/* ═══════════════════════════════════════════════════════════════
   THE TERMI PROTOCOL — "You reported it. We fixed it."
   Split before/after showcase: the bug (left) → the fix (right).
   Static page; media slots are filled in by hand (see fixes.html).
   Semantic accents only: rose = bug, mint = fix, amber = data.
   ═══════════════════════════════════════════════════════════════ */

:root{
  --fx-bug:#fb7185;   --fx-bug-b:rgba(251,113,133,.30); --fx-bug-w:rgba(251,113,133,.07);
  --fx-fix:#7CF6C8;   --fx-fix-b:rgba(124,246,200,.30); --fx-fix-w:rgba(124,246,200,.07);
  --fx-data:#fbbf24;  --fx-data-b:rgba(251,191,36,.30); --fx-data-w:rgba(251,191,36,.08);
}

/* ─── Hero ─── */
.fx-hero{position:relative;overflow:hidden;text-align:center;
  padding:clamp(96px,14vw,164px) 0 clamp(40px,6vw,66px)}
.fx-hero-canvas{position:absolute;inset:0;z-index:0;opacity:.55;
  -webkit-mask-image:radial-gradient(120% 90% at 50% 0%,#000 30%,transparent 78%);
          mask-image:radial-gradient(120% 90% at 50% 0%,#000 30%,transparent 78%)}
.fx-hero .wrap-n{position:relative;z-index:1}
.fx-hero .lb-eyebrow{color:var(--t3)}
.fx-hero h1{margin:6px 0 0}
.fx-hero .divider{margin:20px auto 22px}
.fx-lead{max-width:600px;margin:0 auto;color:var(--t2);
  font-size:clamp(1rem,1.5vw,1.12rem);line-height:1.65}

/* stat strip under the hero */
.fx-stats{display:flex;flex-wrap:wrap;justify-content:center;gap:14px;margin-top:34px}
.fx-stat{display:flex;flex-direction:column;align-items:center;gap:4px;
  min-width:118px;padding:16px 20px;background:var(--bg-s);
  border:1px solid var(--border);border-radius:var(--r-lg)}
.fx-stat b{font-family:var(--f-display);font-size:1.7rem;font-weight:700;color:var(--t1);line-height:1}
.fx-stat span{font-family:var(--f-mono);font-size:.66rem;font-weight:600;
  letter-spacing:.14em;text-transform:uppercase;color:var(--t3)}

/* ─── The list of cases ─── */
.fx-list{display:flex;flex-direction:column;gap:clamp(26px,4.5vw,52px)}

.fx-case{position:relative;
  padding:clamp(20px,3vw,36px);
  border:1px solid var(--border);border-radius:var(--r-2xl);
  background:linear-gradient(180deg,var(--bg-s),var(--bg-c))}

.fx-head{display:flex;align-items:center;gap:12px;margin-bottom:20px}
.fx-n{font-family:var(--f-mono);font-size:.78rem;font-weight:700;letter-spacing:.06em;
  color:var(--bg);background:var(--t1);border-radius:999px;padding:5px 12px;line-height:1}
.fx-cat{font-family:var(--f-mono);font-size:.64rem;font-weight:700;letter-spacing:.16em;
  text-transform:uppercase;padding:5px 11px;border-radius:999px;
  border:1px solid var(--border-h);color:var(--t3);line-height:1}
.fx-cat--bug{color:var(--fx-bug);border-color:var(--fx-bug-b);background:var(--fx-bug-w)}
.fx-cat--req{color:var(--fx-fix);border-color:var(--fx-fix-b);background:var(--fx-fix-w)}
.fx-cat--data{color:var(--fx-data);border-color:var(--fx-data-b);background:var(--fx-data-w)}
.fx-src{margin-left:auto;font-family:var(--f-mono);font-size:.68rem;letter-spacing:.06em;color:var(--t4)}

/* two columns + connector */
.fx-grid{display:grid;grid-template-columns:1fr auto 1fr;
  gap:clamp(14px,2.4vw,26px);align-items:stretch}

.fx-side{display:flex;flex-direction:column;
  padding:clamp(16px,2.2vw,22px);border-radius:var(--r-lg);border:1px solid var(--border)}
.fx-side--bug{background:var(--fx-bug-w);border-color:var(--fx-bug-b)}
.fx-side--fix{background:var(--fx-fix-w);border-color:var(--fx-fix-b)}

.fx-side-tag{display:inline-flex;align-items:center;gap:8px;margin-bottom:12px;
  font-family:var(--f-mono);font-size:.68rem;font-weight:700;letter-spacing:.16em;text-transform:uppercase}
.fx-side--bug .fx-side-tag{color:var(--fx-bug)}
.fx-side--fix .fx-side-tag{color:var(--fx-fix)}
.fx-dot{width:7px;height:7px;border-radius:50%;background:currentColor;box-shadow:0 0 10px currentColor}

.fx-side-title{font-family:var(--f-sans);font-weight:600;color:var(--t1);
  font-size:clamp(1.04rem,1.6vw,1.22rem);line-height:1.32;margin:0 0 12px}

/* the real user quote */
.fx-quote{margin:0 0 16px;padding:13px 15px;border-radius:0 var(--r) var(--r) 0;
  border-left:2px solid var(--fx-bug-b);background:rgba(0,0,0,.18);
  color:var(--t2);font-size:.9rem;line-height:1.6;font-style:italic}
.fx-quote cite{display:block;margin-top:9px;font-style:normal;
  font-family:var(--f-mono);font-size:.7rem;letter-spacing:.04em;color:var(--t4)}

.fx-desc{margin:0 0 16px;color:var(--t2);font-size:.9rem;line-height:1.66}

/* media slot — swap the .fx-ph for an <img>/<video> (see HTML comments) */
.fx-media{margin-top:auto;aspect-ratio:16/10;overflow:hidden;
  border-radius:var(--r);border:1px solid var(--border);background:var(--bg-c)}
.fx-side--bug .fx-media{border-color:var(--fx-bug-b)}
.fx-side--fix .fx-media{border-color:var(--fx-fix-b)}
.fx-media img,.fx-media video{display:block;width:100%;height:100%;object-fit:cover}
.fx-ph{width:100%;height:100%;display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:9px;
  background:repeating-linear-gradient(45deg,var(--bg-c),var(--bg-c) 11px,var(--bg-s) 11px,var(--bg-s) 22px)}
.fx-ph-ic{font-family:var(--f-mono);font-size:1.35rem;color:var(--t4)}
.fx-ph-tx{font-family:var(--f-mono);font-size:.66rem;letter-spacing:.12em;
  text-transform:uppercase;color:var(--t4)}

/* the → connector between bug and fix */
.fx-arrow{align-self:center;display:flex}
.fx-arrow span{display:inline-flex;align-items:center;justify-content:center;
  width:46px;height:46px;border-radius:50%;
  background:var(--bg-e);border:1px solid var(--border-h);
  font-family:var(--f-mono);font-size:1.35rem;color:var(--t2);line-height:1}

/* ─── Closing CTA ─── */
.fx-cta{text-align:center;padding:clamp(40px,6vw,66px);
  border:1px solid var(--border);border-radius:var(--r-2xl);
  background:linear-gradient(180deg,var(--bg-s),var(--bg))}
.fx-cta h2{margin:0 0 12px}
.fx-cta p{max-width:520px;margin:0 auto 26px;color:var(--t2);line-height:1.65}
.fx-cta-btns{display:flex;flex-wrap:wrap;gap:12px;justify-content:center}

/* ─── Responsive: stack the columns, turn the → into a ↓ ─── */
@media (max-width:840px){
  .fx-grid{grid-template-columns:1fr}
  .fx-arrow{margin:1px auto}
  .fx-arrow span{transform:rotate(90deg)}
}
@media (max-width:520px){
  .fx-head{flex-wrap:wrap;gap:8px}
  .fx-src{margin-left:0;flex-basis:100%}
}

/* ─── Jump-to index (sticky title list on the right) ─── */
html{scroll-behavior:smooth}
@media (prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
.fx-case{scroll-margin-top:84px}

.fx-layout{display:grid;grid-template-columns:minmax(0,1fr) 268px;
  gap:clamp(20px,3vw,40px);align-items:start}

.fx-index{position:sticky;top:84px;align-self:start}
.fx-index-inner{padding:16px;border:1px solid var(--border);border-radius:var(--r-lg);
  background:var(--bg-s);max-height:calc(100vh - 108px);overflow:auto}
.fx-index-h{display:flex;align-items:center;justify-content:space-between;gap:8px;
  margin:0 0 12px;font-family:var(--f-mono);font-size:.68rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--t3)}
.fx-index-h .fx-index-count{color:var(--t4)}
.fx-index-nav{display:flex;flex-direction:column;gap:1px}
.fx-index-nav a{display:flex;gap:9px;align-items:baseline;
  padding:8px 10px;border-radius:8px;border-left:2px solid transparent;
  font-size:.82rem;line-height:1.34;color:var(--t2);
  transition:background var(--dur) var(--ease),color var(--dur) var(--ease)}
.fx-index-nav a b{flex:none;min-width:17px;font-family:var(--f-mono);font-size:.7rem;font-weight:700;color:var(--t4)}
.fx-index-nav a:hover{background:var(--accent-m);color:var(--t1)}
.fx-index-nav a.active{color:var(--t1);background:var(--fx-fix-w);border-left-color:var(--fx-fix)}
.fx-index-nav a.active b{color:var(--fx-fix)}

/* mobile toggle button — hidden on desktop */
.fx-index-toggle{display:none;align-items:center;justify-content:center;gap:8px;
  width:100%;margin-bottom:18px;padding:12px 16px;
  font-family:var(--f-mono);font-size:.78rem;font-weight:600;letter-spacing:.08em;
  color:var(--t1);background:var(--bg-s);border:1px solid var(--border-h);border-radius:var(--r)}
.fx-index-toggle:hover{border-color:var(--border-s);background:var(--accent-m)}

@media (max-width:980px){
  .fx-layout{grid-template-columns:1fr}
  .fx-index-toggle{display:flex}
  .fx-index{position:static;order:-1;display:none;margin-bottom:18px}
  .fx-index.open{display:block}
  .fx-index-inner{max-height:62vh}
}

/* ─── Media on the fix side only (bug side = the report) ─── */
.fx-side--bug{justify-content:center}          /* center the quote against the taller fix column */
.fx-media{aspect-ratio:16/9;margin-top:14px}   /* videos are 16:9; sit just under the copy */
.fx-vid{display:block;width:100%;height:100%;object-fit:cover;cursor:pointer;background:var(--bg-c)}

/* real screenshots: show the whole frame at natural height */
.fx-media.fx-media--shot{aspect-ratio:auto;background:var(--bg-c);display:flex}
.fx-media--shot img{height:auto;object-fit:contain}

/* "demo coming" slot for fixes still awaiting a capture */
.fx-media.fx-media--todo{aspect-ratio:16/9}

/* dual-monitor illustration (fix #08) */
.fx-screens{display:block;width:100%;height:auto}

/* Linux: link straight to the download page */
.fx-linux{display:flex;flex-direction:column;align-items:center;gap:6px;margin-top:14px;
  padding:22px 18px;text-align:center;border-radius:var(--r);
  border:1px dashed var(--fx-fix-b);background:var(--fx-fix-w);transition:background var(--dur) var(--ease)}
.fx-linux:hover{background:rgba(124,246,200,.12)}
.fx-linux .fx-linux-badge{font-family:var(--f-mono);font-size:.66rem;font-weight:700;
  letter-spacing:.14em;text-transform:uppercase;color:var(--t3)}
.fx-linux .fx-linux-cta{font-family:var(--f-mono);font-size:.95rem;font-weight:700;color:var(--fx-fix)}

/* video tap-to-mute hint */
.fx-vidwrap{position:relative}
.fx-vidwrap .fx-vidtag{position:absolute;left:10px;bottom:10px;pointer-events:none;
  font-family:var(--f-mono);font-size:.6rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;
  color:var(--t2);background:rgba(9,9,11,.7);border:1px solid var(--border);border-radius:999px;padding:4px 9px;
  opacity:.9}
