/* Signal theme: near-black, one red accent, metallic headings, mono micro-labels.
   Shared by the homepage, the case studies and the retention dashboard. */
:root {
  --bg: #070608; --surface: #121015; --surface2: #18151c;
  --ink: #ece8ef; --ink-2: #a39cab; --ink-3: #7a7383; --line: rgba(255, 255, 255, 0.08); --line2: rgba(255, 255, 255, 0.14);
  --accent: #ff3b2f; --accent-soft: rgba(255, 59, 47, 0.14); --dot-muted: #4a4350; --radius: 14px;
  --sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; --serif: var(--sans);
  --display: "Instrument Serif", Georgia, serif; --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
h1, h2, h3, h4, p, dl, dd, ul, ol, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: 32px; padding-right: 32px; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }
.metal { background: linear-gradient(180deg, #ffffff 0%, #e4e1e8 40%, #8d8794 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.it { font-family: var(--display); font-style: italic; font-weight: 400; letter-spacing: -.01em; color: var(--accent); -webkit-text-fill-color: var(--accent); padding-right: .05em; }
.skip-link { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--accent); color: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* nav */
.nav { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); width: min(1240px, calc(100% - 32px)); z-index: 50;
  display: flex; align-items: center; gap: 22px; padding: 10px 12px 10px 18px; border: 1px solid var(--line); border-radius: 14px;
  background: rgba(10, 8, 12, .8); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 600; letter-spacing: .14em; font-size: 13px; white-space: nowrap; }
.logo svg { width: 26px; height: 18px; color: var(--accent); }
.nav nav { display: flex; gap: 26px; margin: 0 auto; font-size: 14px; color: var(--ink-2); }
.nav nav a:hover { color: var(--ink); }
.clock { color: var(--ink-3); white-space: nowrap; } .clock b { color: var(--ink); font-weight: 500; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 8px; font: 600 14.5px/1.2 var(--sans); color: var(--ink); background: transparent; border: 1px solid var(--line2); cursor: pointer; white-space: nowrap; transition: border-color .2s, transform .2s, background-color .2s; }
.btn:hover { transform: translateY(-1px); border-color: #fff4; }
.btn.red, .btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 10px 30px -12px #ff3b2f99; }
.btn.red:hover, .btn-primary:hover { background: #ff5146; }
.btn.sm { padding: 9px 14px; font-size: 13.5px; }

/* section heads */
.sec { padding-top: 120px; }
.kick { display: flex; align-items: center; gap: 12px; color: var(--ink-3); }
.kick b { color: var(--accent); font-weight: 500; } .kick i { width: 34px; height: 1px; background: var(--ink-3); }
.sec-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: end; margin-top: 18px; }
.sec-head h2 { font-weight: 500; font-size: clamp(36px, 4.8vw, 64px); line-height: 1.02; letter-spacing: -.035em; }
.sec-head p { color: var(--ink-2); max-width: 420px; }
.tag { display: inline-block; padding: 6px 10px; border: 1px solid var(--line2); border-radius: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-2); text-transform: uppercase; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.fig { color: var(--ink-3); }

/* ================= homepage ================= */
.hero { position: relative; min-height: 760px; padding-top: 170px; overflow: hidden; }
#field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero .wrap { position: relative; z-index: 2; }
.hero .kick b { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero h1 { margin-top: 26px; font-weight: 500; font-size: clamp(56px, 9.6vw, 148px); line-height: .92; letter-spacing: -.055em; }
.hero-row { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-top: 40px; }
.hero-row p { max-width: 430px; color: var(--ink-2); font-size: 17px; }
.hero-row p b { color: var(--ink); font-weight: 500; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; }
.telemetry { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: rgba(7, 6, 8, .85); }
.telemetry .wrap { display: flex; gap: 34px; padding-top: 13px; padding-bottom: 13px; color: var(--ink-3); white-space: nowrap; }
.telemetry b { color: var(--ink); font-weight: 500; } .telemetry .r { color: var(--accent); }
.telemetry .push { margin-left: auto; }

.marq { overflow: hidden; border-bottom: 1px solid var(--line); padding: 24px 0; -webkit-mask: linear-gradient(90deg, #0000, #000 12%, #000 88%, #0000); mask: linear-gradient(90deg, #0000, #000 12%, #000 88%, #0000); }
.marq div { display: inline-flex; gap: 46px; white-space: nowrap; animation: slide 40s linear infinite; font-size: 26px; letter-spacing: -.02em; color: var(--ink-2); }
.marq span { display: inline-flex; align-items: center; gap: 46px; }
.marq svg { width: 22px; height: 15px; color: var(--accent); }
@keyframes slide { to { transform: translateX(-50%); } }

/* the interactive board (assets/hero.js) */
.board { display: grid; grid-template-columns: minmax(0, 1fr) 300px; margin-top: 50px; overflow: hidden; position: relative; }
.board-top { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--line); color: var(--ink-3); }
.board-top .dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #2a2530; margin-right: 6px; }
.board-top .dots i:first-child { background: var(--accent); }
.hero-viz { margin: 0; padding: 22px 26px; border-right: 1px solid var(--line); min-width: 0; }
.viz-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 8px; background: rgba(0, 0, 0, .4); border: 1px solid var(--line); }
.viz-tab { font: 500 12px var(--mono); letter-spacing: .06em; text-transform: uppercase; background: transparent; border: 0; color: var(--ink-2); padding: 9px 13px; border-radius: 5px; cursor: pointer; }
.viz-tab:hover { color: var(--ink); }
.viz-tab[aria-pressed="true"] { background: var(--accent); color: #fff; }
.viz-stage { position: relative; height: 340px; margin-top: 14px; cursor: pointer; }
.viz-stage canvas { display: block; }
.viz-tip { position: absolute; z-index: 3; pointer-events: none; padding: 6px 10px; border-radius: 6px; background: #fff; color: #111; font-size: 12.5px; white-space: nowrap; box-shadow: 0 8px 20px #0008; }
.hero-viz figcaption { margin-top: 10px; }
.viz-q { font-weight: 500; font-size: 19px; letter-spacing: -.01em; }
.viz-a { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-top: 10px; font-size: 12.5px; color: var(--ink-3); }
.viz-item { display: inline-flex; gap: 7px; align-items: center; }
.key { display: inline-block; width: 9px; height: 9px; border-radius: 50%; }
.key-hi { background: var(--accent); box-shadow: 0 0 10px var(--accent); } .key-lo { background: var(--dot-muted); }
.viz-note { margin-left: auto; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.viz-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 600; color: var(--accent); }
.results { display: grid; grid-template-rows: repeat(4, 1fr); }
.result { display: flex; flex-direction: column; justify-content: center; padding: 18px 24px; border-bottom: 1px solid var(--line); transition: background-color .2s; }
.result:last-child { border-bottom: 0; } .result:hover { background: rgba(255, 59, 47, .05); }
.result b, .result span { transition: opacity .18s, transform .18s; }
.result.swap b, .result.swap span { opacity: 0; transform: translateY(6px); }
.result b { font-size: 40px; font-weight: 500; letter-spacing: -.045em; line-height: 1; }
.result span { margin-top: 6px; font-size: 13px; color: var(--ink-3); }

/* project ring (3D on desktop, a swipe row on phones) */
.ringwrap { position: relative; height: 480px; margin-top: 30px; perspective: 1900px; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ringwrap:active { cursor: grabbing; }
.ringwrap::before { content: ""; position: absolute; left: 50%; top: 55%; width: 900px; max-width: 100%; height: 300px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(255, 59, 47, .16), transparent); pointer-events: none; }
.ring { position: absolute; left: 50%; top: 30px; width: 0; height: 0; transform-style: preserve-3d; }
.card { position: absolute; width: 270px; left: -135px; top: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 12px; border: 1px solid var(--line2);
  background: linear-gradient(180deg, #17141b, #0f0d12); padding: 14px 14px 16px; box-shadow: 0 30px 60px -30px #000; transition: border-color .3s; }
.card.front { border-color: rgba(255, 59, 47, .55); box-shadow: 0 30px 70px -30px rgba(255, 59, 47, .4); }
.card .ch { display: flex; justify-content: space-between; } .card .ch b { color: var(--accent); font-weight: 500; } .card .ch span { color: var(--ink-3); }
.card .img { position: relative; height: 140px; margin-top: 12px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); background: #000; }
.card .img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card h3 { font-weight: 500; font-size: 18px; line-height: 1.18; letter-spacing: -.02em; margin: 14px 0 12px; min-height: 42px; }
.card dl { display: grid; grid-template-columns: 62px 1fr; gap: 8px 8px; align-items: baseline; padding-top: 12px; border-top: 1px solid var(--line); }
.card dt { font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; color: var(--ink-3); text-transform: uppercase; padding-top: 2px; }
.card dd { font-family: var(--mono); font-size: 12px; }
.card dd.ans { font-family: var(--sans); font-size: 17px; font-weight: 500; letter-spacing: -.02em; color: var(--accent); line-height: 1.15; }
.card dd.proof { font-family: var(--sans); font-size: 13px; color: var(--ink-2); line-height: 1.3; }
.card dd.proof b { font-weight: 600; color: var(--ink); }
.ringctl { display: flex; justify-content: center; align-items: center; gap: 22px; color: var(--ink-3); }
.ringctl button { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line2); background: transparent; color: var(--ink); font-size: 16px; cursor: pointer; }
.ringctl button:hover { border-color: var(--accent); color: var(--accent); }
.ringwrap.flat { height: auto; perspective: none; cursor: auto; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding: 6px 16px 20px; touch-action: auto; }
.ringwrap.flat::-webkit-scrollbar { display: none; }
.ringwrap.flat::before { display: none; }
.ringwrap.flat .ring { position: static; display: flex; gap: 12px; width: max-content; height: auto; transform: none !important; }
.ringwrap.flat .card { position: relative; left: auto; width: min(78vw, 290px); transform: none !important; opacity: 1 !important; filter: none !important; scroll-snap-align: center; }

/* all-projects table */
.ptable-wrap { margin-top: 70px; overflow-x: auto; }
.ptable { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.ptable caption { text-align: left; padding-bottom: 14px; color: var(--ink-3); white-space: nowrap; }
.ptable th, .ptable td { text-align: left; padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.ptable thead th { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); border-bottom-color: var(--line2); }
.ptable tbody th { font-weight: 500; white-space: nowrap; } .ptable tbody th a:hover { color: var(--accent); }
.ptable td { color: var(--ink-2); }
.ptable td.v { color: var(--accent); font-weight: 500; font-size: 15.5px; letter-spacing: -.01em; min-width: 190px; }
.ptable td.v span { display: block; margin-top: 3px; font-weight: 400; font-size: 13px; color: var(--ink-3); letter-spacing: 0; }
.ptable td.t { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); }
.ptable td.l { white-space: nowrap; } .ptable td.l a { color: var(--ink); } .ptable td.l a:hover { color: var(--accent); }

/* toolkit bento */
.bento { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-top: 50px; }
.b { position: relative; border-radius: var(--radius); padding: 24px 26px; overflow: hidden; border: 1px solid var(--line); background: var(--surface); }
.b .lab { display: flex; align-items: center; gap: 10px; color: var(--ink-3); }
.b .lab span:first-child { display: grid; place-items: center; width: 22px; height: 22px; border: 1px solid currentColor; border-radius: 4px; font-size: 10px; }
.b h3 { font-weight: 500; font-size: 26px; letter-spacing: -.025em; line-height: 1.1; margin-top: 14px; }
.b p { color: var(--ink-2); font-size: 14.5px; margin-top: 8px; max-width: 460px; }
.b .tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.b.light { grid-row: span 2; background: #ecebee; color: #121014; display: flex; flex-direction: column; justify-content: flex-end; min-height: 560px; }
.b.light .lab, .b.light p { color: #5d5763; } .b.light .tag { border-color: rgba(0, 0, 0, .15); color: #3d3842; }
.b.light a.tag:hover { border-color: var(--accent); color: var(--accent); }
.b.light canvas { position: absolute; left: 0; top: 0; width: 100%; height: 66%; }
.b.light .pin { position: absolute; font-family: var(--mono); font-size: 10.5px; padding: 5px 8px; background: #fff; border: 1px solid rgba(0, 0, 0, .12); border-radius: 4px; color: #333; }
.b.light .pin::before { content: "●"; color: var(--accent); margin-right: 6px; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 90px; margin-top: 20px; }
.bars i { flex: 1; border-radius: 3px 3px 0 0; background: linear-gradient(#ff3b2f, rgba(255, 59, 47, .2)); }
.b.red { background: var(--accent); color: #fff; border-color: var(--accent); }
.b.red .lab, .b.red p { color: #ffe1dc; } .b.red .tag { border-color: rgba(255, 255, 255, .4); color: #fff; }
.b.red svg { display: block; width: 100%; height: 100px; margin-top: 16px; }
.b.term { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1.25fr; gap: 30px; }
.termwin { background: #09080b; border: 1px solid var(--line); border-radius: 10px; font-family: var(--mono); font-size: 13.5px; overflow: hidden; }
.termwin .tb { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11px; }
.termwin .tb i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #2a2530; margin-right: 5px; }
.termwin .body { padding: 16px 16px 6px; }
.termwin .pr { color: var(--ink-3); } .termwin .q { color: #fff; margin-top: 6px; min-height: 44px; }
.termwin .q::after { content: ""; display: inline-block; width: 8px; height: 16px; background: var(--accent); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
.termwin .rows { border-top: 1px solid var(--line); margin-top: 10px; }
.termwin .row { display: flex; gap: 10px; padding: 9px 16px; border-bottom: 1px dashed var(--line); color: var(--ink-2); font-size: 12.5px; }
.termwin .row:last-child { border-bottom: 0; } .termwin .row span:nth-child(2) { flex: 1; border-bottom: 1px dotted rgba(255, 255, 255, .13); margin-bottom: 5px; }
.termwin .row b { color: var(--accent); font-weight: 500; }

/* checks strip */
.checks { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; margin-top: 44px; align-items: start; }
.json { font-family: var(--mono); font-size: 13px; line-height: 2; padding: 18px 22px; overflow-x: auto; }
.json .k { color: var(--ink-3); }
.json .bad { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--accent); }
.json .fix { color: var(--accent); margin-left: 10px; }
.json .head { display: flex; justify-content: space-between; padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 11px; letter-spacing: .1em; }
.rules { border-top: 1px solid var(--line); }
.rule { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; }
.rule b { font-family: var(--mono); font-size: 11px; color: var(--accent); font-weight: 500; padding-top: 5px; }
.rule h4 { font-weight: 500; font-size: 18px; letter-spacing: -.01em; }
.rule p { color: var(--ink-2); font-size: 14.5px; margin-top: 4px; }

/* about */
.about { display: grid; grid-template-columns: 300px 1fr; gap: 50px; margin-top: 44px; align-items: start; }
.photo { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.photo img { display: block; width: 100%; filter: grayscale(.3) contrast(1.05); }
.photo .mono { position: absolute; left: 12px; bottom: 12px; padding: 5px 8px; background: rgba(0, 0, 0, .7); border-radius: 4px; color: var(--ink-2); }
.about-text p { font-size: 19px; color: var(--ink-2); line-height: 1.5; max-width: 680px; }
.about-text p + p { margin-top: 16px; } .about-text p b { color: var(--ink); font-weight: 500; }
.edu { display: grid; grid-template-columns: 110px 1fr; margin-top: 30px; border-top: 1px solid var(--line); max-width: 680px; }
.edu dt, .edu dd { padding: 12px 0; border-bottom: 1px solid var(--line); }
.edu dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); padding-top: 15px; }

/* contact */
.cta { position: relative; margin-top: 140px; padding: 70px 50px; border-radius: 18px; overflow: hidden; border: 1px solid rgba(255, 59, 47, .35); background: radial-gradient(80% 120% at 85% 100%, rgba(255, 59, 47, .25), transparent 60%), var(--surface); }
.cta h2 { font-weight: 500; font-size: clamp(34px, 5vw, 66px); line-height: 1.02; letter-spacing: -.04em; max-width: 780px; margin-top: 18px; }
.cta p { color: var(--ink-2); margin-top: 18px; max-width: 520px; }
.cta .acts { margin-top: 30px; }
.cta .big-m { position: absolute; right: -40px; bottom: -70px; width: 420px; height: 280px; color: rgba(255, 59, 47, .13); pointer-events: none; }

footer.foot { margin-top: 120px; border-top: 1px solid var(--line); padding: 30px 0 46px; color: var(--ink-3); }
footer.foot .wrap { display: flex; flex-wrap: wrap; gap: 14px 30px; align-items: center; }
footer.foot .links { margin-left: auto; display: flex; gap: 22px; }
footer.foot a:hover { color: var(--ink); }

/* ================= case studies ================= */
.case-top { padding-top: 150px; position: relative; }
.case-top::before { content: ""; position: absolute; right: -10%; top: 40px; width: 720px; max-width: 90%; height: 520px; background: radial-gradient(closest-side, rgba(255, 59, 47, .18), transparent); pointer-events: none; }
.crumb { display: flex; flex-wrap: wrap; gap: 10px; color: var(--ink-3); } .crumb a:hover { color: var(--ink); } .crumb b { color: var(--accent); font-weight: 500; }
.case-top h1 { position: relative; margin-top: 24px; font-weight: 500; font-size: clamp(38px, 5.6vw, 84px); line-height: 1; letter-spacing: -.045em; max-width: 1050px; }
.case-lede { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; margin-top: 34px; align-items: start; }
.case-lede > p { font-size: 20px; color: var(--ink-2); line-height: 1.45; }
.spec { display: grid; grid-template-columns: 90px 1fr; border-top: 1px solid var(--line); }
.spec dt, .spec dd { padding: 11px 0; border-bottom: 1px solid var(--line); }
.spec dt { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; color: var(--ink-3); text-transform: uppercase; padding-top: 13px; }
.spec dd { font-size: 14.5px; color: var(--ink-2); } .spec dd a { color: var(--accent); font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.impact { display: grid; grid-template-columns: 1fr 1fr 1.1fr; margin-top: 60px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.impact > div { padding: 24px 24px 26px; border-right: 1px solid var(--line); }
.impact > div:last-child { border-right: 0; background: var(--accent); color: #fff; }
.impact .mono { color: var(--ink-3); } .impact > div:last-child .mono { color: #ffd9d3; }
.impact p { margin-top: 12px; color: var(--ink-2); font-size: 15.5px; }
.impact strong { display: block; margin-top: 12px; font-size: 56px; font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.impact > div:last-child p { color: #fff; font-size: 14.5px; }
.dash-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; padding: 18px 22px; }
.dash-cta p { color: var(--ink-2); }
.case-doc { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 60px; margin-top: 100px; align-items: start; }
.toc { position: sticky; top: 110px; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 8px 0 8px 16px; color: var(--ink-3); margin-left: -1px; border-left: 1px solid transparent; font-size: 14px; }
.toc a.on, .toc a:hover { color: var(--ink); border-left-color: var(--accent); }
.case-doc section + section { margin-top: 90px; }
.case-doc h2 { font-weight: 500; font-size: clamp(30px, 3.4vw, 40px); letter-spacing: -.035em; line-height: 1.05; margin-top: 14px; }
.case-fig { margin-top: 28px; }
.case-fig .imgbox { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; }
.case-fig img { display: block; width: 100%; }
.case-fig figcaption { margin-top: 12px; color: var(--ink-2); font-size: 15px; max-width: 760px; }
.case-fig figcaption strong { color: var(--ink); font-weight: 500; }
.case-fig figcaption .mono { display: block; color: var(--ink-3); margin-bottom: 4px; }
ol.method { list-style: none; padding: 0; margin-top: 26px; counter-reset: m; border-top: 1px solid var(--line); }
ol.method li { counter-increment: m; display: grid; grid-template-columns: 50px 1fr; padding: 18px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 16px; }
ol.method li::before { content: counter(m, decimal-leading-zero); font-family: var(--mono); font-size: 11.5px; color: var(--accent); padding-top: 4px; }
ul.notes { list-style: none; padding: 0; margin-top: 22px; border-top: 1px solid var(--line); }
ul.notes li { display: grid; grid-template-columns: 50px 1fr; padding: 15px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
ul.notes li span { font-family: var(--mono); font-size: 11px; color: var(--accent); padding-top: 4px; }
.case-two { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 110px; }
.pager a { padding: 24px 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color .2s; }
.pager a:hover { border-color: var(--accent); }
.pager .mono { color: var(--ink-3); } .pager b { display: block; font-weight: 500; font-size: 22px; letter-spacing: -.02em; margin-top: 10px; }
.pager a:last-child { text-align: right; }
.code-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* retention dashboard shims (assets/dashboard.css does the layout) */
.dash { padding-top: 130px; }
.eyebrow { margin: 0 0 14px; font: 500 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.case-back { margin: 0 0 26px; font: 500 11.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; }
.case-back a { color: var(--ink-3); } .case-back a:hover { color: var(--ink); }

/* ================= phones and tablets ================= */
@media (max-width: 980px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .nav nav, .clock { display: none; } .nav { justify-content: space-between; }
  .sec { padding-top: 90px; } .sec-head { grid-template-columns: 1fr; gap: 14px; }
  .hero { min-height: 640px; padding-top: 130px; } .hero-row { flex-direction: column; align-items: flex-start; gap: 26px; }
  .telemetry .hide-sm { display: none; } .telemetry .wrap { gap: 18px; }
  .board { grid-template-columns: 1fr; } .hero-viz { border-right: 0; border-bottom: 1px solid var(--line); padding: 18px 16px; }
  .results { grid-template-columns: 1fr 1fr; grid-template-rows: none; } .result { padding: 16px; }
  .result:nth-child(odd) { border-right: 1px solid var(--line); } .result:nth-last-child(-n+2) { border-bottom: 0; }
  .result b { font-size: 30px; }
  .bento, .b.term, .checks, .about, .case-lede, .case-two, .pager { grid-template-columns: 1fr; gap: 26px; }
  .b.light { grid-row: auto; min-height: 480px; }
  .about .photo { max-width: 260px; }
  .cta { padding: 44px 24px; margin-top: 100px; }
  .impact { grid-template-columns: 1fr; } .impact > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .case-doc { grid-template-columns: 1fr; gap: 0; margin-top: 70px; } .toc { display: none; }
  .case-top { padding-top: 120px; }
}
@media (max-width: 600px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  body { font-size: 15.5px; }
  .hero { min-height: 600px; }
  .hero-row p { font-size: 16px; }
  .marq { padding: 18px 0; } .marq div { font-size: 20px; gap: 30px; } .marq span { gap: 30px; }
  .viz-stage { height: 280px; } .viz-note { margin-left: 0; width: 100%; }
  .viz-tabs { display: flex; width: 100%; } .viz-tab { flex: 1 1 0; padding: 9px 4px; font-size: 10.5px; letter-spacing: .02em; }
  .board-top .mid { display: none; }
  .nav { padding-left: 14px; }
  .ptable thead { display: none; } .ptable, .ptable tbody, .ptable tr, .ptable th, .ptable td { display: block; }
  .ptable tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .ptable th, .ptable td { border: 0; padding: 2px 0; } .ptable td.v { font-size: 17px; margin-top: 6px; }
  .b { padding: 20px; } .b h3 { font-size: 22px; }
  .b.light .pin:nth-of-type(3) { display: none; } .b.light .pin:nth-of-type(2) { left: 30% !important; top: 22% !important; }
  .b.light canvas { height: 52%; }
  .rule { grid-template-columns: 32px 1fr; }
  .case-lede > p { font-size: 17.5px; } .impact strong { font-size: 44px; }
  ol.method li, ul.notes li { grid-template-columns: 36px 1fr; }
  footer.foot .links { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
