/* Homepage tokens. Photography and financial signal colors remain semantic. */
:root[data-theme] {
  --paper:#f7f8fa;--surface:#fff;--ink:#172e46;--muted:#52667c;--line:#d8e0e8;
  --accent:#244c78;--on-accent:#fff;--soft:#eaf0f5;--gold:#947147;
  --chrome:rgba(247,248,250,.97);--sans:"PingFang SC","Microsoft YaHei","Noto Sans SC",-apple-system,sans-serif;
  --bg:var(--paper)!important;--bg2:var(--soft)!important;--panel:var(--surface)!important;--panel2:var(--soft)!important;
  --dim:var(--muted)!important;--faint:var(--muted)!important;--signal:var(--accent)!important;--teal:var(--accent)!important;
  --signal-dim:var(--soft)!important;--line2:var(--line)!important;
  --room-bg:var(--soft)!important;--room-panel:var(--surface)!important;--room-line:var(--line)!important;
  --room-ink:var(--ink)!important;--room-dim:var(--muted)!important;--room-signal:var(--accent)!important;--room-gold:var(--gold)!important;
  --cta-bg:var(--soft)!important;--cta-form-bg:var(--surface)!important;
  --arch:var(--sans)!important;color-scheme:light;
}
:root[data-theme=midnight] {
  --paper:#101725;--surface:#172337;--ink:#f0f3f9;--muted:#bccbdf;--line:#34445c;--accent:#aac9f1;
  --on-accent:#142840;--soft:#213149;--gold:#d1b183;--chrome:rgba(16,23,37,.97);color-scheme:dark;
}
:root[data-theme=ivory] {
  --paper:#f6f0e7;--surface:#fffaf2;--ink:#382c2c;--muted:#6f5753;--line:#d8c9b9;--accent:#823d46;
  --on-accent:#fff9f1;--soft:#eee4d8;--gold:#8f6b44;--chrome:rgba(246,240,231,.97);
}
html[data-theme] { scroll-padding-top:155px; }
html[data-theme] body { background:var(--paper)!important;background-image:none!important;color:var(--ink);font-family:var(--sans);font-size:17px;font-weight:700;line-height:1.8; }
html[data-theme] :is(p,a,small,span,button,label,input,select,td,th,li) { font-weight:700; }
html[data-theme] :is(h1,h2,h3) { font-family:var(--sans);font-weight:900;letter-spacing:-.035em; }
html[data-theme] :is(.pg-hero,.cases-hero) { padding:62px 0 52px!important;background:var(--paper)!important;border-bottom:1px solid var(--line); }
html[data-theme] :is(.pg-hero,.cases-hero)::before { display:none; }
html[data-theme] :is(.pg-hero,.cases-hero) h1 { font-size:clamp(35px,4.3vw,60px);line-height:1.42;max-width:1080px; }
html[data-theme] :is(.pg-hero,.cases-hero) .lead { color:var(--muted);font-size:19px;line-height:1.9;max-width:1020px; }
html[data-theme] :is(.pg-hero,.cases-hero) .badge { display:inline-block;color:var(--accent);background:var(--soft);border:1px solid var(--line);padding:6px 12px;line-height:1.7;white-space:normal; }
html[data-theme] :is(.badge,.meta,.kicker,.prod .tags span,.toc-item .id,.article-item .am,.pg-hero .badge) { font-size:14px; }
html[data-theme] :is(.prod,.svc,.ccard,.case,.fcase,.article-list,.quote-block,.phases,.mk,.toc-item,.stat-card,.disclaimer-box,.note-box) { color:var(--ink);background-color:var(--surface);border-color:var(--line); }
html[data-theme] :is(.prod,.svc,.ccard,.fcase) p { font-size:17px;line-height:1.85; }
html[data-theme] :is(.pg-body,.wrap) { max-width:1320px; }
html[data-theme] .wrap { padding-left:0;padding-right:0;width:min(1320px,calc(100% - 96px)); }
html[data-theme] .pg-body { background:transparent; }
html[data-theme] .cta-in { background:var(--soft)!important;border-color:var(--line)!important; }
html[data-theme] .cta h2 { color:var(--ink)!important; }
html[data-theme] .cta h2 em { color:var(--accent)!important; }
html[data-theme] .cta .sub { color:var(--muted)!important; }
html[data-theme] :is(.btn-primary,.btn-red) { background:var(--accent);color:var(--on-accent);border-color:var(--accent); }
html[data-theme] :is(footer,.sub-footer) { background:var(--paper);color:var(--muted);border-color:var(--line); }
html[data-theme] .sub-header { background:var(--paper);border-color:var(--line);padding-top:42px; }
html[data-theme] .sub-header .brand { display:none; }
html[data-theme] .sub-header h1 { font-size:38px; }
html[data-theme] :is(.page-body p,.page-body ul,.page-body li) { font-size:17px;line-height:1.9; }
html[data-theme] .page-body h2 { font-size:23px; }
html[data-theme] .review-band { background:var(--soft);color:var(--muted);border-color:var(--line);font-size:14px; }
html[data-theme] img { filter:none!important; }
html[data-theme] :is(a,button,input,select,summary):focus-visible { outline:3px solid var(--accent);outline-offset:4px; }

