/* ===========================================================================
   FUNDWRIGHT — HOW IT WORKS  (fw-how.css, prefix .fwh-)
   ---------------------------------------------------------------------------
   Loaded only by templates/pages/fundwright-how-it-works.html (head_extra).
   Builds on style.css: uses its :root colour tokens, .container, .section,
   .btn, .fw-hero and .fw-cta. Never hard-code a new text colour here; if you
   need one, add a token to style.css :root and check its contrast first.

   REUSE ON ANOTHER PAGE
   - Icons: {% include "partials/fw_icons.html" %} once, then
       <svg class="fw-i" aria-hidden="true"><use href="#i-NAME"/></svg>
   - "App window" mock: <div class="fwh-win"><p class="fwh-win-bar"><b>App</b>
       Screen name</p> … <p class="fwh-win-note">Example figures</p></div>
   - Icon bullet list: <ul class="fwh-points"><li><span class="fwh-pic">ICON
       </span><span>text</span></li></ul>
   - Step block: <li class="fwh-step fwh-g-once|each|ongoing"> with .fwh-text
       and .fwh-vis children (two columns on wide screens, stacked on phones).

   GROUP COLOURS carry meaning (which steps happen once, for every proposal,
   or every day). They are set once, as --g, on .fwh-g-* and used by the
   rail, the step number and the group pill. Contrast on --card / --paper:
     olive #5f6b3a 5.7:1 · rust #9f4a2b 5.9:1 · teal #2c7a72 5.0:1 (AA text).
   Pills use ink text on a 14% tint of --g (≥ 13:1).

   MOTION: the hero flow line draws once on load, the completeness ring and
   bars fill once when they scroll into view, and the side-panel tabs answer
   clicks. All of it is off under prefers-reduced-motion.
   =========================================================================== */

/* ---------- icons ---------- */
.fw-i{width:20px;height:20px;flex:0 0 auto;fill:none;stroke:currentColor;stroke-width:1.7;
  stroke-linecap:round;stroke-linejoin:round;vertical-align:middle}

/* ---------- group colours (see header) ---------- */
.fwh-g-once{--g:var(--olive)}
.fwh-g-each{--g:var(--rust)}
.fwh-g-ongoing{--g:var(--teal)}

/* ===================== HERO + FLOW DIAGRAM ===================== */
.fwh-hero{padding-bottom:10px}
.fwh-hero .sub{max-width:60ch}
.fwh-flow{margin:44px 0 0;display:grid;grid-template-columns:minmax(0,1fr) 90px auto 90px minmax(0,1fr);
  align-items:center;gap:0;max-width:1100px}
.fwh-flow ul{list-style:none;display:flex;flex-direction:column;gap:12px}
.fwh-flow li{display:flex;align-items:center;gap:12px;background:var(--card);border:1px solid var(--line);
  border-radius:14px;padding:12px 16px}
