/* The demo console. Same tokens as v2.css, no new palette, no second personality.
   The only colour that carries meaning here is the decision itself: red got through,
   green was stopped. Everything else stays out of the way. */

/* The nav is v2.css's own fixed/transparent one, exactly as on every other page. Only the
   current-page marker is new. */
.nav__links .is-here { color: var(--ink); font-weight: 600; }

/* ---------- hero ---------- */
.dhero { padding: clamp(46px, 7vw, 84px) 0 clamp(26px, 3.4vw, 40px); }
.dhero h1 { font-size: clamp(40px, 6.4vw, 68px); margin: 16px 0 20px; }
.dhero__lead { max-width: 62ch; font-size: clamp(16px, 1.25vw, 18.5px); }
.dhero__lead--tight { margin-top: 12px; }
.dhero__lead b { color: var(--ink); font-weight: 600; }

.chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500;
  color: var(--body); background: var(--white); border: 1px solid var(--line);
  padding: 5px 12px 5px 10px; border-radius: 100px; box-shadow: 0 1px 2px rgba(28,24,14,.04); }
.chip__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* ---------- console shell ---------- */
.console { background: var(--white); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow); overflow: hidden; }
.console__bar { display: flex; align-items: center; gap: 14px; padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft); background: var(--bone-2); }
.console__dots { display: inline-flex; gap: 6px; }
.console__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(27,27,22,.13); }
.console__title { font-size: 11.5px; color: var(--faint); }
.console__ctrls { margin-left: auto; display: flex; gap: 8px; }
.cbtn { font: inherit; font-size: 12.5px; font-weight: 500; color: var(--body); cursor: pointer;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 5px 12px;
  transition: background .18s var(--ease), color .18s var(--ease); }
.cbtn:hover { background: var(--bone); }
.cbtn--primary { background: var(--ink); color: #fff; border-color: var(--ink); }
.cbtn--primary:hover { background: #2c2c25; }

.console__body { display: grid; grid-template-columns: minmax(0,1fr) 292px; }
@media (max-width: 900px) { .console__body { grid-template-columns: 1fr; } }

/* ---------- the stream ---------- */
.stream { min-width: 0; padding: 4px 0 10px; }
.stream__head, .srow { display: grid; align-items: center;
  grid-template-columns: minmax(0,1fr) 128px 92px 116px 96px; gap: 10px; padding: 0 18px; }
.stream__head { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--faint); padding-block: 10px; border-bottom: 1px solid var(--line-soft); }
.ta-r { text-align: right; } .ta-c { text-align: center; }

.stream__rows { min-height: 344px; }
.srow { padding-block: 11px; border-bottom: 1px solid var(--line-soft); cursor: pointer;
  animation: rowin .34s var(--ease) both; transition: background .16s var(--ease); }
.srow:hover { background: var(--bone); }
@keyframes rowin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .srow { animation: none; } }

.srow__m { min-width: 0; }
.srow__name { font-size: 13.5px; color: var(--ink); font-weight: 500; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.srow__sub { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--faint); margin-top: 2px; }
.srow__mcc { font-family: 'JetBrains Mono', monospace; font-size: 11.5px; color: var(--body); }
.srow__mcc b { color: var(--ink); font-weight: 500; }
.srow__amt { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink); text-align: right; }

.pill { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: -0.01em;
  padding: 3px 9px; border-radius: 100px; white-space: nowrap; }