/* The masthead follows the delivered homepage rather than each old page's nav. */
.eco-chrome { position:sticky;top:0;z-index:60;padding:0!important;background:var(--chrome);border-bottom:1px solid var(--line);backdrop-filter:blur(16px); }
.eco-masthead { width:min(1320px,calc(100% - 96px));min-height:92px;margin:auto;display:flex;align-items:center;gap:26px; }
.eco-brand { display:flex;align-items:center;gap:11px;flex:none;text-decoration:none;color:var(--ink); }
.eco-brand>span { display:block!important; }
.eco-brand svg { width:37px;height:37px;stroke:currentColor;fill:none;stroke-width:2.5; }
.eco-brand b { font-size:23px;display:block;line-height:1.3;font-weight:900;letter-spacing:-.03em; }
.eco-brand small { display:block;font-size:14px;color:var(--muted);line-height:1.6;margin-top:5px; }
.eco-nav { display:flex;align-items:center;justify-content:center;gap:24px;flex:1; }
.eco-nav a { color:var(--ink);font-size:16px;font-weight:800;white-space:nowrap;text-decoration:none; }
.eco-nav a:hover { color:var(--accent); }
.eco-actions { display:flex;align-items:center;gap:21px;flex:none; }
.eco-actions button,.eco-actions a { color:var(--ink);font:800 15px/1.5 var(--sans);cursor:pointer;white-space:nowrap; }
.eco-appearance { background:none;border:0;display:flex;gap:7px;align-items:center;min-height:44px;padding:0; }
.eco-appearance>span:first-child { font-size:23px; }
.eco-entry { padding:9px 13px;border:1px solid var(--line);text-decoration:none; }
.eco-menu-toggle { display:none;width:42px;height:44px;align-items:center;justify-content:center;flex-direction:column;gap:7px;background:none;border:0; }
.eco-menu-toggle span { width:22px;height:2px;background:currentColor; }
.eco-subnav { width:min(1320px,calc(100% - 96px));margin:auto;display:flex;align-items:center;justify-content:space-between;gap:20px;border-top:1px solid var(--line);min-height:44px; }
.eco-subnav>span { font-size:14px;color:var(--muted); }
.eco-subnav nav { display:flex;gap:24px;align-items:center; }
.eco-subnav a { color:var(--muted);font-size:14px;white-space:nowrap;text-decoration:none;padding:9px 0; }
.eco-subnav a[aria-current=page] { color:var(--accent);border-bottom:2px solid var(--accent); }
.eco-dialog { margin:auto;width:min(500px,calc(100% - 32px));padding:36px;max-height:calc(100dvh - 40px);overflow:auto;background:var(--surface);color:var(--ink);border:1px solid var(--line);font:700 16px/1.8 var(--sans); }
.eco-dialog::backdrop { background:#10172588;backdrop-filter:blur(4px); }
.eco-dialog h2 { font-size:30px;margin:12px 0; }
.eco-dialog>p { color:var(--muted);margin:10px 0; }
.eco-dialog-close { position:absolute;top:12px;right:15px;width:44px;height:44px;background:none;border:0;color:inherit;font-size:30px;cursor:pointer; }
.eco-dialog label { display:flex;align-items:center;gap:15px;margin:10px 0;padding:14px;border:1px solid var(--line);cursor:pointer; }
.eco-dialog label:has(input:checked) { background:var(--soft);border-color:var(--accent); }
.eco-swatches { display:flex;gap:3px; }
.eco-swatches i { width:15px;height:30px;border:1px solid #8883; }
.eco-dialog label>span:nth-child(2) { flex:1; }
.eco-dialog small { display:block;font-size:14px;color:var(--muted); }
.eco-dialog input { width:18px;height:18px;accent-color:var(--accent); }
.eco-skip { position:fixed;left:16px;top:-100px;padding:12px 20px;z-index:100;background:var(--surface);color:var(--accent); }
.eco-skip:focus { top:12px; }
@media(max-width:1200px) { .eco-nav { gap:18px; } .eco-masthead { gap:18px; } .eco-actions { gap:14px; } }
@media(max-width:1100px) {
  .eco-nav { display:none;position:absolute;top:92px;left:0;right:0;background:var(--surface);padding:24px 5%;border-bottom:1px solid var(--line);box-shadow:0 15px 25px #10172522; }
  .eco-nav.open { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 25px; }
  .eco-nav a { padding:12px; }
  .eco-actions { margin-left:auto;gap:20px; }
  .eco-menu-toggle { display:flex; }
}
@media(max-width:700px) {
  .eco-masthead,.eco-subnav,html[data-theme] .wrap { width:calc(100% - 40px); }
  .eco-masthead { gap:10px;min-height:86px; }
  .eco-brand { gap:8px; } .eco-brand svg { width:29px;height:32px; }
  .eco-brand b { font-size:20px; } .eco-brand small { font-size:12px; }
  .eco-actions { gap:12px; } .eco-appearance .eco-appearance-label { display:none; }
  .eco-entry { display:none; }
  .eco-nav { top:86px; }
  .eco-subnav { display:block;overflow-x:auto;min-height:44px; }
  .eco-subnav>span { display:none; }
  .eco-subnav nav { gap:22px; }
  .eco-subnav a { padding:12px 0; }
  html[data-theme] :is(.pg-hero,.cases-hero) { padding:38px 0!important; }
  html[data-theme] :is(.pg-hero,.cases-hero) h1 { font-size:34px; }
  html[data-theme] :is(.pg-hero,.cases-hero) .lead { font-size:17px; }
  .eco-dialog { padding:30px 20px; }
  .eco-dialog label { gap:12px;padding:12px; }.eco-swatches i { width:12px; }
  html[data-theme] .toc-item { gap:12px;padding:18px 16px; }
  html[data-theme] .toc-item .ttl { min-width:0;overflow-wrap:anywhere; }
}
@media(max-width:360px) { .eco-masthead { width:calc(100% - 28px); }.eco-brand b { font-size:18px; }.eco-brand small { font-size:11px; }.eco-brand svg { width:24px; }.eco-actions { gap:7px; }.eco-entry { padding:7px; } }
@media(prefers-reduced-motion:reduce) { html[data-theme],html[data-theme] * { scroll-behavior:auto!important;transition:none!important; } }
