/* Flyway shared chrome — sidebar rail, header, top nav, bottom nav, footer. Single source for every page.
   Pages supply the theme variables (--bg, --card, --line, --ink, --muted, --forest, etc.). */

/* ============================================================================================
   SIDEBAR RAIL — the task register. Every drill and tool, always one click away, for everyone.
   Fixed full-height column on <body>; the page's own .wrap is pushed right by body padding, so
   no page markup has to change. Expanded by default; the collapse choice is remembered.
   ============================================================================================ */
/* --hdr = the fixed header bar's height (JS refines it from the real measurement; the default is
   deliberately generous so content clears the bar even if that measurement is late).
   --hdr-gap = the breathing room between the bar and the first thing on the page. */
:root{--rail-w:248px;--rail-min:56px;--hdr:66px;--hdr-gap:14px}
body{--rail:var(--rail-w)}
body.railmin{--rail:var(--rail-min)}
/* The header is a full-bleed fixed bar; the rail hangs underneath it, content clears it via
   body padding-top. Taken out of flow entirely so it never has to fight the rail's body padding
   with a negative margin (which is what pushed the logo off the left edge). */
#fw-header.top{position:fixed;top:0;left:0;right:0;z-index:80;margin:0;padding:9px clamp(14px,2.6vw,24px);
  background:var(--bg);border-bottom:1px solid var(--line);gap:10px}
/* NOTE the .fwshell class (chrome.js puts it on <body>). Every page's own <style> block loads AFTER
   chrome.css and contains `html,body{margin:0;padding:0}` — a bare `body{padding-top:…}` here has
   equal specificity and loses the cascade, so the shell's spacing MUST be class-qualified to win. */
body.fwshell{padding-top:calc(var(--hdr) + var(--hdr-gap))}
body>.wrap{padding-top:0}
/* Anchor jumps and scrollIntoView() must stop below the bar, not behind it. */
html{scroll-padding-top:calc(var(--hdr) + var(--hdr-gap))}
[id]{scroll-margin-top:calc(var(--hdr) + var(--hdr-gap))}
#fw-rail{position:fixed;top:var(--hdr);left:0;bottom:0;width:var(--rail);z-index:70;display:flex;flex-direction:column;
  background:var(--card2);border-right:1px solid var(--line);padding:10px 8px;overflow:visible;
  transition:width .16s ease}
#fw-scrim{display:none;position:fixed;inset:0;z-index:65;background:rgba(16,32,24,.42)}
.railscroll{flex:1;overflow-y:auto;overflow-x:hidden;margin:0 -4px;padding:0 4px}
.railscroll::-webkit-scrollbar{width:6px}
.railscroll::-webkit-scrollbar-thumb{background:var(--line);border-radius:3px}
/* Collapsible sections — seven Explore tools plus five each of Learn and Practice is too tall to
   show flat, so each section folds. The one you're working in opens itself. */
.railsec{margin-bottom:2px}
.railgrp{display:flex;align-items:center;justify-content:space-between;gap:6px;width:100%;border:0;background:transparent;
  font-family:inherit;font-size:10px;font-weight:800;letter-spacing:.07em;text-transform:uppercase;color:var(--muted);
  padding:7px 8px;margin:0;border-radius:8px;cursor:pointer;text-align:left}
.railgrp:hover{background:var(--card);color:var(--forest)}
.railgrp .chev{width:13px;height:13px;flex:none;transition:transform .16s ease}
.railsec.open .railgrp .chev{transform:rotate(180deg)}
.railbody{display:none;padding-bottom:6px}
.railsec.open .railbody{display:block}
.railsub{font-size:9.5px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--muted);opacity:.75;
  padding:0 8px;margin:8px 0 3px}
.railset{display:flex;flex-direction:column;gap:1px}
/* Items render as <a> on static pages and as <button> inside the quiz app — style both identically. */
.railitem{display:flex;align-items:center;gap:9px;width:100%;padding:7px 8px;border-radius:9px;border:0;background:transparent;
  color:var(--ink);text-decoration:none;font-family:inherit;font-size:13px;font-weight:600;text-align:left;cursor:pointer;white-space:nowrap}
