/* ============================================================
   odNOVA — guide.css
   Shared editorial system for the two sibling GATEWAY pages:
   Face & Structure and Skin Quality. One architecture, one
   interaction grammar, one mobile behaviour. Pages differ only
   by colour register (burgundy / green — set per page in the
   inline #pillar-tint block), entry set and clinical data.

   Reuses tokens.css + profile.css primitives (.od-sec, .od-wrap,
   .od-eyebrow, .pf-h2 / .pf-h2-ink, .pf-p / .pf-p-ink, .pf-btn,
   nav, footer, mobile menu). Only the gateway-specific pieces
   live here:
     A. Centred patient-truth hero
     B. Concern recognition selector
     C. Click/tap diagnostic instrument (rail + fixed-label panel)
     D. Grouped treatment routes (editorial links, not cards)
     E. Compact two-column chapters + assessment CTA
   No pinned scroll at any width. Motion = one in-place cross-fade
   with an 8–16px directional shift. No-JS / reduced-motion =
   linear, fully readable, immediate.
   ============================================================ */

/* ---------- A. Centred patient-truth hero ---------- */
.pf-hero.cg-hero { min-height: 100svh; }
.cg-hero-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: clamp(40px, 9vh, 104px) 24px clamp(48px, 10vh, 116px); }
.cg-hero-eyebrow { justify-content: center; margin-bottom: 22px; }
.cg-hero-h1 { margin: 0 auto 22px; max-width: 20ch; font-family: var(--font-serif); font-weight: 300; font-size: clamp(34px, 4.4vw, 50px); line-height: 1.1; letter-spacing: -0.01em; color: var(--text-hi); text-wrap: balance; }
.cg-hero-h1 .cg-em { font-style: italic; color: var(--gold-soft); }
.cg-hero-lede { margin: 0 auto 16px; max-width: 62ch; font-family: var(--font-sans); font-weight: 300; font-size: clamp(16.5px, 1.5vw, 18px); line-height: 1.68; color: var(--text-body-2); text-wrap: pretty; }
.cg-hero-lede:last-of-type { margin-bottom: 0; }
.cg-hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-top: 32px; }

/* ---------- shared chapter rhythm ---------- */
.cg-sec { padding: clamp(72px, 10vh, 116px) 0; }
.cg-sec .od-wrap { width: 100%; }
.cg-head { max-width: 760px; margin: 0 0 clamp(26px, 4vh, 44px); }
.cg-head.cg-center { margin-left: auto; margin-right: auto; text-align: center; }
.cg-head.cg-center .od-eyebrow { justify-content: center; }
.cg-lead { max-width: 62ch; }
.cg-note { font-family: var(--font-sans); font-weight: 300; font-size: 16.5px; line-height: 1.66; margin: clamp(22px, 3vh, 30px) 0 0; max-width: 64ch; }

/* ---------- B. Concern recognition selector ---------- */
.cg-concern-head { display: flex; align-items: baseline; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; }
.cg-concern-lab { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.cg-concern-hint { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; color: var(--ink-soft); }
.cg-concerns { display: flex; flex-wrap: wrap; gap: 10px; }
.cg-concern { font-family: var(--font-serif); font-weight: 400; font-style: italic; font-size: 18px; line-height: 1.2; color: var(--ink); background: var(--cream-card); border: 1px solid var(--line-on-cream); padding: 11px 18px; cursor: pointer; transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease; -webkit-appearance: none; appearance: none; }
.cg-concern:hover { border-color: var(--gold-deep); }
.cg-concern[aria-pressed="true"] { border-color: var(--gold-deep); background: rgba(140,113,80,0.1); color: var(--ink); }
.cg-multi { font-family: var(--font-sans); font-weight: 300; font-size: 15.5px; line-height: 1.6; color: var(--ink-body); margin: 18px 0 0; min-height: 1.6em; transition: opacity 0.35s ease; }
.cg-multi b { font-weight: 400; font-style: italic; font-family: var(--font-serif); color: var(--ink); }
.cg-multi[hidden] { display: block; opacity: 0; }
.cg-concern-index { list-style: none; margin: 26px 0 0; padding: 0; columns: 2; column-gap: 48px; }
.cg-concern-index li { break-inside: avoid; position: relative; padding: 10px 0 10px 22px; border-top: 1px solid var(--line-on-cream); font-family: var(--font-sans); font-weight: 300; font-size: 15.5px; line-height: 1.5; color: var(--ink-body); }
.cg-concern-index li::before { content: "—"; position: absolute; left: 0; top: 10px; color: var(--gold-deep); }

/* ---------- C. Click/tap diagnostic instrument ---------- */
.cg-inst-frame { border: 1px solid var(--line-on-dark-faint); background: rgba(255,255,255,0.015); }
.cg-inst-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line-on-dark-faint); }
.cg-inst-bar .cg-inst-name { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-soft); }
.cg-inst-bar .cg-inst-meta { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-soft); }

