/* only approach.html uses: /approach — the tier picker (five gates answered left to right, js/approach.js lights the
   tier the case lands on in the map of five tiers below, with where we run each) and the hard constraints. ZEN-327. */

/* ---- hero ---- */
.ap-hero{ position:relative; padding-top:clamp(128px,16vh,184px); padding-bottom:clamp(48px,7vh,80px); overflow-x:clip; }
.ap-hero .wrap{ position:relative; z-index:2; }
.ap-hero .h-display{ max-width:880px; }
.ap-hero .lead{ max-width:58ch; }
.ap-note{ margin-top:24px; display:flex; gap:14px; align-items:flex-start; max-width:62ch; font-size:15px; line-height:1.6; color:var(--text-muted); }
.ap-note p{ margin:0; }
.ap-note b{ color:var(--text); font-weight:600; }
.ap-note .rule{ flex:0 0 28px; height:1px; margin-top:12px; background:var(--border-strong); }

.ap-pick-sec{ padding-bottom:var(--section-y); }
.ap-cons-sec{ padding-top:0; }

/* ---- the gates: the one being asked reads as a question with two real buttons, the ones ahead wait muted ---- */
.ap-gates{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:30px; }
.ap-gate{ position:relative; display:flex; flex-direction:column; justify-content:space-between; gap:16px; padding:16px 16px 14px; border:1px solid var(--border);
  border-radius:12px; background:var(--surface-solid); transition:border-color .3s var(--ease), background-color .3s var(--ease); }
.ap-gate h3{ margin:0; font-family:var(--font-display); font-weight:500; font-size:15.5px; line-height:1.35; letter-spacing:-.01em;
  color:var(--text); text-wrap:balance; transition:color .3s var(--ease); }
.ap-live .ap-gate:not(.is-now):not(.is-done) h3{ color:var(--text-muted); }
.ap-gate + .ap-gate::before{ content:""; position:absolute; left:-19px; top:50%; width:7px; height:7px; border:0 solid var(--text-faint);
  border-width:1.5px 1.5px 0 0; transform:translateY(-50%) rotate(45deg); }
.ap-gate.is-now{ border-color:color-mix(in srgb, var(--accent) 60%, var(--border));
  background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%), var(--surface-solid); }
.ap-gate.is-done{ border-color:color-mix(in srgb, var(--accent) 25%, var(--border)); }

.ap-seg{ display:flex; gap:6px; }
.ap-seg button{ flex:1; min-width:64px; height:40px; padding:0 14px; border:1px solid var(--border); border-radius:999px; background:transparent;
  color:var(--text-muted); font-family:var(--font-display); font-weight:500; font-size:14.5px; cursor:pointer;
  transition:color .2s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), transform .16s var(--ease); }