.railitem svg{width:17px;height:17px;flex:none;color:var(--muted)}
.railitem .rl{flex:1;overflow:hidden;text-overflow:ellipsis}
.railitem:hover{background:var(--card);color:var(--forest)}
.railitem:hover svg{color:var(--forest)}
.railitem.on{background:var(--mint);color:var(--forest-d);font-weight:700}
.railitem.on svg{color:var(--forest)}
.railitem .sbadge{font-size:8.5px;padding:2px 5px;letter-spacing:.04em}
/* The foot holds only the account chip and the collapse control — Field Intelligence is a section. */
.railfoot{border-top:1px solid var(--line);margin:8px -4px 0;padding:8px 4px 0;display:flex;flex-direction:column;gap:2px}
.railacct{display:flex;align-items:center;gap:9px;width:100%;padding:8px;border-radius:9px;border:1px solid transparent;background:transparent;
  color:var(--muted);text-decoration:none;font-family:inherit;font-size:12.5px;cursor:pointer;text-align:left;white-space:nowrap}
.railacct:hover{background:var(--card);border-color:var(--line)}
.railacct b{color:var(--ink)}
.railacct .chiptext{flex:1;overflow:hidden;text-overflow:ellipsis}
.railacct.signin{background:var(--forest);border-color:var(--forest);color:#fff}
.railacct.signin b{color:#fff}
.railacct.signin .av{background:#fff;color:var(--forest-d)}
.railacct.signin:hover{background:var(--forest-d)}
.railtoggle{display:flex;align-items:center;gap:9px;width:100%;padding:7px 8px;border-radius:9px;border:0;background:transparent;
  color:var(--muted);font-family:inherit;font-size:12px;font-weight:700;cursor:pointer;text-align:left;white-space:nowrap}
.railtoggle svg{width:17px;height:17px;flex:none;transition:transform .16s ease}
.railtoggle:hover{background:var(--card);color:var(--forest)}
/* Collapsed: icons only. Same DOM, same links — a width change, not a different menu.
   Sections un-fold when collapsed, otherwise a closed section would show nothing at all. */
body.railmin #fw-rail{padding-left:6px;padding-right:6px}
body.railmin .rl,body.railmin .railitem .sbadge,body.railmin .railacct .chiptext,
body.railmin .railgrp,body.railmin .railsub{display:none}
body.railmin .railbody{display:block}
body.railmin .railitem,body.railmin .railacct,body.railmin .railtoggle{justify-content:center;padding-left:0;padding-right:0}
body.railmin .railset{gap:2px}
body.railmin .railsec{margin-bottom:10px}
body.railmin .railtoggle svg{transform:rotate(180deg)}
body.railmin .railacct.signin{background:transparent;border-color:transparent}
body.railmin .railacct.signin .av{background:var(--forest);color:#fff}
/* Push every page's content clear of the rail. .wrap stays centred inside what's left. */
@media(min-width:901px){
  /* .fwshell for the same cascade reason as the top padding above. */
  body.fwshell{padding-left:var(--rail);transition:padding-left .16s ease}
  .iconbtn.railopen{display:none}
}
@media(max-width:900px){
  #fw-rail{top:0;transform:translateX(-100%);transition:transform .18s ease;width:var(--rail-w);box-shadow:var(--shadow);z-index:90}
  #fw-scrim{z-index:85}
  body.railopen #fw-rail{transform:none}
  body.railopen #fw-scrim{display:block}
  body.railmin #fw-rail{padding-left:8px;padding-right:8px}
  body.railmin .rl,body.railmin .railitem .sbadge,body.railmin .railacct .chiptext,
  body.railmin .railgrp,body.railmin .railsub{display:revert}
  body.railmin .railgrp{display:flex}
  body.railmin .railbody{display:none}
  body.railmin .railsec.open .railbody{display:block}
  body.railmin .railitem,body.railmin .railacct,body.railmin .railtoggle{justify-content:flex-start;padding-left:8px;padding-right:8px}
  .railtoggle{display:none}           /* on mobile the scrim/hamburger closes it */
}

header.top{display:flex;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
/* Consistent gap between the sticky header and the first content across all pages */
.wrap>article:first-of-type{margin-top:18px}
header.top .logo{display:flex;align-items:center;gap:11px;text-decoration:none;cursor:pointer}
header.top .mark img{width:44px;height:44px;object-fit:contain}
.brand{display:flex;flex-direction:column;line-height:1.02}
.bname{font-weight:800;font-size:20px;letter-spacing:.2px;color:var(--ink)}
.tag{background:var(--card);border:1px solid var(--line);border-radius:8px;padding:4px 9px;font-size:9.5px;letter-spacing:.13em;text-transform:uppercase;color:var(--muted);font-weight:700;margin-top:2px}
.spacer{flex:1}
/* new consistent nav with hover sub-menus */
.toptabs2{display:flex;gap:2px;align-items:center}
.navitem{position:relative}
/* invisible bridge across the gap so the mouse can travel from the nav item to its sub-menu without losing hover */
.navitem::after{content:"";position:absolute;left:0;right:0;top:100%;height:12px}
/* .navtop / .submenu items render as <a> on static pages and as <button> inside the quiz app — style both. */
.navtop{display:inline-block;padding:8px 14px;border-radius:10px;color:var(--ink);text-decoration:none;font-weight:700;font-size:14px;border:0;background:transparent;cursor:pointer;font-family:inherit}
.navitem:hover .navtop,.navtop:focus{color:var(--forest);background:var(--card2)}
.navtop.active{color:#fff;background:var(--forest)}
.dark .navtop.active{color:#04140d}
.navitem:hover .navtop.active{background:var(--forest-d)}
.submenu{position:absolute;top:calc(100% + 8px);left:0;min-width:200px;background:var(--card);border:1px solid var(--line);border-radius:12px;box-shadow:var(--shadow);padding:6px;display:none;z-index:60}
.navitem:hover .submenu,.navitem:focus-within .submenu{display:block}
.navitem.closed .submenu{display:none!important}
.submenu a,.submenu button{display:flex;align-items:center;justify-content:space-between;gap:14px;width:100%;text-align:left;padding:8px 12px;border-radius:8px;color:var(--ink);text-decoration:none;font-size:13.5px;font-weight:600;white-space:nowrap;border:0;background:transparent;cursor:pointer;font-family:inherit}
.submenu a:hover,.submenu button:hover{background:var(--card2);color:var(--forest)}
/* Skill / job badge: names the Flyway skill an item builds, or the Compass job it does. */
.sbadge{font-size:9.5px;font-weight:800;letter-spacing:.06em;color:var(--forest-d);background:var(--mint,var(--card2));border:1px solid var(--mintline);border-radius:999px;padding:2px 7px;flex:none}
@media(max-width:640px){.toptabs2{display:none}}
.toptabs{display:flex;gap:4px;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:5px;box-shadow:var(--shadow-sm)}
.toptabs a,.toptabs button{border:0;background:transparent;color:var(--muted);padding:8px 15px;border-radius:999px;cursor:pointer;font-weight:700;font-size:13px;text-decoration:none}
.toptabs a:hover,.toptabs button:hover{color:var(--forest)}
.toptabs a.active,.toptabs button.active{background:var(--forest);color:#fff}
.dark .toptabs a.active,.dark .toptabs button.active{color:#04140d}
.iconbtn{width:38px;height:38px;border-radius:11px;border:1px solid var(--line);background:var(--card);color:var(--muted);display:grid;place-items:center;cursor:pointer;box-shadow:var(--shadow-sm)}
.iconbtn:hover{color:var(--forest);border-color:var(--mintline)}
.iconbtn svg{width:20px;height:20px}
.dark .iconbtn{color:var(--gold)}
.pill{display:inline-flex;align-items:center;gap:7px;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:7px 12px;font-size:13px;color:var(--muted);box-shadow:var(--shadow-sm);text-decoration:none;cursor:pointer;transition:background .15s,border-color .15s}
.pill:hover{background:var(--card2);border-color:var(--mintline)}
.pill b{color:var(--ink)}
.pill .chiptext{white-space:nowrap}
/* Signed-out CTA: a clear, always-labelled Sign in button (survives the mobile pill collapse). */
.pill.signin{background:var(--forest);border-color:var(--forest);color:#fff;font-weight:800;padding:8px 16px;box-shadow:var(--shadow-sm)}
.pill.signin:hover{background:var(--forest-d,var(--forest));border-color:var(--forest)}
.pill.signin .chiptext{display:inline!important;color:#fff}
.av{width:22px;height:22px;border-radius:50%;background:var(--forest);color:#fff;display:grid;place-items:center;font-weight:800;font-size:11px}
.dark .av{color:#04140d}
.bottomnav{position:fixed;left:0;right:0;bottom:0;z-index:40;background:var(--card);border-top:1px solid var(--line);display:flex;justify-content:space-around;padding:8px 6px calc(8px + env(safe-area-inset-bottom,0));box-shadow:0 -6px 20px rgba(31,58,42,.08)}
.bottomnav a,.bottomnav button{border:0;background:transparent;display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--muted);font-size:10px;font-weight:800;cursor:pointer;text-decoration:none}
.bottomnav a.on,.bottomnav button.on,.bottomnav a:hover{color:var(--forest)}
.bottomnav svg{width:23px;height:23px}
@media(min-width:641px){.bottomnav{display:none}}
@media(max-width:640px){.toptabs{display:none}
  header.top{margin-bottom:10px}
  header.top .mark img{width:36px;height:36px}
  .bname{font-size:18px}
  .tag{display:none}
  .pill{padding:0;border:0;background:transparent;box-shadow:none}
  .pill:hover{background:transparent;border-color:transparent}
  .pill .chiptext{display:none}
  .pill .av{width:34px;height:34px;font-size:14px}
}

/* Rich SEO / navigation footer (shared across static pages; mirrored inline in the quiz app). */
/* chrome.js moves #fw-footer out to <body>, so it goes full-bleed; neutralize any page-level footer styling. */
#fw-footer{margin:0;padding:0;border:0;text-align:left}
.ftr{border-top:1px solid var(--line);margin-top:48px;background:var(--card2);text-align:left}
.ftr-in{max-width:1280px;margin:0 auto;padding:40px 20px 26px}
.ftr-cols{display:grid;grid-template-columns:1.5fr repeat(5,1fr);gap:26px 22px}
.ftr-brand{max-width:280px}
.ftr-logo{display:inline-flex;align-items:center;gap:10px;text-decoration:none}
.ftr-logo img{width:34px;height:34px;border-radius:8px}
.ftr-logo b{display:block;color:var(--ink);font-size:16px;font-weight:800;line-height:1.15}
.ftr-logo .t{display:block;color:var(--muted);font-size:12px}
.ftr-mission{color:var(--muted);font-size:13px;line-height:1.55;margin:12px 0 0}
.ftr-col h4,.ftr-dest h4,.ftr-searches h4{font-size:11.5px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin:0 0 10px;font-weight:800}
.ftr-col a{display:block;color:var(--ink);text-decoration:none;font-size:13.5px;padding:4px 0}
.ftr-col a:hover{color:var(--forest)}
.ftr-dest{margin-top:32px;border-top:1px solid var(--line);padding-top:22px}
.ftr-chips{display:flex;flex-wrap:wrap;gap:8px}
.ftr-chips a{font-size:12.5px;color:var(--ink);text-decoration:none;background:var(--card);border:1px solid var(--line);border-radius:999px;padding:5px 11px}
.ftr-chips a:hover{color:var(--forest);border-color:var(--mintline)}
.ftr-searches{margin-top:22px;line-height:2}
.ftr-searches .lk{color:var(--muted);text-decoration:none;font-size:12.5px}
.ftr-searches .lk:hover{color:var(--forest)}
.ftr-searches .sep{color:var(--line)}
.ftr-bottom{margin-top:26px;border-top:1px solid var(--line);padding-top:18px;display:flex;justify-content:space-between;gap:14px;flex-wrap:wrap;align-items:center}
.ftr-credit{color:var(--muted);font-size:12px;line-height:1.5;max-width:660px}
.ftr-legal{color:var(--muted);font-size:12px}
.ftr-legal a{color:var(--muted);text-decoration:none}
.ftr-legal a:hover{color:var(--forest)}
@media(max-width:900px){.ftr-cols{grid-template-columns:1fr 1fr 1fr}.ftr-brand{grid-column:1 / -1;max-width:none}}
@media(max-width:560px){.ftr-cols{grid-template-columns:1fr 1fr}.ftr-bottom{flex-direction:column;align-items:flex-start}.ftr-in{padding-bottom:84px}}

/* ══ .fwhero — the shared Method step hero ══════════════════════════════════════════════════
   ONE recipe, five pages. Consistency here is the treatment, not the subject: each step gets
   its own photo, every photo gets the same grayscale → forest tint → left scrim → step pill.

   The source image is shipped ALREADY GRAYSCALE. That is the whole trick: since the duotone
   discards color anyway, encoding chroma is wasted bytes, and the tint + scrim conceal the
   compression artifacts that would be visible on a full-color photo. Net result is the
   CHEAPEST of the treatments we mocked — 19KB on a phone, vs 39KB for a plain color hero.
   It also means any photo dropped in gets legible white type with no per-image scrim tuning.

   Wiring a page (nothing uses this yet — see Flyway-Method-Photo-Brief.md):
     <link rel="preload" as="image" imagesrcset="…-760.avif 760w, …-1200.avif 1200w" imagesizes="100vw" type="image/avif">
     <section class="fwhero">
       <picture><source type="image/avif" srcset="…"><source type="image/webp" srcset="…">
         <img src="/images/method/<step>-hero-1200.jpg" alt="" width="1200" height="560" fetchpriority="high" decoding="async"></picture>
       <div class="fwhero-tint"></div><div class="fwhero-scrim"></div>
       <div class="fwhero-in"><div class="wrap"> …steppill / eyebrow / h1 / lead… </div></div>
     </section>                                                                              */
.fwhero{position:relative;overflow:hidden;isolation:isolate;   /* isolate: keeps the blend off the page behind */
  border-bottom:1px solid var(--line);min-height:clamp(340px,46vw,520px);display:flex;align-items:center}
.fwhero picture,.fwhero img{position:absolute;inset:0;width:100%;height:100%;display:block}
.fwhero img{object-fit:cover;object-position:center 62%}
/* Fallback first: a translucent wash tints acceptably everywhere. Browsers with blend modes
   get the real duotone. Without this order, a non-supporting browser paints flat green over
   the photo and the hero becomes a solid rectangle. */
.fwhero-tint{position:absolute;inset:0;background:var(--forest,#1f7a46);opacity:.42;pointer-events:none}
@supports (mix-blend-mode:color){.fwhero-tint{mix-blend-mode:color;opacity:.95}}
.fwhero-scrim{position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(90deg,rgba(6,22,14,.88) 0%,rgba(6,22,14,.62) 45%,rgba(6,22,14,.22) 80%,rgba(6,22,14,.05) 100%)}
.fwhero-in{position:relative;z-index:2;width:100%;padding:clamp(34px,5vw,70px) 0}
.fwhero .eyebrow{color:#8fe6b4}
.fwhero h1{color:#fff;max-width:15ch;text-shadow:0 2px 22px rgba(0,0,0,.45)}
.fwhero .lead{color:rgba(255,255,255,.92);max-width:44ch;text-shadow:0 1px 12px rgba(0,0,0,.35)}
.fwhero .steppill{display:inline-flex;align-items:center;gap:9px;background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.4);color:#fff;border-radius:999px;padding:6px 14px;font-size:12px;
  font-weight:800;letter-spacing:.08em;text-transform:uppercase}
/* Portrait phones: the left scrim has nowhere to go, so weight it from the bottom instead. */
@media(max-width:640px){
  .fwhero-scrim{background:linear-gradient(180deg,rgba(6,22,14,.45) 0%,rgba(6,22,14,.30) 40%,rgba(6,22,14,.86) 100%)}
  .fwhero img{object-position:center 58%}
}

/* Two-column step heroes (SHAPE / MOVE / MARK) keep an explanatory graphic in the right column.
   A left-weighted scrim would leave that panel sitting on bright photo, so this variant darkens
   evenly across the full width instead. The graphics are content — they don't get deleted for a
   background. */
.fwhero.twocol .fwhero-scrim{background:linear-gradient(90deg,rgba(6,22,14,.90) 0%,rgba(6,22,14,.76) 55%,rgba(6,22,14,.66) 100%)}
/* Anything that isn't a background layer stacks above the photo. Covers every page's own
   inner wrapper (.pheroin/.sheroin/.mheroin/.kheroin/.cheroin) without naming them. */
.fwhero>*:not(picture):not(.fwhero-tint):not(.fwhero-scrim){position:relative;z-index:2;width:100%}
.fwhero .lead{font-size:clamp(17px,2vw,21px)}
