/* ═══════════════════════════════════════════════════════════════════
   The Treatment Engine — page-specific styles (mockup v1)
   Additions only. Extends the gf.cx tokens + page-header.css.
   Signature motif: the kintsugi seam (gold over urushi lacquer).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  --gold-leaf: #d4a94a;   /* brighter gold highlight on the seam */
  --urushi:    #2a1c12;   /* dark lacquer the gold sits in */
  --bengara:   #8c3b26;   /* red-iron lacquer: the UNrepaired crack = unreceipted */
  --parked:    #a89f90;   /* present-but-quiet: nothing disappears */
  --kept:      var(--accent);
  --seam:      4px;
  --mono-led:  'IBM Plex Mono', ui-monospace, 'SF Mono', monospace;  /* ledger/receipts */
  --mincho:    'Shippori Mincho', var(--serif);                       /* lens glyphs */
}

/* a touch more room than the 720px prose column where the lanes need it */
.page--wide { max-width: 860px; }

/* ── The kintsugi seam ─────────────────────────────────────────────
   A vertical mend: gold line seated in a thin band of dark lacquer,
   with a few diagonal "staple" mends crossing it. Used as the page
   spine and as the kept/parked divider. */
.seam {
  position: relative;
  width: 10px;
  align-self: stretch;
  flex: 0 0 10px;
  background: var(--urushi);
  border-radius: 1px;
}
.seam::before {           /* the gold vein */
  content: "";
  position: absolute; inset: 0;
  left: 50%; transform: translateX(-50%);
  width: var(--seam);
  background: linear-gradient(180deg,
     var(--gold-leaf), var(--gold) 30%, var(--gold-leaf) 55%, var(--gold) 80%, var(--gold-leaf));
  box-shadow: 0 0 6px rgba(184,134,42,0.45);
  border-radius: 2px;
}
.seam i {                 /* a diagonal mend-staple */
  position: absolute; left: -5px; width: 20px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-leaf), transparent);
  transform: rotate(-24deg);
}
.seam i:nth-of-type(1){ top: 14%; }
.seam i:nth-of-type(2){ top: 46%; transform: rotate(20deg); }
.seam i:nth-of-type(3){ top: 78%; }

/* horizontal seam, for section breaks / the "repair" rule */
.seam-rule {
  height: 6px; margin: 34px 0; border: 0;
  background: var(--urushi); border-radius: 3px; position: relative;
}
.seam-rule::before {
  content: ""; position: absolute; inset: 0; top: 50%; transform: translateY(-50%);
  height: var(--seam);
  background: linear-gradient(90deg,
     var(--gold-leaf), var(--gold) 30%, var(--gold-leaf) 60%, var(--gold));
  box-shadow: 0 0 6px rgba(184,134,42,0.4);
  border-radius: 2px;
}

/* ── Hero mechanism: "One place. One person. One change. One test." ── */
.mechanism { display: flex; gap: 22px; margin: 8px 0 6px; }
.mechanism .seam { min-height: 150px; }
.mechanism ol { list-style: none; display: grid; gap: 6px; }
.mechanism li {
  font-family: var(--serif); font-size: 34px; line-height: 1.12; font-weight: 400;
  letter-spacing: -0.01em;
}
.mechanism li span { color: var(--gold); font-style: italic; }
.mechanism .gloss { font-family: var(--sans); font-size: 15px; color: var(--ink-soft); margin-top: 2px; }

/* ── Ethos strip ─────────────────────────────────────────────────── */
.ethos {
  background: var(--urushi); color: #f3ead9;
  padding: 22px 26px; border-radius: 4px; margin: 26px 0;
}
.ethos b { color: var(--gold-leaf); font-weight: 700; }
.ethos .big { font-family: var(--serif); font-size: 23px; line-height: 1.3; }

