/* Marga v4 design system: the "linen" redesign
   ==========================================================================================
   Added 2026-11-11 from the approved six-page design (Home, Manufacturers, Investors, About,
   Journal, Article). Pages switch to this file one at a time, by changing their stylesheet
   link from marga-v3.css. Nothing loads both. marga-v3.css stays in place until the last page
   has moved, so a rollback is that one line again.

   WHAT CARRIES OVER FROM v3 UNCHANGED. Every token in v3's :root is repeated here with the
   same name and value. The carried components (the Marga Index scorecard, the consultation
   form, the benchmark wizard) reach the system through those names, and an unresolved var()
   fails silently. The contrast measurements behind them are recorded in marga-v3.css and in
   CLAUDE.md and are not repeated here. The rules that matter most:
     - gold #C7A24B is a fill, rule, border and shadow on light grounds. Never text on cream.
       On the dark grounds it is safe as text (6.9:1 and up).
     - bronze #9A742F is text only at display size, which is the italic 01/02 numerals at
       40px and up (3.3 to 4.0:1, over the 3:1 large-text bar). Eyebrows and links on light
       use --text-accent #6B4F1C.
     - eyebrows and labels track on --track-eyebrow and --track-label, never a literal. The
       design draws eyebrows at .16em; the token is .18em and wins.

   WHAT IS NEW. Five grounds and one text colour the design adds, all below. A linen texture
   on the page top and the light closing band. Outlined cards with a hard offset shadow. Ink
   primary buttons. A header whose links sit in an outlined pill. Hand-drawn SVG marks under
   one word per headline, animated by marga-draw.js. An accessible tab explorer for
   marga-tabs.js.

   NO EM DASHES IN THE TEXT. The design bullets short lists with an em dash. The copy rules
   forbid the character in anything human visible, so .dash-list draws the dash as a rule in
   CSS and the markup carries plain list items.
   ========================================================================================== */

*,*::before,*::after{box-sizing:border-box}

/* ==========================================================================================
   FONTS
   ------------------------------------------------------------------------------------------
   THE WORDMARK FACE IS SELF-HOSTED AND SUBSET. Bricolage Grotesque draws "marga/partners" and
   nothing else. Subset to those ten glyphs it is 3 KB, against 38 KB for the face from Google,
   and serving it from here keeps a second render-blocking stylesheet request off the critical
   path. Licensed under the SIL Open Font License 1.1; the licence ships beside the file in
   /assets/fonts/OFL-BricolageGrotesque.txt, which the OFL requires.

   METRIC-MATCHED FALLBACKS. Until Manrope and Newsreader arrive the page renders in a local
   face, and when the real one swaps in, any difference in width or line height reflows the
   hero and pushes everything below it down. Lighthouse measured that as layout shift. These
   two faces are Arial and Times New Roman (or their metric clones, Liberation Sans and Serif,
   on Linux) resized to the real fonts' average glyph width and vertical metrics, measured from
   the font files with fontTools on 2026-11-11, so the swap lands in the same place. */
@font-face{font-family:'Bricolage Grotesque';font-style:normal;font-weight:800;font-display:swap;
  src:url(/assets/fonts/bricolage-wordmark.woff2) format('woff2')}
/* THE ITALIC NUMERALS HAVE THEIR OWN 5 KB FACE. The 01/02/03 index numerals are the only italic
   on most linen pages, and loading Newsreader Italic for them cost 62 KB a page. This is that face
   cut to the ten digits (optical size axis kept), served from here under its own family name so
   it never competes with Google's faces. Pages that set italic words, such as the homepage's "all
   three.", still request the full italic through head(italic=True). OFL 1.1, licence alongside. */
@font-face{font-family:'Newsreader Numerals';font-style:italic;font-weight:400;font-display:swap;
  src:url(/assets/fonts/newsreader-italic-numerals.woff2) format('woff2');unicode-range:U+30-39}
@font-face{font-family:'Manrope Fallback';src:local('Arial'),local('ArialMT'),local('Liberation Sans');
  size-adjust:103.26%;ascent-override:103.24%;descent-override:29.05%;line-gap-override:0%}
@font-face{font-family:'Newsreader Fallback';src:local('Times New Roman'),local('TimesNewRomanPSMT'),
  local('Liberation Serif');
  size-adjust:98.03%;ascent-override:74.98%;descent-override:27.03%;line-gap-override:0%}

