/* why/ (the founder's letter), site-v53-letter-rail: THE READER IS NEVER LOST.
   Two columns: a running rail on the left that stays put while the letter scrolls (the six movements in the letter's own words,
   the current one lit, one line each of what the movement argues, then the signature and the button), and the letter itself in
   a reading column on the right. Phones: the rail becomes a short contents block above the letter, and a thin bar at the top
   names the part being read. Tokens, type scale and the frame come from shared/site.css; nothing here redeclares a token. */

/* the hero and the letter share one page section; the hero keeps the frame's rhythm */
.letter-page .hero-solo{padding-bottom:clamp(40px,6vh,64px)}

/* ── the two columns ── */
.lr{--rail:300px;display:grid;grid-template-columns:var(--rail) minmax(0,36em);gap:0 clamp(48px,6vw,112px);align-items:start}

/* ── the rail ── */
.rail{position:sticky;top:28px;align-self:start}
.rail-in{display:flex;flex-direction:column;max-height:calc(100svh - 56px)}
.rail-h{font-size:var(--fs-cap);line-height:1.3;font-weight:600;letter-spacing:0;color:var(--sub)}
.rail-list{margin-top:14px;display:grid;gap:4px}
.rail-list a{position:relative;display:grid;grid-template-columns:2px 1fr;column-gap:16px;padding:8px 0 10px;border-radius:0}
.rail-bar{grid-row:1 / span 2;position:relative;width:2px;border-radius:1px;background:var(--edge);overflow:hidden}
.rail-bar i{position:absolute;inset:0;transform-origin:top;transform:scaleY(var(--p,0));background:var(--dim);transition:background-color var(--motion-medium) var(--ease-out)}
.rail-t{font-size:15px;line-height:1.35;font-weight:600;letter-spacing:-.005em;color:var(--sub);transition:color var(--motion-medium) var(--ease-out)}
.rail-l{margin-top:3px;font-size:var(--fs-cap);line-height:1.45;color:var(--dim);transition:color var(--motion-medium) var(--ease-out)}
.rail-list a:hover .rail-t{color:var(--ink)}
.rail-list a:focus-visible{outline-offset:4px}
/* the part being read: title in ink, its line readable, the bar filling as the reader moves through it */
.rail-list a.on .rail-t{color:var(--ink)}
.rail-list a.on .rail-l{color:var(--sub)}
.rail-list a.on .rail-bar i{background:var(--teal)}
/* no JS: every part reads at full strength */
html:not(.js) .rail-t{color:var(--ink)}
html:not(.js) .rail-l{color:var(--sub)}
.rail-end{margin-top:22px;padding-top:18px;border-top:1px solid var(--hair)}
.rail-sign{font-size:15px;font-weight:600;line-height:1.35;color:var(--ink)}
.rail-sign span{display:block;margin-top:2px;font-size:var(--fs-cap);font-weight:400;color:var(--sub)}
.rail-end .btn{margin-top:18px;height:44px;padding:0 28px}

