/* Escher case study. Wide page, narrow text. Uses the site's colour variables from style.css plus a few of its own. */
:root{--rule:#e7e7e4;--panel:#f7f7f5;--chip:#efefec;--red:#fa504a}
@media(prefers-color-scheme:dark){:root:not([data-theme=light]){--rule:#2a2a2a;--panel:#1a1a1a;--chip:#222}}
:root[data-theme=dark]{--rule:#2a2a2a;--panel:#1a1a1a;--chip:#222}

main.cs{max-width:1168px;padding-inline:40px}
.cs .back{margin-bottom:96px}
.cs article{line-height:1.7}
.cs section{margin-top:200px}
.cs .prose{max-width:640px}
.cs h2{font-size:32px;line-height:1.25;font-weight:500;color:var(--strong);letter-spacing:-.01em;margin-bottom:24px}
.cs h3{font-size:16px;font-weight:500;color:var(--strong);margin-bottom:6px}
.cs .prose p,.cs .lede{font-size:18px;color:var(--text)}
.cs .small{font-size:13px;color:var(--muted);line-height:1.6}
.cs figure{margin:0}
.cs figcaption{font-size:14px;color:var(--soft);margin-top:16px;max-width:640px}

/* Hero */
.cs .hero{display:grid;grid-template-columns:minmax(0,1fr);gap:0}
.cs .mark{width:56px;height:56px;border-radius:12px;display:block;margin-bottom:40px}
.cs h1{font-size:72px;line-height:1;font-weight:500;letter-spacing:-.03em;color:var(--strong);margin-bottom:28px}
.cs .lede{font-size:24px;line-height:1.45;max-width:720px;color:var(--text);margin-bottom:72px}
.cs .facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:32px;border-top:1px solid var(--rule);padding-top:28px;margin-bottom:96px}
.cs .facts dt{font-size:13px;color:var(--muted);margin-bottom:6px}
.cs .facts dd{margin:0;font-size:15px;line-height:1.55;color:var(--strong)}

/* Screens */
.cs .shot{display:block;width:100%;height:auto;border-radius:14px;border:1px solid var(--rule);background:var(--panel)}
.cs .stage{background:var(--panel);border-radius:20px;padding:56px}
.cs .stage .shot{box-shadow:0 1px 2px #0000000a,0 16px 48px -12px #0000001f}
.cs .two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.cs .block{margin-top:72px}

/* Numbers */
.cs .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:32px;margin-top:64px}
.cs .stats.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.cs .stat{border-top:1px solid var(--strong);padding-top:20px}
.cs .num{display:block;font-size:56px;line-height:1;font-weight:500;letter-spacing:-.03em;color:var(--strong);margin-bottom:16px;font-variant-numeric:tabular-nums}
.cs .stat p{font-size:15px;line-height:1.5;color:var(--text);margin:0}
.cs .stat .src{display:block;font-size:12px;color:var(--muted);margin-top:8px}

/* Three-up text cards */
.cs .cols{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:48px;margin-top:72px}
.cs .cols p{font-size:15px;line-height:1.6;color:var(--soft);margin:0}
.cs .cols .n{display:block;font-size:13px;color:var(--muted);margin-bottom:14px;font-variant-numeric:tabular-nums}
.cs .pull{font-size:28px;line-height:1.4;color:var(--strong);max-width:820px;margin-top:96px;font-weight:400;letter-spacing:-.01em}

/* Roles */
.cs .chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:40px;padding:0;list-style:none}
.cs .chips li{font-size:14px;padding:6px 14px;border-radius:999px;background:var(--chip);color:var(--strong)}
.cs .chips li:first-child{background:var(--strong);color:var(--bg)}

/* Diagrams */
.cs .diagram{background:var(--panel);border-radius:20px;padding:56px 40px;margin-top:64px}
.cs .diagram svg{display:block;width:100%;height:auto;max-width:880px;margin:0 auto;overflow:visible}
.cs svg text{font-family:Arial,Helvetica,sans-serif}
.cs .d-node{fill:var(--bg);stroke:var(--rule)}
.cs .d-key{fill:var(--strong)}
.cs .d-key-t{fill:var(--bg)}
.cs .d-t{fill:var(--strong);font-size:15px}
.cs .d-s{fill:var(--muted);font-size:12px}
.cs .d-line{stroke:var(--line);fill:none;stroke-width:1.25}
.cs .d-red{stroke:var(--red);fill:none;stroke-width:1.5}
.cs .d-redt{fill:var(--red);font-size:12px}

/* Sketch strip */
.cs .strip{display:flex;gap:24px;overflow-x:auto;scroll-snap-type:x mandatory;margin-top:64px;padding-bottom:20px;scrollbar-width:thin}
.cs .strip figure{flex:0 0 min(560px,80%);scroll-snap-align:start}
.cs .strip figcaption{margin-top:12px}
.cs .strip figcaption b{font-weight:500;color:var(--strong)}

/* Design system */
.cs .swatches{display:grid;grid-template-columns:repeat(8,minmax(0,1fr));gap:16px;margin-top:64px}
.cs .sw{height:96px;border-radius:12px;border:1px solid var(--rule)}
.cs .swatches p{font-size:13px;line-height:1.45;color:var(--strong);margin:10px 0 0}
.cs .swatches small{display:block;color:var(--muted);font-size:12px;font-variant-numeric:tabular-nums}
.cs .type{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:24px}
.cs .type div{background:var(--panel);border-radius:16px;padding:40px}
.cs .type .g{font-family:'Geist',Arial,sans-serif;font-size:56px;line-height:1;color:var(--strong);letter-spacing:-.02em}
.cs .type .gmono{font-family:'Geist Mono',ui-monospace,monospace;font-size:40px;line-height:1.2;color:var(--strong)}
.cs .type p{font-size:13px;color:var(--muted);margin:20px 0 0}

/* Stack */
.cs .stack{list-style:none;padding:0;margin:64px 0 0;border-top:1px solid var(--rule)}
.cs .stack li{display:grid;grid-template-columns:240px minmax(0,1fr);gap:32px;padding:24px 0;border-bottom:1px solid var(--rule)}
.cs .stack b{font-weight:500;color:var(--strong)}
.cs .stack span{color:var(--soft)}

.cs .learned .cols p{font-size:16px}
.cs footer{margin-top:200px}

@media(max-width:900px){
  .cs .facts,.cs .stats{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:40px}
  .cs .swatches{grid-template-columns:repeat(4,minmax(0,1fr))}
  .cs .stage{padding:24px}
}
@media(max-width:600px){
  main.cs{padding-inline:20px}
  .cs .back{margin-bottom:56px}
  .cs section{margin-top:120px}
  .cs h1{font-size:48px}
  .cs .lede{font-size:19px;margin-bottom:48px}
  .cs h2{font-size:26px}
  .cs .prose p{font-size:17px}
  .cs .facts{grid-template-columns:1fr 1fr;gap:24px;margin-bottom:56px}
  .cs .num{font-size:40px}
  .cs .stats,.cs .stats.three{grid-template-columns:1fr 1fr;gap:28px 20px}
  .cs .cols,.cs .two,.cs .type{grid-template-columns:1fr;gap:32px}
  .cs .pull{font-size:22px;margin-top:64px}
  .cs .stage{padding:12px;border-radius:14px}
  .cs .shot{border-radius:8px}
  .cs .diagram{padding:24px 12px;border-radius:14px;overflow-x:auto}
  .cs .diagram svg{min-width:560px}
  .cs .strip{margin-inline:-20px;padding-inline:20px}
  .cs .strip figure{flex-basis:85%}
  .cs .swatches{grid-template-columns:repeat(2,minmax(0,1fr))}
  .cs .type div{padding:28px}
  .cs .type .g{font-size:44px}
  .cs .type .gmono{font-size:26px}
  .cs .stack li{grid-template-columns:1fr;gap:4px}
  .cs footer{margin-top:120px}
}

/* Next project hook: the whole card is the link. Dark like the Air Atlas page it leads to. */
.cs .next{margin-top:200px}
.cs .next-card{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:40px;background:#0b0f0e;border-radius:20px;overflow:hidden;text-decoration:none;color:#e4ebd9;padding-left:64px;transition:transform .3s ease}
.cs .next-card:hover{color:#e4ebd9}
.cs .next-card:hover .next-go{color:#fff;text-decoration-color:#fff}
.cs .next-card img{display:block;width:100%;height:auto;transition:transform .6s ease;-webkit-mask-image:linear-gradient(to right,transparent,#000 18%);mask-image:linear-gradient(to right,transparent,#000 18%)}
.cs .next-card:hover img{transform:scale(1.03)}
.cs .next-text{display:flex;flex-direction:column;padding:64px 0}
.cs .next-label{font-size:13px;color:#94a480;margin-bottom:20px}
.cs .next-title{font-size:56px;line-height:1;font-weight:500;letter-spacing:-.03em;color:#fff;margin-bottom:20px}
.cs .next-line{font-size:18px;line-height:1.5;color:#c9d1bf;margin-bottom:40px}
.cs .next-go{font-size:15px;color:#e4ebd9;text-decoration:underline;text-decoration-color:#e1e7d566;text-underline-offset:4px}
.cs footer{margin-top:72px}
@media(max-width:600px){
  .cs .next{margin-top:120px}
  .cs .next-card{grid-template-columns:1fr;padding-left:0;gap:0;border-radius:14px}
  .cs .next-text{padding:32px 24px 8px}
  .cs .next-card img{-webkit-mask-image:linear-gradient(transparent,#000 18%);mask-image:linear-gradient(transparent,#000 18%)}
  .cs .next-title{font-size:40px}
  .cs .next-line{font-size:16px;margin-bottom:24px}
}
/* Variant for OpenFOAM Studio: the navy of its field renders. */
.cs .next-card.foam{background:#10162a;color:#dfe7f7}
.cs .next-card.foam:hover{color:#dfe7f7}
.cs .next-card.foam .next-label{color:#7f8fb8}
.cs .next-card.foam .next-line{color:#b9c5e2}
.cs .next-card.foam .next-go{color:#dfe7f7;text-decoration-color:#dfe7f766}
@media(prefers-reduced-motion:reduce){.cs .next-card img{transition:none}}

/* System design and desktop sections */
.cs .d-group{fill:none;stroke:var(--line);stroke-dasharray:4 4;opacity:.7}
.cs .sub{margin-top:120px}
.cs .sub h3{font-size:20px;margin-bottom:12px}
.cs .sub .diagram{margin-top:40px}
.cs .steps{list-style:none;padding:0;margin:48px 0 0;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:24px;counter-reset:none}
.cs .steps li{border-top:1px solid var(--strong);padding-top:16px;display:flex;flex-direction:column;gap:6px}
.cs .steps .n{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.cs .steps b{font-weight:500;color:var(--strong)}
.cs .steps li>span:last-child{font-size:14px;line-height:1.55;color:var(--soft)}
.cs .cards{margin-top:40px}
.cs .card{background:var(--panel);border-radius:16px;padding:36px}
.cs .card h3{font-size:16px;margin-bottom:16px}
.cs .card ul{margin:0;padding-left:18px;color:var(--soft);font-size:15px;line-height:1.6}
.cs .card li+li{margin-top:10px}
.cs code{font-family:'Geist Mono',ui-monospace,monospace;font-size:.88em;background:var(--chip);padding:1px 5px;border-radius:4px;color:var(--strong)}
.cs #build .stack{margin-top:96px}
.cs .builds{border-top:1px solid var(--rule);padding-top:48px}
@media(max-width:900px){.cs .steps{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:32px}}
@media(max-width:600px){.cs .sub{margin-top:80px}.cs .steps{grid-template-columns:1fr}.cs .card{padding:24px}}

/* Illustrations: ink lines, 2px dithered fills (patterns in the hidden .defs svg), Escher red as the one accent. */
.cs .defs{position:absolute;width:0;height:0;overflow:hidden}
.cs .dk{fill:var(--strong)}
.cs .dr{fill:var(--red)}
.cs .art{margin:64px 0 0;background:var(--panel);border-radius:20px;padding:48px 40px}
.cs .art svg{display:block;width:100%;height:auto;max-width:880px;margin:0 auto;overflow:visible}
.cs .ico{display:block;width:100%;max-width:320px;height:auto;margin-bottom:28px;background:var(--panel);border-radius:16px;overflow:visible}
.cs .art text,.cs .ico text{font-family:Arial,Helvetica,sans-serif}
.cs .i-ink{stroke:var(--strong);stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.cs .i-ink:not([fill]){fill:none}
.cs .i-paper{fill:var(--bg)}
.cs .i-paper.i-ink{fill:var(--bg)}
.cs .i-line{stroke:var(--line);stroke-width:1;fill:none}
.cs .i-red{stroke:var(--red);stroke-width:1.75;fill:none;stroke-linecap:round}
.cs .i-dot{fill:var(--line)}
.cs .i-reddot{fill:var(--red)}
.cs .i-trail{stroke:var(--red);stroke-width:1.5;fill:none;stroke-dasharray:2 7;stroke-linecap:round}
.cs .i-trail-s{stroke:var(--red);stroke-width:1.5;fill:none;stroke-dasharray:2 6;stroke-linecap:round}
.cs .i-q{font-size:28px;fill:var(--red);font-weight:500}
.cs .i-mono{font-family:'Geist Mono',ui-monospace,monospace!important;font-size:11px;fill:var(--strong)}
.cs .i-mono-l{font-family:'Geist Mono',ui-monospace,monospace!important;font-size:34px;fill:var(--strong)}
.cs .i-small{font-size:12px;fill:var(--soft)}
.cs .i-cap{font-size:14px;fill:var(--strong)}
.cs .i-badge{font-size:10px;fill:#fff;font-weight:700}
.cs .i-tag{fill:var(--bg);stroke:var(--rule)}
.cs .i-tag-key{fill:var(--strong)}
.cs .i-tag-t{font-size:13px;fill:var(--strong)}
.cs .i-tag-kt{font-size:13px;fill:var(--bg)}
.cs .i-paper-s{fill:none}
@media(max-width:600px){.cs .art{padding:20px 12px;border-radius:14px;margin-top:40px}.cs .ico{max-width:none}}
.cs .i-fillred{fill:var(--red)}
.cs .i-fillink{fill:var(--strong)}
.cs .i-redt{fill:var(--red)}

/* Motion: illustrations ease in once as they scroll into view; the red trails drift slowly. Off for reduced motion. */
.reveal .cs .art svg,.reveal .cs .ico{opacity:0;transform:translateY(12px);transition:opacity .9s cubic-bezier(.2,.7,.2,1),transform .9s cubic-bezier(.2,.7,.2,1)}
.reveal .cs .art.in svg,.reveal .cs .ico.in{opacity:1;transform:none}
.cs .i-trail,.cs .i-trail-s{animation:trail 9s linear infinite}
@keyframes trail{to{stroke-dashoffset:-90}}
@media(prefers-reduced-motion:reduce){.reveal .cs .art svg,.reveal .cs .ico{opacity:1;transform:none;transition:none}.cs .i-trail,.cs .i-trail-s{animation:none}}
@media(max-width:600px){.cs .art{padding:16px 6px}}

/* Backend sections */
.cs .i-tiny{font-size:10px;fill:var(--muted)}
.cs .i-cell{stroke:var(--strong);stroke-width:1}
.cs .i-on{font-size:11px;fill:#fff}
.cs .i-onk{font-size:11px;fill:var(--bg)}
.cs .toolsets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:20px;margin-top:64px}
.cs .toolset{background:var(--panel);border-radius:16px;padding:28px}
.cs .toolset .num{font-size:44px;margin-bottom:20px}
.cs .toolset h3{margin-bottom:4px}
.cs .toolset p{font-size:14px;line-height:1.5;color:var(--soft);margin:0 0 20px}
.cs .toolset ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:6px}
.cs .toolset li{font-family:'Geist Mono',ui-monospace,monospace;font-size:11px;line-height:1;padding:6px 8px;border-radius:6px;background:var(--bg);color:var(--strong);border:1px solid var(--rule)}
.cs .toolset.key{display:block;background:var(--strong)}
.cs .toolset.key .num,.cs .toolset.key h3{color:var(--bg)}
.cs .toolset.key p{color:var(--muted)}
.cs .toolset.key li{background:transparent;color:var(--bg);border-color:color-mix(in srgb,var(--bg) 25%,transparent)}
@media(max-width:900px){.cs .toolsets{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.cs .toolsets{grid-template-columns:minmax(0,1fr)}.cs .toolset li{overflow-wrap:anywhere}}

/* Gen UI and tokens */
.cs .i-onkm{fill:var(--bg);opacity:.6}
.cs .i-big{font-size:22px;fill:var(--strong);font-weight:500}
.cs .i-huge{font-size:56px;fill:var(--strong);font-weight:500;letter-spacing:-1px}
.cs .tiers{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;margin-top:40px}
.cs .tier{background:var(--panel);border-radius:16px;padding:0 28px 28px;overflow:hidden}
.cs .tier-bar{display:block;height:24px;margin:0 -28px 24px}
.cs .t-a .tier-bar{background:conic-gradient(var(--strong) 25%,transparent 0 50%,var(--strong) 0 75%,transparent 0) 0 0/8px 8px;opacity:.14}
.cs .t-b .tier-bar{background:conic-gradient(var(--strong) 25%,transparent 0 50%,var(--strong) 0 75%,transparent 0) 0 0/4px 4px;opacity:.35}
.cs .t-c .tier-bar{background:conic-gradient(var(--red) 25%,transparent 0 50%,var(--red) 0 75%,transparent 0) 0 0/4px 4px}
.cs .tier ul{margin:12px 0 0;padding-left:18px;color:var(--soft);font-size:14px;line-height:1.55}
.cs .tier li+li{margin-top:8px}
@media(max-width:900px){.cs .tiers{grid-template-columns:1fr}}

/* ---------- Sidebar: grouped, sticky, follows the section in view ---------- */
.cs{--dith:conic-gradient(var(--strong) 25%,transparent 0 50%,var(--strong) 0 75%,transparent 0) 0 0/4px 4px;--dith-r:conic-gradient(var(--red) 25%,transparent 0 50%,var(--red) 0 75%,transparent 0) 0 0/4px 4px;--dith-l:radial-gradient(circle at 1px 1px,var(--strong) .9px,transparent 1.1px) 0 0/6px 6px}
.cs .toc{display:none}
@media(min-width:1200px){
  main.cs{max-width:1480px;padding-inline:48px}
  .cs article:not([hidden]){display:grid;grid-template-columns:176px minmax(0,1fr);column-gap:80px}
  .cs article>*{grid-column:2;min-width:0}
  .cs article>.toc{display:block;grid-column:1;grid-row:1/span 80;align-self:start;position:sticky;top:88px;max-height:calc(100vh - 112px);overflow:auto;scrollbar-width:none;padding:4px 0 24px}
  .cs article>.toc::-webkit-scrollbar{display:none}
}
.cs .toc-g+.toc-g{margin-top:28px}
.cs .toc p{font-size:13px;line-height:1.3;color:var(--strong);margin:0 0 10px}
.cs .toc ul{list-style:none;margin:0;padding:0;border-left:1px solid var(--rule)}
.cs .toc a{display:block;font-size:13px;line-height:1.3;padding:5px 0 5px 15px;margin-left:-1px;border-left:1px solid transparent;color:var(--muted);text-decoration:none;transition:color .25s ease,border-color .25s ease}
.cs .toc a:hover{color:var(--strong)}
.cs .toc a[aria-current=true]{color:var(--strong);border-left-color:var(--red)}
.cs section{scroll-margin-top:64px}

/* ---------- Live visuals (escher.js) ---------- */
.cs .live{position:relative;isolation:isolate}
.cs .replay{position:absolute;top:16px;right:20px;font:inherit;font-size:12px;color:var(--muted);background:none;border:0;padding:4px 0;cursor:pointer;text-decoration:underline;text-decoration-color:var(--line);text-underline-offset:3px;opacity:0;pointer-events:none;transition:opacity .4s ease}
.cs .live.done .replay{opacity:1;pointer-events:auto}
.cs .replay:hover{color:var(--strong)}
.cs .key{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--soft)}
.cs .key::before{content:"";width:12px;height:12px;border:1px solid var(--strong);border-radius:2px}

/* Gen UI stream */
.cs .stream{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:48px;align-items:center;padding:56px}
.cs .stream-code,.cs .stream-card{position:relative;border-radius:12px}
.cs .stream-code::before,.cs .stream-card::before{content:"";position:absolute;inset:0;transform:translate(7px,7px);border-radius:12px;background:var(--dith-l);z-index:-1}
.cs .stream-code{background:var(--strong);color:var(--bg);padding:24px 24px 20px;min-height:268px;display:flex;flex-direction:column}
.cs .stream-lines{font-family:'Geist Mono',ui-monospace,monospace;font-size:12.5px;line-height:2.1;flex:1}
.cs .ln{display:block;white-space:pre;min-height:2.1em;overflow:hidden}
.cs .caret{display:inline-block;width:7px;height:14px;background:var(--red);vertical-align:-2px;margin-left:1px;animation:blink 1s steps(1) infinite}
@keyframes blink{50%{opacity:0}}
.cs .stream-label{font-size:12px;opacity:.55;margin-top:12px}
.cs .stream-card{background:var(--bg);border:1.5px solid var(--strong);padding:22px}
.cs .stream-card [data-k],.cs .stream-card{transition:opacity .6s cubic-bezier(.2,.7,.2,1),transform .6s cubic-bezier(.2,.7,.2,1)}
.cs .sc-head{font-size:16px;color:var(--strong);margin:0 0 14px}
.cs .sc-kpis{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.cs .sc-kpis div{border:1px solid var(--strong);border-radius:8px;padding:10px 12px}
.cs .sc-kpis span{display:block;font-size:12px;color:var(--soft)}
.cs .sc-kpis b{display:block;font-size:22px;font-weight:500;color:var(--strong);line-height:1.3}
.cs .sc-chart{display:flex;align-items:flex-end;gap:14px;height:104px;border-bottom:1px solid var(--line);margin:18px 0 14px}
.cs .sc-chart i{flex:1;height:var(--h);background:var(--dith);transform-origin:bottom;transition:transform .8s cubic-bezier(.2,.7,.2,1)}
.cs .sc-chart i:nth-child(2){transition-delay:.05s}.cs .sc-chart i:nth-child(3){transition-delay:.1s}.cs .sc-chart i:nth-child(4){transition-delay:.15s}.cs .sc-chart i:nth-child(5){transition-delay:.2s}.cs .sc-chart i:nth-child(6){transition-delay:.25s}
.cs .sc-chart i.r{background:var(--dith-r)}
.cs .sc-cite{display:inline-flex;align-items:center;gap:8px;font-size:12px;color:var(--soft);border:1px solid var(--strong);border-radius:999px;padding:3px 12px 3px 10px}
.cs .sc-cite i{width:7px;height:7px;border-radius:50%;background:var(--red)}
.cs .is-anim .stream-card:not(.on){opacity:.0;transform:translateY(10px)}
.cs .is-anim .stream-card [data-k]:not(.on){opacity:0;transform:translateY(8px)}
.cs .is-anim .sc-chart:not(.on) i{transform:scaleY(0)}

/* Scan grid */
.cs .scan{padding:56px}
.cs .sg{display:grid;gap:5px}
.cs .sg-row{display:grid;grid-template-columns:52px repeat(16,minmax(0,1fr));gap:5px;align-items:center}
.cs .sg-row>span{font-size:12px;color:var(--soft);text-align:right;padding-right:8px}
.cs .sg-head b{font-size:10px;font-weight:400;color:var(--muted);text-align:center}
.cs .sg i{display:block;height:22px;border:1px solid var(--strong);border-radius:3px;transition:background-color .2s ease}
.cs .sg i.run{background:var(--dith-l)}
.cs .sg i.done{background:var(--dith)}
.cs .sg i.fail{background:var(--dith-r);border-color:var(--red)}
.cs .sg i.retried{border-color:var(--red);box-shadow:inset 0 0 0 1px var(--red)}
.cs .sg-foot{display:flex;flex-wrap:wrap;align-items:center;gap:12px 24px;margin-top:28px;padding-left:57px}
.cs .k-done::before{background:var(--dith)}.cs .k-run::before{background:var(--dith-l)}.cs .k-fail::before{background:var(--dith-r);border-color:var(--red)}
.cs .sg-count{margin-left:auto;font-size:12px;color:var(--soft);font-variant-numeric:tabular-nums}
.cs .sg-count b{font-weight:500;color:var(--strong)}

/* Token toggle chart */
.cs .tokens{padding:48px 56px}
.cs .tk-top{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:16px}
.cs .seg{display:inline-flex;padding:3px;border-radius:999px;background:var(--bg);border:1px solid var(--rule)}
.cs .seg button{font:inherit;font-size:13px;padding:6px 16px;border:0;border-radius:999px;background:none;color:var(--soft);cursor:pointer;transition:background-color .3s ease,color .3s ease}
.cs .seg button[aria-pressed=true]{background:var(--strong);color:var(--bg)}
.cs .seg button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
.cs .tk-read{margin:0;font-size:13px;color:var(--soft)}
.cs .tk-read b{font-size:28px;font-weight:500;color:var(--strong);margin-right:8px;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.cs .tk-chart{display:flex;gap:16px;align-items:flex-end;height:260px;margin-top:36px;border-bottom:1px solid var(--line)}
.cs .tk-bar{flex:1;display:flex;flex-direction:column;justify-content:flex-end;height:100%}
.cs .tk-bar i{display:block;height:var(--v);border:1px solid var(--strong);border-bottom:0;background:var(--dith);transition:background .7s ease}
.cs .tk-bar i[style*="--v:0.00%"]{border:0}
.cs .tk-bar i.n{background:var(--dith-r);border-color:var(--red)}
.cs .tokens.after .tk-bar i:not(.n){background:var(--dith-l)}
.cs .tk-foot{display:flex;flex-wrap:wrap;gap:12px 24px;margin-top:20px}
.cs .k-full::before{background:var(--dith)}.cs .k-cache::before{background:var(--dith-l)}.cs .k-new::before{background:var(--dith-r);border-color:var(--red)}
.cs .tk-note{font-size:12px;color:var(--muted);margin:12px 0 0;max-width:640px}

@media(max-width:900px){.cs .stream{grid-template-columns:minmax(0,1fr);padding:32px}.cs .live .replay{position:static;display:block;margin:20px 0 0 auto}.cs .stream .replay{grid-column:1}.cs .scan,.cs .tokens{padding:32px}}
@media(max-width:600px){
  .cs .stream{padding:16px;gap:28px}.cs .stream-code{min-height:0;padding:18px}.cs .stream-lines{font-size:10.5px}
  .cs .scan,.cs .tokens{padding:20px 12px}
  .cs .sg,.cs .sg-row{gap:3px}.cs .sg-row{grid-template-columns:40px repeat(16,minmax(0,1fr))}.cs .sg i{height:14px;border-radius:2px}
  .cs .sg-head b{font-size:0}.cs .sg-head b:first-of-type,.cs .sg-head b:last-of-type{font-size:9px}
  .cs .sg-foot{padding-left:0}.cs .sg-count{margin-left:0;width:100%}
  .cs .tk-chart{gap:6px;height:200px}

}
@media(prefers-reduced-motion:reduce){.cs .caret{animation:none}.cs .sc-chart i,.cs .stream-card [data-k],.cs .tk-bar i,.cs .sg i{transition:none}}

/* Icons: Phosphor (MIT), inlined by scripts/escher-icons.py. Spots are duotone tiles above short headings; .ic sits inline with labels. */
.cs .spot{position:relative;isolation:isolate;display:grid;place-items:center;width:44px;height:44px;color:var(--red);margin-bottom:22px}
.cs .spot::before,.cs .spot::after{content:"";position:absolute;inset:0;border-radius:12px;z-index:-1}
.cs .spot::before{transform:translate(4px,4px);background:var(--dith-l);opacity:.5}
.cs .spot::after{background:var(--bg);border:1px solid var(--rule)}
.cs .spot svg{width:22px;height:22px;display:block}
.cs .ic{display:inline-flex;vertical-align:-2px;margin-right:7px}
.cs .ic svg{width:15px;height:15px;display:block}
.cs .facts dt .ic svg{width:14px;height:14px}
.cs .tier .n .ic,.cs .builds .n .ic{color:var(--strong)}
.cs .t-c .n .ic{color:var(--red)}
.cs .toolset{position:relative}
.cs .toolset .spot{position:absolute;top:24px;right:24px;margin:0;width:38px;height:38px;border-radius:10px}
.cs .toolset .spot::before,.cs .toolset .spot::after{border-radius:10px}
.cs .toolset .spot svg{width:20px;height:20px}
.cs .toolset.key .spot::after{background:transparent;border-color:color-mix(in srgb,var(--bg) 25%,transparent)}
.cs .toolset.key .spot::before{display:none}
.cs .replay{display:inline-flex;align-items:center}
.cs .replay .ic{margin-right:5px;vertical-align:0}
.cs .replay .ic svg{width:13px;height:13px}

/* Data model: the real tables. escher.js draws the wires for the chosen table. */
.cs .er-grid{position:relative;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:40px 48px}
.cs .art.er svg.er-wires{position:absolute;inset:0;width:100%;height:100%;max-width:none;overflow:visible;pointer-events:none;opacity:1;transform:none;transition:none}
.cs .er-wires path{fill:none;stroke:var(--strong);stroke-width:1.25}
.cs .er-wires circle{fill:var(--red)}
.cs .er-col{position:relative;z-index:1;display:flex;flex-direction:column;gap:16px;min-width:0}
.cs .er-h{font-size:13px;color:var(--muted);margin:0 0 2px}
.cs .er-t{position:relative;display:block;width:100%;text-align:left;font:inherit;color:inherit;background:var(--bg);border:1.5px solid var(--strong);border-radius:10px;padding:0;cursor:pointer;transition:border-color .3s ease,box-shadow .25s ease}
.cs .er-t::before{content:"";position:absolute;inset:-1.5px;transform:translate(5px,5px);border-radius:10px;background:var(--dith-l);z-index:-1;transition:opacity .3s ease}
.cs .er-n{display:block;font-family:'Geist Mono',ui-monospace,monospace;font-size:12px;color:var(--strong);padding:9px 12px;border-bottom:1.5px solid var(--strong);overflow-wrap:anywhere}
.cs .er-t.key .er-n{background:var(--strong);color:var(--bg);border-radius:8px 8px 0 0}
.cs .er-t.key .er-n::before{content:"";display:inline-block;width:8px;height:8px;border-radius:2px;background:var(--red);margin-right:8px;vertical-align:0}
.cs .er-cs{display:block;padding:6px 0 8px}
.cs .er-c{display:flex;justify-content:space-between;gap:10px;font-family:'Geist Mono',ui-monospace,monospace;font-size:11px;line-height:1.35;padding:3px 12px;color:var(--soft)}
.cs .er-c span{min-width:0;overflow-wrap:anywhere}
.cs .er-c em{font-style:normal;color:var(--muted);white-space:nowrap}
.cs .er-c.pk span,.cs .er-c.fk span{color:var(--strong)}
.cs .er-c.pk span::before,.cs .er-k.pk::before{content:"";display:inline-block;width:6px;height:6px;border-radius:1px;background:var(--strong);margin-right:6px;vertical-align:1px}
.cs .er-c.fk span::before,.cs .er-k.fk::before{content:"";display:inline-block;width:5px;height:5px;border-radius:50%;border:1.5px solid var(--red);margin-right:6px;vertical-align:1px}
.cs .er.has-sel .er-t:not(.sel):not(.rel){border-color:var(--rule)}
.cs .er.has-sel .er-t:not(.sel):not(.rel)::before{opacity:0}
.cs .er.has-sel .er-t:not(.sel):not(.rel) .er-n{border-color:var(--rule);color:var(--muted)}
.cs .er.has-sel .er-t:not(.sel):not(.rel) .er-c,.cs .er.has-sel .er-t:not(.sel):not(.rel) .er-c span{color:var(--muted)}
.cs .er.has-sel .er-t.key:not(.sel):not(.rel) .er-n{background:var(--rule)}
.cs .er-t.sel{box-shadow:0 0 0 2px var(--bg),0 0 0 4px var(--red)}
.cs .er-t:hover{border-color:var(--strong)!important}
.cs .er-note{margin:40px 0 0;max-width:640px;font-size:15px;line-height:1.6;color:var(--soft);min-height:3.2em}
.cs .er-note b{font-family:'Geist Mono',ui-monospace,monospace;font-weight:400;font-size:13px;color:var(--strong);margin-right:6px}
.cs .er-key{display:flex;flex-wrap:wrap;gap:8px 24px;margin:16px 0 0;font-size:12px;color:var(--muted)}
@media(max-width:1100px){.cs .er-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.cs .er-grid{grid-template-columns:minmax(0,1fr)}.cs .art.er svg.er-wires{display:none}}

/* Components: working copies of Escher's own. */
.cs .gxs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-top:40px}
.cs .gx{display:flex;flex-direction:column;background:var(--panel);border-radius:14px;padding:20px 20px 16px;margin:0;min-width:0}
.cs .gx-stage{position:relative;flex:1;display:grid;place-items:center;min-height:168px}
.cs .gx figcaption{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-top:16px}
.cs .gx figcaption code{background:none;padding:0;font-size:12px}
.cs .gx-hint{font-size:12px;color:var(--muted)}
.cs .gm,.cs .gw{display:grid;gap:3px;width:100%;max-width:240px;background:var(--bg);border:1px solid var(--rule);border-radius:10px;padding:14px 16px}
.cs .gm-l,.cs .gm-n{font-size:12px;color:var(--muted)}
.cs .gm-v{font-size:26px;font-weight:500;color:var(--strong);letter-spacing:-.01em;margin:2px 0}
.cs .gm-d{font-size:12px;color:var(--soft)}
.cs .gm-d.bad{color:var(--red)}
.cs .gc{width:100%;padding:8px 0 22px 34px}
.cs .gc-plot{position:relative;height:128px}
.cs .gc-tick{position:absolute;left:0;right:0;bottom:var(--y);border-top:1px solid var(--rule)}
.cs .gc-tick i{position:absolute;right:100%;margin-right:6px;transform:translateY(-50%);font:normal 10px 'Geist Mono',ui-monospace,monospace;color:var(--muted)}
.cs .gc-bands{position:absolute;inset:0;display:flex}
.cs .gc-band{position:relative;flex:1;height:100%;font:inherit;background:transparent;border:0;padding:0;cursor:default;border-radius:4px 4px 0 0}
.cs .gc-band:hover,.cs .gc-band:focus-visible{background:color-mix(in srgb,var(--strong) 5%,transparent);outline:0}
.cs .gc-band i{position:absolute;bottom:0;left:22%;right:22%;height:var(--h);background:color-mix(in srgb,var(--strong) 20%,var(--bg));border-radius:2px 2px 0 0}
.cs .gc-band.on i{background:var(--strong)}
.cs .gc-band span{position:absolute;top:100%;left:50%;transform:translateX(-50%);margin-top:6px;font:10px 'Geist Mono',ui-monospace,monospace;color:var(--muted);white-space:nowrap}
.cs .gc-band.on span{color:var(--strong)}
.cs .gc-tip{position:absolute;top:-6px;left:0;margin:0;padding:4px 8px;font-size:12px;color:var(--strong);background:var(--bg);border:1px solid var(--rule);border-radius:6px;white-space:nowrap;pointer-events:none;opacity:0;transform:translate(-50%,-100%);transition:opacity .15s ease}
.cs .gc-tip.on{opacity:1}
.cs .gd{width:100%;border-collapse:separate;border-spacing:0;background:var(--bg);border:1px solid var(--rule);border-radius:8px;font-size:12px;color:var(--strong)}
.cs .gd th{text-align:left;padding:0;border-bottom:1px solid var(--rule)}
.cs .gd th button{font:inherit;font-size:11px;color:var(--muted);background:none;border:0;padding:8px 8px;cursor:pointer;width:100%;text-align:inherit;white-space:nowrap}
.cs .gd th button:hover{color:var(--strong)}
.cs .gd th button[aria-sort]{color:var(--strong)}
.cs .gd th button[aria-sort=descending]::after{content:" ↓"}
.cs .gd th button[aria-sort=ascending]::after{content:" ↑"}
.cs .gd td{padding:7px 8px;border-top:1px solid var(--rule);white-space:nowrap}
.cs .gd tr:first-child td{border-top:0}
.cs .gd td:first-child{font-family:'Geist Mono',ui-monospace,monospace;font-size:11px;white-space:normal;overflow-wrap:anywhere}
.cs .gd .r{text-align:right;font-variant-numeric:tabular-nums}
.cs .gf{width:100%;height:auto;overflow:visible}
.cs .gf text{font-size:11px;fill:var(--strong)}
.cs .gf .gf-s{font-size:10px;fill:var(--muted)}
.cs .gf-l{stroke:var(--strong);stroke-width:1.25;fill:none}
.cs .gf-b{fill:var(--bg);stroke:var(--strong);stroke-width:1.25}
.cs .gf-b.red{fill:url(#r25);stroke:var(--red)}
.cs .gw{gap:10px}
.cs .gw-l{font-size:12px;color:var(--muted)}
.cs .gw-l b{color:var(--strong);font-weight:400;font-variant-numeric:tabular-nums}
.cs .gw input{width:100%;margin:0;accent-color:var(--red)}
.cs .gw-v{font-size:22px;font-weight:500;color:var(--strong);font-variant-numeric:tabular-nums}
.cs .gx[data-gx=Cite] .gx-stage{place-items:start stretch;align-content:start;padding-top:12px}
.cs .gt{margin:0;font-size:14px;line-height:1.55;color:var(--strong)}
.cs .gt-m{font:inherit;font-size:10px;line-height:16px;min-width:16px;height:16px;padding:0 4px;margin-left:3px;vertical-align:super;border:0;border-radius:8px;background:var(--chip);color:var(--strong);cursor:help}
.cs .gt-m:hover,.cs .gt-m:focus-visible,.cs .gx-stage.open .gt-m{background:var(--red);color:#fff;outline:0}
.cs .gt-m:focus-visible{box-shadow:0 0 0 2px var(--bg),0 0 0 3px var(--red)}
.cs .gt-pop{position:absolute;left:0;right:0;top:76px;display:grid;gap:4px;padding:10px 12px;font-size:12px;color:var(--strong);background:var(--bg);border:1px solid var(--rule);border-radius:8px;opacity:0;transform:translateY(4px);transition:opacity .2s ease,transform .2s ease;pointer-events:none}
.cs .gx-stage:has(.gt-m:hover) .gt-pop,.cs .gx-stage:has(.gt-m:focus-visible) .gt-pop,.cs .gx-stage.open .gt-pop{opacity:1;transform:none}
.cs .gt-src{display:flex;align-items:center;gap:6px;margin-bottom:2px}
.cs .gt-src i{width:6px;height:6px;border-radius:50%;background:var(--red)}
.cs .gt-kv em{font-style:normal;color:var(--muted);margin-right:8px}
.cs .gt-ts{font-size:11px;color:var(--muted);margin-top:2px}
.cs .gq{width:100%}
.cs .gq-step{margin:0;font:11px 'Geist Mono',ui-monospace,monospace;color:var(--muted)}
.cs .gq-q{margin:4px 0 10px;font-size:15px;color:var(--strong)}
.cs .gq-o{display:grid;gap:6px}
.cs .gq-o button{font:inherit;font-size:13px;text-align:left;color:var(--strong);background:var(--bg);border:1px solid var(--rule);border-radius:8px;padding:7px 12px;cursor:pointer;transition:border-color .2s ease}
.cs .gq-o button:hover,.cs .gq-o button:focus-visible{border-color:var(--strong);outline:0}
.cs .gq-o button.again{border-style:dashed;color:var(--soft)}
.cs .gr-sheet{display:grid;gap:5px;width:100%;max-width:170px;background:var(--bg);border:1px solid var(--rule);border-radius:8px;padding:14px}
.cs .gr-st{justify-self:start;font-size:10px;color:var(--red);border:1px solid var(--red);border-radius:99px;padding:1px 8px}
.cs .gr-t{font-size:13px;font-weight:500;color:var(--strong);margin-top:4px}
.cs .gr-s{font-size:11px;color:var(--muted)}
.cs .gr-ch{display:flex;align-items:flex-end;gap:7px;height:46px;margin:8px 0 4px;border-bottom:1px solid var(--rule)}
.cs .gr-ch i{flex:1;height:var(--h);background:var(--dith)}
.cs .gr-ch i.on{background:var(--dith-r)}
.cs .gr-ln i{display:block;height:1px;background:var(--rule);margin-top:7px}
.cs .gr-ln i:nth-child(2){width:80%}.cs .gr-ln i:nth-child(3){width:60%}
@media(max-width:1100px){.cs .gxs{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.cs .gxs{grid-template-columns:minmax(0,1fr)}}

/* Evaluation: pick a mistake, watch the graders. */
.cs .gv-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:32px}
.cs .gv-chips button{font:inherit;font-size:13px;color:var(--soft);background:var(--bg);border:1px solid var(--rule);border-radius:99px;padding:7px 14px;cursor:pointer;transition:background .2s ease,color .2s ease,border-color .2s ease}
.cs .gv-chips button:hover{color:var(--strong);border-color:var(--line)}
.cs .gv-chips button[aria-pressed=true]{background:var(--strong);border-color:var(--strong);color:var(--bg)}
.cs .gv-body{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr);gap:48px;align-items:start}
.cs .gv-turn{position:relative;background:var(--bg);border:1.5px solid var(--strong);border-radius:12px;padding:20px 22px}
.cs .gv-turn::before{content:"";position:absolute;inset:-1.5px;transform:translate(7px,7px);border-radius:12px;background:var(--dith-l);z-index:-1}
.cs .gv-h{margin:0 0 8px;font-size:12px;color:var(--muted)}
.cs .gv-h+pre+.gv-h{margin-top:20px}
.cs .gv-turn pre{margin:0;font:11.5px/1.8 'Geist Mono',ui-monospace,monospace;color:var(--strong);white-space:pre-wrap;overflow-wrap:anywhere}
.cs .gv-tool{color:var(--soft)!important}
.cs .gv-turn pre span{display:block;min-height:1.8em;margin:0 -22px;padding:0 22px;transition:background .3s ease}
.cs .gv-turn pre span.bad{background:color-mix(in srgb,var(--red) 13%,transparent);box-shadow:inset 3px 0 var(--red)}
.cs .gv-list{list-style:none;margin:0;padding:0}
.cs .gv-list li{display:grid;grid-template-columns:20px 84px minmax(0,1fr);align-items:center;gap:12px;padding:11px 0;border-top:1px solid var(--rule);transition:opacity .25s ease}
.cs .gv-list li:last-child{border-bottom:1px solid var(--rule)}
.cs .gv-n{font:12px 'Geist Mono',ui-monospace,monospace;color:var(--strong)}
.cs .gv-d{font-size:13px;color:var(--soft)}
.cs .gv-i{position:relative;width:20px;height:20px;border-radius:50%;border:1.5px solid var(--strong);transition:background .2s ease,border-color .2s ease}
.cs .gv-list .pass .gv-i::after{content:"";position:absolute;left:5.5px;top:3px;width:4px;height:8px;border:solid var(--strong);border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.cs .gv-list .fail .gv-i{border-color:var(--red);background:var(--dith-r)}
.cs .gv-list .fail .gv-n{color:var(--red)}
.cs .gv-list .wait{opacity:.35}
.cs .gv-list .wait .gv-i{border-style:dashed}
.cs .gv-list .run .gv-i{border-color:var(--rule);border-top-color:var(--strong);animation:gvspin .6s linear infinite}
@keyframes gvspin{to{transform:rotate(360deg)}}
.cs .gv-msg{margin:20px 0 0;min-height:2.6em}
.cs .gv-msg code{display:block;padding:10px 12px;border-radius:8px;font-size:12px;line-height:1.5;color:var(--red);background:color-mix(in srgb,var(--red) 8%,transparent)}
.cs .gv-msg.ok code{color:var(--strong);background:var(--chip)}
.cs .gv-msg.hold{opacity:0}
.cs .gv-why{margin:12px 0 0;font-size:14px;line-height:1.55;color:var(--soft)}
@media(max-width:900px){.cs .gv-body{grid-template-columns:minmax(0,1fr);gap:40px}}
@media(prefers-reduced-motion:reduce){.cs .gv-list .run .gv-i{animation:none}.cs .er-t,.cs .gt-pop,.cs .gv-list li{transition:none}}
.cs .gv-tool{min-height:5.4em}.cs .gv-code{min-height:12.6em}
@media(max-width:600px){.cs .gv-chips{flex-wrap:nowrap;overflow-x:auto;margin:0 -12px 28px;padding:0 12px 4px;scrollbar-width:none}.cs .gv-chips::-webkit-scrollbar{display:none}.cs .gv-chips button{flex:none}}

/* Who it's for: seven roles. SRE, the primary user, gets the tall dark card. */
.cs .roles{display:grid;grid-template-columns:minmax(0,1.3fr) repeat(3,minmax(0,1fr));gap:16px;margin-top:64px}
.cs .role{display:flex;flex-direction:column;gap:4px;min-width:0;background:var(--panel);border-radius:16px;padding:24px 24px 26px}
.cs .role-ic{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;background:var(--bg);border:1px solid var(--rule);color:var(--strong);margin-bottom:18px}
.cs .role-ic .ic{margin:0}
.cs .role-ic .ic svg{width:18px;height:18px}
.cs .role b{font-size:16px;font-weight:500;color:var(--strong)}
.cs .role p{font-size:14px;line-height:1.5;color:var(--soft);margin:0}
.cs .role.main{grid-row:span 2;background:var(--strong);padding:28px}
.cs .role.main .role-ic{background:transparent;border-color:color-mix(in srgb,var(--bg) 25%,transparent);color:var(--bg)}
.cs .role-tag{margin-top:auto;font-size:12px;color:color-mix(in srgb,var(--bg) 60%,transparent)}
.cs .role.main b{color:var(--bg);font-size:36px;line-height:1.15;letter-spacing:-.02em}
.cs .role.main p{color:color-mix(in srgb,var(--bg) 72%,transparent);font-size:15px;margin-top:6px}
.cs .roles-note{font-size:14px;color:var(--muted);margin:16px 0 0}
@media(max-width:900px){.cs .roles{grid-template-columns:repeat(2,minmax(0,1fr))}.cs .role.main{grid-row:auto;grid-column:1/-1}.cs .role.main .role-tag{margin-top:12px}}
@media(max-width:600px){.cs .roles{grid-template-columns:minmax(0,1fr)}}

/* Ask: two passes. Pass 1's tool calls on the left, pass 2's report on the right; each number cites its call. */
.cs .passes{padding:40px}
.cs .ps-grid{display:grid;grid-template-columns:minmax(0,1fr) 64px minmax(0,1fr);align-items:start}
.cs .ps-h{display:flex;align-items:baseline;gap:10px;margin:0 0 14px;font-size:13px;color:var(--muted)}
.cs .ps-h b{font-size:15px;font-weight:500;color:var(--strong)}
.cs .ps-calls{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.cs .ps-calls li{display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:12px;background:var(--bg);border:1px solid var(--rule);border-radius:10px;padding:10px 14px 10px 10px;transition:border-color .35s,box-shadow .35s,opacity .35s}
.cs .ps-n{display:grid;place-items:center;width:22px;height:22px;border-radius:6px;background:var(--chip);font:500 11px 'Geist Mono',ui-monospace,monospace;color:var(--strong);transition:background .35s,color .35s}
.cs .ps-n .ic{margin:0}
.cs .ps-n .ic svg{width:13px;height:13px}
.cs .ps-call{display:flex;flex-direction:column;min-width:0}
.cs .ps-call code{background:none;padding:0;font:12px 'Geist Mono',ui-monospace,monospace;color:var(--strong)}
.cs .ps-arg{font:11px 'Geist Mono',ui-monospace,monospace;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.cs .ps-out{font-size:12.5px;color:var(--text);text-align:right}
.cs .ps-calls .ps-ctl{background:transparent;border-style:dashed}
.cs .ps-ctl .ps-n{background:transparent;color:var(--red)}
.cs .ps-ctl .ps-out{color:var(--red)}
.cs .ps-hand{position:relative;align-self:stretch;display:grid;place-items:center}
.cs .ps-hand::before{content:"";position:absolute;left:10px;right:10px;top:50%;border-top:1px solid var(--line)}
.cs .ps-hand::after{content:"";position:absolute;right:10px;top:50%;width:7px;height:7px;border-top:1px solid var(--line);border-right:1px solid var(--line);transform:translate(0,-50%) rotate(45deg);transform-origin:center}
.cs .ps-hand span{position:relative;writing-mode:vertical-rl;transform:rotate(180deg);font-size:11px;color:var(--muted);background:var(--panel);padding:10px 0}
.cs .ps-doc{background:var(--bg);border:1px solid var(--rule);border-radius:12px;padding:20px 20px 22px;box-shadow:0 14px 36px -24px #00000033}
.cs .ps-title{display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:16px;font-weight:500;color:var(--strong);margin:0}
.cs .ps-st{font-size:11px;font-weight:500;padding:3px 8px;border-radius:999px;background:color-mix(in srgb,var(--red) 12%,transparent);color:var(--red)}
.cs .ps-sub{font-size:12px;color:var(--muted);margin:2px 0 16px}
.cs .ps-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-bottom:16px}
.cs .ps-kpis div{border:1px solid var(--rule);border-radius:8px;padding:10px 12px;min-width:0}
.cs .ps-kpis span{display:block;font-size:11px;line-height:1.4;color:var(--muted)}
.cs .ps-kpis b{display:flex;align-items:flex-start;gap:3px;margin-top:4px;font-size:24px;font-weight:500;line-height:1.1;letter-spacing:-.01em;color:var(--strong);font-variant-numeric:tabular-nums}
.cs .ps-text{font-size:14px;line-height:1.65;color:var(--text);margin:0}
.cs .ps-c{display:inline-grid;place-items:center;min-width:16px;height:16px;padding:0 3px;margin:0 0 0 2px;border:0;border-radius:4px;background:var(--chip);font:500 10px/1 'Geist Mono',ui-monospace,monospace;color:var(--strong);vertical-align:3px;cursor:pointer;transition:background .35s,color .35s}
.cs .ps-kpis .ps-c{margin-top:2px;vertical-align:0}
.cs .ps-c:focus-visible{outline:2px solid var(--red);outline-offset:1px}
.cs .ps-c.on{background:var(--red);color:#fff}
.cs .passes.tracing .ps-calls li:not(.on){opacity:.38}
.cs .ps-calls li.on{border-color:var(--red);box-shadow:0 0 0 3px color-mix(in srgb,var(--red) 14%,transparent)}
.cs .ps-calls li.on .ps-n{background:var(--red);color:#fff}
.cs .ps-note{font-size:13px;color:var(--muted);margin:24px 0 0}
@media(max-width:900px){.cs .ps-grid{grid-template-columns:minmax(0,1fr)}.cs .ps-hand{height:56px}.cs .ps-hand span{writing-mode:horizontal-tb;transform:none;padding:0 10px}.cs .ps-hand::before{left:50%;right:auto;top:8px;bottom:8px;border-top:0;border-left:1px solid var(--line)}.cs .ps-hand::after{right:auto;left:50%;top:auto;bottom:8px;transform:translate(-50%,0) rotate(135deg)}}
@media(max-width:600px){.cs .passes{padding:20px 14px}.cs .ps-calls li{grid-template-columns:22px minmax(0,1fr)}.cs .ps-out{grid-column:2;text-align:left}.cs .ps-kpis b{font-size:20px}}

/* Choosing the chart: the same data, chosen two ways. */
.cs .cc{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:40px}
.cs .cc-card{display:flex;flex-direction:column;margin:0;background:var(--panel);border-radius:16px;padding:24px}
.cs .cc-card figcaption{display:flex;align-items:center;gap:10px;margin:0;max-width:none;font-size:14px;color:var(--strong)}
.cs .cc-tag{font:500 11px 'Geist Mono',ui-monospace,monospace;padding:3px 8px;border-radius:6px;background:var(--chip);color:var(--muted)}
.cs .cc-card:not(.bad) .cc-tag{background:var(--strong);color:var(--bg)}
.cs .cc-stage{flex:1;display:grid;place-items:center;min-height:210px;margin:20px 0}
.cs .cc-chart{display:flex;align-items:stretch;gap:10px;width:100%;max-width:360px;height:150px;background:var(--bg);border:1px solid var(--rule);border-radius:10px;padding:16px 16px 10px}
.cs .cc-b{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
.cs .cc-b i{display:block;width:100%;height:38%;border-radius:3px 3px 0 0;background:color-mix(in srgb,var(--muted) 55%,transparent)}
.cs .cc-b em{order:-1;font:normal 10px 'Geist Mono',ui-monospace,monospace;color:var(--muted)}
.cs .cc-b small{font-size:10px;color:var(--muted);white-space:nowrap}
.cs .cc-metric{max-width:260px}
.cs .cc-say{display:flex;align-items:center;gap:8px;font-size:14px;color:var(--soft);margin:0}
.cs .cc-say .ic{margin:0;color:var(--strong)}
.cs .cc-card.bad .cc-say .ic{color:var(--red)}
@media(max-width:700px){.cs .cc{grid-template-columns:minmax(0,1fr)}}

/* Diagram fills: plain tokens, no dither. */
.cs .i-tok{fill:var(--chip)}
.cs .i-cur{fill:var(--strong);stroke:var(--bg);stroke-width:1.2;stroke-linejoin:round}