:root{
  /* ---- carried from v3, same names and values ---- */
  --ink:#16140F;
  --ink2:#14120E;
  --ink3:#221D15;
  --ink4:#2E2B24;
  --footer:#0F0E0B;
  --cream:#F1E9DB;          /* the page ground */
  --cream2:#F1E9DB;
  --sand:#EBE0CC;
  --sand2:#E3D8BE;
  --sand-glow:#F0E4C8;
  --card:#FBF6EC;           /* card cream */
  --card2:#F6F0E3;
  --card3:#F4EEE1;
  --proof:#F4EBD9;
  --paper:#F1E9DB;          /* v3 meaning: label on a solid dark button. Not the paper ground. */
  --body:#4A4435;
  --bronze-text:#6B4F1C;
  --golddeep:#6B4F1C;
  --green:#166638;
  --muted:#6B6455;
  --hair:rgba(22,20,15,.18);
  --gold:#C7A24B;
  --gold-hover:#D4B45F;
  --bronze:#9A742F;
  --advantage:#1A6640;
  --neutral:#7A5A20;
  --detractor:#B4463C;
  --line:rgba(22,20,15,.18);
  --line-dark:rgba(241,233,219,.16);

  /* ---- grounds the linen design adds ---- */
  --deep:#0F0E0B;           /* alternate dark section. Same value as --footer. */
  --band:#1E1B14;           /* the dark closing band */
  --sheet:#FFFDF8;          /* the paper ground for reading and listing sections. Named
                               --sheet because v3 already spends --paper on something else. */
  --lit:#F6EFE2;            /* the light closing band */
  --sand-hover:#E4D3A8;     /* hover fill on a cream button sitting on a dark ground */

  /* ---- text ---- */
  --text:var(--ink);
  --text-body:#4A4435;                       /* 8.0:1 on cream, 9.5:1 on sheet */
  --text-accent:#6B4F1C;                     /* eyebrows, current nav item, links on light */
  --text-muted:rgba(22,20,15,.62);
  --text-numeral:rgba(22,20,15,.5);
  --text-on-dark:var(--cream);
  --text-on-dark-body:#CFC4AE;               /* the design's body on dark. 11.3:1 on ink,
                                                10.4:1 on band */
  --text-on-dark-muted:rgba(241,233,219,.55);
  --text-accent-dark:var(--gold);

  /* ---- type ---- */
  --serif:'Newsreader','Newsreader Fallback',Georgia,serif;
  --sans:'Manrope','Manrope Fallback',system-ui,sans-serif;
  --mono:'Spline Sans Mono',ui-monospace,monospace;
  --numerals:'Newsreader Numerals','Newsreader','Newsreader Fallback',Georgia,serif;
  --wordmark:'Bricolage Grotesque','Manrope',system-ui,sans-serif;
  --track-eyebrow:.18em;
  --track-label:.14em;

  /* ---- layout. The design is drawn at 1280 with a 56px gutter. ---- */
  --col:min(1280px,100%);
  --col-narrow:min(900px,100%);
  --col-read:min(720px,100%);
  --pad-x:clamp(18px,4.4vw,56px);
  --pad-y:clamp(64px,8.6vw,110px);
  --pad-card:clamp(24px,3.2vw,40px);
  --gap:clamp(18px,2.2vw,28px);

  /* ---- surfaces ---- */
  --r-card:20px;
  --r-btn:10px;
  --r-pill:14px;
  --border:2px solid var(--ink);
  --shadow:6px 6px 0 var(--ink);
  --shadow-sm:4px 4px 0 var(--ink);
  --shadow-gold:6px 6px 0 var(--gold);
  --shadow-gold-sm:4px 4px 0 var(--gold);

  /* Linen: a 4px grid of ink at about 1.5%, under a soft light from the top centre. Only the
     page top and the light closing band carry it; middle sections are flat colour. */
  --linen:
    repeating-linear-gradient(0deg,rgba(22,20,15,.016) 0 1px,rgba(22,20,15,0) 1px 4px),
    repeating-linear-gradient(90deg,rgba(22,20,15,.014) 0 1px,rgba(22,20,15,0) 1px 4px);
  --linen-light:radial-gradient(ellipse 900px 620px at 50% 0,rgba(251,246,236,.75),rgba(251,246,236,0));

  /* ---- the drawn marks ---- */
  --mk-ease:cubic-bezier(.55,.05,.3,1);
  --mk-color:var(--bronze);  /* a stroke, never text, so bronze is fine on light */
}

/* ==========================================================================================
   BASE
   ========================================================================================== */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
/* The linen sits on the body so it runs unbroken from behind the header into the hero, which
   are two elements. Every section below the hero paints its own flat ground over it. */
body{margin:0;color:var(--text);font:400 16px/1.6 var(--sans);
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
  background:var(--linen-light) no-repeat,var(--linen),var(--cream);
  overflow-x:hidden}
img,svg,video{max-width:100%}
img{height:auto}
a{color:inherit}
h1,h2,h3,h4{margin:0;font-weight:inherit}
p{margin:0}
button{font:inherit;color:inherit}
main{display:block}

/* ==========================================================================================
   TYPE
   ------------------------------------------------------------------------------------------
   Display sizes scale linearly with the viewport from the 1280 design and are clamped at both
   ends. A page sets its own design size with --h1 or --h2, a unitless number of pixels at
   1280, so "112" on the Manufacturers H1 needs no new class.
   ========================================================================================== */
.t-eyebrow{margin:0;font:700 13px/1.3 var(--sans);letter-spacing:var(--track-eyebrow);
  text-transform:uppercase;color:var(--text-accent)}
.t-label{font:700 12px/1.3 var(--sans);letter-spacing:var(--track-label);text-transform:uppercase}
.on-dark .t-eyebrow,.on-dark .t-label-accent{color:var(--gold)}

.t-h1{font-family:var(--serif);font-weight:300;line-height:1;letter-spacing:-.03em;
  font-size:clamp(var(--h1-min,44px),calc(var(--h1,125) * 100vw / 1280),calc(var(--h1,125) * 1px));
  text-wrap:balance}
