/* Case studies in the current Ledger look: light by default, dark on request (jec-theme-2), and the
   condensed display face. Loaded last on the older case pages; see DESIGN.md.
   Rule of the sheet: a surface that keeps a dark ground (a hero over film, a product demo, a photo
   panel) keeps dark ink. Everything else follows the theme. */

/* 1. token pages: custom-image, humandata, airpods, lab2fab */
html[data-theme="light"]{
  color-scheme:light;
  --bg:#F0F2F7;--surface:#FFFFFF;--surface-2:#E6E9F0;
  --line:rgba(8,10,16,.09);--line-md:rgba(8,10,16,.16);
  --text-hi:#080A10;--text-mid:rgba(8,10,16,.72);--text-lo:rgba(8,10,16,.58);
  --blue-lt:#1A52F5;--blue-bg:rgba(26,82,245,.07);
}
html[data-theme="light"] body{background:var(--bg);color:var(--text-hi)}
body::before{display:none !important}            /* the old grid ground: gone in both themes */
html[data-theme="light"] .topbar{background:rgba(240,242,247,.86);border-bottom-color:var(--line)}
html[data-theme="light"] :is(.hero,.impact,.reflect .r.accent,.ekg,.card.accent,.studio,.studio-frame,.cistudio,.cmp .c.new,.vid-embed){
  --surface:#0E1018;--surface-2:#13161F;
  --line:rgba(255,255,255,.08);--line-md:rgba(255,255,255,.13);
  --text-hi:#E4E8F4;--text-mid:rgba(228,232,244,.72);--text-lo:rgba(228,232,244,.56);
  --blue-lt:#8FAAFF;
  color:var(--text-hi);
}
html[data-theme="light"] .sched-track{background:var(--surface-2)}
html[data-theme="light"] .impact .sched-track{background:rgba(0,0,0,.42)}

/* 2. lx pages: bioelectric, vitalog, sce */
html[data-theme="light"] body{
  --lx-bg:#F0F2F7;--lx-surface:#FFFFFF;--lx-surface2:#E6E9F0;
  --lx-line:rgba(8,10,16,.09);--lx-line-md:rgba(8,10,16,.16);
  --lx-hi:#080A10;--lx-mid:rgba(8,10,16,.72);--lx-lo:rgba(8,10,16,.58);
  --lx-accent:#1A52F5;--lx-ink:#1A52F5;--lx-green:#058A61;--lx-down:#C62A22;
}
/* heroes over film or a dark product stage keep the dark tokens */
html[data-theme="light"] :is(.sx-hero,.vx-hero){
  --lx-bg:#080A10;--lx-surface:#0E1018;--lx-surface2:#13161F;
  --lx-line:rgba(255,255,255,.08);--lx-line-md:rgba(255,255,255,.14);
  --lx-hi:#E4E8F4;--lx-mid:rgba(228,232,244,.72);--lx-lo:rgba(228,232,244,.56);
  --lx-accent:#4472FF;--lx-ink:#8FAAFF;--lx-green:#07C98D;
}
.sx-hero h1,.vx-hero h1{letter-spacing:-.03em}
/* the grid-line overlay on these heroes is retired with the rest of the grid grounds */
.sx-hero::after,.vx-hero::after{display:none}
html[data-theme="light"] .cl-end{background:var(--lx-bg,#F0F2F7);border-top-color:rgba(8,10,16,.16)}
html[data-theme="light"] .cl-end a{color:#080A10;background-image:linear-gradient(rgba(8,10,16,.42),rgba(8,10,16,.42))}
html[data-theme="light"] .cl-end a:hover{background-image:linear-gradient(#080A10,#080A10)}
html[data-theme="light"] .sx-ticks i{background:rgba(8,10,16,.3)}
html[data-theme="light"] .sx-pair i.was{background:rgba(8,10,16,.3)}
html[data-theme="light"] .sx-waffle i.off{background:rgba(8,10,16,.2)}

/* 3. the display face, tuned: Plex Sans Condensed runs tighter than the old grotesque */
.lx h2{letter-spacing:-.025em}
.lx-opp p.lx-fig,.lx-spec h3{letter-spacing:-.02em}

/* group headings inside a case's "my part" section */
.lx h3.sx-grp{margin:clamp(40px,5vw,64px) 0 clamp(18px,2.2vw,26px);font:600 clamp(24px,2.6vw,34px)/1.1 var(--lx-display);letter-spacing:-.02em}
.lx-head + h3.sx-grp{margin-top:0}