.fwh-flow li b{display:block;font-size:.98rem}
.fwh-flow li small{display:block;font-size:.8rem;color:var(--muted)}
.fwh-flow-ic{display:grid;place-items:center;width:38px;height:38px;border-radius:10px;background:var(--sand);color:var(--ink)}
.fwh-flow-out li{padding:10px 16px}
.fwh-flow-out .fwh-flow-ic{width:32px;height:32px}
.fwh-flow-out li:first-child{border-color:var(--rust)}
.fwh-flow-out li:first-child .fwh-flow-ic{background:var(--rust);color:#fff}
.fwh-flow-line{width:100%;height:24px;overflow:visible;fill:none;stroke:var(--ink);stroke-width:1.6;
  stroke-linecap:round;stroke-linejoin:round}
.fwh-flow-line path:first-child{stroke-dasharray:4 6}
.fwh-flow-core{display:flex;flex-direction:column;align-items:center;text-align:center;gap:6px;
  background:var(--ink);color:#fff;border-radius:22px;padding:26px 30px;box-shadow:var(--shadow)}
.fwh-flow-core-ic{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:var(--rust)}
.fwh-flow-core-ic .fw-i{width:30px;height:30px}
.fwh-flow-core b{font-family:var(--font-display);font-weight:400;font-size:1.9rem;line-height:1.1;margin-top:6px}
.fwh-flow-core small{display:flex;align-items:center;gap:6px;font-size:.8rem;color:#d9cfbd}
.fwh-flow-core small .fw-i{width:15px;height:15px}

/* one orchestrated moment: the two connector lines draw in, in order */
@media (prefers-reduced-motion:no-preference){
  .fwh-flow-line path:first-child{animation:fwh-flow 1.6s linear infinite}
  .fwh-flow-core{animation:fwh-pop .7s .25s cubic-bezier(.2,.8,.2,1) both}
  .fwh-flow-out li{animation:fwh-in .5s cubic-bezier(.2,.8,.2,1) both}
  .fwh-flow-out li:nth-child(1){animation-delay:.6s}
  .fwh-flow-out li:nth-child(2){animation-delay:.72s}
  .fwh-flow-out li:nth-child(3){animation-delay:.84s}
}
@keyframes fwh-flow{to{stroke-dashoffset:-20}}
@keyframes fwh-pop{from{opacity:0;transform:scale(.92)}}
@keyframes fwh-in{from{opacity:0;transform:translateX(-10px)}}

/* ===================== LAYOUT: RAIL + STEPS ===================== */
.fwh-main{padding-top:56px}
.fwh-layout{display:grid;grid-template-columns:250px minmax(0,1fr);gap:clamp(30px,4vw,70px);align-items:start}

.fwh-rail{position:sticky;top:calc(var(--header-h) + 24px);display:flex;flex-direction:column;gap:20px}
.fwh-rail-h{font-size:.82rem;font-weight:600;color:var(--g);margin-bottom:6px}
.fwh-rail ol{list-style:none;border-left:2px solid color-mix(in srgb,var(--g) 30%,transparent)}
.fwh-rail a{display:flex;gap:10px;align-items:baseline;padding:6px 0 6px 14px;margin-left:-2px;
  border-left:2px solid transparent;color:var(--muted);font-size:.88rem;line-height:1.35;transition:color .2s,border-color .2s}
.fwh-rail .fwh-rn{font-family:var(--font-display);font-size:1.15rem;color:var(--g);min-width:1ch}
.fwh-rail a:hover{color:var(--ink)}
.fwh-rail a[aria-current="step"]{color:var(--ink);font-weight:600;border-left-color:var(--g)}

.fwh-steps{list-style:none}
.fwh-step{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);gap:clamp(26px,3.6vw,60px);
  align-items:start;padding:56px 0;border-top:1px solid var(--line);scroll-margin-top:calc(var(--header-h) + 16px)}
.fwh-step:first-child{border-top:0;padding-top:0}

.fwh-num{display:flex;align-items:center;gap:14px}
.fwh-num .n{font-family:var(--font-display);font-size:4.2rem;line-height:.8;color:var(--g)}
.fwh-num .g{font-size:.78rem;font-weight:600;padding:5px 12px;border-radius:999px;color:var(--ink);
  background:color-mix(in srgb,var(--g) 14%,var(--card))}
.fwh-text h2{font-size:clamp(1.9rem,3vw,2.6rem);margin-top:16px;max-width:18ch}
.fwh-lead{margin-top:16px;color:var(--muted);font-size:1.05rem;max-width:46ch}

.fwh-points{list-style:none;margin-top:24px;display:flex;flex-direction:column;gap:16px}
.fwh-points li{display:flex;gap:14px;align-items:flex-start;font-size:.97rem;line-height:1.55;max-width:58ch}
.fwh-points b{font-weight:600}
.fwh-pic{display:grid;place-items:center;width:36px;height:36px;border-radius:10px;flex:0 0 auto;
  background:var(--sand);color:var(--ink);margin-top:-4px}
.fwh-pic .fw-i{width:19px;height:19px}
.fwh-link{margin-top:26px}

/* ===================== APP WINDOW (shared by the illustrations) ===================== */
.fwh-vis{min-width:0}
.fwh-win{background:var(--card);border:1px solid var(--line);border-radius:16px;box-shadow:var(--shadow);overflow:hidden}
.fwh-win-bar{display:flex;gap:8px;align-items:center;padding:11px 18px;border-bottom:1px solid var(--line);
  font-size:.8rem;color:var(--muted);background:color-mix(in srgb,var(--sand) 45%,var(--card))}
.fwh-win-bar b{color:var(--ink);font-weight:700}
.fwh-win-bar b::before{content:"";display:inline-block;width:9px;height:9px;border-radius:2px;background:var(--rust);
  margin-right:8px;transform:rotate(45deg) translateY(-1px)}
.fwh-win-note{padding:8px 18px 12px;font-size:.74rem;color:var(--muted);text-align:right}
.fwh-sub{font-size:.8rem;font-weight:600;color:var(--muted);margin:18px 0 10px}

/* ---- 1 install ---- */
.fwh-stages{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);padding:34px 18px 10px;position:relative}
.fwh-stages::before{content:"";position:absolute;left:12.5%;right:12.5%;top:56px;height:2px;background:var(--olive)}
.fwh-stages li{position:relative;display:flex;flex-direction:column;align-items:center;gap:10px;text-align:center;font-size:.84rem;font-weight:500}
.fwh-stages .dot{display:grid;place-items:center;width:46px;height:46px;border-radius:50%;background:var(--card);
  border:2px solid var(--olive);color:var(--olive)}
.fwh-stages li.on .dot{background:var(--olive);color:#fff}
.fwh-offline{display:flex;align-items:center;justify-content:center;gap:10px;margin:22px 18px 22px;padding:12px;
  border-radius:12px;background:color-mix(in srgb,var(--olive) 12%,var(--card));font-weight:600;font-size:.92rem}

/* ---- 2 profile ---- */
.fwh-profile{display:grid;grid-template-columns:170px minmax(0,1fr);gap:22px;align-items:center;padding:22px 20px 6px}
.fwh-ring{position:relative;width:170px;height:170px}
.fwh-ring svg{width:100%;height:100%;transform:rotate(-90deg)}
.fwh-ring circle{fill:none;stroke-width:11}
.fwh-ring .trk{stroke:var(--sand)}
.fwh-ring .val{stroke:var(--olive);stroke-linecap:round;stroke-dasharray:100;stroke-dashoffset:calc(100 - var(--p))}
.fwh-ring p{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}
.fwh-ring b{font-family:var(--font-display);font-weight:400;font-size:2.9rem;line-height:1}
.fwh-ring span{font-size:.76rem;color:var(--muted);margin-top:4px}
.fwh-cards{list-style:none;display:flex;flex-direction:column;gap:7px}
.fwh-cards li{display:grid;grid-template-columns:20px minmax(0,1fr) auto 22px;gap:10px;align-items:center;
  padding:8px 12px;border:1px solid var(--line);border-radius:10px;font-size:.86rem;background:var(--card)}
.fwh-cards li .fw-i{width:18px;height:18px}
.fwh-cards .a{font-size:.74rem;font-weight:600;color:var(--muted);font-variant-numeric:tabular-nums}
.fwh-cards .s{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1.5px dashed var(--line)}
.fwh-cards li.done .s{border:0;background:var(--olive);color:#fff}
.fwh-cards li.done .s .fw-i{width:14px;height:14px;stroke-width:2.4}
.fwh-cards li:not(.done){background:color-mix(in srgb,var(--sand) 30%,var(--card))}

/* ---- 3 call intake ---- */
.fwh-calltabs{list-style:none;display:flex;gap:4px;padding:10px 14px 0;border-bottom:1px solid var(--line);overflow-x:auto}
.fwh-calltabs li{padding:8px 14px;font-size:.8rem;color:var(--muted);border:1px solid transparent;border-bottom:0;
  border-radius:9px 9px 0 0;white-space:nowrap}
.fwh-calltabs li.on{background:var(--card);border-color:var(--line);color:var(--ink);font-weight:600;margin-bottom:-1px}
.fwh-call{padding:16px 20px 18px}
.fwh-file{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 12px;border:1.5px dashed var(--line);
  border-radius:10px;font-size:.88rem;font-weight:500}
.fwh-file > .fw-i{color:var(--rust)}
.fwh-file .ok{margin-left:auto;display:inline-flex;align-items:center;gap:6px;font-size:.78rem;color:var(--olive);font-weight:600}
.fwh-file .ok .fw-i{width:16px;height:16px}
.fwh-fields{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}
.fwh-fields div{padding:9px 12px;background:color-mix(in srgb,var(--sand) 35%,var(--card));border-radius:9px}
.fwh-fields dt{font-size:.72rem;color:var(--muted)}
.fwh-fields dd{font-size:.9rem;font-weight:600}
.fwh-checkgroups{list-style:none;display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.fwh-checkgroups li{display:flex;flex-direction:column;gap:4px;padding:12px;border:1px solid var(--line);border-radius:10px}
.fwh-checkgroups .fw-i{color:var(--rust)}
.fwh-checkgroups b{font-size:.86rem}
.fwh-checkgroups span{font-size:.74rem;color:var(--muted)}
.fwh-fakebtn{display:flex;align-items:center;justify-content:center;gap:8px;margin-top:16px;padding:11px 16px;border-radius:40px;
  background:var(--rust);color:#fff;font-weight:600;font-size:.9rem}

/* ---- 4 start: fork into three ways ---- */
.fwh-fork{display:flex;flex-direction:column;align-items:center}
.fwh-fork-root{display:inline-flex;align-items:center;gap:8px;padding:10px 18px;border-radius:999px;
  background:var(--ink);color:#fff;font-weight:600;font-size:.9rem;position:relative}
.fwh-ways{list-style:none;display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:40px;position:relative;width:100%}
/* the branch lines: one stem down from the root, one bar across, one drop per card */
.fwh-ways::before{content:"";position:absolute;left:calc((100% - 28px) / 6);right:calc((100% - 28px) / 6);top:-20px;height:2px;background:var(--ink)}
.fwh-fork-root::after{content:"";position:absolute;left:50%;top:100%;width:2px;height:20px;background:var(--ink)}
.fwh-ways li{position:relative;background:var(--card);border:1px solid var(--line);border-radius:16px;padding:22px 18px 20px}
.fwh-ways li::before{content:"";position:absolute;left:50%;top:-21px;width:2px;height:21px;background:var(--ink)}
.fwh-ways li.big{background:var(--rust);border-color:var(--rust);color:#fff;box-shadow:var(--shadow)}
.fwh-way-ic{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--sand);color:var(--ink)}
.fwh-ways li.big .fwh-way-ic{background:rgba(255,255,255,.16);color:#fff}
.fwh-way-n{font-family:var(--font-display);font-size:4.4rem;line-height:.9;margin-top:14px}
.fwh-ways h3{font-family:var(--font-body);font-weight:600;font-size:1.02rem;margin-top:14px}
.fwh-ways li.big h3{color:#fff;margin-top:4px}
.fwh-ways li > p:not(.fwh-way-n){font-size:.86rem;color:var(--muted);margin-top:6px;line-height:1.5}
.fwh-ways li.big p{color:#ffe3d5}

/* wide steps (layout: "wide" in the JSON): heading on the left, picture across the full width below */
.fwh-step.fwh-wide{grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr)}
.fwh-step.fwh-wide .fwh-text,.fwh-step.fwh-wide .fwh-vis{grid-column:1 / -1}
.fwh-wide .fwh-text{display:grid;grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr);column-gap:clamp(26px,3.6vw,60px);align-items:end}
.fwh-wide .fwh-text .fwh-num{grid-column:1 / -1}
.fwh-wide .fwh-lead{margin-top:0;padding-bottom:6px}
.fwh-wide .fwh-ways{grid-template-columns:1fr 1.5fr 1fr}
.fwh-wide .fwh-ways::before{left:calc((100% - 28px) / 7);right:calc((100% - 28px) / 7)}
.fwh-wide .fwh-export{grid-template-columns:200px minmax(0,1fr);gap:40px}
.fwh-wide .fwh-formats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.fwh-wide .fwh-formats li{height:100%;padding:20px 20px}
.fwh-wide .fwh-doc::after{right:-32px;width:22px}

/* ---- 5 write: editor ---- */
.fwh-editor{padding:16px 20px 18px}
.fwh-toolbar{display:flex;flex-wrap:wrap;gap:8px}
.fwh-tb{display:inline-flex;align-items:center;gap:7px;padding:8px 14px;border-radius:9px;border:1px solid var(--line);
  font-size:.84rem;font-weight:600;background:var(--card)}
.fwh-tb .fw-i{width:17px;height:17px;color:var(--rust)}
.fwh-tb.pri{background:var(--rust);border-color:var(--rust);color:#fff}
.fwh-tb.pri .fw-i{color:#fff}
.fwh-sec{font-family:var(--font-display);font-size:1.5rem;margin-top:18px}
.fwh-lines{display:flex;flex-direction:column;gap:9px;margin-top:12px}
.fwh-lines span{display:block;height:9px;width:var(--w);border-radius:5px;background:color-mix(in srgb,var(--ink) 11%,var(--card))}
.fwh-lines span.num{height:auto;background:none;display:flex;align-items:center;gap:8px}
.fwh-lines span.num::before,.fwh-lines span.num::after{content:"";height:9px;border-radius:5px;background:color-mix(in srgb,var(--ink) 11%,var(--card))}
.fwh-lines span.num::before{width:90px}
.fwh-lines span.num::after{flex:1}
.fwh-lines em{font-style:normal;font-weight:700;font-size:.82rem;padding:2px 9px;border-radius:6px;
  background:color-mix(in srgb,var(--olive) 16%,var(--card));outline:1.5px solid var(--olive)}
.fwh-lines span.last{position:relative}
.fwh-lines span.last::after{content:"";position:absolute;right:-6px;top:-3px;width:2px;height:15px;background:var(--rust)}
@media (prefers-reduced-motion:no-preference){.fwh-lines span.last::after{animation:fwh-blink 1.1s steps(1) infinite}}
@keyframes fwh-blink{50%{opacity:0}}
.fwh-meter{display:flex;align-items:center;gap:12px;margin-top:18px;font-size:.8rem;color:var(--muted)}
.fwh-meter .bar{position:relative;flex:1;height:8px;border-radius:5px;background:var(--sand)}
.fwh-meter .bar > span{position:absolute;inset:0;border-radius:5px;background:var(--olive)}
.fwh-meter .bar::after{content:"";position:absolute;left:var(--m);top:-4px;width:2px;height:16px;background:var(--ink)}
.fwh-meter b{color:var(--ink)}
.fwh-badges{list-style:none;display:flex;flex-wrap:wrap;gap:8px;padding:12px 20px 18px;border-top:1px solid var(--line)}
.fwh-badges li{display:inline-flex;align-items:center;gap:7px;font-size:.8rem;font-weight:600;padding:6px 12px;border-radius:999px;
  background:color-mix(in srgb,var(--olive) 12%,var(--card))}
.fwh-badges .fw-i{width:16px;height:16px;color:var(--olive)}

/* ---- 6 side panel (working tabs) ---- */
.fwh-panel-intro{padding:14px 20px 0;font-size:.84rem;color:var(--muted)}
.fwh-ptabs{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:12px 20px 0}
.fwh-ptabs[hidden]{display:none}
.fwh-ptabs button{display:flex;flex-direction:column;align-items:center;gap:5px;padding:12px 6px;border-radius:12px;
  border:1px solid var(--line);background:var(--card);color:var(--ink);font:600 .8rem var(--font-body);cursor:pointer;
  transition:background .2s,border-color .2s,color .2s}
.fwh-ptabs button:hover{border-color:var(--rust)}
.fwh-ptabs button[aria-selected="true"]{background:var(--ink);border-color:var(--ink);color:#fff}
.fwh-ppanel{padding:16px 20px 6px}
.fwh-ppanel + .fwh-ppanel{border-top:1px solid var(--line)}
.js-tabs .fwh-ppanel + .fwh-ppanel{border-top:0}
.fwh-ppanel-h{display:flex;align-items:center;gap:8px;font-family:var(--font-body);font-weight:600;font-size:1rem}
.js-tabs .fwh-ppanel-h{display:none}
.fwh-ppanel-t{font-size:.92rem;margin-top:4px}
.js-tabs .fwh-ppanel-t{margin-top:0}
.fwh-rows{list-style:none;margin-top:12px;display:flex;flex-direction:column;gap:6px}
.fwh-rows li{display:flex;align-items:center;gap:10px;padding:9px 12px;border:1px solid var(--line);border-radius:10px;font-size:.88rem}
.fwh-rows .s{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;border:1.5px dashed var(--muted);flex:0 0 auto}
.fwh-rows li.done .s{border:0;background:var(--olive);color:#fff}
.fwh-rows li.saved .s{border:0;background:var(--sand);color:var(--rust)}
.fwh-rows .s .fw-i{width:13px;height:13px;stroke-width:2.4}
.fwh-rows li.todo{color:var(--muted)}
.fwh-budget{margin-top:14px}
.fwh-budget .bar{display:block;position:relative;height:16px;border-radius:9px;background:var(--sand);overflow:hidden}
.fwh-budget .bar span{position:absolute;inset:0 auto 0 0;width:var(--p);border-radius:9px;background:var(--olive)}
.fwh-budget p{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-top:8px;font-size:.86rem}
.fwh-budget p span{color:var(--muted)}
.fwh-budget .ok{justify-content:flex-start;align-items:center;gap:8px;font-weight:600;color:var(--olive)}

/* ---- 7 finish ---- */
.fwh-finish{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:4px 20px 20px}
.fwh-inserts,.fwh-themes,.fwh-versions{list-style:none;display:flex;flex-direction:column;gap:6px}
.fwh-inserts li{display:flex;align-items:center;gap:9px;font-size:.86rem;padding:7px 10px;border:1px solid var(--line);border-radius:9px}
.fwh-inserts .fw-i{width:17px;height:17px;color:var(--rust)}
.fwh-themes{flex-direction:row;gap:8px}
.fwh-themes li{flex:1;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:.74rem;text-align:center;line-height:1.25}
.fwh-themes .pg{display:flex;flex-direction:column;gap:4px;width:100%;aspect-ratio:3/4;padding:16% 12% 0;border-radius:6px;
  border:1px solid var(--line);background:#fff;position:relative;overflow:hidden}
.fwh-themes .pg i{display:block;height:4px;border-radius:2px;background:color-mix(in srgb,var(--ink) 15%,#fff)}
.fwh-themes .pg i:first-child{height:7px;width:70%;background:var(--ink)}
.fwh-themes li.on .pg{outline:2.5px solid var(--rust);outline-offset:2px}
.fwh-themes li.on{font-weight:600}
.fwh-themes .t-blue .pg::before{content:"";position:absolute;inset:0 0 auto;height:12%;background:#2f5d8a}  /* decorative swatch only */
.fwh-themes .t-blue .pg i:first-child{background:#2f5d8a}
.fwh-themes .t-tender .pg{border:3px double var(--ink)}
.fwh-themes .t-tender .pg i:first-child{width:100%;height:3px}
.fwh-versions{position:relative;padding-left:4px}
.fwh-versions li{display:grid;grid-template-columns:17px minmax(0,1fr);gap:8px;align-items:start;font-size:.84rem;font-weight:500;line-height:1.35}
.fwh-versions .fw-i{width:17px;height:17px;color:var(--rust)}
.fwh-versions li.auto{color:var(--muted);font-weight:400}
.fwh-versions li.auto .fw-i{color:var(--muted)}
.fwh-versions small{display:inline-block;font-size:.7rem;padding:1px 7px;border-radius:999px;border:1px solid var(--line)}
.fwh-versions li + li{margin-top:6px}

/* ---- 8 export ---- */
.fwh-export{display:grid;grid-template-columns:150px minmax(0,1fr);gap:26px;align-items:center}
.fwh-doc{position:relative;aspect-ratio:3/4;background:#fff;border:1px solid var(--line);border-radius:8px;box-shadow:var(--shadow);
  padding:0 16px;display:flex;flex-direction:column;gap:7px}
.fwh-doc .cv{display:block;height:34%;margin:0 -16px 8px;background:var(--rust);border-radius:8px 8px 0 0}
.fwh-doc i{display:block;height:5px;border-radius:3px;background:color-mix(in srgb,var(--ink) 14%,#fff)}
.fwh-doc i:nth-child(3){width:80%}
.fwh-doc i:nth-child(5){width:60%}
.fwh-doc::after{content:"";position:absolute;right:-22px;top:50%;width:14px;height:2px;background:var(--ink)}
.fwh-formats{list-style:none;display:flex;flex-direction:column;gap:10px}
.fwh-formats li{display:flex;gap:14px;align-items:center;padding:14px 16px;background:var(--card);border:1px solid var(--line);border-radius:14px}
.fwh-formats li b{display:block;font-size:.98rem}
.fwh-formats li span span{display:block;font-size:.84rem;color:var(--muted)}
.fwh-fmt-ic{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:var(--sand);color:var(--ink);flex:0 0 auto}
.fwh-formats li.main{border:2px solid var(--rust);box-shadow:var(--shadow)}
.fwh-formats li.main .fwh-fmt-ic{background:var(--rust);color:#fff}

/* ---- 9 dashboard ---- */
.fwh-dash{display:grid;grid-template-columns:1.1fr 1fr;grid-template-rows:auto auto auto;gap:10px;padding:18px 20px 6px}
.fwh-tile{border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.fwh-tile .k{display:flex;align-items:center;gap:8px;font-size:.78rem;color:var(--muted)}
.fwh-tile .k .fw-i{width:16px;height:16px}
.fwh-tile .w{font-size:.88rem;margin-top:6px}
.fwh-tile.due{grid-row:span 2;background:var(--teal);border-color:var(--teal);color:#fff}
.fwh-tile.due .k{color:#fff}
.fwh-tile.due .big{font-family:var(--font-display);font-size:4.4rem;line-height:1;margin-top:12px}
.fwh-tile.due .big span{font-size:1.4rem}
.fwh-tile.warn{background:color-mix(in srgb,var(--rust) 10%,var(--card));border-color:color-mix(in srgb,var(--rust) 40%,var(--line))}
.fwh-tile.warn .k .fw-i{color:var(--rust)}
.fwh-stats{grid-column:1 / -1;display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.fwh-stats div{display:flex;flex-direction:column-reverse;border-top:2px solid var(--teal);padding-top:10px}
.fwh-stats dd{font-family:var(--font-display);font-size:2.2rem;line-height:1}
.fwh-stats dt{font-size:.76rem;color:var(--muted);margin-top:4px}

/* ---- fill-in motion for ring and bars (fw-how.js adds .is-seen) ---- */
@media (prefers-reduced-motion:no-preference){
  .fwh-js .fwh-ring .val{transition:stroke-dashoffset 1.4s cubic-bezier(.2,.8,.2,1)}
  .fwh-js .fwh-ring:not(.is-seen) .val{stroke-dashoffset:100}
  .fwh-js .fwh-meter .bar > span,.fwh-js .fwh-budget .bar span{transform-origin:left;transition:transform 1.1s cubic-bezier(.2,.8,.2,1)}
  .fwh-js .fwh-vis:not(.is-seen) .fwh-meter .bar > span,
  .fwh-js .fwh-vis:not(.is-seen) .fwh-budget .bar span{transform:scaleX(0)}
}

/* ===================== LINK TO EDITIONS ===================== */
.fwh-edlink{position:relative;z-index:2;padding:10px 0 48px}
.fwh-edlink p{border-top:1px solid var(--line);padding-top:40px;text-align:center;color:var(--muted)}
.fwh-edlink a{font-weight:600}

/* ===================== CLOSING ===================== */
.fwh-cta-btns{display:flex;gap:12px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
.fwh-cta-btns .btn{white-space:nowrap;text-align:center}
.fwh-on-dark{color:#fff;border-color:#fff}
.fwh-on-dark:hover{background:#fff;color:var(--ink)}

/* ===================== RESPONSIVE ===================== */
@media (max-width:1180px){
  .fwh-layout{grid-template-columns:1fr}
  /* the rail becomes a horizontal strip of step links above the steps */
  .fwh-rail{position:static;flex-direction:row;gap:22px;overflow-x:auto;padding-bottom:10px;
    border-bottom:1px solid var(--line);margin-bottom:36px}
  .fwh-rail-g{flex:0 0 auto}
  .fwh-rail ol{display:flex;border-left:0;border-top:2px solid color-mix(in srgb,var(--g) 30%,transparent)}
  .fwh-rail a{padding:8px 12px 4px 0;margin:-2px 0 0;border-left:0;border-top:2px solid transparent}
  .fwh-rail .fwh-rt{display:none}
  .fwh-rail .fwh-rn{font-size:1.5rem}
  .fwh-rail a[aria-current="step"]{border-top-color:var(--g)}
}
@media (max-width:980px){
  .fwh-step,.fwh-step.fwh-wide{grid-template-columns:1fr;gap:28px;padding:44px 0}
  .fwh-wide .fwh-text{display:block}
  .fwh-wide .fwh-lead{margin-top:16px}
  .fwh-flow{grid-template-columns:1fr;justify-items:stretch;gap:0;max-width:440px}
  .fwh-flow-line{width:52px;height:24px;margin:14px 0;justify-self:center;transform:rotate(90deg)}
  .fwh-flow-out{flex-direction:row !important;flex-wrap:wrap}
  .fwh-flow-out li{flex:1 1 120px}
}
@media (max-width:620px){
  .fwh-num .n{font-size:3.4rem}
  .fwh-cta-btns{flex-direction:column;align-items:stretch;width:100%}
  .fwh-profile{grid-template-columns:1fr;justify-items:center}
  .fwh-cards{width:100%}
  .fwh-fields{grid-template-columns:1fr}
  .fwh-checkgroups{grid-template-columns:1fr 1fr}
  .fwh-ways,.fwh-wide .fwh-ways{grid-template-columns:1fr;margin-top:20px}
  .fwh-wide .fwh-export{grid-template-columns:1fr;gap:24px}
  .fwh-wide .fwh-formats{grid-template-columns:1fr}
  .fwh-wide .fwh-formats li{padding:14px 16px}
  .fwh-ways::before,.fwh-ways li::before{display:none}
  .fwh-fork-root::after{height:20px}
  .fwh-ptabs{grid-template-columns:1fr 1fr}
  .fwh-finish{grid-template-columns:1fr}
  .fwh-export{grid-template-columns:1fr}
  .fwh-doc{width:120px;justify-self:center}
  .fwh-doc::after{display:none}
  .fwh-dash{grid-template-columns:1fr}
  .fwh-tile.due{grid-row:auto}
  .fwh-stages{padding-left:6px;padding-right:6px}
  .fwh-stages li{font-size:.74rem}
  .fwh-stages .dot{width:40px;height:40px}
  .fwh-stages::before{top:53px}
}