.t-h2{font-family:var(--serif);font-weight:300;line-height:1.02;letter-spacing:-.025em;
  font-size:clamp(var(--h2-min,34px),calc(var(--h2,72) * 100vw / 1280),calc(var(--h2,72) * 1px));
  text-wrap:balance}
.t-h3{font-family:var(--serif);font-weight:600;line-height:1.08;letter-spacing:-.015em;
  font-size:clamp(23px,calc(var(--h3,34) * 100vw / 1280),calc(var(--h3,34) * 1px))}
.t-h4{font-family:var(--serif);font-weight:600;line-height:1.12;font-size:23px}
.t-lead{font-size:clamp(17px,1.6vw,20px);line-height:1.55;color:var(--text-body);
  max-width:40em;text-wrap:pretty}
.t-body{font-size:16px;line-height:1.6;color:var(--text-body)}
.t-small{font-size:14px;line-height:1.55;color:var(--text-body)}
.on-dark .t-lead,.on-dark .t-body,.on-dark .t-small{color:var(--text-on-dark-body)}

/* The italic index numeral, 01 02 03. Display size only, which is what lets it be bronze. */
.t-num{font-family:var(--numerals);font-style:italic;font-weight:400;line-height:.8;
  font-size:clamp(36px,calc(var(--num,64) * 100vw / 1280),calc(var(--num,64) * 1px));
  color:var(--bronze)}
.on-dark .t-num{color:var(--gold)}

/* ==========================================================================================
   LAYOUT AND GROUNDS
   ------------------------------------------------------------------------------------------
   Sections alternate light and dark. Two light sections in a row must differ visibly, so the
   second one is .bg-sheet, which brings its own 2px ink rule. bin/ground-check.js enforces
   the colour half of that.
   ========================================================================================== */
.inner{width:var(--col);margin:0 auto;padding:0 var(--pad-x)}
.inner-narrow{width:var(--col-narrow);margin:0 auto;padding:0 var(--pad-x)}
.section{padding:var(--pad-y) 0}
.hero{padding:clamp(40px,6vw,80px) 0 clamp(64px,8vw,110px)}
.hero.center{text-align:center}
.hero.center .inner{display:flex;flex-direction:column;align-items:center}

.bg-cream{background:var(--cream)}
.bg-card{background:var(--card)}
.bg-sheet{background:var(--sheet);border-top:var(--border)}
.bg-ink{background:var(--ink);color:var(--text-on-dark)}
.bg-deep{background:var(--deep);color:var(--text-on-dark)}
.bg-band{background:var(--band);color:var(--text-on-dark)}
.bg-lit{background:var(--lit)}
.linen{background:var(--linen-light) no-repeat,var(--linen),var(--cream)}
.rule-top{border-top:var(--border)}

/* ==========================================================================================
   CARDS
   ========================================================================================== */
.card{background:var(--card);color:var(--text);border:var(--border);border-radius:var(--r-card);
  box-shadow:var(--shadow);padding:var(--pad-card)}
/* A cream card sitting on a dark section: the outline and the shadow turn gold. */
.card-gold{border-color:var(--gold);box-shadow:var(--shadow-gold)}
/* A dark card, on light or dark: ink fill, gold outline and shadow. */
.card-ink{background:var(--ink);color:var(--text-on-dark);border:2px solid var(--gold);
  border-radius:var(--r-card);box-shadow:var(--shadow-gold);padding:var(--pad-card)}
.card-flush{padding:0;overflow:hidden}
.card-stack{display:flex;flex-direction:column;gap:16px}
/* Cards always restore the light text system inside, whatever ground they sit on. */
.on-dark .card:not(.card-ink) .t-eyebrow{color:var(--text-accent)}
.on-dark .card:not(.card-ink) .t-lead,.on-dark .card:not(.card-ink) .t-body,
.on-dark .card:not(.card-ink) .t-small{color:var(--text-body)}
.on-dark .card:not(.card-ink) .t-num{color:var(--bronze)}

.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--gap)}
.grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--gap)}

/* ==========================================================================================
   BUTTONS, CHIPS, LISTS, LINKS
   ========================================================================================== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5em;min-height:44px;
  padding:clamp(13px,1.3vw,16px) clamp(20px,1.9vw,24px);border:var(--border);
  border-radius:var(--r-btn);font:700 16px/1.2 var(--sans);text-decoration:none;
  text-align:center;cursor:pointer;transition:background-color .15s,color .15s,border-color .15s}
/* The design's trailing arrow on a few buttons, drawn rather than typed, so the link's text
   (its anchor text and its accessible name) is the label alone. The "/ ''" alt text keeps
   screen readers from announcing "right arrow"; browsers without that syntax use the first
   declaration and simply show the glyph. */
.btn-arrow::after{content:"\2192";content:"\2192" / ""}
.btn-lg{padding:clamp(15px,1.4vw,18px) clamp(22px,2.2vw,28px);font-size:17px}
.btn-primary{background:var(--ink);color:var(--cream);border-color:var(--ink)}
.btn-primary:hover{background:var(--text-accent);border-color:var(--text-accent);color:var(--cream)}
/* .btn-dark is the v3 name for the ink button, still emitted by margazine_signup(). */
.btn-dark{background:var(--ink);color:var(--cream);border-color:var(--ink)}
.btn-dark:hover{background:var(--text-accent);border-color:var(--text-accent);color:var(--cream)}
.btn-secondary{background:var(--card);color:var(--ink);box-shadow:var(--shadow-sm)}
.btn-secondary:hover{background:var(--gold);color:var(--ink)}
/* On a dark ground every button becomes the cream-on-gold one, so closing bands and dark
   sections can emit .btn-primary without knowing which variant they are in. */