/* ── The narrowing pipeline (a real sequence → numbered is earned) ── */
.pipe { display: grid; gap: 0; margin: 10px 0 4px; }
.pipe .step { display: grid; grid-template-columns: 30px 1fr; gap: 14px; padding: 12px 0; border-top: 1px solid var(--line); }
.pipe .step:last-child { border-bottom: 1px solid var(--line); }
.pipe .n { font-family: var(--mono); font-size: 13px; color: var(--gold); padding-top: 3px; }
.pipe .step h4 { font-size: 16px; font-weight: 700; margin: 0 0 2px; }
.pipe .step p { margin: 0; color: var(--ink-soft); font-size: 15.5px; max-width: 60ch; }

/* ── CTA ──────────────────────────────────────────────────────────── */
.cta {
  display: inline-block; background: var(--accent); color: #f3ead9;
  font-family: var(--sans); font-weight: 700; font-size: 16px;
  padding: 13px 24px; border-radius: 3px; text-decoration: none; border: 0; cursor: pointer;
}
.cta:hover { background: #22362a; color: #fff; }
.cta--ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-strong); }

/* ── Workshop: the two lanes (kept vs parked) ─────────────────────── */
.lanes { display: flex; gap: 22px; align-items: stretch; margin: 20px 0; }
.lane { flex: 1 1 0; min-width: 0; }
.lane h3 { display: flex; align-items: baseline; gap: 8px; }
.lane .count { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); font-weight: 400; letter-spacing: 0; }
.lane--kept h3 { color: var(--kept); }
.lane--parked h3 { color: var(--parked); }

.qcard {
  background: #fff; border: 1px solid var(--line); border-radius: 3px;
  padding: 11px 13px; margin: 8px 0; font-size: 15px; line-height: 1.4;
}
.qcard .tag { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); display: block; margin-bottom: 3px; }
.qcard--parked { background: transparent; border-style: dashed; color: var(--parked); }
.qcard--parked .tag { color: var(--parked); }

/* the chosen spine — the crack filled with gold */
.qcard--spine {
  border: 0; position: relative; background: var(--urushi); color: #f3ead9;
  padding: 16px 18px 16px 20px;
}
.qcard--spine::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: var(--seam);
  background: linear-gradient(180deg, var(--gold-leaf), var(--gold), var(--gold-leaf));
  box-shadow: 0 0 8px rgba(184,134,42,0.5);
}
.qcard--spine .tag { color: var(--gold-leaf); }
.qcard--spine .sp { font-family: var(--serif); font-size: 20px; line-height: 1.32; display: block; margin-top: 2px; }
.qcard--support { border-left: 3px solid var(--gold); }

