/* v4 colour refinements, linked last on every page so these rules read over v3.css.
   Colour blocks, each revertible on its own: A ink, B surfaces and rings, C five sunk chapters on the home page, D the hero, F window frames
   and selection. Then E navigation and T typography. */

:root{
  /* v4 A. ink. Primary text moves up to 0.95 lightness at chroma .004 (dark reading pages run primary at 0.94 to 1.00, chroma .003 or less);
     grey text had chroma .018 to .026, above the ground's own .014, so it read blue and dusty: capped at .008 to .012. */
  --ink:oklch(0.950 0.004 256);       /* was 0.921 0.006; brighter, near neutral */
  --ink-lead:oklch(0.870 0.008 256);  /* was 0.836 0.019; serif prose */
  --ink-2:oklch(0.800 0.008 256);     /* was 0.799 0.018; card body, lightness unchanged, chroma cut */
  --ink-3:oklch(0.714 0.010 256);     /* was 0.714 0.026; lightness unchanged, chroma cut */
  --ink-4:oklch(0.620 0.012 256);     /* was 0.544 0.020; 5.1:1 on n1, 3.9:1 on the card panel */
}

:root{
  /* v4 B. surfaces. Two rungs: the things a reader looks at (cards, tiles, flags) step +0.096 L over the page; the one large region stays soft.
     n1 to n6 are untouched: --line and --n5 keep their values everywhere else. */
  --v3-panel:oklch(0.289 0.016 256);     /* cards, tiles, flags; was var(--n2) 0.233 (+0.040), now +0.096 over the page */
  --v3-panel-2:oklch(0.320 0.017 256);   /* hover and raised; was var(--n3) 0.263, now +0.031 above the panel, still a visible step */
  /* rings drawn in ink at a set opacity, so they brighten with the surface they sit on */
  --v4-ring:color-mix(in oklab,var(--ink) 18%,transparent);     /* on n1 about oklch 0.37 (+0.173); was solid --n5 (+0.141) */
  --v4-ring-hi:color-mix(in oklab,var(--ink) 9%,transparent);   /* top inset highlight; was 6% */
  --edge-hi:inset 0 1px 0 var(--v4-ring-hi);
  --v3-edge:inset 0 1px 0 var(--v4-ring-hi);
}
.pillars>*,.pg-home .ex-grid>li,.pg-home .rp3>li,.pg-home .ls{box-shadow:0 0 0 1px var(--v4-ring),var(--edge-hi)}
.pg-home .ex-flag{box-shadow:0 0 0 1px var(--v4-ring),var(--edge-hi)}
/* the one large band keeps the soft rung: a region is not a card */
.pg-home .ls{background:var(--n2)}

/* v4 C. tonal landmarks: five home chapters (Why now, The numbers, Basis, Together, The ask) sit on the sunk ground, full bleed like the hero,
   with a hairline top and bottom and a soft white light at the top edge. Each is a change of subject; Basis and Together are adjacent and
   read as one band. Rhythm down the page, in this branch's section order: n1 · n1 · n0 · n1 n1 n1 n1 · n0 · n1 · n0 n0 · n1 · n0. */
.pg-home .chapter.v4-sunk{position:relative;margin-inline:calc(-1 * var(--gutter));padding-inline:var(--gutter);
  background:radial-gradient(70% 45% at 50% 0%,var(--v3-glow),transparent 70%),var(--n0);
  box-shadow:inset 0 1px 0 var(--n4),inset 0 -1px 0 var(--n4)}
.pg-home .chapter.v4-sunk + .chapter.v4-sunk{box-shadow:inset 0 -1px 0 var(--n4)}

/* v4 D. hero. The engraving goes; one soft overhead light behind the headline replaces the two radials, a single light source rather than
   a texture in a corner. The grain stays. */
.pg-home .ph-engrave{display:none}
.pg-home .ph-hero{background:
  radial-gradient(70% 55% at 50% -5%,color-mix(in oklab,var(--band-glow) 5%,transparent),transparent 70%),
  linear-gradient(to bottom,var(--n0) 45%,var(--n1))}

/* v4 F. two follow-throughs from B: the prototype window frames ring with the same
   ink-alpha ring as the cards, hover one step brighter; text selection in the accent tint, not the browser's default blue. */
:root{
  --shadow-window:0 0 0 1px var(--v4-ring),var(--edge-hi),0 2.5rem 6rem -1.5rem var(--n0),0 0 0 .5rem color-mix(in oklab,var(--ink) 3%,transparent);
  --shadow-window-hover:0 0 0 1px color-mix(in oklab,var(--ink) 26%,transparent),var(--edge-hi),0 2.5rem 6rem -1.5rem var(--n0),0 0 0 .5rem color-mix(in oklab,var(--ink) 3%,transparent);
}
::selection{background:var(--accent-tint);color:var(--ink)}

/* v4 E. navigation. Five blocks, each revertible on its own: E1 chapter bar, E2 top nav,
   E3 the Products menu, E4 its motion (with the hover behaviour in site.js), E5 the seam between the two bars. */