.pill--miss { color: var(--bad); background: var(--bad-bg); }
.pill--stop { color: var(--good); background: var(--good-bg); }
.pill--rev  { color: #9A6B12; background: rgba(200,140,20,.13); }
.pill--none { color: var(--faint); background: rgba(27,27,22,.05); }
.cellc { text-align: center; }

.stream__hint { font-size: 12px; color: var(--faint); padding: 12px 18px 0; }

/* ---------- tally ---------- */
.tally { border-left: 1px solid var(--line-soft); padding: 18px; background: var(--bone-2); }
@media (max-width: 900px) { .tally { border-left: 0; border-top: 1px solid var(--line-soft); } }
.tally__unit { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.tally__k { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--faint); }
.tally__v { display: block; font-size: 30px; font-weight: 500; color: var(--ink);
  letter-spacing: -0.03em; line-height: 1.15; margin-top: 3px;
  font-variant-numeric: tabular-nums; }
.tally__unit--bad .tally__v { color: var(--bad); }
.tally__unit--good .tally__v { color: var(--good); }

.gap { margin-top: 16px; padding: 16px; border-radius: 12px; background: var(--white);
  border: 1px solid var(--line); text-align: center; }
.gap__v { display: block; font-size: 44px; font-weight: 600; color: var(--bad);
  letter-spacing: -0.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.gap__k { display: block; font-size: 12.5px; color: var(--body); margin-top: 6px; }
.gap__amt { display: block; font-size: 12px; color: var(--faint); margin-top: 5px; }
.tally__foot { font-size: 11.5px; color: var(--faint); margin-top: 14px; line-height: 1.5; }

/* ---------- sections ---------- */
.sect { padding: clamp(52px, 8vw, 96px) 0 0; }
.sect__head { max-width: 66ch; }
.sect__head h2 { font-size: clamp(28px, 3.6vw, 40px); margin: 14px 0 14px; }
.sect__lead { font-size: clamp(15.5px, 1.15vw, 17.5px); }

/* ---------- try it ---------- */
.try { margin-top: 26px; }
.try__form { display: flex; gap: 10px; max-width: 720px; }
@media (max-width: 620px) { .try__form { flex-direction: column; } }
.try__in { flex: 1; min-width: 0; font-size: 13.5px; color: var(--ink); background: var(--white);
  border: 1px solid var(--line); border-radius: 11px; padding: 14px 16px;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease); }
.try__in:focus { outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft); }
.try__in::placeholder { color: #B4B1A2; }

.try__eg { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.egb { font: inherit; font-family: 'JetBrains Mono', monospace; font-size: 11.5px; cursor: pointer;
  color: var(--body); background: var(--white); border: 1px dashed var(--line);
  border-radius: 8px; padding: 6px 11px; transition: border-color .18s var(--ease), color .18s var(--ease); }
.egb:hover { border-style: solid; border-color: var(--accent); color: var(--ink); }

.try__out { margin-top: 20px; max-width: 720px; background: var(--white);
  border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; box-shadow: var(--shadow); }
.vd { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.vd__pill { font-size: 12.5px; font-weight: 600; padding: 5px 13px; border-radius: 100px; }
.vd__desc { font-family: 'JetBrains Mono', monospace; font-size: 12.5px; color: var(--ink); }
.vd__line { margin-top: 13px; font-size: 15px; color: var(--ink); }
.vd__line b { font-weight: 600; }
.vd__why { margin-top: 9px; font-size: 13.5px; color: var(--body); }
.vd__meta { margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--line-soft);
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px; color: var(--faint); line-height: 1.6; }

/* ---------- pattern ---------- */
.pattern { margin-top: 26px; background: var(--white); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; max-width: 860px; }
.pat__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 20px; border-bottom: 1px solid var(--line-soft); background: var(--bone-2); }
.pat__rule { font-size: 15px; font-weight: 600; color: var(--ink); }
.pat__id { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--faint); }
.pat__body { padding: 18px 20px 20px; }
.pat__reason { font-size: 15px; color: var(--ink); }
.pat__charges { margin: 16px 0 0; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; }
.pat__c { display: grid; grid-template-columns: 96px minmax(0,1fr) 88px; gap: 10px;
  padding: 10px 14px; font-size: 13px; align-items: center; }
