/* Compact resource directory and focused article reading. */
.tool-group-actions{display:flex;align-items:center;gap:8px;flex-shrink:0}
.tool-group-actions .group-more{font-size:11px;white-space:nowrap;color:var(--primary)}
#home-tools.curated-tool-groups:not(.list){grid-template-columns:repeat(3,minmax(0,1fr));align-items:start;gap:28px 20px}
@media(max-width:900px){#home-tools.curated-tool-groups:not(.list){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#home-tools.curated-tool-groups:not(.list){grid-template-columns:1fr}.tool-group-actions{gap:12px}}
:root{--bg:#f0f6fc;--ink:#24354b;--muted:#5b6b7e;--line:#e1e9f1;--strong:#6754bd;--lavender:#eeeafa;--radius:16px}
body{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;background-image:none}
h1,h2,h3,.cover-title{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
h1{font-size:30px;font-weight:750;letter-spacing:-1px}h2{font-size:21px;font-weight:750;letter-spacing:-.5px}
.site-header{background:#fff}.topbar{background:#ffffffed}
.intro{padding:32px 0;gap:10px 28px}.intro .eyebrow{color:#6754bd}
.section{padding:28px 0;border-top:0}.section-head{margin-bottom:18px}.section-head>a{max-width:none}
#home-tools.directory-groups:not(.list){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.directory-group{padding:22px;background:#ffffff70;border:1px solid #fff;border-radius:20px;min-width:0}
.group-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:16px}
.group-heading h3{font-size:14px;font-weight:750}.group-heading>a{font-size:11px;color:var(--muted)}
.directory-group .cards.tool-grid{grid-template-columns:1fr;gap:10px}
.tool-card,.cards.list .tool-card,.library-content .cards.list .tool-card{display:grid;grid-template-columns:44px minmax(0,1fr);gap:6px 12px;padding:16px;background:#fff;border:1px solid #e6edf5;border-radius:13px;box-shadow:0 2px 4px #233c5b03}
.tool-card:hover{border-color:#c1b7e6;box-shadow:0 4px 16px #233c5b08}
.tool-logo{grid-column:1;grid-row:1/4;width:44px;height:44px;border-radius:11px;background:#eaf0ff;position:relative;display:flex;align-items:center;justify-content:center;overflow:hidden;color:#6754bd}
.tool-favicon{width:32px;height:32px;object-fit:contain}
.tool-card h3,.tool-card>p,.tool-card>.tags,.tool-card>.card-actions,.tool-card>.link-status{grid-column:2;margin:0}
.tool-card h3{font-size:13px;line-height:1.6;letter-spacing:0;font-weight:750}.tool-card>p{font-size:12px;line-height:1.7}
.tool-card>.tags .tag{font-size:9px;background:transparent;padding:0;color:#788596}
.tool-card .card-top{display:none!important}
.tool-card .card-actions,.cards.list .tool-card .card-actions{grid-column:2;grid-row:auto;padding-top:7px;gap:8px}
.tool-card .card-actions .button{flex:0 1 auto;padding:5px 8px;border:0;background:#f5f7fb;font-size:10px}
.tool-card .pin{padding:5px 8px;font-size:10px;min-height:32px}.tool-card .report{font-size:9px;padding:5px 0;width:auto;margin-left:auto;min-height:32px}
.directory-groups.list{grid-template-columns:1fr}.library-content .cards.tool-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.topic{background:#ffffff80;border-color:#fff}.topic-icon{background:#eae7f7;color:#6754bd}
.card:not(.tool-card){box-shadow:none;border-color:#e3eaf2}
.article-visual.article-cover{height:160px}.cover-title{font-family:'SF Pro Display',-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif}
.quick-box,.quick-box:nth-child(2){padding:18px 20px;border-color:#e3eaf2}
.reader-page{padding-bottom:40px}body:has(.reader-page){background:#fff}
.reader-heading,.reader-meta,.reader-page .article-layout,.reader-page>.section{width:100%;max-width:720px;margin-inline:auto}
.reader-heading{padding-top:40px}.reader-icon{display:flex;align-items:center;justify-content:center;width:42px;height:42px;background:#f0edfb;color:#6754bd;border-radius:12px;margin-bottom:20px}.reader-icon .ui-icon{width:24px;height:24px}
.reader-heading .page-heading{margin:8px 0 0;padding:0}.reader-heading h1{font-size:34px;line-height:1.35;color:#182333}
.reader-heading .page-heading p{font-size:15px;line-height:1.9;margin-top:16px;color:#647185}
.reader-meta{padding:20px 0 24px;border-bottom:1px solid #edf0f4;gap:14px}
.reader-page .article-layout{display:flex;flex-direction:column;gap:24px}
.reader-page .toc{position:static;width:100%;border:0;border-bottom:1px solid #edf0f4;background:transparent;padding:16px 0;border-radius:0;max-height:none}.reader-page .toc summary{font-size:13px}.reader-page .toc a{font-size:12px;padding:8px 0}
.reader-page .article-body{width:100%;max-width:100%;min-width:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.reader-page .article-body p,.reader-page .article-body li{font-size:15px;line-height:1.95;color:#536174}
.reader-page .handbook-body h2{font-size:23px;font-weight:750;margin:38px 0 16px;color:#202d3f}.reader-page .handbook-body h3{font-size:17px;margin:28px 0 12px;color:#202d3f}
.reader-page .handbook-body [data-original-content]>section{margin-bottom:36px;padding-bottom:24px;border-bottom:1px solid #edf0f4}
.reader-page .handbook-body img,.reader-page .handbook-body video{max-width:100%;height:auto;border-radius:12px}
.reader-page .handbook-body .note{background:#f5f6fb;border-color:#aaa0d9}.reader-page>.section{margin-top:32px}.reader-page>.section .cards{grid-template-columns:1fr}
@media(min-width:1500px){.container{max-width:1180px;margin-left:calc(var(--sidebar) + (100% - var(--sidebar) - 1180px)/2)}}
@media(max-width:1100px){#home-tools.directory-groups:not(.list){grid-template-columns:1fr}.library-content .cards.tool-grid{grid-template-columns:1fr}}
@media(max-width:900px){.reader-heading{padding-top:28px}.reader-heading h1{font-size:30px}}
@media(max-width:600px){h1{font-size:25px}.intro{padding:24px 0}.directory-group{padding:16px}.directory-groups{gap:14px}.group-heading{align-items:flex-start}.group-heading h3{font-size:13px}.tool-card,.cards.list .tool-card,.library-content .cards.list .tool-card{padding:14px;grid-template-columns:40px minmax(0,1fr);gap:5px 10px}.tool-logo{width:40px;height:40px}.tool-card h3{font-size:13px}.tool-card>p{font-size:12px}.tool-card .report{margin-left:0}.reader-heading h1{font-size:27px}.reader-heading .page-heading p{font-size:14px}.reader-page .article-body p,.reader-page .article-body li{font-size:14px}.reader-meta{align-items:flex-start}.topic-grid{grid-template-columns:1fr}.reader-page .handbook-body h2{font-size:21px}}
@media print{.reader-heading{padding-top:0}.reader-icon,.reader-meta{display:none}.reader-page .article-layout{display:block}}

/* Centered library: one quiet topbar, no desktop or mobile sidebar. */
:root{--sidebar:0px;--bg:#edf6ff}
.container,.site-footer .container{width:calc(100% - 48px);max-width:1080px;margin-inline:auto}
.topbar{display:block;width:100%;height:auto;min-height:64px;margin:0;padding:0 24px;border-bottom:1px solid #e7edf4;position:sticky;top:0;background:#ffffffed}
.topbar-inner{max-width:1080px;min-height:64px;margin:auto;display:flex;align-items:center;gap:32px}
.topbar .brand{font-size:17px;letter-spacing:-.5px;gap:8px;flex-shrink:0}.topbar .brand-mark{width:25px;height:25px;color:#6754bd}.topbar .brand-sub{font-size:9px;letter-spacing:1.4px;margin-top:2px}
.topbar-tabs{height:64px;gap:24px;flex:1}.topbar-tabs a{font-size:12px;white-space:nowrap}.topbar-actions{gap:16px;flex-shrink:0}
.topbar-saved{display:flex;font-size:12px;gap:6px}.topbar-saved>span:first-child{font-size:16px}.topbar-saved>span:last-child{display:inline-block;font-size:10px;border-radius:5px;background:#f0edf8;padding:1px 5px}
.language-switch button{padding:5px 7px;font-size:10px;min-height:30px}
.intro{display:block;padding:40px 0 24px}.intro h1{font-size:28px;line-height:1.45;max-width:none}.intro>p:not(.eyebrow){max-width:none;font-size:14px;margin-top:7px}
.intro .search-large{max-width:520px;margin:20px 0 0;border-radius:11px;background:#ffffffb8}.search-large input{font-size:12px}
.section{padding:20px 0}.section-head h2{font-size:20px}.section-head>a{font-size:11px}
.tools-section{padding:24px;background:#ffffff70;border:1px solid #fff;border-radius:22px;margin:12px 0 24px}
#home-tools.directory-groups:not(.list){grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.directory-column{display:flex;flex-direction:column;gap:24px;min-width:0}
.home-page .directory-group{background:none;border:0;border-radius:0;padding:0}
.home-page .group-heading{margin-bottom:10px}.home-page .group-heading h3{font-size:11px;color:#64748a;letter-spacing:.6px;font-weight:750}
.home-page .tool-card{padding:13px;gap:4px 10px;grid-template-columns:40px minmax(0,1fr);border:0;box-shadow:0 2px 4px #2e466403}
.home-page .tool-logo{width:40px;height:40px;grid-row:1/3}
.home-page .tool-card h3{font-size:12px}.home-page .tool-card>p{font-size:11px;line-height:1.65}
.home-page .tool-card>.tags,.home-page .tool-card .report,.home-page .tool-card .card-actions>.button{display:none}
.home-page .tool-card .card-actions{padding:0;justify-content:flex-end;margin-top:2px}
.home-page .tool-card .pin{font-size:10px;border:0;background:none;padding:2px 4px;min-height:28px;color:#738099}.home-page .tool-card .pin:hover,.home-page .tool-card .pin[aria-pressed=true]{background:#f0edfb;color:#6754bd}
.knowledge-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.knowledge-group{padding:22px;background:#ffffff70;border:1px solid #fff;border-radius:20px;min-width:0}
.knowledge-group .cards{grid-template-columns:1fr;gap:10px}
.knowledge-group .card{padding:16px;gap:7px;border:0;border-radius:12px}
.knowledge-group .card>.card-top,.knowledge-group .card>.tags,.knowledge-group .card>.meta{display:none}
.knowledge-group .card>.article-visual{display:flex;margin:0 0 6px}
.knowledge-group .card h3{font-size:13px}.knowledge-group .card>p{font-size:12px;line-height:1.75}
.knowledge-group .card-actions{padding-top:4px;justify-content:space-between}.knowledge-group .card-actions .button{flex:none;background:none;border:0;padding:4px 0;font-size:11px;color:#6754bd}.knowledge-group .pin{border:0;padding:4px 6px;font-size:10px;color:#738099}
.site-footer{margin-top:36px;padding:0;background:transparent;border-top:1px solid #dfe9f3}
.site-footer .footer-bottom{display:flex;flex-direction:row;align-items:center;flex-wrap:wrap;padding:22px 0;gap:24px;border:0;font-size:11px;color:#6c7c8f}
.footer-name{margin-right:auto;font-weight:700;color:#34475f}.footer-bottom .text-button{font-size:11px}.footer-bottom .back-top{font-size:11px;margin-left:0}
.reader-page .breadcrumb{max-width:720px;margin-inline:auto}.reader-heading{padding-top:30px}
@media(max-width:900px){.topbar-inner{gap:20px}.topbar-tabs{gap:18px}.topbar-actions{gap:10px}.topbar-saved{font-size:11px}.topbar-tabs a{font-size:11px}#home-tools.directory-groups:not(.list){grid-template-columns:repeat(2,minmax(0,1fr))}.directory-column:last-child{grid-column:1/-1;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}}
@media(max-width:600px){.container,.site-footer .container{width:calc(100% - 32px);margin-inline:auto}.topbar{padding:0 16px}.topbar-inner{min-height:60px;flex-wrap:wrap;gap:0;justify-content:space-between}.topbar .brand{font-size:16px}.topbar-actions{margin-left:auto;gap:12px}.topbar-saved{display:flex;font-size:11px}.topbar-tabs{flex:0 0 100%;order:3;height:44px;gap:0;justify-content:space-between}.topbar-tabs a{font-size:11px}.intro{padding:26px 0 18px}.intro h1{font-size:24px}.intro>p:not(.eyebrow){font-size:12px}.intro .search-large{margin-top:17px}.tools-section{padding:16px;border-radius:18px}.section-head{gap:12px}.section-head h2{font-size:18px}.section-head>a{max-width:110px}.knowledge-groups{grid-template-columns:1fr}.knowledge-group{padding:16px}.site-footer .footer-bottom{gap:16px;padding:20px 0}.footer-name{flex-basis:100%;margin:0}.site-footer{margin-top:24px}}
@media(max-width:420px){#home-tools.directory-groups:not(.list){grid-template-columns:1fr}.directory-column:last-child{grid-column:auto;display:flex;gap:24px}.topbar-actions{gap:8px}.topbar .brand-mark{width:22px;height:22px}.home-page .tool-card h3{font-size:13px}.home-page .tool-card>p{font-size:12px}}
@media print{.topbar{display:none}.container{max-width:none;width:100%;margin:0}}

/* Use the installed SF Pro Display family without downloading font binaries. */
@font-face{font-family:'SF Pro Display';src:local('SF Pro Display'),local('SFProDisplay-Regular');font-style:normal;font-weight:400;font-display:swap}
@font-face{font-family:'SF Pro Display';src:local('SF Pro Display Medium'),local('SFProDisplay-Medium');font-style:normal;font-weight:500;font-display:swap}
@font-face{font-family:'SF Pro Display';src:local('SF Pro Display Semibold'),local('SFProDisplay-Semibold');font-style:normal;font-weight:600;font-display:swap}
@font-face{font-family:'SF Pro Display';src:local('SF Pro Display Bold'),local('SFProDisplay-Bold');font-style:normal;font-weight:700 800;font-display:swap}
.creative-link{display:inline-flex;align-items:center;gap:7px;white-space:nowrap;font-size:12px;font-weight:600;color:#6754bd;border:1px solid #e4def5;border-radius:8px;padding:7px 10px;background:#f6f3fd}
.creative-link:hover{background:#eee8fa;border-color:#c9bce9}
a.tool-card{cursor:pointer;color:var(--ink)}a.tool-card:hover .tool-title-line{color:var(--strong)}
.home-page a.tool-card{padding-block:15px}.home-page a.tool-card .tool-logo{grid-row:1/3}
@media(max-width:600px){.creative-link{font-size:11px;padding:6px 8px}.topbar-actions{gap:8px}}

.theme-toggle{width:34px;height:34px;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink)}
.theme-toggle:hover{border-color:var(--strong);background:var(--lavender)}.theme-toggle svg{width:18px;height:18px}.theme-sun{display:none}
html[data-theme=dark]{color-scheme:dark;--bg:#050505;--surface:#151515;--soft:#1b1b1d;--ink:#f0f0f2;--muted:#a3a3ab;--line:#2a2a2f;--strong:#a89afa;--lavender:#23202f}
html[data-theme=light]{color-scheme:light}
html[data-theme=dark] .theme-moon{display:none}html[data-theme=dark] .theme-sun{display:block}
html[data-theme=dark] body,html[data-theme=dark] body:has(.reader-page){background:#050505;color:var(--ink)}
html[data-theme=dark] .topbar{background:#090909ed;border-color:#242426}
html[data-theme=dark] .topbar-tabs a{color:#a3a3ab}html[data-theme=dark] .topbar-tabs a[aria-current=page]{color:#f0f0f2;border-color:#a89afa}
html[data-theme=dark] .brand-mark,html[data-theme=dark] .brand-sub{color:#a89afa}
html[data-theme=dark] .tools-section,html[data-theme=dark] .knowledge-group,html[data-theme=dark] .directory-group{background:#101011;border-color:#252528}
html[data-theme=dark] .home-page .directory-group{background:transparent;border:0}
html[data-theme=dark] .card,html[data-theme=dark] .home-page .tool-card,html[data-theme=dark] .knowledge-group .card,html[data-theme=dark] .quick-box,html[data-theme=dark] .filters,html[data-theme=dark] .progress-box,html[data-theme=dark] .check-group,html[data-theme=dark] .empty{background:#19191b;border-color:#2b2b30;box-shadow:none}
html[data-theme=dark] .card:hover{border-color:#65589a;background:#1f1e24}
html[data-theme=dark] .tool-logo,html[data-theme=dark] .reader-icon{background:#252132;color:#b1a4fa}
html[data-theme=dark] .card p,html[data-theme=dark] .muted,html[data-theme=dark] .page-heading p,html[data-theme=dark] .intro>p,html[data-theme=dark] .section-head p,html[data-theme=dark] .section-head>a,html[data-theme=dark] .group-heading h3,html[data-theme=dark] .home-page .group-heading h3,html[data-theme=dark] .breadcrumb{color:#a3a3ab}
html[data-theme=dark] .search-large,html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#19191b;border-color:#34343a;color:#f0f0f2}
html[data-theme=dark] input::placeholder{color:#8f8f99}
html[data-theme=dark] .button,html[data-theme=dark] .pin,html[data-theme=dark] .chip,html[data-theme=dark] .language-switch,html[data-theme=dark] .view-switch{background:#202023;border-color:#35353b;color:#c0bbcF}
html[data-theme=dark] .language-switch button{color:#aaa7b3}html[data-theme=dark] .language-switch button[aria-pressed=true],html[data-theme=dark] .view-switch button[aria-pressed=true]{background:#35323f;color:#fff}
html[data-theme=dark] .primary,html[data-theme=dark] .chip[aria-pressed=true]{background:#b1a4fa;color:#141019;border-color:#b1a4fa}
html[data-theme=dark] .creative-link{background:#211d2e;color:#b9adff;border-color:#3d3455}html[data-theme=dark] .creative-link:hover{background:#30273f}
html[data-theme=dark] .label,html[data-theme=dark] .tag{background:#28272d;color:#b6b0c5}
html[data-theme=dark] .knowledge-group .card-actions .button,html[data-theme=dark] .knowledge-group .pin{background:none;color:#b1a4fa}
html[data-theme=dark] .reader-heading h1,html[data-theme=dark] .handbook-body h2,html[data-theme=dark] .handbook-body h3{color:#f0f0f2}
html[data-theme=dark] .reader-page .article-body{background:transparent}
html[data-theme=dark] .reader-page .article-body p,html[data-theme=dark] .reader-page .article-body li{color:#b8b8c1}
html[data-theme=dark] .reader-meta,html[data-theme=dark] .toc,html[data-theme=dark] .reader-page .handbook-body [data-original-content]>section{border-color:#29292d;background:transparent}
html[data-theme=dark] .handbook-body .note,html[data-theme=dark] .handbook-body .demo,html[data-theme=dark] .handbook-body .box,html[data-theme=dark] .handbook-related,html[data-theme=dark] .notice,html[data-theme=dark] .handbook-body pre,html[data-theme=dark] .handbook-body code{background:#1c1925;color:#c4bbdc;border-color:#57466e}
html[data-theme=dark] .handbook-body .audit{background:#272116;border-color:#927443}
html[data-theme=dark] .handbook-body th{background:#23202c;color:#d2c8e8}html[data-theme=dark] .handbook-body td,html[data-theme=dark] .handbook-body th,html[data-theme=dark] .tablewrap{border-color:#343039}
html[data-theme=dark] .handbook-body .grid{background:#18151f}html[data-theme=dark] .handbook-body .grid span{background:#352c47;color:#dbd1ed;border-color:#5a4879}
html[data-theme=dark] .handbook-body a{color:#b9adff}
html[data-theme=dark] .site-footer{border-color:#252528}html[data-theme=dark] .footer-name,html[data-theme=dark] .site-footer .footer-bottom{color:#a3a3ab}
html[data-theme=dark] dialog{background:#151515;color:#f0f0f2;border-color:#34343a}
@media(max-width:600px){.theme-toggle{width:30px;height:30px}.topbar-actions{gap:7px}}
@media print{html[data-theme=dark] body,html[data-theme=dark] body:has(.reader-page){background:white;color:black}html[data-theme=dark] .reader-page .article-body p,html[data-theme=dark] .reader-page .article-body li,html[data-theme=dark] .handbook-body h2,html[data-theme=dark] .handbook-body h3{color:black}}

/* Imported Notion content follows the same centered reading layout. */
.category-chips{margin:0 0 20px}.category-more{display:flex;justify-content:space-between;gap:10px;margin-top:16px;font-size:11px;color:var(--strong)}
.notion-columns{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.notion-columns>*{min-width:0}
.handbook-body figure{margin:24px 0}.handbook-body figure img{display:block;max-width:100%;height:auto;margin:auto}.handbook-body figcaption{font-size:12px;line-height:1.7;color:var(--muted);margin-top:10px}
.handbook-body blockquote{margin:20px 0;padding:12px 20px;border-left:3px solid var(--strong);color:var(--muted)}
.handbook-body hr{border:0;border-top:1px solid var(--line);margin:28px 0}.notion-reference{overflow-wrap:anywhere}
.article-body .note{overflow-wrap:anywhere}.reader-page .toc:not(:has(a)){display:none}
.card h3,.card>p,.card .muted{overflow-wrap:anywhere}.filters select{min-width:0;max-width:100%}
@media(max-width:600px){.notion-columns{grid-template-columns:1fr}.category-chips{gap:6px}.category-chips .chip{font-size:10px;padding:5px 9px}.knowledge-group .category-more{font-size:11px}}

/* Portfolio identity: white PDL mark on a dark tile in both themes. */
.topbar .brand-mark{width:32px;height:32px;background:#050505;border-radius:7px;overflow:hidden;flex-shrink:0}
.topbar .brand-mark img{display:block;width:100%;height:100%;object-fit:contain}

/* Semantic palette: portfolio blue, quiet violet, neutral reading surfaces. */
:root,html[data-theme=light]{
 --primary:#2457d6;--primary-hover:#1945b5;--primary-soft:#e9effc;--on-primary:#fff;
 --secondary:#69598b;--secondary-soft:#eeeaf5;
 --neutral-bg:#f3f3f0;--neutral-panel:#eaeae6;--neutral-surface:#fafaf7;--neutral-hover:#f0f1ed;
 --neutral-ink:#272a30;--neutral-body:#494e56;--neutral-muted:#626872;--neutral-line:#d9dcd6;
 --bg:var(--neutral-bg);--surface:var(--neutral-surface);--soft:var(--neutral-panel);--ink:var(--neutral-ink);--muted:var(--neutral-muted);--line:var(--neutral-line);--strong:var(--primary);--lavender:var(--secondary-soft);
 --topbar-bg:#fafaf7f2;--focus:#2457d6;
}
html[data-theme=dark]{
 --primary:#8eaeff;--primary-hover:#b1c6ff;--primary-soft:#18243e;--on-primary:#0d162b;
 --secondary:#b6acd5;--secondary-soft:#282432;
 --neutral-bg:#050505;--neutral-panel:#111111;--neutral-surface:#1b1b1b;--neutral-hover:#262626;
 --neutral-ink:#efeeec;--neutral-body:#cecece;--neutral-muted:#a7a7ad;--neutral-line:#333335;
 --bg:var(--neutral-bg);--surface:var(--neutral-surface);--soft:var(--neutral-panel);--ink:var(--neutral-ink);--muted:var(--neutral-muted);--line:var(--neutral-line);--strong:var(--primary);--lavender:var(--secondary-soft);
 --topbar-bg:#0d0d0df2;--focus:#8eaeff;
}
html[data-theme] body,html[data-theme] body:has(.reader-page){background:var(--bg);color:var(--ink)}
html[data-theme] .topbar{background:var(--topbar-bg);border-color:var(--line)}
html[data-theme] :is(.tools-section,.knowledge-group,.directory-group){background:var(--soft);border-color:var(--line)}
html[data-theme] .home-page .directory-group{background:transparent;border:0}
html[data-theme] :is(.card,.home-page .tool-card,.knowledge-group .card,.quick-box,.filters,.progress-box,.check-group,.empty,dialog){background:var(--surface);border-color:var(--line);box-shadow:none}
html[data-theme] .card:hover{background:var(--neutral-hover);border-color:var(--secondary)}
html[data-theme] :is(h1,h2,h3,.reader-heading h1,.handbook-body h2,.handbook-body h3){color:var(--ink)}
html[data-theme] :is(.card p,.page-heading p,.intro>p,.reader-page .article-body p,.reader-page .article-body li){color:var(--neutral-body)}
html[data-theme] :is(.muted,.section-head p,.section-head>a,.group-heading h3,.home-page .group-heading h3,.breadcrumb,.reader-meta,.footer-name,.site-footer .footer-bottom,.topbar-tabs a){color:var(--muted)}
html[data-theme] :is(.tool-logo,.reader-icon,.topic-icon){background:var(--secondary-soft);color:var(--secondary)}
html[data-theme] :is(.search-large,input,select,textarea){background:var(--surface);border-color:var(--line);color:var(--ink)}
html[data-theme] input::placeholder{color:var(--muted)}
html[data-theme] :is(.button,.pin,.chip,.language-switch,.view-switch,.theme-toggle){background:var(--surface);border-color:var(--line);color:var(--neutral-body)}
html[data-theme] :is(.primary,.chip[aria-pressed=true]){background:var(--primary);border-color:var(--primary);color:var(--on-primary)}
html[data-theme] .primary:hover{background:var(--primary-hover)}
html[data-theme] :is(.creative-link,.label,.tag){background:var(--secondary-soft);color:var(--secondary);border-color:var(--line)}
html[data-theme] .creative-link:hover{background:var(--neutral-hover);border-color:var(--secondary)}
html[data-theme] :is(.language-switch button,.view-switch button){color:var(--muted)}
html[data-theme] :is(.language-switch button[aria-pressed=true],.view-switch button[aria-pressed=true]){background:var(--secondary-soft);color:var(--ink)}
html[data-theme] .topbar-tabs a[aria-current=page]{color:var(--primary);border-color:var(--primary)}
html[data-theme] :is(.knowledge-group .card-actions .button,.knowledge-group .pin,.handbook-body a,.category-more,.intro .eyebrow){color:var(--primary)}
html[data-theme] .knowledge-group .card-actions .button{background:transparent}
html[data-theme] :is(.reader-meta,.toc,.site-footer,.tablewrap,.handbook-body td,.handbook-body th){border-color:var(--line)}
html[data-theme] :is(.handbook-body .note,.handbook-body .demo,.handbook-body .box,.handbook-related,.notice,.handbook-body pre,.handbook-body code,.handbook-body th){background:var(--secondary-soft);color:var(--neutral-body);border-color:var(--line)}
html[data-theme] .reader-page .article-body{background:transparent}
html[data-theme] :is(a,button,input,select,textarea):focus-visible{outline:2px solid var(--focus);outline-offset:3px}
@media print{html[data-theme] body,html[data-theme] body:has(.reader-page){background:#fff;color:#000}}

/* Apple-inspired light palette: cool gray canvas, white cards, blue actions. */
html[data-theme=light]{
 --primary:#0071e3;--primary-hover:#0062c4;--primary-soft:#eaf3fc;--on-primary:#fff;
 --secondary:#515154;--secondary-soft:#ececef;
 --neutral-bg:#f5f5f7;--neutral-panel:#ededf0;--neutral-surface:#fff;--neutral-hover:#fafafa;
 --neutral-ink:#1d1d1f;--neutral-body:#424245;--neutral-muted:#6e6e73;--neutral-line:#d2d2d7;
 --topbar-bg:#ffffffed;--focus:#0071e3;
}
html[data-theme=light] :is(.tools-section,.knowledge-group){background:var(--bg);border-color:transparent}
html[data-theme=light] .tool-logo,html[data-theme=light] .reader-icon,html[data-theme=light] .topic-icon{background:var(--primary-soft);color:var(--primary)}
html[data-theme=light] .creative-link{background:var(--primary-soft);color:var(--primary);border-color:transparent}
html[data-theme=light] .creative-link:hover{background:#dcecfb}
html[data-theme=light] :is(.label,.tag){background:var(--secondary-soft);color:var(--secondary)}
html[data-theme=light] .card:hover{border-color:#b7b7bd}
html[data-theme=light] body:has(.reader-page){background:var(--surface)}
html[data-theme=light] :is(.handbook-body .note,.handbook-body .demo,.handbook-body .box,.handbook-related,.notice,.handbook-body pre,.handbook-body code,.handbook-body th){background:var(--bg);color:var(--neutral-body)}

/* Keep one enclosing frame for tools, with category headings inside. */
html[data-theme=light] .tools-section{background:var(--neutral-panel);border:1px solid #dedee3}
html[data-theme=dark] .tools-section{background:var(--neutral-panel);border:1px solid var(--line)}
html[data-theme] .tools-section .directory-group{background:transparent;border:0;padding:0}

/* Quiet frames and a moving highlight around interactive cards. */
html[data-theme] .knowledge-group{background:var(--neutral-panel);border:1px solid color-mix(in srgb,var(--line) 45%,transparent)}
html[data-theme] :is(.card,.tools-section){border-color:color-mix(in srgb,var(--line) 45%,transparent)}
.article-card{color:var(--ink);cursor:pointer}
.article-card:hover{color:var(--ink)}
@property --edge-angle{syntax:'<angle>';initial-value:0deg;inherits:false}
:is(.article-card,.tool-card){position:relative;isolation:isolate}
:is(.article-card,.tool-card)::after{content:'';position:absolute;inset:0;border-radius:inherit;padding:1px;pointer-events:none;background:conic-gradient(from var(--edge-angle),transparent 0deg 220deg,var(--primary) 285deg,transparent 360deg);mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);mask-composite:exclude;opacity:0;transition:opacity .25s}
:is(.article-card,.tool-card):is(:hover,:focus-visible)::after{opacity:1;animation:card-edge 3s linear infinite}
@keyframes card-edge{to{--edge-angle:360deg}}
@media(prefers-reduced-motion:reduce){:is(.article-card,.tool-card):is(:hover,:focus-visible)::after{animation:none;background:var(--primary)}}

/* Cards use surface contrast instead of a static outline. */
html[data-theme] .cards .card,
html[data-theme] .cards .card:hover,
html[data-theme] .checklist-layout .check-group,
html[data-theme] .checklist-layout .progress-box{border:0;box-shadow:none}

/* Home sections share the page container without enclosing frames. */
html[data-theme] .home-page .tools-section{background:transparent;border:0;border-radius:0;padding:20px 0;margin:12px 0 24px;width:100%}
html[data-theme] .home-page .knowledge-group{background:transparent;border:0;border-radius:0;padding:0;min-width:0}
.home-page .knowledge-section,.home-page .knowledge-groups,.home-page #home-tools{width:100%}
.home-page .knowledge-groups{gap:28px 24px}
@media(max-width:600px){.home-page .knowledge-groups{gap:28px}}

/* Neutral scale and borderless controls. */
:root{--neutral-0:#fff;--neutral-50:#fafafa;--neutral-100:#f5f5f7;--neutral-200:#e8e8ed;--neutral-300:#d2d2d7;--neutral-400:#aeaeb2;--neutral-500:#8e8e93;--neutral-600:#6e6e73;--neutral-700:#48484a;--neutral-800:#2c2c2e;--neutral-900:#1d1d1f}
html[data-theme=light]{--control-bg:var(--neutral-200);--control-active:var(--neutral-0)}
html[data-theme=dark]{--control-bg:var(--neutral-800);--control-active:var(--neutral-700)}
html[data-theme] :is(input:not([type=checkbox]),select,textarea,.search-large,.header-search,.filters,.sort,.button,.chip,.pin,.theme-toggle,.language-switch,.view-switch,.creative-link){border:0;box-shadow:none}
html[data-theme] :is(input:not([type=checkbox]),select,textarea,.search-large,.header-search,.sort){background:var(--control-bg);color:var(--ink)}
html[data-theme] .search-large input{background:transparent}
html[data-theme] .filters{background:var(--surface)}
html[data-theme] :is(.language-switch button[aria-pressed=true],.view-switch button[aria-pressed=true]){background:var(--control-active)}
html[data-theme] .card{border:0;box-shadow:none}
.article-card>p{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;min-width:0}
/* Light articles retain a white reading canvas. Dark uses the site palette. */
html[data-theme] body:has(.reader-page){background:var(--bg)}
html[data-theme=light] .reader-page{--bg:var(--neutral-0);--surface:var(--neutral-0);--ink:var(--neutral-900);--neutral-body:var(--neutral-700);--muted:var(--neutral-600);--neutral-muted:var(--neutral-600);--line:var(--neutral-200);--primary:#0071e3;--strong:#0071e3;--secondary-soft:var(--neutral-100);--neutral-ink:var(--neutral-900);--control-bg:var(--neutral-100)}
html[data-theme] .reader-page :is(.toc,.reader-meta,.article-body){border:0}
html[data-theme] .reader-page .handbook-body [data-original-content]>section{background:transparent;border:0}
html[data-theme] .reader-page .article-body :is(p,li){color:var(--neutral-body)}
html[data-theme] .reader-page .handbook-body a{color:var(--primary)}
html[data-theme=light] body:has(.reader-page) .site-footer{color:var(--neutral-600);--muted:var(--neutral-600);--neutral-muted:var(--neutral-600)}
main.container{padding-top:20px}
@media(max-width:600px){main.container{width:calc(100% - 40px);padding-top:28px}.intro{padding-top:12px}.page-heading{margin-top:20px}.reader-heading{padding-top:24px}.topbar{padding-inline:20px}.topbar-tabs{gap:12px;overflow-x:auto}.topbar-tabs a{flex-shrink:0}.reader-heading h1{font-size:28px}.reader-page .breadcrumb{padding-top:4px}}
@media(max-width:360px){.topbar .brand{font-size:14px}.topbar-actions{gap:5px}.creative-link{padding:6px;font-size:10px}.topbar-tabs a{font-size:10px}}

/* Radius hierarchy: sections 20, cards 16, fields 10, small controls 8. */
:root{--radius-lg:20px;--radius-card:16px;--radius-field:10px;--radius-small:8px}
html[data-theme] :is(.card,.home-page .tool-card,.knowledge-group .card,.quick-box,.check-group){border-radius:var(--radius-card)}
html[data-theme] :is(.filters,.progress-box,dialog){border-radius:var(--radius-lg)}
html[data-theme] :is(input:not([type=checkbox]),select,textarea,.search-large,.header-search){border-radius:var(--radius-field)}
html[data-theme] :is(.button,.chip,.pin,.theme-toggle,.language-switch,.view-switch,.creative-link,.tool-logo,.reader-icon){border-radius:var(--radius-small)}
html[data-theme] .article-cover{border-radius:var(--radius-field)}
html[data-theme=light] .intro .search-large{background:var(--neutral-0)}
html[data-theme=light] :is(.filters input,.filters select,.filters textarea,.sort){background:var(--neutral-100)}
html[data-theme] .preferences-frame{display:flex;align-items:center;gap:4px;padding:4px;background:var(--control-bg);border-radius:var(--radius-field)}
html[data-theme=light] .preferences-frame{background:var(--neutral-100)}
html[data-theme] .preferences-frame :is(.language-switch,.theme-toggle){background:transparent;border:0}
html[data-theme] .preferences-frame .language-switch button[aria-pressed=true]{background:var(--control-active);border-radius:var(--radius-small)}
html[data-theme] .creative-link,html[data-theme] .creative-link:hover{background:transparent;border:0;color:var(--primary);padding:7px 4px;border-radius:var(--radius-small)}
html[data-theme] .creative-link:hover{text-decoration:underline;text-underline-offset:4px}
.knowledge-group .cards{gap:16px}
@media(max-width:600px){.knowledge-group .cards{gap:12px}.preferences-frame{gap:2px;padding:3px}.topbar-actions{gap:8px}.preferences-frame .theme-toggle{width:28px;height:28px}.preferences-frame .language-switch button{padding:4px 5px;min-height:28px}.creative-link{font-size:11px}}
@media(max-width:360px){.topbar-actions{gap:4px}.topbar .brand{gap:5px}.topbar .brand-mark{width:24px;height:24px}.creative-link{font-size:10px}}

/* Separate language and theme frames, spaced by 8px. */
html[data-theme] .preferences-frame{gap:8px;padding:0;background:transparent;border-radius:0}
html[data-theme] .preferences-frame .language-switch{background:var(--control-bg);padding:4px;border-radius:var(--radius-field)}
html[data-theme] .preferences-frame .theme-toggle{background:var(--control-bg);width:38px;height:38px;border-radius:var(--radius-field)}
html[data-theme=light] .preferences-frame :is(.language-switch,.theme-toggle){background:var(--neutral-100)}
@media(max-width:600px){html[data-theme] .preferences-frame .language-switch{padding:3px}html[data-theme] .preferences-frame .theme-toggle{width:34px;height:34px}}

/* Readable category labels and a distinct card-title level. */
html[data-theme] :is(.group-heading h3,.home-page .group-heading h3){font-size:14px;line-height:1.5;letter-spacing:0;color:var(--muted)}
.group-count{font-size:12px;line-height:1.5;color:var(--muted);white-space:nowrap;font-weight:400}
html[data-theme] :is(.knowledge-group .card h3,.home-page .tool-card h3,.card h3){font-size:15px;line-height:1.5}
html[data-theme] :is(.knowledge-group .card>p,.home-page .tool-card>p){font-size:13px;line-height:1.7}
html[data-theme] .category-more{font-size:13px;justify-content:flex-start}
html[data-theme] :is(.category-chips .chip,.chip){font-size:12px}
@media(max-width:600px){html[data-theme] :is(.knowledge-group .card h3,.home-page .tool-card h3){font-size:14px}.group-count{font-size:12px}}

/* Calm cards, smaller titles, and more breathing room below navigation. */
:is(.article-card,.tool-card)::after{display:none;animation:none}
html[data-theme] :is(.card h3,.knowledge-group .card h3){font-size:13px;line-height:1.6}
html[data-theme] .home-page .tool-card h3{font-size:12px}
html[data-theme] .article-card>p,html[data-theme] .tool-card>p{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}
html[data-theme] .card-actions :is(.button,.pin){border:1px solid color-mix(in srgb,var(--neutral-400) 35%,transparent);background:var(--surface)}
@media(max-width:1024px){main.container{padding-top:36px}}
@media(max-width:600px){main.container{padding-top:56px}.intro{padding-top:12px}html[data-theme] .home-page .tool-card h3{font-size:13px}}

/* Mobile-only tool category disclosure. */
.category-toggle{display:none}
@media(max-width:600px){.category-toggle{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;padding:8px;border:0;border-radius:var(--radius-small);background:var(--surface);color:var(--muted);flex-shrink:0}.category-toggle svg{width:20px;height:20px;transition:transform .2s}.category-toggle[aria-expanded=false] svg{transform:rotate(180deg)}.home-page .directory-group.is-collapsed .tool-grid{display:none}.home-page .group-heading{margin-bottom:12px;min-height:36px}}
@media(prefers-reduced-motion:reduce){.category-toggle svg{transition:none}}

/* Consistent spacing between tools within each category. */
.directory-group .cards.tool-grid{gap:12px}

/* Compact, frameless category arrow aligned with its title. */
@media(max-width:600px){.category-toggle{width:21px;height:21px;padding:2px;background:transparent;border-radius:0}.category-toggle svg{width:16px;height:16px}.home-page .group-heading{min-height:21px;align-items:center}}

/* Legible sorting label and a distinct neutral selector. */
html[data-theme] .library-content .toolbar>label{color:var(--ink);font-size:12px;font-weight:500;display:flex;align-items:center;gap:8px}
html[data-theme=light] .library-content .sort{background:var(--neutral-200);color:var(--neutral-900)}
html[data-theme=dark] .library-content .sort{background:var(--neutral-800);color:#efeeec}
html[data-theme] .library-content .sort{font-size:12px;font-weight:500;padding:9px 12px;border:0;border-radius:var(--radius-field)}
html[data-theme] .library-content .sort:hover{background:var(--control-active)}

/* Give mobile navigation breathing room, including the device safe area. */
@media screen and (max-width:600px){
  .topbar{padding-top:calc(12px + env(safe-area-inset-top, 0px))}
  .topbar-inner{row-gap:8px}
}

/* Notion article covers preserve the source composition. */
.article-visual.notion-cover{height:160px;padding:0;overflow:hidden;background:var(--color-surface,#f5f5f7)}
.notion-cover img{display:block;width:100%;height:100%;object-fit:cover;object-position:center}

/* Knowledge: two full-width categories, six cards per category. */
.home-page .knowledge-groups{grid-template-columns:minmax(0,1fr);gap:36px}
.home-page .knowledge-group .cards{grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.home-page .knowledge-group .group-heading{margin-bottom:16px;align-items:center}
html[data-theme] .home-page .knowledge-group .group-heading h3{font-size:14px;line-height:1.5;letter-spacing:0;color:var(--muted);font-weight:750}
.home-page .knowledge-group .group-more{font-size:13px;color:var(--primary);white-space:nowrap}
.home-page .knowledge-group .card{padding:12px;gap:8px;min-width:0;align-content:start}
.home-page .knowledge-group .article-visual{width:100%;height:auto;aspect-ratio:8/5;margin:0 0 4px;border-radius:10px}
.home-page .knowledge-group .article-visual img{width:100%;height:100%;object-fit:cover}
html[data-theme] .home-page .knowledge-group .card h3{font-size:14px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.home-page .knowledge-group .cover-title{font-size:clamp(22px,2.8vw,34px)}
@media(max-width:900px){.home-page .knowledge-group .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}}
@media(max-width:600px){.home-page .knowledge-group .cards{grid-template-columns:minmax(0,1fr);gap:16px}.home-page .knowledge-groups{gap:28px}.home-page .knowledge-group .cover-title{font-size:32px}}

/* Related articles use the home card dimensions and a two-column row. */
.reader-page>.related-articles{width:calc((100% - 40px) * 2 / 3 + 20px);max-width:none}
.reader-page>.related-articles .cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
.reader-page .related-articles .article-card{padding:12px;gap:8px;min-width:0;align-content:start}
.reader-page .related-articles .article-visual{width:100%;height:auto;aspect-ratio:8/5;margin:0 0 4px;border-radius:10px}
.reader-page .related-articles .article-visual img{width:100%;height:100%;object-fit:cover}
.reader-page .related-articles .card :is(.card-top,.tags,.meta){display:none}
html[data-theme] .reader-page .related-articles .card h3{font-size:14px;line-height:1.5;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.reader-page .related-articles .cover-title{font-size:clamp(22px,2.8vw,34px)}
@media(max-width:900px){.reader-page>.related-articles{width:100%}.reader-page>.related-articles .cards{gap:16px}}
@media(max-width:600px){.reader-page>.related-articles .cards{grid-template-columns:minmax(0,1fr)}.reader-page .related-articles .cover-title{font-size:32px}}

/* Floating surfaces share field corners and elevation, without an outline. */
:root{--popup-shadow:0 8px 28px rgb(20 24 40 / 14%)}
html[data-theme=dark]{--popup-shadow:0 8px 28px rgb(0 0 0 / 48%)}
.select-field{display:inline-block;position:relative;min-width:0;max-width:100%;vertical-align:middle}
.filters .select-field{display:block;width:100%;grid-column:1/-1}
.select-native{display:none}
html[data-theme] .select-trigger{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:9px;border:0;border-radius:var(--radius-field);background:var(--control-bg);color:var(--ink);font:inherit;font-size:12px;text-align:left;cursor:pointer}
html[data-theme=light] .select-trigger{background:var(--neutral-100)}
.select-trigger::after{content:'';width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(45deg);margin:0 3px 3px;flex-shrink:0}
html[data-theme] .select-popup{position:fixed;margin:0;padding:5px;border:0;border-radius:var(--radius-field);background:var(--surface);color:var(--ink);box-shadow:var(--popup-shadow);overflow:auto;overscroll-behavior:contain}
.select-option{display:block;width:100%;border:0;border-radius:calc(var(--radius-field) - 5px);padding:9px 10px;background:transparent;color:inherit;text-align:left;font:inherit;font-size:12px;cursor:pointer}
.select-option:is(:hover,:focus-visible),.select-option[aria-selected=true]{background:var(--control-bg);color:var(--primary)}
.select-option:focus-visible{outline:2px solid var(--focus);outline-offset:-2px}
html[data-theme] dialog{border:0;box-shadow:var(--popup-shadow)}

/* Compact sorting surface: quiet label, field as the primary control. */
html[data-theme] .library-content .toolbar>.sort-frame{
  display:inline-flex;
  align-items:center;
  flex-wrap:nowrap;
  padding:4px 4px 4px 12px;
  gap:8px;
  background:var(--surface);
  color:var(--muted);
  font-size:11px;
  font-weight:400;
  white-space:nowrap;
  border:0;
  border-radius:14px;
  box-shadow:none;
  max-width:100%;
  margin-left:auto;
}
html[data-theme] .sort-frame .select-trigger{
  font-weight:500;
  min-height:36px;
  padding:7px 10px;
  gap:12px;
  line-height:22px;
}
.sort-frame .select-field{min-width:0}
.home-page .group-heading .group-next{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;flex:0 0 auto;border-radius:7px;color:var(--secondary);line-height:1}
.home-page .group-heading .group-next .ui-arrow{width:16px;height:16px;vertical-align:middle}
.home-page .group-heading .group-next:hover{color:var(--primary);background:var(--secondary-soft)}
.home-page .group-heading .group-next:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
@media(max-width:600px){
 .home-page .tools-section .group-heading{justify-content:flex-start;gap:0}
 .home-page .tools-section .group-heading h3{min-width:0}
 .home-page .tools-section .tool-group-actions{display:contents}
 .home-page .tools-section .category-toggle{margin-left:auto}
}
#home-tools.directory-groups.curated-tool-groups:not(.list){grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 20px}
@media(max-width:900px){#home-tools.directory-groups.curated-tool-groups:not(.list){grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){#home-tools.directory-groups.curated-tool-groups:not(.list){grid-template-columns:1fr}}
@media(max-width:600px){
  html[data-theme] .library-content .toolbar>.sort-frame{gap:6px;padding-left:10px}
  html[data-theme] .sort-frame .select-trigger{font-size:11px;padding-inline:8px;gap:8px}
}

/* Complete dark palette, including reading examples and interaction states. */
@media screen{
 html[data-theme=dark]{
  --neutral-bg:#101113;--neutral-panel:#181a1e;--neutral-surface:#202226;--neutral-hover:#292c31;
  --neutral-ink:#f1f2f4;--neutral-body:#cdd0d7;--neutral-muted:#a9afb9;--neutral-line:#41464f;
  --secondary:#b8bdc8;--secondary-soft:#292c33;--control-bg:#2b2e34;--control-active:#414650;
  --topbar-bg:#15171af5;
 }
 html[data-theme=dark] :is(.filters label,.toc a,.card .meta,.toolbar p,.section-desc,.check-row,.structure-list li,.flow,.handbook-body .small,.handbook-body .article-origin,.handbook-body .diagram small){color:var(--neutral-body)}
 html[data-theme=dark] :is(.tool-card>.tags .tag,.check-row:has(input:checked) span,.handbook-body .check input:checked+span){color:var(--muted)}
 html[data-theme=dark] :is(.button,.pin,.chip,.theme-toggle):hover{background:var(--neutral-hover);color:var(--ink)}
 html[data-theme=dark] :is(.primary,.chip[aria-pressed=true]):hover{background:var(--primary-hover);color:var(--on-primary)}
 html[data-theme=dark] .pin[aria-pressed=true]{background:var(--primary-soft);color:var(--primary);border-color:var(--primary)}
 html[data-theme=dark] :is(.language-switch button,.view-switch button):hover{color:var(--ink)}
 html[data-theme=dark] .topbar-tabs a:hover{color:var(--ink)}
 html[data-theme=dark] :is(input,textarea)::placeholder{color:var(--muted);opacity:1}
 html[data-theme=dark] :is(.filters input,.select-trigger,.search-large,textarea){border:1px solid var(--line)}
 html[data-theme=dark] .search-large input{border:0}
 html[data-theme=dark] .select-popup{border:1px solid var(--line)}
 html[data-theme=dark] .select-option:is(:hover,:focus-visible),html[data-theme=dark] .select-option[aria-selected=true]{background:var(--control-bg);color:var(--primary)}
 html[data-theme=dark] .home-page .tool-logo{background:var(--neutral-panel)}
 html[data-theme=dark] .home-page .tool-card>p{color:var(--muted)}
 html[data-theme=dark] .home-page .group-heading .group-next{color:var(--muted)}
 html[data-theme=dark] .home-page .group-heading .group-next:hover{color:var(--primary)}
 html[data-theme=dark] .notion-cover{background:var(--soft)}
 html[data-theme=dark] .reader-page .article-body :is(p,li){color:var(--neutral-body)}
 html[data-theme=dark] :is(.handbook-body .audit,.handbook-body .grid,.handbook-body .diagram>div,.flow,.structure-list article){background:var(--soft);color:var(--neutral-body);border-color:var(--line)}
 html[data-theme=dark] :is(.handbook-body .note,.handbook-body .audit,.notice){border-left-color:var(--primary)}
 html[data-theme=dark] :is(.handbook-body .grid span,.handbook-body button,.handbook-body .outline){background:var(--control-bg);color:var(--ink);border-color:var(--line)}
 html[data-theme=dark] .handbook-body button:hover:enabled{background:var(--control-active)}
 html[data-theme=dark] .handbook-body .demo input{background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-theme=dark] .handbook-body .num,html[data-theme=dark] .progress-box strong{color:var(--primary)}
 html[data-theme=dark] .flow :is(a,span:not(.arrow)){border-color:var(--line)}
 html[data-theme=dark] .flow a:hover{background:var(--neutral-hover);color:var(--primary)}
 html[data-theme=dark] progress{accent-color:var(--primary);background:var(--control-bg)}
 html[data-theme=dark] progress::-webkit-progress-bar{background:var(--control-bg);border-radius:8px}
 html[data-theme=dark] progress::-webkit-progress-value{background:var(--primary);border-radius:8px}
 html[data-theme=dark] progress::-moz-progress-bar{background:var(--primary);border-radius:8px}
 html[data-theme=dark] dialog::backdrop{background:#0009}
 html[data-theme=dark] .dialog-heading button{color:var(--muted)}
 html[data-theme=dark] .dialog-heading button:hover{color:var(--ink)}
 html[data-theme=dark] .toast{background:var(--ink);color:var(--bg)}
 html[data-theme=dark] :is(.skip-link,.back-top){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-theme=dark] .back-top:hover{background:var(--neutral-hover)}
 html[data-theme=dark] .link-status{color:#e3bc86!important;border-color:#e3bc86}
}

/* Approved image destinations: keep actions next to their source image. */
.handbook-body .image-source-action{display:flex;justify-content:flex-start;margin-top:12px}
.handbook-body .image-source-button{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:10px 16px;white-space:normal;text-decoration:none;font-size:14px;line-height:1.5;text-align:left}
.handbook-body .image-source-button:hover{text-decoration:none}
.handbook-body .image-source-button svg{flex-shrink:0}

.handbook-body .video-thumbnail-link{position:relative;display:block;width:100%;max-width:100%;margin-inline:auto;overflow:hidden;border-radius:12px;isolation:isolate;text-decoration:none;cursor:pointer}
.handbook-body .video-thumbnail-link img{transition:transform .25s ease;}
.video-thumbnail-overlay{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;background:rgba(0,0,0,.12);transition:background .25s ease;pointer-events:none}
.video-play-mark{display:grid;place-items:center;width:56px;height:56px;border-radius:50%;background:rgba(18,18,20,.78);color:#fff;box-shadow:0 2px 16px #0003;transition:transform .25s ease,background .25s ease}
.video-play-mark svg{width:28px;height:28px;display:block}
.video-thumbnail-label{padding:6px 12px;border-radius:100px;background:rgba(18,18,20,.88);color:#fff;font-size:14px;font-weight:600;line-height:1.5;opacity:0;transform:translateY(4px);transition:opacity .25s ease,transform .25s ease}
.handbook-body .video-thumbnail-link:is(:hover,:focus-visible){text-decoration:none}
.video-thumbnail-link:is(:hover,:focus-visible) .video-thumbnail-overlay{background:rgba(0,0,0,.32)}
.video-thumbnail-link:is(:hover,:focus-visible) img{transform:scale(1.025)}
.video-thumbnail-link:is(:hover,:focus-visible) .video-play-mark{transform:scale(1.08);background:rgba(18,18,20,.92)}
.video-thumbnail-link:is(:hover,:focus-visible) .video-thumbnail-label{opacity:1;transform:none}
.handbook-body .video-thumbnail-link:focus-visible{outline:3px solid var(--primary);outline-offset:4px}
@media (hover:none){.video-thumbnail-label{opacity:1;transform:none}}
.source-thumbnail-link .video-thumbnail-overlay{background:transparent}
.source-thumbnail-link .video-play-mark{opacity:0;transition:opacity .25s ease,transform .25s ease,background .25s ease}
.source-thumbnail-link:is(:hover,:focus-visible) .video-play-mark{opacity:1}
@media (hover:none){.source-thumbnail-link .video-play-mark{opacity:1}.source-thumbnail-link .video-thumbnail-overlay{background:rgba(0,0,0,.12)}}
@media (prefers-reduced-motion:reduce){.source-thumbnail-link .video-play-mark{transition:none}}
@media (prefers-reduced-motion:reduce){.video-thumbnail-link img,.video-thumbnail-overlay,.video-play-mark,.video-thumbnail-label{transition:none}.video-thumbnail-link:is(:hover,:focus-visible) img,.video-thumbnail-link:is(:hover,:focus-visible) .video-play-mark{transform:none}}

/* Search focus encloses the input and submit button as one field. */
html[data-theme] :is(.search-large,.header-search):focus-within{
  outline:2px solid var(--focus);
  outline-offset:3px;
}
html[data-theme] :is(.search-large,.header-search) :is(input,button):focus-visible{
  outline:none;
}

/* Keep selected text and autofill backgrounds clear of the search action. */
.search-large,.header-search{gap:8px}
.search-large>button,.header-search>button{flex-shrink:0}