/* v4 E1. chapter bar: state is colour plus a soft pill. No underline, no icons. */
.nav2 ul{align-items:center}
.nav2 a{height:32px;align-self:center;padding:0 12px;border-radius:999px;color:var(--ink-3);font-size:.8125rem;
  transition:color .1s cubic-bezier(.25,.46,.45,.94),background-color .1s cubic-bezier(.25,.46,.45,.94)}
.nav2 a .ic{display:none}
.nav2 a:hover{color:var(--ink);background:color-mix(in oklab,var(--ink) 6%,transparent)}
.nav2 a.on{color:var(--ink);background:color-mix(in oklab,var(--ink) 12%,transparent)}
.nav2 a.on::after{content:none}
.nav2{border-bottom:1px solid color-mix(in oklab,var(--ink) 8%,transparent)}   /* header hairline: ink at 8 percent */

/* v4 E2. top nav: hover and open states as ink-alpha pills, not a solid grey; 0.1s transitions. .nav1-links a
   matches nothing in the current shell; the top nav's links are .nav1-items a, so they are named beside it. */
.nav1-links a,.nav1-items a,.nav1-menubtn{transition:color .1s cubic-bezier(.25,.46,.45,.94),background-color .1s cubic-bezier(.25,.46,.45,.94)}
.nav1-links a:hover,.nav1-items a:hover,.nav1-menubtn:hover{background:color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menubtn[aria-expanded="true"]{background:color-mix(in oklab,var(--ink) 8%,transparent);color:var(--ink)}

/* v4 E3. the Products menu: two product cells side by side and a footer strip; columns with a full-width strip and an arrow,
   hairline cells with no gaps, an icon tile beside each name. No HTML change. */

/* shared: icon tile, name, line */
.nav1-menu-list .ic{display:grid;place-items:center;width:28px;height:28px;margin:0;border-radius:7px;font-size:15px;
  color:var(--ink-2);background:color-mix(in oklab,var(--ink) 4%,transparent);box-shadow:0 0 0 1px color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menu-list .txt{display:flex;flex-direction:column;gap:2px;font-size:14px;line-height:1.4}
.nav1-menu-list .txt .nm b{font-weight:500;font-size:14px;color:var(--ink)}
.nav1-menu-list .txt small{font-size:13px;line-height:1.4;color:var(--ink-3);font-weight:400}

/* desktop: the floating panel */
@media (min-width:961px){
.nav1-menu{width:560px;max-width:calc(100vw - 2 * var(--gutter));padding:0;overflow:hidden;
  background:var(--v3-panel);border:0;border-radius:var(--v3-r-win);
  box-shadow:0 0 0 1px var(--v4-ring),var(--edge-hi),
             0 16px 40px color-mix(in oklab,var(--n0) 75%,transparent),
             0 2px 6px color-mix(in oklab,var(--n0) 60%,transparent)}
.nav1-menu-h{margin:0;padding:12px 16px 11px;font:var(--w-mono) var(--t-mono)/16px var(--mono);letter-spacing:.12em;text-transform:uppercase;
  color:var(--ink-3);border-bottom:1px solid color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menu-list{display:grid;grid-template-columns:1fr 1fr;padding:0;margin:0}
.nav1-menu-list>li{display:contents}
.nav1-menu-list a{display:grid;grid-template-columns:auto 1fr;grid-template-areas:"ic txt";column-gap:12px;align-items:start;
  padding:16px 16px 18px;min-height:0;border-radius:0;color:var(--ink);transition:background-color .1s cubic-bezier(.25,.46,.45,.94)}
.nav1-menu-list a:hover,.nav1-menu-list a:focus-visible{background:color-mix(in oklab,var(--ink) 5%,transparent)}
.nav1-menu-list a[aria-current="page"]{background:color-mix(in oklab,var(--ink) 9%,transparent)}
.nav1-menu-list>li:first-child a{border-right:1px solid color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menu-list>li:nth-child(-n+2) a{border-bottom:1px solid color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menu-list .ic{grid-area:ic}
.nav1-menu-list .txt{grid-area:txt;padding-top:3px}
/* third item: the footer strip, full width, the arrow at the far right */
.nav1-menu-list>li:nth-child(3) a{grid-column:1 / -1;grid-template-columns:auto auto 1fr;grid-template-areas:"ic txt arrow";
  align-items:center;padding:12px 16px;row-gap:0}
.nav1-menu-list>li:nth-child(3) .txt{flex-direction:row;align-items:baseline;gap:10px;padding-top:0}
.nav1-menu-list>li:nth-child(3) .nm,.nav1-menu-list>li:nth-child(3) small{white-space:nowrap}
.nav1-menu-list>li:nth-child(3) a::after{content:"\2192";grid-area:arrow;justify-self:end;color:var(--ink-4);font-size:14px;
  transition:transform .15s ease-out,color .1s}
.nav1-menu-list>li:nth-child(3) a:hover::after{color:var(--ink);transform:translateX(2px)}
@media (prefers-reduced-motion:reduce){.nav1-menu-list>li:nth-child(3) a::after{transition:none}}
}

/* phone sheet (960 and below): rows, an icon tile, the text, an arrow on the third; the site links and the ask button unchanged */
@media (max-width:960px){
.nav1-menu-h{color:var(--ink-4);border-bottom:1px solid color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menu-list li,.nav1-menu-site li{border-bottom:1px solid color-mix(in oklab,var(--ink) 8%,transparent)}
.nav1-menu-list a{display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"ic txt arrow";column-gap:12px;align-items:center;
  padding:12px 0;min-height:0;border-radius:0;color:var(--ink)}
.nav1-menu-list .ic{grid-area:ic}
.nav1-menu-list .txt{grid-area:txt}
.nav1-menu-list>li:nth-child(3) a::after{content:"\2192";grid-area:arrow;justify-self:end;color:var(--ink-4);font-size:14px;padding-right:4px}
.nav1-menu-site a{padding:12px 0;color:var(--ink-2);font-size:15px}
}

/* v4 E4. menu motion: in over 160ms, out over 100ms (site.js holds the panel for the out step); none under reduced motion */
.nav1-menu{transform-origin:top left;animation:v4-menu-in .16s cubic-bezier(.2,.7,.3,1)}
.nav1-menu.v4-out{animation:v4-menu-out .1s ease-in forwards;pointer-events:none}
@keyframes v4-menu-in{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}
@keyframes v4-menu-out{from{opacity:1;transform:none}to{opacity:0;transform:translateY(-4px) scale(.98)}}
@media (prefers-reduced-motion:reduce){.nav1-menu,.nav1-menu.v4-out{animation:none}}

/* v4 E5. the header is 56.5px (a 56px row and a half pixel transparent border); the chapter bar sticks at 57px. Make the header 57px. */
header.nav1{border-bottom-width:1px}

/* v4 T. typography. The element rules of one type scale; every size, weight, tracking, leading and
   measure is a token in site.css :root. The generic selectors come first in each rule; where the site names the same role with its own
   class, that class follows (the figures are .facts b; running prose is the paragraphs listed; the ask's paragraphs are its intro).
   Every role below is set in the sans; the serif is kept for the quote role and the letter only.
   The hero lead's measure is v3.css's #covenant .wrap>p.lead, the lead measure. */
h1{font:var(--w-head) var(--t-h1)/var(--lh-h1) var(--font-sans);letter-spacing:var(--ls-h1)}
.ph-ask h2{font-size:var(--t-h2-top);letter-spacing:var(--ls-h2-top);line-height:1.04}
h2{font:var(--w-head) var(--t-h2)/var(--lh-h2) var(--font-sans);letter-spacing:var(--ls-h2)}
h3{font:var(--w-sub) var(--t-h3)/var(--lh-h3) var(--font-sans);letter-spacing:var(--ls-h3)}
.fig,.facts b{font-weight:var(--w-sub);font-size:var(--t-fig);letter-spacing:var(--ls-fig)}
b,strong{font-weight:var(--w-bold)}
.btn{font:var(--w-sub) var(--t-ui-sm)/22px var(--font-sans)}

.lead{font:var(--w-ui) var(--t-lead)/var(--lh-lead) var(--font-sans);max-width:var(--measure-lead)}
/* the inner pages' intros in the 640px column: the Screens intro balanced so it never ends on
   a short line; the field page's small print under its intro narrows with it, so a note is never wider than the text it notes. The
   home hero keeps the lead measure above (65 characters a line at most) */
.pg-screens .open .lead,main.cmpx .lead,main.cmpx #cmp-top .note,.pg-questions .qa-top .lead,.pg-basis .b1-side .lead{max-width:var(--lead-col)}
.pg-screens .open .lead,.pg-questions .qa-top .lead{text-wrap:balance} /* both centred; at 640px the questions intro would otherwise end on "says so." */
/* the four inner intros on the phone (the same on all four so no inner page differs): 18px, the desktop body size, on the
   phone body's 26px leading, so the first screen is not carried by a 20px block */
@media (max-width:600px){.pg-screens .open .lead,main.cmpx .lead,.pg-questions .qa-top .lead,.pg-basis .b1-side .lead{font-size:18px;line-height:var(--lh-prose);text-wrap:pretty}}
.ch-head p:not(.kicker),.ak-p{font:var(--w-ui) var(--t-intro)/var(--lh-prose) var(--font-sans);max-width:var(--measure-prose)}
.why>p:first-of-type{font:var(--w-ui) var(--t-display)/var(--lh-display) var(--font-sans);letter-spacing:var(--ls-display);max-width:28em;text-wrap:balance} /* even
   lines, so the statement never ends on "too." alone (pretty still left "waits too.") */
.prose p,.why p,.mk-t p,.ph-case figcaption p:not(.kicker):not(.ph-case-q),.bs-t p:not(.kicker):not(.st),.qa details p,.sv-cap>.l2{
  font:var(--w-ui) var(--t-body)/var(--lh-prose) var(--font-sans);max-width:var(--measure-prose)}

.eyebrow,.kicker{font:var(--w-mono) var(--t-mono)/16px var(--font-mono);letter-spacing:var(--ls-eyebrow);text-transform:uppercase}

.foot-base a{padding-block:14px}