.pat__c + .pat__c { border-top: 1px solid var(--line-soft); }
.pat__c span:first-child { font-family: 'JetBrains Mono', monospace; font-size: 11px; color: var(--faint); }
.pat__c span:nth-child(2) { color: var(--ink); }
.pat__c span:last-child { font-family: 'JetBrains Mono', monospace; text-align: right; color: var(--ink); }
.pat__note { margin-top: 15px; font-size: 13.5px; color: var(--body); }

/* ---------- cta ---------- */
.sect--cta { padding-bottom: 0; }
.cta { background: var(--ink); color: #EDEBE2; border-radius: 20px;
  padding: clamp(32px, 5vw, 56px); text-align: center; }
.cta h2 { color: #fff; font-size: clamp(26px, 3.2vw, 36px); }
.cta p { max-width: 58ch; margin: 14px auto 0; color: rgba(237,235,226,.72); font-size: 16px; }
.cta__row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 24px; }
.cta .btn--ink { background: #fff; color: var(--ink); border-color: #fff; }
.btn--ghost { background: transparent; color: #EDEBE2; border: 1px solid rgba(237,235,226,.28); }
.btn--ghost:hover { background: rgba(255,255,255,.07); }

.fineprint { display: block; font-size: 11.5px; color: var(--faint); line-height: 1.6;
  max-width: 78ch; padding-top: 40px; padding-bottom: 56px; }

/* ---------- drawer ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(27,27,22,.34);
  backdrop-filter: blur(2px); animation: fade .22s var(--ease) both; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.drawer__panel { position: absolute; top: 0; right: 0; height: 100%; width: min(460px, 92vw);
  background: var(--bone); border-left: 1px solid var(--line); overflow-y: auto;
  padding: 26px 26px 40px; animation: slidein .3s var(--ease) both; }
@keyframes slidein { from { transform: translateX(24px); opacity: .4 } to { transform: none; opacity: 1 } }
@media (prefers-reduced-motion: reduce) {
  .drawer__scrim, .drawer__panel { animation: none; }
}
.drawer__x { position: absolute; top: 16px; right: 18px; font-size: 24px; line-height: 1;
  color: var(--faint); background: none; border: 0; cursor: pointer; padding: 4px; }
.drawer__x:hover { color: var(--ink); }
.dw__k { font-family: 'JetBrains Mono', monospace; font-size: 10.5px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--faint); }
.dw__desc { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--ink);
  margin: 6px 0 20px; word-break: break-word; }
.dw__row { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0;
  border-top: 1px solid var(--line-soft); font-size: 13.5px; }
.dw__row span:first-child { color: var(--body); }
.dw__row span:last-child { color: var(--ink); text-align: right; font-weight: 500; }
.dw__verdict { margin: 18px 0 4px; padding: 15px 16px; border-radius: 12px;
  background: var(--white); border: 1px solid var(--line); }
.dw__verdict p { font-size: 13.5px; color: var(--body); margin-top: 7px; }
.dw__foot { margin-top: 20px; font-size: 11.5px; color: var(--faint); line-height: 1.6; }

/* One control, and a quiet progress read beside it. Two buttons both reading "Replay" at the
   end of the stream looked like a bug, because it was one. */
.console__count { font-size: 11px; color: var(--faint); margin-right: 4px; }

/* ---------- hero, borrowing the homepage's own treatment ----------
   The demo used a flat bone panel while every other page opens on the gradient ground with the
   line-art corners. That seam is the first thing a prospect sees after clicking through from
   the homepage, so it now uses .hero3 itself rather than a lookalike: same background ramp,
   same strands, same fade out into --bone. Only the proportions differ, because this hero
   carries two paragraphs and a console rather than a full-bleed product shot. */
.hero3--demo { min-height: 0; padding: clamp(118px, 13vw, 150px) 0 clamp(30px, 4vw, 52px); }
.hero3--demo::after { height: 120px; }
.hero3__inner--demo { left: 0; }
.dhero__h1 { font-size: clamp(40px, 6.4vw, 68px); margin: 18px 0 20px; }