.on-dark .btn-primary,.on-dark .btn-secondary,.btn-ondark{background:var(--card);color:var(--ink);
  border-color:var(--gold);box-shadow:var(--shadow-gold-sm)}
.on-dark .btn-primary:hover,.on-dark .btn-secondary:hover,.btn-ondark:hover{
  background:var(--sand-hover);border-color:var(--gold);color:var(--ink)}
/* Cards on a dark ground are light inside, so their buttons go back to the light set. */
.on-dark .card:not(.card-ink) .btn-primary{background:var(--ink);color:var(--cream);
  border-color:var(--ink);box-shadow:none}
.on-dark .card:not(.card-ink) .btn-primary:hover{background:var(--text-accent);
  border-color:var(--text-accent)}
.cta-row{display:flex;flex-wrap:wrap;gap:12px}

.chips{display:flex;flex-wrap:wrap;gap:10px;margin:0;padding:0;list-style:none}
.chip{display:inline-flex;align-items:center;border:var(--border);border-radius:var(--r-btn);
  background:var(--card);padding:10px 16px;font:700 15px/1.2 var(--sans);color:var(--ink)}

/* The design's em dash bullet, drawn rather than typed. 0.9em wide is the em dash of
   Manrope at this size, sat on the x-height middle. */
.dash-list{list-style:none;margin:0;padding:0;display:grid;gap:6px;font-size:15px;
  line-height:1.5;color:var(--text-body)}
.dash-list li{position:relative;padding-left:1.35em}
.dash-list li::before{content:"";position:absolute;left:0;top:.72em;width:.9em;height:2px;
  background:currentColor}
.on-dark .dash-list{color:var(--text-on-dark-body)}

/* Inline text links such as "Advisory for manufacturers →". */
.link{font-weight:700;color:inherit;text-decoration:underline;text-decoration-thickness:1px;
  text-underline-offset:5px;text-decoration-color:rgba(22,20,15,.35);
  transition:text-decoration-color .15s}
.link:hover{text-decoration-color:currentColor}
/* .link-arrow is the v3 name, and shared chrome (the PROOF regions build_site.py rewrites, the
   join gate, older generators) still emits it. On a linen page it is the same inline link. */
.link-arrow{font-weight:700;color:inherit;text-decoration:underline;text-decoration-thickness:1px;
  text-underline-offset:5px;text-decoration-color:rgba(22,20,15,.35)}
.link-arrow:hover{text-decoration-color:currentColor}
.on-dark .link-arrow{text-decoration-color:rgba(241,233,219,.4)}
.on-dark .link{text-decoration-color:rgba(241,233,219,.4)}
.on-dark .card:not(.card-ink) .link,.on-dark .card:not(.card-ink) .link-arrow{
  text-decoration-color:rgba(22,20,15,.35)}
.on-dark .link:hover{text-decoration-color:currentColor}

/* ==========================================================================================
   HEADER
   ------------------------------------------------------------------------------------------
   Fixed and floating, as v3 was. Wordmark on the left; on the right the links sit inside an
   outlined cream pill with the ink CTA at its end.

   At the top of the page it is exactly the design: no bar, just the wordmark and the pill
   over the linen. Once the page scrolls, marga-v3-nav.js sets data-scrolled on .nav-cap and
   the whole row becomes one outlined cream capsule with a hard shadow. That is what keeps an
   ink wordmark legible over the ink and deep sections it now floats across. The inner pill
   drops its own outline then, so there is never a border inside a border.

   The hero clears the bar with --nav-clear. Every other hook marga-v3-nav.js reads is
   unchanged: .nav-cap carries data-menu for the drawer, .nav-drop carries data-open for the
   Advisory disclosure, .nav-toggle opens the drawer.
   ========================================================================================== */
/* Visually hidden, still read by assistive tech and by crawlers. Carries the brand's proper
   name beside the drawn wordmark. */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip{position:absolute;left:-9999px;top:0;z-index:99;background:var(--ink);color:var(--cream);
  padding:12px 16px;border-radius:var(--r-btn);font-weight:700}
.skip:focus,.skip:focus-visible{left:16px;top:16px}

:root{--nav-clear:106px}
.nav-wrap{position:fixed;top:0;left:0;right:0;z-index:70;padding:24px var(--pad-x);
  pointer-events:none;transition:padding .2s}
.nav-cap{width:min(1168px,100%);margin:0 auto;display:flex;align-items:center;
  justify-content:space-between;gap:18px;position:relative;pointer-events:auto;
  border:2px solid transparent;border-radius:calc(var(--r-pill) + 4px);padding:0;
  transition:background-color .2s,border-color .2s,box-shadow .2s,padding .2s}
.nav-wrap:has(.nav-cap[data-scrolled=true]){padding-top:12px;padding-bottom:12px}
.nav-cap[data-scrolled=true]{background:var(--card);border-color:var(--ink);
  box-shadow:var(--shadow-sm);padding:4px 4px 4px 16px}
