/* BENEFSAN — process.css (How we work). Page-specific, unlayered (wins over main.css). Tokens only.
   1 · Ten-Station Rail: default = horizontal scroll-snap list (works without JS);
       .rail--pinned (JS, ≥1024, motion on) = sticky pin, vertical scroll drives horizontal travel;
       .rail--stack (JS, reduced motion / data-motion=off) = plain vertical list.
   2 · Deliverables table · 3 · Engineering-output sheets · 4 · Team band · 5 · Start list · 6 · FAQ · print */

:root{
  --rail-top:calc(var(--sticky-offset) - 16px);                                  /* header + strip */
  /* inline padding that aligns the first station with .container. The % resolves against the element it is used on
     (.rail__track / .rail__list = the full-bleed pin), so a classic scrollbar does not shift it the way 100vw would;
     JS replaces it with the measured px value. */
  --rail-pad:max(var(--page-pad),calc((100% - var(--container)) / 2 + var(--page-pad)));
  --st-w:min(300px,82vw);
  --st-gap:var(--gutter);
  --dot:14px;
  --line-y:34px;                                                                  /* rail line offset inside .rail__list */
}
@media (min-width:720px){:root{--st-w:360px}}
@media (min-width:1024px){:root{--st-w:clamp(400px,33vw,520px)}}