/* ── the letter ── */
.letter{padding-bottom:8px}
.letter p{font-size:var(--fs-lead);line-height:1.7;color:var(--ink);max-width:36em}
.letter p+p,.letter p+.four,.letter .four+p{margin-top:1.05em}
.letter strong{font-weight:600}
.letter em{font-style:italic}
/* a movement opens after a breath and a hairline, level with its title in the rail */
.mv{scroll-margin-top:28px}
.mv+.mv{margin-top:clamp(48px,7vh,72px);padding-top:clamp(48px,7vh,72px);border-top:1px solid var(--hair)}
.letter p.opener{font-size:clamp(21px,1.7vw,24px);line-height:1.45;font-weight:500;letter-spacing:-.012em}
.letter p.turn{font-weight:500}
/* the paragraph of questions he asks himself: set off, the one indent in the letter */
.letter p.asks{margin-top:1.6em;padding-left:22px;border-left:2px solid var(--teal);color:var(--sub);font-style:italic}
/* the four things the setup needed: one set, each on its own hairline */
.four{display:grid;margin-block:1.6em}
.four p{padding-block:1em;border-top:1px solid var(--hair)}
.four p+p{margin-top:0}
.four p:last-child{border-bottom:1px solid var(--hair)}
.letter p.last{margin-top:1.6em}
.letter p.letter-sign{margin-top:var(--sp-actions);padding-top:var(--sp-lead);border-top:1px solid var(--hair);max-width:22em;font-size:var(--fs-body);font-weight:600}
.letter-sign span{display:block;margin-top:2px;font-weight:400;color:var(--sub)}
/* wide screens: the signature is drawn at the foot of the rail, level with the last line; the letter's own copy stays for screen readers */
@media (min-width:900px){
  .letter p.letter-sign{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
}

/* short screens: the rail keeps every title and line, the gaps tighten */
@media (min-width:900px) and (max-height:760px){
  .rail-list{margin-top:10px;gap:0}
  .rail-list a{padding:6px 0 8px}
  .rail-end{margin-top:14px;padding-top:14px}
  .rail-end .btn{margin-top:14px}
}
@media (min-width:900px) and (max-height:640px){.rail-l{display:none}}

/* ── the phone bar: the part being read, pinned to the top once the contents block has scrolled away ── */
.lr-now{display:none}

/* ── narrow screens: the rail becomes a short contents block above the letter ── */
@media (max-width:899px){
  .lr{grid-template-columns:minmax(0,1fr)}
  .rail{position:static}
  .rail-in{max-height:none}
  .rail-list{gap:0;margin-top:8px}
  .rail-list a{padding:9px 0;grid-template-columns:22px 1fr;column-gap:8px;border-top:1px solid var(--hair);counter-increment:none}
  .rail-list li:last-child a{border-bottom:1px solid var(--hair)}
  .rail-bar{display:none}
  .rail-list{counter-reset:mv}
  .rail-list li{counter-increment:mv}
  .rail-list a::before{content:counter(mv);grid-row:1;font-size:var(--fs-cap);font-weight:600;line-height:1.55;color:var(--sub)}
  .rail-t{color:var(--ink);font-weight:500}
  .rail-l,.rail-end{display:none}
  .letter{margin-top:clamp(40px,6vh,56px)}
  .mv{scroll-margin-top:60px}
  .letter p{font-size:var(--fs-body)}
  .letter p.opener{font-size:20px}
  html.js .lr-now{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:10px;position:fixed;z-index:30;top:0;left:0;right:0;height:44px;padding:0 var(--gut);background:var(--page);border-bottom:1px solid var(--hair);font-size:14px;line-height:1.2;transform:translateY(-100%);transition:transform var(--motion-medium) var(--ease-out)}
  html.js .lr-now.show{transform:none}
  .lr-now-n{font-weight:600;color:var(--sub)}
  .lr-now-t{min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-weight:600;color:var(--ink)}
  .lr-now-p{position:absolute;left:0;right:0;bottom:-1px;height:2px}
  .lr-now-p i{position:absolute;inset:0;transform-origin:left;transform:scaleX(var(--p,0));background:var(--teal)}
}

/* ── v54: no coloured fill bar. The phone bar's progress line goes grey too. ── */
.rail-bar{display:none}
.rail-list a{grid-template-columns:1fr;column-gap:0}
.lr-now-p i{background:var(--edge)}

/* D. THE THREAD: one hairline runs the length of the list and one small dot travels down it with the reader, so position in the whole letter is one glance. */
.rail-list{position:relative;gap:2px;padding-left:22px}
.rail-list::before{content:'';position:absolute;left:3px;top:10px;bottom:10px;width:1px;background:var(--edge)}
.rail-list a{grid-template-columns:1fr;padding:7px 0}
.rail-t{font-weight:500;color:var(--dim)}
.rail-l{color:var(--dim)}
.rail-list a.on .rail-t{color:var(--ink);font-weight:600}
.rail-list a.on .rail-l{color:var(--sub)}
.rail-dot{position:absolute;left:0;top:0;width:7px;height:7px;border-radius:50%;background:var(--ink);transform:translateY(var(--y,14px));transition:transform 80ms linear;pointer-events:none}
html:not(.js) .rail-dot,html:not(.js) .rail-list::before{display:none}
html:not(.js) .rail-list{padding-left:0}
html:not(.js) .rail-t{color:var(--ink)}
@media (max-width:899px){.rail-dot,.rail-list::before{display:none}.rail-list{padding-left:0}}