@media(min-width:981px){
  .nav-cap[data-scrolled=true] .nav-links{border-color:transparent}
}
@media(max-width:980px){
  :root{--nav-clear:96px}
  /* Inside the capsule the toggle is already on an outlined surface, so its own hard shadow
     would hang off the capsule's edge. */
  .nav-cap[data-scrolled=true] .nav-toggle{box-shadow:none;width:44px;height:44px}
}
.hero{padding-top:calc(var(--nav-clear) + clamp(40px,6vw,80px))}

.nav-brand{display:flex;align-items:flex-end;gap:10px;min-height:44px;padding-bottom:8px;
  text-decoration:none;color:var(--ink)}
.nav-brand svg{height:26px;width:auto;flex:none}
/* The letters are generated content, so the DOM text of the brand link is only the visually
   hidden proper name beside it. Anchor text and the accessible name both stay "Marga Partners".
   Markup: <span class="wm" aria-hidden="true"><span class="wm-slash"></span></span> */
.wm{font:800 26px/.8 var(--wordmark);letter-spacing:-.03em;white-space:nowrap}
.wm::before{content:"marga"}
.wm::after{content:"partners"}
.wm-slash::before{content:"/"}
.wm-slash{color:var(--bronze)}   /* a 26px heavy glyph, large text: 3.97:1 on cream clears 3:1 */
.on-dark .wm-slash,.site-foot .wm-slash{color:var(--gold)}

.nav-links{display:flex;align-items:center;gap:clamp(18px,2.2vw,28px);
  padding:5px 5px 5px 24px;border:var(--border);border-radius:var(--r-pill);
  background:var(--card)}
.nav-links a:not(.btn),.nav-drop>button{display:inline-flex;align-items:center;min-height:44px;
  font:600 15px/1 var(--sans);color:var(--ink);text-decoration:none;
  text-underline-offset:5px;text-decoration-thickness:2px;transition:color .15s}
.nav-links a:not(.btn):hover,.nav-drop>button:hover{color:var(--text-accent)}
.nav-links a[aria-current=page],.nav-drop[data-current]>button{color:var(--text-accent);
  text-decoration-line:underline}
.nav-links .btn{min-height:44px;padding:9px 18px;font-size:15px}

.nav-drop{position:relative}
.nav-drop>button{gap:7px;padding:0;background:none;border:0;cursor:pointer}
.nav-drop>button svg{width:10px;height:10px;transition:transform .18s}
.nav-drop>button[aria-expanded=true] svg{transform:rotate(180deg)}
/* Bridges the gap between trigger and panel so a hover path does not drop the menu. */
.nav-drop[data-open=true]::after{content:"";position:absolute;top:100%;left:-12px;right:-12px;height:20px}
.nav-panel{position:absolute;top:calc(100% + 16px);left:-24px;width:330px;
  background:var(--card);border:var(--border);border-radius:var(--r-card);
  box-shadow:var(--shadow);padding:8px;opacity:0;visibility:hidden;transform:translateY(-6px);
  transition:opacity .16s,transform .16s,visibility 0s .16s}
.nav-drop[data-open=true] .nav-panel{opacity:1;visibility:visible;transform:none;
  transition:opacity .16s,transform .16s,visibility 0s}
.nav-panel a{display:block !important;min-height:0 !important;padding:13px 15px;border-radius:12px;
  text-decoration:none !important}
.nav-panel a:hover,.nav-panel a:focus-visible{background:var(--cream);color:var(--ink)}
.nav-panel a b{display:block;font:700 15px/1.3 var(--sans);color:var(--ink);margin-bottom:3px}
.nav-panel a span{display:block;font:500 13px/1.45 var(--sans);color:var(--text-body)}
.nav-panel a[aria-current=page] b{color:var(--text-accent);text-decoration:underline;
  text-underline-offset:4px;text-decoration-thickness:2px}

.nav-toggle{display:none;width:48px;height:48px;flex:none;border:var(--border);
  border-radius:var(--r-btn);background:var(--card);cursor:pointer;align-items:center;
  justify-content:center;flex-direction:column;gap:5px;box-shadow:var(--shadow-sm)}
.nav-toggle i{display:block;width:18px;height:2px;background:var(--ink);border-radius:2px;
  transition:transform .2s}
.nav-cap[data-menu=true] .nav-toggle i:first-child{transform:translateY(3.5px) rotate(45deg)}
.nav-cap[data-menu=true] .nav-toggle i:last-child{transform:translateY(-3.5px) rotate(-45deg)}