/* ---------- 1 · Rail: section + bar ---------- */
.rail-section .sec-head{margin-bottom:var(--sp-6)}
/* the scroll / arrow-key hint does not apply to the static stack (reduced motion, ?motion=off) */
@media (prefers-reduced-motion:reduce){.rail__hint{display:none}}
html[data-motion="off"] .rail__hint{display:none}
.rail{position:relative}
.rail__pin{position:relative;padding-top:var(--sp-2)}
.rail__bar{display:flex;align-items:center;justify-content:space-between;gap:var(--sp-4);min-height:44px;margin-bottom:var(--sp-3)}
.rail__count{color:var(--muted);letter-spacing:.02em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
.rail__count b{font-weight:500;color:var(--ink)}
.rail__count-sep{margin-inline:2px}
@media (max-width:1023.98px){.rail__count-sep,.rail__count [data-rail-title]{display:none}}
.rail__index{display:none}
.rail__index ol{display:flex;gap:6px}
.rail__idx{display:grid;place-content:center;width:40px;height:40px;border:1px solid var(--line);border-radius:var(--radius);background:var(--surface);font-family:var(--font-mono);font-size:var(--fs-eyebrow);font-weight:500;color:var(--muted);text-decoration:none;font-variant-numeric:tabular-nums;transition:background var(--t-fast),color var(--t-fast),border-color var(--t-fast)}
.rail__idx:hover{border-color:var(--line-strong);color:var(--ink)}
.rail__idx.is-passed{color:var(--ink);border-color:var(--steel)}
.rail__idx[aria-current="true"]{background:var(--navy);border-color:var(--navy);color:var(--on-navy)}
@media (min-width:900px){.rail__index{display:block}}                            /* from 900px the bar fits index + counter + nav without clipping */
.rail__nav{display:flex;gap:var(--sp-2);flex:none}
.rail__btn{width:44px;height:44px;display:grid;place-content:center;border:1px solid var(--line-strong);border-radius:var(--radius);color:var(--ink);background:var(--surface);transition:background var(--t-fast),color var(--t-fast),opacity var(--t-fast)}
.rail__btn:hover{background:var(--ink);color:var(--bg)}
/* ends of the line: aria-disabled keeps the button focusable so keyboard focus is never dropped */
.rail__btn[aria-disabled="true"]{opacity:.35;cursor:default}
.rail__btn[aria-disabled="true"]:hover{background:var(--surface);color:var(--ink)}
.rail__btn .icon{width:18px;height:18px}
.rail__btn--prev .icon{transform:rotate(180deg)}
html:not(.js) .rail__nav,html:not(.js) .rail__count{display:none}

/* ---------- 1 · Rail: track (default = scroll-snap list) ---------- */
.rail__track{position:relative;overflow-x:auto;overflow-y:hidden;padding-inline-start:var(--rail-pad);scroll-snap-type:x mandatory;scroll-padding-inline:var(--rail-pad);scrollbar-width:none;-webkit-overflow-scrolling:touch;outline-offset:-3px}
.rail__track::-webkit-scrollbar{display:none}
/* start padding lives on the track (so % resolves against the pin width); end padding stays on the list so every browser keeps it in the scrollable overflow */
.rail__list{position:relative;display:flex;gap:var(--st-gap);width:max-content;padding:var(--sp-2) var(--rail-pad) var(--sp-4) 0;--pos:0}
/* the rail line (::before) and its gold fill (::after) travel with the list */
.rail__list::before,.rail__list::after{content:"";position:absolute;top:var(--line-y);left:calc(var(--dot) / 2);height:2px;background:var(--line-strong);opacity:.18;width:calc(9 * (var(--st-w) + var(--st-gap)));pointer-events:none}
.rail__list::after{background:var(--gold);opacity:1;width:calc(var(--pos) * (var(--st-w) + var(--st-gap)))}
.station{position:relative;flex:0 0 var(--st-w);display:flex;flex-direction:column;padding-top:56px;scroll-snap-align:start;min-width:0}
.station::before{content:"";position:absolute;top:calc(var(--line-y) - var(--sp-2) - var(--dot) / 2 + 1px);left:0;width:var(--dot);height:var(--dot);border-radius:50%;background:var(--bg-2);border:2px solid var(--muted);z-index:1;transition:background var(--t-fast),border-color var(--t-fast),box-shadow var(--t-fast)}
.station.is-passed::before{background:var(--navy);border-color:var(--navy)}
.station.is-active::before{background:var(--gold);border-color:var(--gold);box-shadow:0 0 0 4px var(--bg-2),0 0 0 5px var(--gold)}
.station__phase-mark{position:absolute;top:0;left:0;font-family:var(--font-mono);font-size:var(--fs-eyebrow);font-weight:500;letter-spacing:.12em;text-transform:uppercase;color:var(--muted);white-space:nowrap;line-height:1.2}
.station__card{flex:1;display:flex;flex-direction:column;gap:var(--sp-4);padding:var(--sp-5);min-height:320px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);transition:border-color var(--t-base) var(--ease),box-shadow var(--t-base) var(--ease)}
@media (min-width:1024px){.station__card{min-height:clamp(340px,40vh,420px)}}
@media (min-width:1200px){.station__card{padding:var(--sp-6)}}
.station.is-active .station__card{border-color:var(--gold);box-shadow:var(--shadow-2)}
.station__top{display:flex;align-items:flex-start;justify-content:space-between;gap:var(--sp-4)}
/* numeral size comes from main.css (--fs-station, 72 → 128px); only the stroke colour is page-specific */
.station .station__no{-webkit-text-stroke:1.5px var(--steel);transition:color var(--t-base) var(--ease)}
@supports not (-webkit-text-stroke:1px currentColor){.station .station__no{color:var(--line)}}
.station__glyph{width:56px;height:56px;margin-top:8px;color:var(--navy);flex:none;transition:color var(--t-base)}
.station.is-active .station__glyph{color:var(--gold-deep)}
.station__text{margin-top:auto;display:flex;flex-direction:column;gap:var(--sp-3);align-items:flex-start}
.station__title{font-weight:600;max-width:18ch;text-wrap:balance}   /* 18ch: "Water treatment · tailings" breaks as two even lines */
.station__line{color:var(--ink-2);max-width:36ch;text-wrap:pretty}
.station.is-active .station__phase{border-color:var(--gold);color:var(--gold-text-sm)}
/* short desktop viewports (laptop + bookmarks bar, 125 % zoom): keep the whole card inside the pinned window */
@media (min-width:1024px) and (max-height:700px){
  .station__card{min-height:0}
  .station__text{margin-top:var(--sp-5)}
  .station .station__no{font-size:clamp(3.5rem,2rem + 3vw,5rem)}
}

/* ---------- 1 · Rail: pinned mode (JS, ≥1024, motion on) ---------- */
.rail--pinned .rail__pin{position:sticky;top:var(--rail-top);z-index:2;padding-bottom:var(--sp-5)}
.rail--pinned .rail__track{overflow:clip;scroll-snap-type:none}
.rail--pinned .rail__list{transform:translate3d(calc(-1px * var(--x,0)),0,0);will-change:transform}
html[data-motion="off"] .rail--pinned .rail__list{will-change:auto}