.ap-seg button:disabled{ cursor:default; }
.ap-live .ap-gate:not(.is-now):not(.is-done) .ap-seg button{ border-color:transparent; }
.ap-seg button:not(:disabled):hover{ border-color:var(--accent-text); color:var(--accent-text); }
.ap-seg button:not(:disabled):active{ transform:scale(.97); }
.ap-gate.is-now .ap-seg button{ border-color:var(--border-strong); background:var(--surface-solid); color:var(--text); }
.ap-gate.is-now .ap-seg button:hover{ border-color:var(--accent-text); color:var(--accent-text); }
.ap-seg button[aria-pressed="true"], .ap-seg button[aria-pressed="true"]:hover{ border-color:var(--accent-fill); background:var(--accent-fill); color:#fff; }

/* ---- the bar under the gates: what a yes looks like for the gate being asked, then where the case lands.
   Every line sits in one grid cell, so the bar keeps the height of the tallest in any state ---- */
.ap-bar{ margin:12px 0 36px; display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px 40px; align-items:center;
  padding:18px 0; border-block:1px solid var(--border); }
.ap-bar-stack{ display:grid; }
.ap-bar-p{ grid-area:1 / 1; align-self:center; visibility:hidden; opacity:0; transition:opacity .2s var(--ease), visibility 0s .2s; }
.ap-bar-p.is-on{ visibility:visible; opacity:1; transition:opacity .35s var(--ease) .05s; }
.ap-bar-k{ margin:0 0 6px; font-size:13.5px; color:var(--text-muted); }
/* the signs sit in two even columns, each behind the site's drawn tick (as the Careers checklist) */
.ap-bar-p ul{ list-style:none; margin:0; padding:0; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 32px; }
.ap-bar-p li{ position:relative; padding-left:26px; font-size:15px; line-height:1.45; color:var(--text); }
.ap-bar-p li::before{ content:""; position:absolute; left:2px; top:5px; width:10px; height:5px;
  border-left:1.6px solid var(--pos-text); border-bottom:1.6px solid var(--pos-text); transform:rotate(-45deg); }
.ap-bar-t{ margin:0; display:flex; flex-wrap:wrap; align-items:baseline; gap:6px 18px; font-family:var(--font-display); font-weight:500;
  font-size:26px; line-height:1.2; letter-spacing:-.02em; color:var(--text); }
.ap-bar-t .link-arrow{ font-size:14.5px; letter-spacing:0; }
.ap-bar-cta{ display:flex; gap:10px; align-items:center; }
.ap-bar-cta .is-off{ visibility:hidden; }

/* ---- the map: five tiers side by side ---- */
.ap-legend{ display:flex; align-items:center; gap:8px; margin:0 0 12px; font-size:13px; color:var(--text-muted); }
.ap-meter{ display:inline-flex; gap:3px; }
.ap-meter i{ width:16px; height:6px; border-radius:2px; background:var(--border-strong); }
.ap-meter i.on{ background:var(--accent-text); }
.ap-spec{ display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); border:1px solid var(--border); border-radius:var(--radius-lg);
  background:var(--surface-solid); }
.ap-col{ position:relative; padding:22px 20px 24px; border-left:1px solid var(--border); display:flex; flex-direction:column; gap:14px;
  scroll-margin-top:110px; transition:background-color .3s var(--ease); }
.ap-col:first-child{ border-left:0; border-radius:var(--radius-lg) 0 0 var(--radius-lg); }
.ap-col:last-child{ border-radius:0 var(--radius-lg) var(--radius-lg) 0; }
.ap-col h3, .ap-exit h3{ margin:0; font-family:var(--font-display); font-weight:600; font-size:17px; line-height:1.25; color:var(--text); transition:color .3s var(--ease); }
.ap-col > p, .ap-exit p:not(.ap-proof-k){ margin:0; font-size:14px; line-height:1.55; color:var(--text-muted); }
.ap-col .ap-proof{ margin-top:auto; }
/* the gate being asked names its tier; a ruled-out tier dims by colour; the landed one lights with the drawing's corner marks */
.ap-col.is-ask h3, .ap-exit.is-ask h3{ color:var(--accent-text); }
.ap-col.is-out h3, .ap-exit.is-out h3, .is-out .ap-proof .n, .is-out .ap-proof b{ color:var(--text-muted); }
.is-out .ap-meter i.on{ background:var(--text-faint); }
.ap-col.is-hit, .ap-exit.is-hit{ background:linear-gradient(180deg, color-mix(in srgb, var(--accent) 12%, transparent), transparent 60%); }
.ap-col.is-hit::before, .ap-col.is-hit::after, .ap-exit.is-hit::before, .ap-exit.is-hit::after{
  content:""; position:absolute; width:10px; height:10px; border:0 solid var(--accent-text); pointer-events:none; }
.ap-col.is-hit::before, .ap-exit.is-hit::before{ left:8px; top:8px; border-width:1.5px 0 0 1.5px; }
.ap-col.is-hit::after, .ap-exit.is-hit::after{ right:8px; bottom:8px; border-width:0 1.5px 1.5px 0; }
.ap-exit{ position:relative; margin-top:12px; display:grid; grid-template-columns:minmax(0,1.6fr) minmax(0,1fr); gap:16px 40px; align-items:start;
  padding:20px 24px; border:1px dashed var(--border-strong); border-radius:var(--radius-lg); scroll-margin-top:110px; transition:background-color .3s var(--ease); }
.ap-exit h3{ margin-bottom:6px; }