@media(max-width:980px){
  .nav-toggle{display:inline-flex}
  /* The pill becomes the drawer: same element, dropped below the header as a card. */
  .nav-links{position:absolute;top:calc(100% + 12px);left:0;right:0;flex-direction:column;
    align-items:stretch;gap:0;padding:8px 0 14px;border-radius:var(--r-card);
    box-shadow:var(--shadow);opacity:0;visibility:hidden;transform:translateY(-6px);
    transition:opacity .16s,transform .16s,visibility 0s .16s}
  .nav-cap[data-menu=true] .nav-links{opacity:1;visibility:visible;transform:none;
    transition:opacity .16s,transform .16s,visibility 0s}
  .nav-links>a:not(.btn),.nav-drop{border-top:1px solid var(--line)}
  .nav-links>a:not(.btn):first-child,.nav-drop:first-child{border-top:0}
  .nav-links>a:not(.btn){padding:6px 22px;min-height:52px}
  .nav-drop>button{width:100%;min-height:52px;padding:0 22px;justify-content:space-between}
  /* The panel opens in place. display:block because it is a span, and visibility:inherit so
     a shut drawer still hides it from the tab order. Both carried from v3, where each one
     fixed a real defect. */
  .nav-panel{position:static;display:block;width:auto;opacity:1;transform:none;border:0;
    box-shadow:none;background:transparent;padding:0 12px;max-height:0;overflow:hidden;
    visibility:hidden;transition:max-height .2s,visibility 0s .2s}
  .nav-drop[data-open=true] .nav-panel{max-height:360px;visibility:inherit;
    transition:max-height .2s,visibility 0s}
  .nav-links .btn{margin:12px 22px 0;min-height:48px}
}
@media(max-width:420px){
  .wm{font-size:22px}
  .nav-brand svg{height:22px}
}

/* ==========================================================================================
   CLOSING BAND
   ------------------------------------------------------------------------------------------
   Two variants, chosen to contrast with the section above: light after a dark section, dark
   after a light one. The footer follows the band as its own element.
   ========================================================================================== */
.closing{padding:var(--pad-y) 0;text-align:center}
.closing .inner{display:flex;flex-direction:column;align-items:center}
.closing h2{margin-top:24px;max-width:13em;--h2:87;--h2-min:38px}
.closing .sub{margin-top:clamp(20px,2.4vw,30px);max-width:36em}
.closing .btn{margin-top:clamp(26px,2.8vw,36px)}
.closing-light{border-top:var(--border);color:var(--ink);
  background:radial-gradient(ellipse 1000px 420px at 50% 100%,rgba(199,162,75,.42),rgba(199,162,75,0)) no-repeat,
    var(--linen),var(--lit)}
.closing-dark{color:var(--text-on-dark);
  background:radial-gradient(ellipse 1000px 380px at 50% 105%,rgba(199,162,75,.38),rgba(199,162,75,0)) no-repeat,
    var(--band)}

/* ==========================================================================================
   FOOTER
   ========================================================================================== */
.site-foot{background:var(--ink);color:var(--text-on-dark-body);padding:44px 0 36px;
  font-size:13px;line-height:1.7}
.closing-dark+.site-foot{border-top:1px solid rgba(199,162,75,.22)}
.site-foot .inner{display:grid;grid-template-columns:minmax(0,1.2fr) auto minmax(0,1fr);
  gap:32px 48px;align-items:start}
.site-foot .brand{display:flex;align-items:flex-end;gap:9px;margin-bottom:10px;color:var(--cream)}
.site-foot .brand svg{height:22px;width:auto}
.site-foot .brand .wm{font-size:22px}
.site-foot .desc{max-width:30ch}
.site-foot .cols{display:flex;gap:40px;flex-wrap:wrap}
.site-foot h3{margin:0 0 4px;font:700 13px/1.7 var(--sans);color:var(--gold)}
.site-foot ul{list-style:none;margin:0;padding:0}
.site-foot ul a,.site-foot .foot-legal a{display:inline-flex;align-items:center;min-height:32px;
  color:var(--text-on-dark-body);text-decoration:none}
.site-foot a:hover{color:var(--cream);text-decoration:underline;text-underline-offset:4px}
.site-foot .foot-legal{font-size:12px;display:flex;flex-direction:column;gap:6px}
.site-foot .foot-legal .links{display:flex;flex-wrap:wrap;gap:0 16px}
@media(max-width:860px){
  .site-foot .inner{grid-template-columns:minmax(0,1fr)}
}
@media(max-width:480px){
  .site-foot ul a,.site-foot .foot-legal a{min-height:44px}
}

/* ==========================================================================================
   DRAWN MARKS
   ------------------------------------------------------------------------------------------
   A hand-drawn SVG over or under one word per headline. The word is wrapped in .mk, the SVG
   sits inside it absolutely, and the paths use pathLength="1" so one dash length fits every
   path. Drawing is stroke-dashoffset 1.02 to 0.

     .mk-circle      an ellipse round the word ("wins.", "priced in.")
     .mk-under       one underline, or two with a second path.s2 ("framework.", "franchise.")
     .mk-brush       a gold brush stroke behind the word, drawn ("practice.")
     .mk-hl          a gold block behind the word that wipes in left to right ("all three.")
     .mk-strike      a gold fill struck through the word. Static, never animated.

   data-draw="hero" plays on load after 0.6s with no script. data-draw on its own waits for
   marga-draw.js to add .is-drawn when the word is half in view. With no script at all, or
   with reduced motion, every mark is shown fully drawn.
   ========================================================================================== */
.mk{position:relative;display:inline-block;white-space:nowrap}
.mk>svg{position:absolute;overflow:visible;pointer-events:none}
.mk path.s{fill:none;stroke:var(--mk-color);stroke-linecap:round;stroke-width:var(--mk-w,4.4)}
.on-dark .mk{--mk-color:var(--gold)}