/* ── Modes ────────────────────────────────────────────────────────── */
.modes { display: grid; gap: 12px; margin: 14px 0; }
.mode { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 15px 17px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.mode--on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.mode h4 { font-family: var(--serif); font-weight: 600; font-size: 19px; margin: 0; }
.mode .pick { font-family: var(--mono); font-size: 11px; color: var(--ink-soft); align-self: center; }
.mode--on .pick { color: var(--accent); font-weight: 700; }
.mode p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.mode .lenses { grid-column: 1 / -1; font-size: 12.5px; color: var(--gold); font-family: var(--mono); }

/* ── The 3-act arc with the six lenses ────────────────────────────── */
.arc { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 16px 0; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.act { padding: 15px 16px; border-right: 1px solid var(--line); }
.act:last-child { border-right: 0; }
.act .t { font-family: var(--mono-led); font-size: 11px; color: var(--ink-soft); }
.act h4 { font-family: var(--serif); font-size: 18px; font-weight: 600; margin: 2px 0 8px; }
.act .lens { font-size: 13.5px; margin: 8px 0; padding-left: 12px; border-left: 2px solid var(--gold); color: var(--ink); }
.act .lens .gl { font-family: var(--mincho); font-size: 15px; color: var(--gold); margin-right: 6px; }
.act .lens b { font-style: italic; font-family: var(--serif); font-weight: 600; }
/* lens-to-temperature shift: Act1 moss · Act2 gold · Act3 cool sumi/indigo */
.act--1 { background: rgba(44,74,58,0.045); }
.act--2 { background: rgba(184,134,42,0.07); }
.act--3 { background: rgba(43,58,85,0.055); }
.act--3 .lens { border-left-color: #2b3a55; }
.act--1 .lens { border-left-color: var(--accent); }
/* a lens still "unfilled" (not yet supported by the real story) = bengara hairline */
.act .lens--unfilled { border-left: 2px solid var(--bengara); color: var(--ink-soft); opacity: 0.85; }
.act .lens--unfilled .gl { color: var(--bengara); }

/* ── Treatment output: document register ──────────────────────────── */
.doc { background: #fffdf8; border: 1px solid var(--line); border-radius: 4px; padding: 30px 34px; margin: 18px 0; }
.doc .logline { font-family: var(--serif); font-size: 22px; line-height: 1.4; color: var(--ink); }
.doc .meta { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 10px 0 4px; }
.doc h4 { font-size: 13px; font-weight: 700; letter-spacing: 0.4px; margin: 20px 0 6px; color: var(--accent); }

/* beats */
.beat { display: grid; grid-template-columns: 56px 1fr; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.beat .tc { font-family: var(--mono); font-size: 12px; color: var(--gold); padding-top: 2px; }
.beat p { margin: 0; font-size: 15px; }

/* claim ledger / receipts — each row is a seam: gold if receipted, bengara if not */
.claim { display: grid; grid-template-columns: 1fr auto; gap: 4px 14px; padding: 11px 0 11px 14px; align-items: start;
         border-top: 1px solid var(--line); border-left: 3px solid var(--gold); }
.claim--unverified { border-left: 3px solid var(--bengara); }
.claim .txt { font-size: 15px; }
.claim .need { font-family: var(--mono-led); font-size: 10px; color: var(--bengara); vertical-align: super; margin-left: 4px; }
.receipt { font-family: var(--mono-led); font-size: 11px; color: var(--accent); background: rgba(44,74,58,0.08); padding: 3px 9px; border-radius: 3px; white-space: nowrap; }
.claim--unverified .txt { color: var(--ink-soft); }
.claim--struck .txt { text-decoration: line-through; text-decoration-color: var(--crimson); color: var(--ink-soft); }
.receipt--none { color: var(--bengara); background: rgba(140,59,38,0.09); }

/* plain-speech before → after (the "say it plainly" pass) */
.plain { margin: 14px 0; }
.plain .was { background: #ece4d4; color: var(--ink-soft); padding: 6px 10px; border-radius: 3px; position: relative; }
.plain .was s { text-decoration-color: var(--crimson); }
.plain .now { background: var(--ink); color: #f3ead9; padding: 8px 11px; border-radius: 3px; margin-top: 6px; font-weight: 500; }
.plain .now::before { content: "say"; font-family: var(--mono); font-size: 10px; color: var(--gold-leaf); display:block; letter-spacing: 1px; }

/* funding gate badge */
.gate { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 4px; margin: 20px 0; font-size: 15px; }
.gate--dev { background: rgba(159,28,46,0.07); border: 1px solid rgba(159,28,46,0.3); }
.gate--ready { background: rgba(44,74,58,0.07); border: 1px solid rgba(44,74,58,0.35); }
.gate .mark { font-family: var(--serif); font-size: 26px; line-height: 1; }
.gate--dev .mark { color: var(--crimson); }
.gate--ready .mark { color: var(--accent); }
.gate b { display: block; }
.gate .sub { color: var(--ink-soft); font-size: 13.5px; }

/* little owner-gate note on the generate step */
.gated-note { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); display: flex; gap: 7px; align-items: center; margin-top: 8px; }
.gated-note::before { content: "⚿"; color: var(--gold); font-size: 15px; }

/* stepper */
.stepper { display: flex; flex-wrap: wrap; gap: 6px 10px; font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 4px 0 10px; }
.stepper b { color: var(--accent); }
.stepper .on { color: var(--ink); font-weight: 700; }

@media (max-width: 680px) {
  .mechanism li { font-size: 26px; }
  .lanes { flex-direction: column; }
  .arc { grid-template-columns: 1fr; }
  .act { border-right: 0; border-bottom: 1px solid var(--line); }
  .doc { padding: 22px 18px; }
}