/* ---------- 1 · Rail: stack mode (JS, reduced motion / data-motion=off) ---------- */
.rail--stack .rail__bar{display:none}
.rail--stack .rail__track{overflow:visible;scroll-snap-type:none}
.rail--stack .rail__list{display:block;width:auto;padding:0 var(--rail-pad) 0 0;max-width:none}
.rail--stack .rail__list::before,.rail--stack .rail__list::after,.rail--stack .station::before,.rail--stack .station__phase-mark{display:none}
.rail--stack .station{padding:0;flex:none;display:block;max-width:calc(var(--container) - 2 * var(--page-pad));margin-inline:auto}
.rail--stack .station__card{min-height:0;display:grid;grid-template-columns:auto 1fr;gap:var(--sp-3) var(--sp-6);align-items:center;padding:var(--sp-5) 0;background:transparent;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none}
.rail--stack .station:last-child .station__card{border-bottom:1px solid var(--line)}
.rail--stack .station__top{grid-row:1 / 3;display:flex;align-items:center;gap:var(--sp-5)}
.rail--stack .station .station__no{font-size:clamp(3rem,2rem + 2vw,4.5rem);-webkit-text-stroke:0;color:transparent;background:var(--gold-grad);-webkit-background-clip:text;background-clip:text;min-width:2.2ch}
@supports not (background-clip:text){.rail--stack .station .station__no{color:var(--gold-deep);background:none}}
.rail--stack .station__glyph{margin-top:0}
.rail--stack .station__text{margin-top:0;display:grid;grid-template-columns:auto 1fr;gap:var(--sp-2) var(--sp-4);align-items:baseline}
.rail--stack .station__line{grid-column:1 / -1;max-width:52ch}
.rail--stack .station__phase{justify-self:start}
@media (max-width:719.98px){
  .rail--stack .station__card{grid-template-columns:1fr}
  .rail--stack .station__top{grid-row:auto}
  .rail--stack .station__text{grid-template-columns:1fr}
}

/* ---------- 2 · Deliverables table ---------- */
.deliv th[scope="row"]{white-space:nowrap;vertical-align:top}
.deliv .deliv__st{white-space:nowrap;color:var(--ink)}
.deliv .deliv__st a{color:var(--gold-text-sm);text-decoration:none;border-bottom:1px solid var(--line)}
.deliv .deliv__st a:hover{color:var(--ink);border-color:var(--ink)}
.deliv td:last-child{max-width:62ch}
@media (min-width:900px){.deliv th:first-child,.deliv td:first-child{width:18%}.deliv th:nth-child(2),.deliv td:nth-child(2){width:14%}}

/* ---------- 3 · Engineering output — drawings on white sheets, title block masked ---------- */
.output{row-gap:var(--gutter)}
.output__fig{display:flex;flex-direction:column}
.output__sheet{position:relative;padding:var(--sp-3);background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
.output__sheet img{aspect-ratio:auto;object-fit:contain;border-radius:0;background:var(--surface)}
/* INTERIM: the drawings' title block (and the ruler row beneath it) is covered by a white cell that ends on the sheet's frame lines,
   so no names other than BENEFSAN's reach the page (spec §5.4 / §6.2). The shipped image files still carry the block —
   the asset owner re-exports them cropped; then this rule and the two <span class="output__mask"> go. */
.output__mask{position:absolute;inset-inline-end:var(--sp-3);bottom:var(--sp-3);width:33.5%;height:19.5%;background:var(--surface)}

/* ---------- 4 · Who you talk to — navy band ---------- */
.team .team__grid{align-items:center}
.team__text{display:flex;flex-direction:column;align-items:flex-start;gap:var(--sp-5)}
.team__text .h2{max-width:18ch}
.team__text .lead{color:var(--on-navy-muted)}
.team__stats{width:100%;max-width:520px;margin-top:var(--sp-2)}
.team__fig img{border-radius:var(--radius)}
@media (min-width:1024px){.team__fig{grid-column:8 / span 5}}

/* ---------- 5 · What we need to start ---------- */
.start>div{display:flex;flex-direction:column;gap:var(--sp-3)}
.start dt{display:flex;flex-direction:column;gap:var(--sp-3)}
.start__idx{font-size:var(--fs-eyebrow);font-weight:500;letter-spacing:.1em;color:var(--gold-text-sm)}
.start dd{color:var(--ink-2);max-width:34ch}
@media (min-width:1200px){.start>div{padding:var(--sp-6)}}

/* ---------- 6 · FAQ ---------- */
.faq{max-width:var(--reading)}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion:reduce){
  .station::before,.station__card,.station .station__no,.station__glyph,.rail__idx,.rail__btn{transition:none}
}
@media print{
  .rail{height:auto !important}
  .rail__pin{position:static}
  .rail__nav,.rail__index,.rail__count{display:none}
  .rail__track{overflow:visible;padding:0}
  .rail__list{display:grid;grid-template-columns:1fr 1fr;width:auto;transform:none !important;padding:0}
  .rail__list::before,.rail__list::after,.station::before{display:none}
  .station{padding-top:var(--sp-4)}
  .station__card{min-height:0;box-shadow:none}
  .station .station__no{-webkit-text-stroke:1px var(--muted)}
}