.mk-circle>svg{left:var(--mk-x,-4%);width:calc(100% - 2 * var(--mk-x,-4%));top:-6%;height:116%}
.mk-under>svg{left:0;width:100%;bottom:-18%;height:24%}
.mk-under path.s{--mk-w:4.6}
.mk-under path.s2{--mk-w:3.4}
.mk-brush{isolation:isolate}
.mk-brush>svg{left:-2%;width:104%;bottom:-14%;height:24%;z-index:-1}
.mk-brush path.s{stroke:var(--gold);--mk-w:6}
.mk-hl{isolation:isolate;padding:0 .08em}
.mk-hl>svg{left:-2%;width:104%;bottom:-16%;height:26%;z-index:-1}
.mk-hl path{fill:var(--gold)}
.mk-strike{white-space:normal}
.mk-strike>svg{left:-3%;width:106%;top:41%;height:29%}
.mk-strike path{fill:var(--gold)}

/* Waiting to draw. */
.mk[data-draw] path.s{stroke-dasharray:1 2;stroke-dashoffset:1.02}
.mk-hl[data-draw]>svg{clip-path:inset(0 100% 0 0)}

/* Durations, per mark type, and the second underline follows the first. */
.mk path.s{--mk-d:.7s;--mk-dl:.2s}
.mk-circle path.s{--mk-d:1.4s}
.mk-brush path.s{--mk-d:.8s}
.mk-under path.s2{--mk-d:.55s;--mk-dl:.8s}
.mk[data-draw=hero] path.s{--mk-dl:.6s}
.mk[data-draw=hero] path.s2{--mk-dl:1.15s}

.mk[data-draw=hero] path.s,.mk.is-drawn path.s{
  animation:mg-draw var(--mk-d) var(--mk-ease) var(--mk-dl) forwards}
.mk-hl[data-draw=hero]>svg,.mk-hl.is-drawn>svg{
  animation:mg-wipe .9s cubic-bezier(.6,.1,.3,1) var(--mk-dl,.2s) both}
@keyframes mg-draw{to{stroke-dashoffset:0}}
@keyframes mg-wipe{from{clip-path:inset(0 100% 0 0)}to{clip-path:inset(0 0 0 0)}}

@media(scripting:none){
  .mk[data-draw] path.s{stroke-dashoffset:0}
  .mk-hl[data-draw]>svg{clip-path:none}
}

/* The arrow doodle beside the hero buttons. Decorative, and it needs room to the left. */
.doodle{position:absolute;overflow:visible;pointer-events:none;fill:none;stroke:var(--ink);
  stroke-width:2.5;stroke-linecap:round;stroke-linejoin:round}
.doodle-arrow{left:-130px;top:-30px;width:120px;height:70px}
@media(max-width:900px){.doodle{display:none}}

/* ==========================================================================================
   TAB EXPLORER (marga-tabs.js)
   ------------------------------------------------------------------------------------------
   Without script it is a plain stack of every panel, each headed by its own question, and
   the list of triggers is hidden because it would do nothing. marga-tabs.js adds the ARIA
   tab pattern and data-tabs-ready, and only then does the list appear and the panels hide.
   ========================================================================================== */
.qx{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:32px;align-items:start}
.qx-list{display:flex;flex-direction:column;gap:4px}
.qx:not([data-tabs-ready]){grid-template-columns:minmax(0,1fr)}
.qx:not([data-tabs-ready]) .qx-list{display:none}
.qx-tab{all:unset;box-sizing:border-box;cursor:pointer;display:grid;gap:6px;padding:16px 20px;
  border-left:3px solid rgba(241,233,219,.15);transition:background-color .15s,border-color .15s}
.qx-tab:hover{background:rgba(241,233,219,.06)}
.qx-tab[aria-selected=true]{border-left-color:var(--gold);background:rgba(241,233,219,.08)}
.qx-tab:focus-visible{outline:2px solid var(--gold);outline-offset:2px}
.qx-tab .stage{font:700 11px/1.3 var(--sans);letter-spacing:var(--track-label);
  text-transform:uppercase;color:var(--gold)}
.qx-tab .q{font:300 22px/1.2 var(--serif);color:var(--text-on-dark-body)}
.qx-tab[aria-selected=true] .q{color:var(--cream)}
.qx-panels{display:grid;gap:24px}
.qx-panel{background:var(--card);color:var(--ink);border:2px solid var(--gold);
  border-radius:var(--r-card);box-shadow:var(--shadow-gold);padding:var(--pad-card)}
.qx-panel[hidden]{display:none}
.qx-panel:focus-visible{outline:2px solid var(--gold);outline-offset:4px}
.qx-panel .t-eyebrow{font-size:12px;color:var(--text-accent)}
.qx-panel h3{margin:12px 0 10px;font:600 clamp(24px,2.5vw,32px)/1.1 var(--serif);letter-spacing:-.015em}
.qx-beat{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;padding:20px 0;
  border-top:1px solid rgba(22,20,15,.2);margin:0}
.qx-beat dt{font:700 12px/1.4 var(--sans);letter-spacing:var(--track-label);text-transform:uppercase}
.qx-beat dd{margin:0;font-size:17px;line-height:1.55;color:var(--text-body)}
@media(max-width:860px){
  .qx{grid-template-columns:minmax(0,1fr)}
  .qx-beat{grid-template-columns:minmax(0,1fr);gap:6px}
}

/* ==========================================================================================
   FORMS
   ========================================================================================== */