.cg-inst { display: grid; grid-template-columns: 0.92fr 1.68fr; background: var(--cream-approach); color: var(--ink); }
/* rail (vertical on desktop) */
.cg-rail { position: relative; display: flex; flex-direction: column; border-right: 1px solid var(--line-on-cream); padding: 8px 0; }
.cg-rail-ink { position: absolute; left: 0; width: 2px; background: var(--gold-deep); top: 0; height: 0; transition: top 0.5s cubic-bezier(0.16,1,0.3,1), height 0.5s cubic-bezier(0.16,1,0.3,1); }
.cg-railbtn { display: flex; align-items: baseline; gap: 12px; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid var(--line-on-cream-soft); padding: 15px 22px; cursor: pointer; font: inherit; -webkit-appearance: none; appearance: none; transition: background 0.25s ease; }
.cg-railbtn:first-child { border-top: 0; }
.cg-railbtn .cg-rn { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; color: var(--gold-deep); }
.cg-railbtn .cg-rl { font-family: var(--font-serif); font-weight: 400; font-size: 19px; line-height: 1.15; color: var(--ink); }
.cg-railbtn .cg-rs { display: block; font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-soft); margin-top: 4px; }
.cg-railbtn:hover { background: rgba(140,113,80,0.06); }
.cg-railbtn[aria-selected="true"] { background: rgba(140,113,80,0.09); }
.cg-railbtn[aria-selected="true"] .cg-rl { color: var(--gold-deep); }

/* panels — stacked in one cell for a stable frame; cross-fade between */
.cg-panels { position: relative; padding: clamp(24px, 3vw, 38px) clamp(22px, 3vw, 40px); }
.cg-panels::after { content: ""; position: absolute; left: 1px; right: 1px; bottom: 0; height: 30px; background: linear-gradient(rgba(237,232,223,0), var(--cream-approach)); opacity: 0; transition: opacity 0.25s ease; pointer-events: none; }
.cg-panels.more::after { opacity: 1; }
.cg-inst.js .cg-panels { display: grid; }
.cg-panel { }
.cg-inst.js .cg-panel { grid-area: 1 / 1; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity 0.5s cubic-bezier(0.16,1,0.3,1), transform 0.5s cubic-bezier(0.16,1,0.3,1); }
.cg-inst.js .cg-panel.is-on { opacity: 1; transform: none; pointer-events: auto; }
.cg-inst:not(.js) .cg-panel + .cg-panel { margin-top: 28px; padding-top: 26px; border-top: 1px solid var(--line-on-cream); }
.cg-panel-title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.14; color: var(--ink); margin: 0 0 18px; }
.cg-prow { padding: 14px 0; border-top: 1px solid var(--line-on-cream); }
.cg-prow:first-of-type { border-top: 0; padding-top: 0; }
.cg-plab { display: block; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 7px; }
.cg-prow p { margin: 0; font-family: var(--font-sans); font-weight: 300; font-size: 15.5px; line-height: 1.62; color: var(--ink-body); }
.cg-prow.cg-route { border-top: 2px solid var(--gold-deep); margin-top: 4px; }
.cg-prow.cg-route .cg-plab { color: var(--gold-deep); }
.cg-route-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 12px 0 0; }
.cg-route-links a { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold-deep); border-bottom: 1px solid var(--gold); padding-bottom: 3px; }
.cg-route-links a:hover { color: var(--ink); }
.cg-route-none { font-family: var(--font-serif); font-style: italic; font-weight: 400; font-size: 15px; color: var(--ink-soft); margin: 12px 0 0; }