/* proof: our solution and its published result */
.ap-proof{ display:grid; align-content:start; }
.ap-proof-k{ margin:0 0 2px; font-size:13px; color:var(--text-muted); }
.ap-proof a{ display:grid; gap:2px; padding:10px 0; border-top:1px solid var(--border); color:var(--text); text-decoration:none; }
.ap-proof-k + a{ border-top:0; }
.ap-proof .n{ font-family:var(--font-display); font-weight:500; font-size:14.5px; transition:color .2s var(--ease); }
.ap-proof .r{ font-size:13.5px; line-height:1.45; color:var(--text-muted); }
.ap-proof b{ font-family:var(--font-mono); font-weight:500; color:var(--pos-text); font-variant-numeric:tabular-nums; }
.ap-proof b.dn{ color:var(--accent-2-text); }
.ap-proof a:hover .n{ color:var(--accent-text); }

/* ---- constraints ---- */
.ap-cons{ border-top:1px solid var(--border); }
.ap-cons > div{ display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) minmax(0,1.5fr); gap:8px 40px; align-items:baseline;
  padding:22px 0; border-bottom:1px solid var(--border); }
.ap-cons h3{ margin:0; font-family:var(--font-display); font-weight:600; font-size:17px; line-height:1.3; color:var(--text); }
.ap-cons p{ margin:0; font-size:15px; line-height:1.6; color:var(--text-muted); }
.ap-cons .ap-cons-to{ font-family:var(--font-display); font-weight:500; color:var(--accent-text); }

@media (max-width:1080px){
  /* gates become rows: the question on the left, its two buttons on the right */
  .ap-gates{ grid-template-columns:minmax(0,1fr); gap:8px; max-width:720px; }
  .ap-gate + .ap-gate::before{ content:none; }
  .ap-gate{ flex-direction:row; align-items:center; gap:20px; padding:12px 14px 12px 18px; }
  .ap-seg{ flex:0 0 auto; }
  .ap-spec{ grid-template-columns:minmax(0,1fr); }
  .ap-col{ display:grid; grid-template-columns:minmax(0,1fr) 260px; grid-template-areas:"h proof" "m proof" "p proof"; gap:10px 32px;
    align-content:start; border-left:0; border-top:1px solid var(--border); }
  .ap-col:first-child{ border-top:0; border-radius:var(--radius-lg) var(--radius-lg) 0 0; }
  .ap-col:last-child{ border-radius:0 0 var(--radius-lg) var(--radius-lg); }
  .ap-col h3{ grid-area:h; } .ap-col .ap-meter{ grid-area:m; } .ap-col > p{ grid-area:p; } .ap-col .ap-proof{ grid-area:proof; margin-top:0; }
  .ap-cons > div{ grid-template-columns:minmax(0,1fr) minmax(0,1.6fr); }
  .ap-cons > div p:last-child{ grid-column:2; }
}
@media (max-width:820px){
  .ap-bar{ grid-template-columns:minmax(0,1fr); }
}
@media (max-width:640px){
  .ap-gate{ gap:14px; padding:12px 12px 12px 14px; }
  .ap-gate h3{ font-size:15px; }
  .ap-seg button{ min-width:56px; height:44px; padding:0 12px; }
  .ap-bar-p ul{ grid-template-columns:minmax(0,1fr); }
  .ap-bar-t{ font-size:23px; }
  .ap-bar-t .link-arrow{ padding:14px 0; margin:-14px 0; }   /* a 44px tap target without moving the line */
  .ap-bar-cta{ flex-wrap:wrap; }
  .ap-col{ display:flex; }
  .ap-exit{ grid-template-columns:minmax(0,1fr); padding:18px; }
  .ap-cons > div{ grid-template-columns:minmax(0,1fr); }
  .ap-cons > div p:last-child{ grid-column:auto; }
}
@media (prefers-reduced-motion: reduce){
  .ap-bar-p, .ap-bar-p.is-on{ transition:none; }
}
/* Windows High Contrast drops the fills: the given answer and the gate being asked keep system colours */
@media (forced-colors: active){
  .ap-seg button[aria-pressed="true"]{ forced-color-adjust:none; background:Highlight; color:HighlightText; border-color:Highlight; }
  .ap-gate.is-now{ border:2px solid Highlight; }
  .ap-col.is-hit, .ap-exit.is-hit{ outline:2px solid Highlight; outline-offset:-2px; }
}