.field{display:grid;gap:8px}
.field label,.field legend{font:700 12px/1.3 var(--sans);letter-spacing:var(--track-label);
  text-transform:uppercase;color:var(--ink)}
.input,.field input:not([type=checkbox]):not([type=radio]),.field select,.field textarea{
  width:100%;min-height:48px;padding:12px 14px;border:var(--border);border-radius:var(--r-btn);
  background:var(--card);color:var(--ink);font:500 16px/1.4 var(--sans)}
.field textarea{min-height:120px;resize:vertical}
.input:focus,.field input:focus,.field select:focus,.field textarea:focus{
  outline:2px solid var(--text-accent);outline-offset:2px}
.on-dark .input,.on-dark .field input:not([type=checkbox]):not([type=radio]){border-color:var(--gold)}

/* ---- shared form components, ported from v3 in the linen style -----------------------------
   Inputs are 2px ink on card cream with a 10px radius, everywhere. The markup is unchanged: the
   MargaZine signup (margazine_signup in v4_chrome), the providers join gate, and the note that
   marga-prefill.js inserts when it has filled a field. Labels keep the v3 rule that a label is
   uppercase Manrope 700 on the label tracking token, in the accent that clears AA.

   NOT A BARE .gate. The essays use .gate for the email gate's container and benchmark.html has
   its own; v3 kept the join gate's rules out of the shared sheet for exactly that reason. The
   providers block is .gate-join, so nothing here can reach either. */
.mz-head{max-width:60ch}
.mz-head .t-h2{margin-top:16px}
.mz-head .t-lead{margin-top:18px}
.mz-form{margin-top:clamp(26px,3vw,34px)}
.mz-row,.gate-join{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:18px}
.gate-f,.mz-f{display:grid;min-width:0}
.mz-l,.gate-l{display:block;font:700 12px/1.3 var(--sans);letter-spacing:var(--track-label);
  text-transform:uppercase;color:var(--text-accent);margin-bottom:10px}
.mz-opt{margin-left:8px;color:var(--text-muted)}
.mz-form input[type=text],.mz-form input[type=email],.mz-form select,.gate-join input,.gate-join select{
  width:100%;min-height:48px;padding:12px 14px;border:var(--border);border-radius:var(--r-btn);
  background:var(--card);color:var(--ink);font:500 16px/1.4 var(--sans)}
.mz-form input:focus,.mz-form select:focus,.gate-join input:focus,.gate-join select:focus{
  outline:2px solid var(--text-accent);outline-offset:2px}
.mz-consent{display:flex;align-items:flex-start;gap:12px;margin:22px 0 0;max-width:66ch;
  font:400 15px/1.55 var(--sans);color:var(--text-body);cursor:pointer}
.mz-consent input{margin:3px 0 0;width:18px;height:18px;flex:none;accent-color:var(--ink)}
.mz-form .btn{margin-top:24px}
.prefill-note{margin:0 0 22px;padding:14px 18px;background:var(--card);border:var(--border);
  border-radius:var(--r-btn);font:400 14px/1.55 var(--sans);color:var(--text-body)}
.prefill-clear{background:none;border:0;padding:0;font:700 14px/1.55 var(--sans);
  color:var(--text-accent);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.prefill-clear:hover{color:var(--ink)}

/* ==========================================================================================
   FOCUS AND MOTION
   ========================================================================================== */
:where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline:2px solid var(--text-accent);outline-offset:3px;border-radius:2px}
.on-dark :where(a,button,input,select,textarea,summary,[tabindex]):focus-visible{
  outline-color:var(--gold)}
.on-dark .card:not(.card-ink) :where(a,button,input,select,textarea):focus-visible{
  outline-color:var(--text-accent)}
.btn:focus-visible{outline-offset:4px;border-radius:var(--r-btn)}

@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{transition-duration:.01ms !important;animation:none !important}
  .mk[data-draw] path.s{stroke-dashoffset:0}
  .mk-hl[data-draw]>svg{clip-path:none}
}

/* ==========================================================================================
   RESPONSIVE
   ------------------------------------------------------------------------------------------
   Grids collapse to one column; display type is already fluid through clamp(). Nothing that
   holds text has a fixed height.
   ========================================================================================== */
@media(max-width:1024px){
  .grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:768px){
  .grid-2,.grid-3{grid-template-columns:minmax(0,1fr)}
  .card{box-shadow:var(--shadow-sm)}
  .card-gold,.qx-panel,.card-ink{box-shadow:var(--shadow-gold-sm)}
  .cta-row{flex-direction:column;align-items:stretch}
  .hero.center .cta-row{align-self:stretch}
}

/* Phones. Every display size above is clamped at a floor, and on a phone the floors are what
   render: the H1 sat at 38 to 44px beside closing headings at 38px and numerals at 36 to 62px,
   so the hero read no louder than the page under it. Here the hero grows with the viewport,
   section headings sit at 34px under it, and every other display size in a section steps
   below its heading: the H1 leads the page and each H2 leads its section.
   Page-specific display sizes (the thesis line, journal day numbers, the Method score, the
   About definition word) take the same step in their own generators. */
@media(max-width:480px){
  .t-h1{font-size:max(46px,13vw)}
  .t-h2{--h2-min:34px}
  .closing h2{--h2-min:34px}
  .t-num{font-size:26px}
}