/* ---------- D. Grouped treatment routes (editorial links) ---------- */
.cg-routes { display: flex; flex-direction: column; }
.cg-route-row { display: grid; grid-template-columns: 0.9fr 1.7fr auto; gap: 32px; align-items: baseline; padding: 22px 0; border-top: 1px solid var(--line-on-cream); }
.cg-route-row:last-child { border-bottom: 1px solid var(--line-on-cream); }
.cg-route-name { font-family: var(--font-serif); font-weight: 400; font-size: 22px; line-height: 1.16; color: var(--ink); margin: 0; }
.cg-route-desc { font-family: var(--font-sans); font-weight: 300; font-size: 15.5px; line-height: 1.6; color: var(--ink-body); margin: 0; max-width: 60ch; }
.cg-route-go { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); border-bottom: 1px solid var(--gold); padding-bottom: 4px; white-space: nowrap; }
.cg-route-go:hover { color: var(--ink); }
.cg-routes-foot { font-family: var(--font-sans); font-weight: 300; font-style: italic; font-size: 16px; line-height: 1.5; color: var(--ink-body); margin: 26px 0 0; }

/* dark-register variant of the routes list (used where the section is dark) */
.cg-routes--dark .cg-route-row { border-color: var(--line-on-dark); }
.cg-routes--dark .cg-route-row:last-child { border-color: var(--line-on-dark); }
.cg-routes--dark .cg-route-name { color: var(--text-head); }
.cg-routes--dark .cg-route-desc { color: var(--text-body); }
.cg-routes--dark .cg-route-go { color: var(--gold-soft); }
.cg-routes--dark .cg-route-go:hover { color: var(--text-hi); }
.cg-routes--dark .cg-routes-foot { color: var(--text-body); }

/* ---------- E. Compact two-column chapters ---------- */
.cg-duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(36px, 5vw, 64px); align-items: start; }
.cg-list { list-style: none; margin: 8px 0 0; padding: 0; }
.cg-list li { position: relative; padding: 11px 0 11px 22px; border-top: 1px solid var(--line-on-dark); font-family: var(--font-sans); font-weight: 300; font-size: 15.5px; line-height: 1.55; color: var(--text-body); }
.cg-list li::before { content: "—"; position: absolute; left: 0; top: 11px; color: var(--gold-soft); }
.cg-list--ink li { border-color: var(--line-on-cream); color: var(--ink-body); }
.cg-list--ink li::before { color: var(--gold-deep); }

/* assessment CTA */
.cg-cta { text-align: center; }
.cg-cta .cg-head { margin-left: auto; margin-right: auto; }
.cg-cta-h2 { max-width: 22ch; margin: 0 auto 22px; }
.cg-cta-p { margin-left: auto; margin-right: auto; }
.cg-cta .pf-hero-ctas { justify-content: center; margin-top: 32px; }

/* ============================================================
   MOBILE ≤820px — same instrument, bounded 2-col control grid,
   one active panel, no pinned scroll, 44px targets, no overflow
   ============================================================ */
@media (max-width: 820px) {
  .cg-hero-stage { padding: 30px 22px 54px; }
  .cg-sec { padding: 60px 0; }
  .cg-head { margin-bottom: 24px; }

  .cg-concern-index { columns: 1; }
  .cg-concerns { gap: 8px; }
  .cg-concern { font-size: 16.5px; padding: 12px 16px; }

  .cg-inst { grid-template-columns: 1fr; }
  .cg-rail { flex-direction: row; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-right: 0; border-bottom: 1px solid var(--line-on-cream); padding: 14px; }
  .cg-rail-ink { display: none; }
  .cg-railbtn { flex-direction: column; align-items: flex-start; gap: 5px; min-height: 56px; justify-content: center; border-top: 0; border: 1px solid var(--line-on-cream); padding: 11px 13px; }
  .cg-railbtn .cg-rl { font-size: 16.5px; }
  .cg-railbtn[aria-selected="true"] { border-color: var(--gold-deep); background: rgba(140,113,80,0.1); }
  .cg-panels { padding: 22px 18px 24px; }
  .cg-panel-title { font-size: 21px; margin-bottom: 14px; }
  .cg-prow { padding: 12px 0; }
  .cg-prow p { font-size: 15px; }
  /* bounded panel: content fits at 390×844; only shorter phones scroll, with an honest cue */
  .cg-inst.js .cg-panels { max-height: 70svh; }
  .cg-inst.js .cg-panel.is-on { overflow: auto; -webkit-overflow-scrolling: touch; max-height: 70svh; }

  .cg-route-row { grid-template-columns: 1fr; gap: 8px; padding: 18px 0; }
  .cg-route-go { justify-self: start; }

  .cg-duo { grid-template-columns: 1fr; gap: 30px; }
}

/* reduced motion — keep the click instrument, drop the transition */
@media (prefers-reduced-motion: reduce) {
  .cg-inst.js .cg-panel { transition: none; transform: none; }
  .cg-rail-ink { transition: none; }
  .cg-multi { transition: none; }
}
