/* ==========================================================================
   Electric Marae - Rewiring Aotearoa campaign page (Whakahiko Ngā Marae)
   House style: rewiring-pages-theme (NZME), as Powered from Within version B,
   the cut-out page after OJ's MarkUp rounds 1-3: cream-led, gold accent, no neon,
   no eyebrows, no side-stripe cards, white figure cards on light bands.
   PFW styles.css + cutout.css folded into one sheet; new components use em-.
   Motion beyond the house reveal lives in motion.css (animator-owned): every
   component here is drawn in its final state, which is the reduced-motion state.
   ========================================================================== */

:root {
  color-scheme: light;

  --ink:         #143a1e;
  --ink-deep:    #0d2814;
  --teal:        #1a3c3c;
  --teal-mid:    #2d5c5a;
  --teal-light:  #3a6e6b;
  --cream:       #FFFCF0;
  --paper:       #f5f0e1;
  --gold:        #f5b731;   /* fills and markers on light bands; text only on dark */
  --mint:        #c2d0c4;
  --petrol-dark: #b4533f;   /* error text on cream */
  --text-on-dark:   #d1e0df;
  --muted-on-dark:  #a9c3ab;
  --text-on-cream:  #1a3c3c;
  --muted-on-cream: #4f6e6c;
  --hairline-dark:  rgba(194, 208, 196, 0.24);
  --hairline-cream: rgba(26, 60, 60, 0.18);
  --surface-dark:   rgba(255, 252, 240, 0.05);

  --font-body:    'Rubik', system-ui, -apple-system, sans-serif;
  --font-display: 'Rewiring Solid', 'Rubik', system-ui, sans-serif;
  --fs-hero:    clamp(2.6rem, 7vw, 5.75rem);
  --fs-h2:      clamp(1.9rem, 3.8vw, 3rem);
  --fs-h3:      clamp(1.25rem, 1.8vw, 1.6rem);
  --fs-lede:    clamp(1.1rem, 1.55vw, 1.35rem);
  --fs-body:    1.0625rem;
  --fs-small:   0.92rem;
  --fs-micro:   0.75rem;
  --fs-stat:    clamp(2.2rem, 4.6vw, 3.75rem);
  --lh-tight: 1.04; --lh-head: 1.1; --lh-body: 1.65;
  --measure: 65ch;
  --track-display: normal;            /* MarkUp r1 #17 */

  --shell: 1180px;
  --gutter: 32px;
  --pad-section: clamp(72px, 10vw, 128px);
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px;
  --s-6: 32px; --s-7: 48px; --s-8: 64px; --s-9: 96px;
  --topbar-h: 64px;

  --wonk:     255px 15px 225px 15px / 15px 225px 15px 255px;
  --wonk-alt: 15px 225px 15px 255px / 255px 15px 225px 15px;
  --radius-card: 8px 22px 8px 22px;
  --radius-card-alt: 22px 8px 22px 8px;

  --shadow-hard: 0 8px 0 rgba(0, 0, 0, 0.25);
  --shadow-soft: 0 18px 40px rgba(6, 24, 11, 0.35);
  --shadow-cream: 0 14px 32px rgba(20, 58, 30, 0.14);
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");

  /* card system (PFW cutout.css MarkUp r1 #23, promoted to :root) */
  --card-white:  #ffffff;
  --card-radius: 16px;
  --card-shadow: 0 10px 26px rgba(20, 58, 30, 0.09), 0 1px 2px rgba(20, 58, 30, 0.06);
  --card-shadow-hover: 0 20px 36px rgba(20, 58, 30, 0.14);
  --card-line: rgba(26, 60, 60, 0.1);
  --cut-drop: drop-shadow(0 14px 14px rgba(20, 58, 30, 0.16));
  --cut-drop-dark: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.38));

  /* chart meaning (review_visual 2.1) */
  --grid-blue:   #7c96c1;
  --solar:       var(--gold);
  --fixed-dot:   var(--mint);

  /* spike */
  --spike-line:  var(--cream);
  --spike-peak:  rgba(245, 183, 49, 0.22);
  --spike-tick:  var(--gold);

  /* profiles */
  --match-bg:    var(--ink);

  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --dur-1: 180ms; --dur-2: 450ms; --dur-3: 800ms;

  --z-rail: 40; --z-topbar: 50;
}

/* Rewiring Solid alpha cut: A-Z, a-z, space, macrons ONLY. Rubik picks up
   digits and punctuation per glyph. Never set it on numbers. */
@font-face {
  font-family: 'Rewiring Solid';
  src: url('fonts/RewiringSolid-alpha.woff2') format('woff2'),
       url('fonts/RewiringSolid-alpha.otf') format('opentype');
  font-weight: 400 800;
  font-display: swap;
}

/* ------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 16px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--text-on-cream);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  font-kerning: normal;
}
img, svg { max-width: 100%; display: block; }
picture { display: block; }
img { height: auto; }
h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote, fieldset { margin: 0; }
ol, ul { padding: 0; list-style: none; }
fieldset { padding: 0; border: 0; min-width: 0; }
legend { padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
strong { font-weight: 700; }
main { overflow-x: clip; }
[hidden] { display: none !important; }

.pfw-visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.pfw-skip {
  position: fixed; left: 16px; top: 12px; z-index: 100; transform: translateY(-200%);
  background: var(--gold); color: var(--ink); font-weight: 700;
  padding: 10px 18px; border-radius: var(--wonk); text-decoration: none;
}
.pfw-skip:focus { transform: none; }

.pfw-shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

/* focus: teal on light bands, gold on dark */
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }
.pfw-band--ink :focus-visible, .pfw-band--deep :focus-visible, .pfw-band--teal :focus-visible { outline-color: var(--gold); }
.pfw-band--teal .em-askcard :focus-visible, .pfw-band--deep .em-mismatch__card :focus-visible,
.pfw-band--teal .pfw-quote :focus-visible { outline-color: var(--teal); }

/* ------------------------------------------------------------ bands */
.pfw-band { position: relative; padding: calc(var(--pad-section) * 0.86) 0 var(--pad-section); isolation: isolate; }
.pfw-band--ink  { background: var(--ink);      color: var(--text-on-dark); }
.pfw-band--deep { background: var(--ink-deep); color: var(--text-on-dark); }
.pfw-band--teal { background: var(--teal);     color: var(--text-on-dark); }
.pfw-band--cream { background: var(--cream);   color: var(--text-on-cream); }
.pfw-band--paper { background: var(--paper); }
.pfw-band--ink::before, .pfw-band--deep::before, .pfw-band--teal::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: var(--grain); pointer-events: none; opacity: 0.9;
}

/* ------------------------------------------------------------ type */
.pfw-h1, .pfw-h2 {
  font-family: var(--font-display);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: var(--track-display);
  text-wrap: balance;
}
.pfw-h1 { font-size: var(--fs-hero); line-height: 0.98; color: var(--ink); }
.pfw-h2 { font-size: var(--fs-h2); line-height: var(--lh-head); margin-bottom: var(--s-5); color: var(--ink); }
.pfw-band--ink .pfw-h2, .pfw-band--deep .pfw-h2, .pfw-band--teal .pfw-h2 { color: var(--cream); }
.pfw-lede { font-size: var(--fs-lede); line-height: 1.55; max-width: 58ch; text-wrap: pretty; }
.pfw-band--ink .pfw-lede, .pfw-band--deep .pfw-lede, .pfw-band--teal .pfw-lede { color: var(--text-on-dark); }
.pfw-body p { max-width: var(--measure); text-wrap: pretty; }
.pfw-body p + p { margin-top: 1em; }
.pfw-head { margin-bottom: var(--s-8); max-width: 760px; }
.pfw-head--wide { max-width: 880px; }
.pfw-head--full, .pfw-head--full .pfw-lede { max-width: none; }

.hl {
  color: inherit;
  background: linear-gradient(transparent 58%, var(--gold) 58%, var(--gold) 92%, transparent 92%);
  padding: 0 0.08em; margin: 0 -0.02em;
  box-decoration-break: clone; -webkit-box-decoration-break: clone;
}
.pfw-band--ink .hl, .pfw-band--deep .hl, .pfw-band--teal .hl { background: none; color: var(--gold); }

/* page ref: there is no public PDF yet, so a quiet span with the page in its title */
.pfw-ref {
  display: inline-block;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  vertical-align: 0.35em;
  white-space: nowrap;
  padding: 2px 1px;
  color: var(--muted-on-cream);
  cursor: help;
}
.pfw-band--ink .pfw-ref, .pfw-band--deep .pfw-ref, .pfw-band--teal .pfw-ref { color: var(--muted-on-dark); }
.em-refs { margin-top: 6px; }
.em-refs .pfw-ref { vertical-align: baseline; }

/* ------------------------------------------------------------ buttons */
.pfw-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px;
  font-size: 15px; font-weight: 700; line-height: 1.2; text-align: center;
  padding: 14px 32px;
  text-decoration: none;
  border-radius: var(--wonk);
  border: 3px solid var(--gold);
  background: var(--gold);
  color: var(--ink);
  transition: transform var(--dur-1) ease, box-shadow var(--dur-1) ease, background var(--dur-1) ease;
}
.pfw-btn:hover { transform: translateY(-2px) rotate(-0.4deg); box-shadow: var(--shadow-hard); }
.pfw-btn:active { transform: translateY(0) scale(0.98); box-shadow: none; }
.pfw-btn[disabled] { opacity: 0.7; cursor: progress; transform: none; box-shadow: none; }
.pfw-btn--ghost { background: transparent; border-color: var(--ink); color: var(--ink); border-radius: var(--wonk-alt); }
.pfw-btn--ghost:hover { background: rgba(20, 58, 30, 0.06); }
.pfw-btn--ghost-ink { background: transparent; border-color: var(--ink); color: var(--ink); border-radius: var(--wonk-alt); }
.pfw-btn--ink { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.pfw-btn--sm { min-height: 40px; padding: 8px 20px; font-size: 14px; border-width: 2px; }

/* ------------------------------------------------------------ topbar (cream, ink type) */
.pfw-topbar {
  position: fixed; inset: 0 0 auto; z-index: var(--z-topbar);
  height: var(--topbar-h);
  border-bottom: 1px solid transparent;
  transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2) var(--ease-out);
}
.pfw-topbar.is-scrolled { background: rgba(255, 252, 240, 0.95); border-bottom-color: var(--hairline-cream); }
@supports (backdrop-filter: blur(8px)) {
  .pfw-topbar.is-scrolled { background: rgba(255, 252, 240, 0.86); backdrop-filter: blur(10px); }
}
.pfw-topbar__inner {
  max-width: 1320px; height: 100%; margin: 0 auto; padding: 0 var(--gutter);
  display: flex; align-items: center; gap: var(--s-5);
}
.pfw-topbar__brand {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: var(--track-display); font-size: 17px; line-height: 1;
  color: var(--ink); text-decoration: none; white-space: nowrap;
}
.pfw-topbar__brand span { color: var(--teal-mid); }
.pfw-topbar__nav { flex: 1; display: flex; justify-content: center; gap: 4px; }
.pfw-topbar__link {
  font-size: 14px; font-weight: 500; color: var(--text-on-cream); text-decoration: none;
  padding: 8px 12px; border-radius: var(--wonk); white-space: nowrap;
  transition: color var(--dur-1), background var(--dur-1);
}
.pfw-topbar__link:hover { color: var(--ink); background: rgba(20, 58, 30, 0.06); }
.pfw-topbar__cta { margin-left: auto; white-space: nowrap; }

/* bottom section rail (phones only) */
.pfw-rail { display: none; }

/* ------------------------------------------------------------ 01 hero: headline left, one scene right */
.pfw-hero {
  position: relative; z-index: 2; isolation: isolate;
  min-height: min(100dvh, 860px);
  display: flex; align-items: center;
  padding: calc(var(--topbar-h) + 40px) 0 64px;
}
.pfw-hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  align-items: center; column-gap: clamp(16px, 3vw, 40px);
}
.pfw-hero__copy { max-width: 560px; }
.em-h1__reo {
  display: block; margin-bottom: 0.35em;
  font-family: var(--font-body); font-weight: 700; text-transform: none;
  font-size: var(--fs-h3); line-height: 1.2; color: var(--ink);
}
.em-h1__main { display: block; }
.pfw-h1 .pfw-h1__mark {
  display: inline;
  background: linear-gradient(transparent 60%, var(--gold) 60%, var(--gold) 90%, transparent 90%);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 0.02em 0 0.07em; margin-left: -0.07em;
}
.pfw-hero__sub {
  font-size: var(--fs-lede); line-height: 1.5; color: var(--text-on-cream);
  margin-top: var(--s-5); max-width: 34ch; text-wrap: pretty;
}
.pfw-hero__ctas { display: flex; flex-wrap: wrap; gap: var(--s-4); margin-top: var(--s-6); }
.pfw-scene {
  position: absolute; z-index: 0; pointer-events: none;
  top: calc(var(--topbar-h) + 8px); bottom: 12px; left: 0; right: 0;
}
.pfw-scene__img { width: 100%; height: 100%; object-fit: contain; object-position: 100% 50%; }
@media (min-width: 1500px) {
  .pfw-scene { left: calc(50% - 760px); right: calc(50% - 760px); }
}
@media (prefers-reduced-motion: no-preference) {
  .js .pfw-scene__img { animation: pfw-scene-in 1100ms var(--ease-out) 120ms both; }
}
@keyframes pfw-scene-in { from { opacity: 0; transform: scale(0.97) translateY(12px); } }

/* ------------------------------------------------------------ cut-outs float, no frames */
.em-cut img { width: 100%; filter: var(--cut-drop); }
.pfw-band--ink .em-cut img, .pfw-band--deep .em-cut img, .pfw-band--teal .em-cut img { filter: var(--cut-drop-dark); }

/* ------------------------------------------------------------ stat cards: plain white on light bands */
.pfw-stat {
  display: flex; flex-direction: column; gap: 6px;
  padding: 22px 24px 20px;
  border-radius: var(--card-radius);
}
.pfw-stat__value {
  font-size: clamp(2rem, 3.3vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; text-wrap: balance; align-self: flex-start;
}
.pfw-stat__label { font-size: var(--fs-small); line-height: 1.45; text-wrap: pretty; }
.pfw-stat--onCream { background: var(--card-white); border: 1px solid var(--card-line); box-shadow: var(--card-shadow); }
.pfw-stat--onCream .pfw-stat__value { color: var(--ink); }
.pfw-stat--onCream .pfw-stat__label { color: var(--text-on-cream); }
.pfw-stat--inline { background: var(--surface-dark); border: 1px solid var(--hairline-dark); }
.pfw-stat--inline .pfw-stat__value { color: var(--gold); }
.pfw-stat--inline .pfw-stat__label { color: var(--text-on-dark); }
@media (hover: hover) and (pointer: fine) {
  .js .pfw-stat--onCream.sr.vis {
    transition: opacity 600ms var(--ease-out), transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
    transition-delay: 0s !important;
  }
  .pfw-stat--onCream:hover { transform: translateY(-6px) !important; box-shadow: var(--card-shadow-hover); }
  .pfw-stat--onCream .pfw-stat__value {
    background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 92% / 0% 0.26em;
    transition: background-size 420ms var(--ease-out);
  }
  .pfw-stat--onCream:hover .pfw-stat__value { background-size: 100% 0.26em; }
}

/* ------------------------------------------------------------ pull line */
.pfw-pullline {
  margin-top: var(--s-7);
  position: relative; padding-top: 1.05em;
  font-size: clamp(1.3rem, 2.2vw, 1.75rem); font-weight: 600; line-height: 1.35;
  color: var(--ink); max-width: 32ch; text-wrap: balance;
}
.pfw-pullline::before {
  content: "\201C"; position: absolute; left: -0.04em; top: -0.22em;
  font-family: var(--font-body); font-size: 3em; font-weight: 800; line-height: 1; color: var(--gold);
  -webkit-text-stroke: 1.5px var(--ink);
}
.pfw-pullline p { display: inline; }
.pfw-pullline__cite { display: inline; font-style: normal; font-size: var(--fs-small); font-weight: 500; color: var(--muted-on-cream); margin-left: 4px; }

/* ------------------------------------------------------------ expanders (PFW "the asks"), used by the six steps */
.pfw-asks {
  --a-fg: var(--ink);
  --a-text: var(--text-on-cream);
  --a-muted: var(--muted-on-cream);
  --a-line: rgba(26, 60, 60, 0.2);
  --a-accent: var(--ink);
  --a-on-accent: var(--gold);
  --a-hover: rgba(20, 58, 30, 0.04);
  --ease-ui: cubic-bezier(0.23, 1, 0.32, 1);
  margin-top: var(--s-5);
  border-top: 1px solid var(--a-line);
  border-bottom: 1px solid var(--a-line);
}
.pfw-band--ink .pfw-asks, .pfw-band--deep .pfw-asks, .pfw-band--teal .pfw-asks {
  --a-fg: var(--cream);
  --a-text: var(--text-on-dark);
  --a-muted: var(--muted-on-dark);
  --a-line: var(--hairline-dark);
  --a-accent: var(--gold);
  --a-on-accent: var(--ink);
  --a-hover: rgba(255, 252, 240, 0.035);
}
.pfw-asks summary {
  display: flex; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 4px 10px 2px;
  list-style: none; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  font-size: 0.95rem; font-weight: 700; line-height: 1.3; color: var(--a-fg);
  border-radius: 4px;
  transition: background-color var(--dur-1) ease;
}
.pfw-asks summary::-webkit-details-marker, .pfw-asks summary::marker { display: none; content: ""; }
.pfw-asks__count {
  min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  display: inline-grid; place-items: center;
  font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--a-muted); border: 1px solid var(--a-line);
}
.pfw-asks__icon {
  position: relative; flex: 0 0 auto; margin-left: auto;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1.5px solid var(--a-accent); color: var(--a-accent);
  transition: transform 220ms var(--ease-ui), background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.pfw-asks__icon::before, .pfw-asks__icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px;
  background: currentColor; border-radius: 1px;
}
.pfw-asks__icon::after { transform: rotate(90deg); }
.pfw-asks[open] .pfw-asks__icon { transform: rotate(45deg); background: var(--a-accent); color: var(--a-on-accent); }
@media (hover: hover) and (pointer: fine) {
  .pfw-asks summary:hover { background: var(--a-hover); }
  .pfw-asks summary:hover .pfw-asks__icon { background: var(--a-accent); color: var(--a-on-accent); }
}
.pfw-asks__head { padding: 16px 2px 4px; font-size: 1rem; font-weight: 700; color: var(--a-fg); }
.pfw-asks--inline { border-bottom: 0; }
.pfw-asks__panel { padding-bottom: 16px; }
.pfw-asks__list { display: flex; flex-direction: column; }
.pfw-ask {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 20px; align-items: baseline;
  padding: 12px 2px; border-top: 1px solid var(--a-line);
}
.pfw-ask__text { font-size: 0.95rem; line-height: 1.6; color: var(--a-text); text-wrap: pretty; }
.pfw-ask__text strong { color: var(--a-fg); font-weight: 700; }
.pfw-ask .pfw-ask__ref { vertical-align: baseline; color: var(--a-muted); }
/* card layout (MarkUp r1 #7 / #14): the open list lays out as a row of white cards */
.pfw-asks--cards .pfw-asks__list {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; padding-top: 8px;
}
.pfw-asks--cards .pfw-ask {
  display: flex; flex-direction: column; gap: 10px;
  padding: 18px 18px 16px; background: var(--card-white); border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.pfw-asks--cards .pfw-ask__text strong { display: block; margin-bottom: 4px; font-size: 1.02rem; line-height: 1.3; }
.pfw-asks--cards .pfw-ask__ref { margin-top: auto; align-self: flex-start; }
@supports selector(::details-content) {
  details.pfw-asks { interpolate-size: allow-keywords; }
  details.pfw-asks::details-content {
    block-size: 0; overflow-y: clip; opacity: 0;
    transition: block-size 180ms var(--ease-ui), opacity 120ms ease, content-visibility 180ms allow-discrete;
  }
  details.pfw-asks[open]::details-content {
    block-size: auto; opacity: 1;
    transition: block-size 280ms var(--ease-ui), opacity 220ms ease 40ms, content-visibility 280ms allow-discrete;
  }
}
@media (prefers-reduced-motion: no-preference) {
  details.pfw-asks--cards[open] .pfw-ask, .pfw-tl-drawer .pfw-ask { animation: pfw-ask-in 360ms var(--ease-out) both; }
  .pfw-asks--cards .pfw-ask:nth-child(2) { animation-delay: 50ms; }
}
@keyframes pfw-ask-in { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) {
  details.pfw-asks::details-content, details.pfw-asks[open]::details-content { transition: none; }
  .pfw-asks__icon { transition: none; }
}

/* ------------------------------------------------------------ quote card (cream on dark) */
.pfw-quote {
  max-width: 880px; margin: var(--s-8) auto 0; text-align: center;
  background: var(--cream); color: var(--teal); border-radius: var(--card-radius);
  padding: clamp(28px, 4vw, 48px) clamp(28px, 5vw, 64px);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}
.pfw-quote blockquote { font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 700; line-height: 1.3; text-wrap: balance; }
.pfw-quote blockquote p::before { content: "\201C"; }
.pfw-quote blockquote p::after { content: "\201D"; }
.pfw-quote__cite { margin-top: 16px; font-size: var(--fs-small); font-weight: 500; color: var(--muted-on-cream); }
.pfw-quote .pfw-ref { color: var(--muted-on-cream); }

/* ------------------------------------------------------------ timeline rail (three stops, cream) */
.pfw-timeline__rail {
  position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px;
  align-items: start;
}
.pfw-timeline__rail::before {
  content: ""; position: absolute; left: 0; right: 0; top: 13px; height: 2px;
  background: linear-gradient(90deg, var(--gold) 0 33%, rgba(26, 60, 60, 0.22) 33% 100%);
}
.pfw-stop { position: relative; padding-top: 48px; }
.pfw-stop__node {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px;
  border: 3px solid var(--ink); background: var(--cream); border-radius: var(--wonk);
}
.pfw-stop:nth-child(even) .pfw-stop__node { border-radius: var(--wonk-alt); }
.pfw-stop--now .pfw-stop__node { background: var(--gold); box-shadow: 0 0 0 6px var(--cream); }
.pfw-stop__title { font-size: 1.35rem; font-weight: 700; line-height: 1.2; color: var(--ink); margin-bottom: 10px; }
.pfw-asks--stop { margin-top: 14px; }
.pfw-asks--stop .pfw-ask__text { font-size: 0.92rem; line-height: 1.55; }
.pfw-tl-drawer { display: none; }
@media (min-width: 1101px) {
  .pfw-tl-drawer.is-open { display: block; margin-top: var(--s-6); padding-top: var(--s-5); border-bottom: 0; }
  .pfw-tl-drawer__title { font-size: 1.15rem; font-weight: 700; color: var(--a-fg); margin-bottom: 6px; }
  .pfw-tl-drawer .pfw-asks__panel { padding-bottom: 0; }
}
@supports (grid-template-rows: subgrid) {
  @media (min-width: 1101px) {
    .pfw-timeline__rail { row-gap: 0; }
    .pfw-stop { display: grid; grid-row: span 4; grid-template-rows: subgrid; align-content: start; }
    .pfw-stop .pfw-asks--stop { align-self: start; }
  }
}

/* ------------------------------------------------------------ cta grid + fake cover */
.pfw-cta__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.pfw-cta .pfw-h2 { font-size: clamp(2.1rem, 4.4vw, 3.5rem); }
.pfw-cta__body { font-size: var(--fs-lede); line-height: 1.5; max-width: 40ch; }
.pfw-cta__visual { position: relative; display: flex; justify-content: flex-end; padding: 24px 0; }
.pfw-cta__art { position: absolute; left: -20%; bottom: -10%; width: 68%; z-index: 2; rotate: -4deg; pointer-events: none; }
.pfw-pdfcard {
  position: relative; z-index: 1; width: min(320px, 100%);
  display: block; text-decoration: none; color: var(--teal);
  background: var(--cream); border: 3px solid var(--teal); border-radius: var(--radius-card);
  padding: 14px 14px 18px; transform: rotate(2deg); box-shadow: var(--shadow-cream);
}
.pfw-pdfcard__fake {
  aspect-ratio: 1 / 1.414; border-radius: 4px 12px 4px 12px; background: var(--ink); color: var(--cream);
  padding: 28px 22px; display: flex; flex-direction: column; gap: 12px; position: relative; overflow: hidden;
}
.pfw-pdfcard__fake::before { content: ""; position: absolute; inset: 0; background-image: var(--grain); }
.pfw-pdfcard__fake b {
  position: relative;
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: var(--track-display);
  font-size: 1.9rem; line-height: 1.02; margin-top: auto; text-wrap: balance;
}
.pfw-pdfcard__meta { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; font-size: var(--fs-small); line-height: 1.35; }

/* ------------------------------------------------------------ sources + footer */
.pfw-sources { padding: var(--s-8) 0 56px; }
.pfw-sources__intro { font-size: var(--fs-small); color: var(--muted-on-dark); margin-bottom: var(--s-5); max-width: 60ch; }
.pfw-sources__more { max-width: none; }
.pfw-sources__title { margin: 0; font-size: 1rem; font-weight: 700; color: var(--cream); }
.pfw-sources__list {
  list-style: decimal; padding: var(--s-5) 0 var(--s-5) 1.4em; columns: 2; column-gap: 56px;
  font-size: 0.82rem; line-height: 1.55; color: var(--muted-on-dark);
}
.pfw-sources__list li { break-inside: avoid; margin-bottom: 8px; padding-left: 4px; }
.pfw-sources__list li::marker { color: var(--mint); font-weight: 700; }
.pfw-foot {
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--hairline-dark);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: var(--fs-small); color: var(--muted-on-dark);
}
.pfw-foot__top { color: var(--cream); font-weight: 600; text-decoration: none; }
.pfw-foot__top:hover { color: var(--gold); }

/* ------------------------------------------------------------ scroll reveal (house) */
.js .sr {
  opacity: 0; transform: translateY(26px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.js .sr.vis { opacity: 1; transform: none; }

/* ==================================================================== 02 He marae, he manaaki */
.em-manaaki__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; align-items: start; }
.em-manaaki__copy { grid-column: 1 / span 7; }
.em-manaaki__rail { grid-column: 9 / span 4; display: flex; flex-direction: column; gap: var(--s-4); }
.em-manaaki__art--wide { margin: -40px -24px -6px 4%; }
.js .em-manaaki__art--wide.sr.vis, .em-manaaki__art--wide { transform: rotate(-2deg); }
.em-manaaki__art--phone { display: none; }
.em-manaaki__closer { margin-top: var(--s-6); font-size: var(--fs-lede); line-height: 1.5; color: var(--ink); font-weight: 500; max-width: 46ch; text-wrap: pretty; }

/* hazard waffle: if Aotearoa had 100 marae (decorative; the cards carry the meaning) */
.em-waffle { margin-top: var(--s-7); }
.em-waffle__title { font-weight: 700; font-size: 1rem; color: var(--ink); margin-bottom: 14px; }
.em-waffle__body { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.em-waffle__grid { display: grid; grid-template-columns: repeat(10, 14px); gap: 6px; }
.em-waffle__dot {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(26, 60, 60, 0.45); background: transparent;
}
.em-waffle__dot--exposed { background: var(--ink); border-color: var(--ink); }
.em-waffle__dot--flood { box-shadow: 0 0 0 2.5px var(--gold); }
.em-waffle__labels { display: flex; flex-direction: column; gap: 14px; max-width: 220px; }
.em-waffle__label { display: grid; grid-template-columns: 18px 1fr; gap: 10px; align-items: start; font-size: var(--fs-small); line-height: 1.4; color: var(--text-on-cream); }
.em-waffle__label i { width: 14px; height: 14px; border-radius: 50%; margin-top: 2px; background: var(--ink); }
.em-waffle__label--flood i { box-shadow: 0 0 0 2.5px var(--gold); }

/* ==================================================================== 03 The load spike (deep) */
.em-spike { margin-top: var(--s-4); }
.em-spike__stage { position: relative; }
.em-spike__plot { position: relative; }
.em-spike__plot--narrow, .em-spike__caption { display: none; }
.em-spike__svg { width: 100%; height: auto; overflow: visible; font-family: var(--font-body); }
.em-spike__svg text { fill: var(--muted-on-dark); }
.em-spike__svg--wide text { font-size: 13px; }
.em-spike__svg--narrow text { font-size: 11px; }
.em-spike__floor { stroke: rgba(194, 208, 196, 0.45); stroke-width: 1.5; }
.em-spike__ylabel { color: var(--muted-on-dark); }
.em-spike__ylabel text { font-weight: 500; }
.em-spike__demand { stroke: var(--mint); stroke-opacity: 0.7; stroke-width: 1.5; stroke-dasharray: 7 6; }
.em-spike__svg .em-spike__demand-label { fill: var(--mint); font-weight: 600; }
.em-spike__peak { fill: var(--spike-peak); }
.em-spike__hatch { fill: var(--gold); opacity: 0.35; }
.em-spike__area { fill: rgba(255, 252, 240, 0.06); }
.em-spike__line {
  fill: none; stroke: var(--spike-line); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.em-spike__svg .em-spike__tag--tangihanga { fill: var(--cream); font-weight: 600; }
.em-spike__svg .em-spike__tag--hui { fill: var(--muted-on-dark); }
.em-spike__dot { fill: var(--gold); }
/* a deep halo keeps tags and the demand label legible where they cross the hatched peak band */
.em-spike__svg .em-spike__tag, .em-spike__svg .em-spike__demand-label {
  paint-order: stroke; stroke: var(--ink-deep); stroke-width: 4px; stroke-linejoin: round;
}
/* base fill on the group, lit fill on the <use>: its clone inherits, so no class fill on the path */
.em-spike__fixed { fill: rgba(194, 208, 196, 0.26); }
.em-spike__ticks-lit { fill: var(--spike-tick); }
.em-spike__svg .em-spike__fixed-label { fill: var(--text-on-dark); font-weight: 600; }
.em-spike__svg .em-spike__day { fill: var(--gold); font-weight: 700; font-variant-numeric: tabular-nums; }
.em-spike__leader { fill: none; stroke: var(--cream); stroke-opacity: 0.6; stroke-width: 1; vector-effect: non-scaling-stroke; }
.em-spike__head { display: none; }   /* scene.js draws its own playhead */

/* annotation cards over the wide chart (percent of the 1200 x 460 plot) */
.em-spike__note {
  position: absolute; z-index: 2;
  max-width: 240px; padding: 10px 14px 11px;
  background: var(--cream); color: var(--ink); border-radius: 12px;
  font-size: var(--fs-small); line-height: 1.4; font-weight: 500;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  text-wrap: pretty;
}
.em-spike__note .pfw-ref { color: var(--muted-on-cream); }
.em-spike__note--quiet { left: 5.5%; top: 9%; width: 17%; }   /* reviewer: was 12%, grazed the Feb Hui tag in seven-day */
.em-spike__note--spike { left: 27.5%; top: 8%; width: 20%; }  /* reviewer: was 26%, covered the March Tangihanga tag */
.em-spike__note--peak  { left: 56.5%; top: 11%; width: 20%; }  /* reviewer: was 55%, its left edge covered the July Tangihanga tag */
/* reviewer: between 768 and 1180 the quiet and peak cards wrapped to 5 lines and covered the Feb "Hui" tag
   and the "Peak demand" label (static / reduced-motion view). Wider cards wrap shorter; edges stay clear of the spikes. */
@media (min-width: 768px) and (max-width: 1180px) {
  .em-spike__note { padding: 8px 11px 9px; font-size: 0.8125rem; line-height: 1.35; max-width: none; }
  .em-spike__note--quiet { left: 3%; width: 19.5%; }
  .em-spike__note--spike { left: 27%; width: 22%; }
  .em-spike__note--peak  { left: 56.5%; width: 23%; }
}
/* reviewer: from 768 to 1023 the plot is too narrow for overlay cards (they crossed the Feb spike and hid
   "Peak demand"), so the three notes sit in a row under the chart; scene.js still fades each one in place */
@media (min-width: 768px) and (max-width: 1023px) {
  .em-spike__plot--wide { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: start; }
  .em-spike__plot--wide > svg { grid-column: 1 / -1; }
  .em-spike__plot--wide .em-spike__note { position: static; width: auto; max-width: none; box-shadow: none; }
  .em-spike__plot--wide .em-spike__leader { display: none; }
}

.em-spike__closer {
  margin: var(--s-6) auto 0; max-width: 40ch; text-align: center; text-wrap: balance;
  font-size: clamp(1.2rem, 2vw, 1.55rem); font-weight: 600; line-height: 1.4; color: var(--cream);
}
.em-spike__controls { display: flex; flex-direction: column; align-items: center; margin-top: var(--s-5); }
.em-spike__toggle {
  display: inline-flex; padding: 4px; gap: 4px;
  border: 1.5px solid rgba(255, 252, 240, 0.55); border-radius: 999px;
}
html:not(.js) .em-spike__toggle { display: none; }
.em-spike__toggle button {
  min-height: 40px; padding: 8px 18px; border: 0; border-radius: 999px;
  background: transparent; color: var(--cream); font-size: 14px; font-weight: 600;
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease;
}
.em-spike__toggle button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
@media (hover: hover) { .em-spike__toggle button[aria-pressed="false"]:hover { background: rgba(255, 252, 240, 0.08); } }
.em-spike__fineprint {
  margin: var(--s-5) auto 0; max-width: 70ch; text-align: center;
  font-size: var(--fs-small); line-height: 1.5; color: var(--muted-on-dark);
}

/* ------------------------------------------------------------ four mismatch cards */
.em-mismatch { position: relative; margin-top: var(--s-8); }
.em-mismatch__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.em-mismatch__card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px 26px 22px; border-radius: var(--card-radius);
  background: var(--cream); color: var(--teal);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}
.em-mismatch__card:last-child { padding-right: 150px; }
.em-mismatch__fig {
  font-size: calc(var(--fs-stat) * 0.7); font-weight: 800; line-height: 1; letter-spacing: -0.02em;
  color: var(--ink); font-variant-numeric: tabular-nums;
}
.em-mismatch__title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; color: var(--ink); text-wrap: balance; }
.em-mismatch__text { font-size: 0.98rem; line-height: 1.55; }
.em-mismatch__card .pfw-ref { color: var(--muted-on-cream); }
.em-mismatch__art {
  position: absolute; right: -10px; bottom: -36px; width: 140px; z-index: 2; pointer-events: none;
}
.js .em-mismatch__art.sr.vis, .em-mismatch__art { transform: rotate(3deg); }
.em-fifth__stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 820px; margin: var(--s-8) auto 0; }

/* ==================================================================== 04 Energy from your own whenua */
.em-sides { display: grid; grid-template-columns: 1fr 1fr; }
.em-sides__col { padding: 4px clamp(20px, 4vw, 48px); }
.em-sides__col--away { padding-left: 0; border-right: 1px solid var(--hairline-cream); }
.em-sides__col--home { padding-right: 0; }
.em-sides__art { width: min(300px, 80%); margin-bottom: var(--s-4); }
.js .em-sides__art, .em-sides__art { transform: rotate(-2deg); }
.em-sides__art.em-sides__art--panel { width: 150px; transform: rotate(3deg); }
.em-sides__title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; color: var(--ink); margin-bottom: var(--s-4); }
.em-sides__fig { display: flex; flex-direction: column; gap: 4px; margin-bottom: var(--s-4); }
.em-sides__fig b {
  font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; line-height: 1; letter-spacing: -0.02em; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.em-sides__fig span { font-size: var(--fs-small); line-height: 1.45; max-width: 40ch; }
.em-sides__line { margin-top: var(--s-5); font-size: 1rem; line-height: 1.55; max-width: 46ch; }

.em-costbars { margin: 0; }
.em-costbars__chart { display: flex; flex-direction: column; gap: 22px; }
.em-costbars__label { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; font-size: 0.98rem; line-height: 1.3; color: var(--text-on-cream); margin-bottom: 8px; }
.em-costbars__label b { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.em-costbars__track { position: relative; height: 30px; }
.em-costbars__fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--hi) * 100%);
  transform-origin: left center;
}
.em-costbars__solid, .em-costbars__range {
  position: absolute; top: 0; bottom: 0;
  border: 2px solid var(--ink);
}
.em-costbars__solid { left: 0; width: calc(var(--lo) / var(--hi) * 100%); border-radius: 4px 0 0 4px; border-right-width: 0; }
.em-costbars__range { left: calc(var(--lo) / var(--hi) * 100%); right: 0; border-radius: 0 10px 10px 0; }
.em-costbars__row--grid .em-costbars__solid { background: var(--grid-blue); }
.em-costbars__row--grid .em-costbars__range { background: repeating-linear-gradient(-45deg, var(--grid-blue) 0 4px, rgba(124, 150, 193, 0.25) 4px 9px); }
.em-costbars__row--solar .em-costbars__solid { background: var(--gold); }
.em-costbars__row--solar .em-costbars__range { background: repeating-linear-gradient(-45deg, var(--gold) 0 4px, rgba(245, 183, 49, 0.25) 4px 9px); }
.em-costbars__caption { margin-top: var(--s-5); font-size: var(--fs-small); line-height: 1.5; color: var(--muted-on-cream); max-width: 48ch; }
.em-whenua__eff {
  margin: var(--s-8) auto 0; max-width: 44ch; text-align: center; text-wrap: balance;
  font-size: clamp(1.2rem, 2vw, 1.5rem); font-weight: 600; line-height: 1.4; color: var(--ink);
}

/* ==================================================================== 05 The Electric Marae diagram */
.em-diagram__stage {
  position: relative; aspect-ratio: 16 / 10; width: 100%;
  margin-top: calc(var(--s-5) * -1);
}
.em-diagram__ground, .em-diagram__lines {
  position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none;
}
.em-diagram__horizon { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.em-diagram__grass { fill: none; stroke: #7fa36f; stroke-width: 2.5; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.em-diagram__gravel { fill: none; stroke: var(--ink); stroke-width: 1.5; stroke-dasharray: 6 7; vector-effect: non-scaling-stroke; }
.em-diagram__cable path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.em-diagram__share path { fill: none; stroke: #d99a14; stroke-width: 2.5; stroke-dasharray: 4 6; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.em-diagram__leader path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.em-diagram__ground { z-index: 0; }
.em-diagram__share { z-index: 2; }
.em-diagram__cable { z-index: 2; }
.em-diagram__leader { z-index: 5; }

.em-diagram__piece {
  position: absolute; left: var(--l); bottom: var(--b); width: var(--w); z-index: var(--z, 3);
  transition: transform 200ms var(--ease-out), opacity 200ms ease, filter 200ms ease;
  pointer-events: none;
}
.em-diagram__piece img { width: 100%; filter: var(--cut-drop); transition: filter 200ms ease; }
.em-diagram__piece[data-piece="papakainga"]   { --l: 2%;   --b: 30%; --w: 18%; --z: 1; }
.em-diagram__piece[data-piece="kohanga"]      { --l: 70%;  --b: 33%; --w: 16%; --z: 1; }
.em-diagram__piece[data-piece="power-pole"]   { --l: 18%;  --b: 22%; --w: 12%; --z: 2; }
.em-diagram__piece[data-piece="wharekai"]     { --l: 29%;  --b: 16%; --w: 42%; --z: 3; }
.em-diagram__piece[data-piece="battery"]      { --l: 66%;  --b: 18%; --w: 7%;  --z: 4; }
.em-diagram__piece[data-piece="hwhp"]         { --l: 72.5%; --b: 18%; --w: 6%; --z: 4; }
.em-diagram__piece[data-piece="ev-van"]       { --l: 70%;  --b: 2%;  --w: 17%; --z: 5; }
.em-diagram__piece[data-piece="fast-charger"] { --l: 86.5%; --b: 9%; --w: 13%; --z: 5; }
.em-diagram__piece[data-piece="atv"]          { --l: 3%;   --b: 4%;  --w: 15%; --z: 5; }
.em-diagram__piece[data-piece="mower-tools"]  { --l: 18%;  --b: 2%;  --w: 12%; --z: 5; }
.em-diagram__inset { --l: 40%; --b: 64%; --w: 17%; --z: 6; aspect-ratio: 1; }
.em-diagram__ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.em-diagram__ring path { fill: var(--cream); stroke: var(--ink); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.em-diagram__inset picture { position: absolute; left: 10%; top: 10%; width: 80%; }
.em-diagram__inset img { filter: none; }

/* pins: numbered gold buttons, positioned in the same percent space */
.em-pin {
  position: absolute; left: var(--px); top: var(--py); z-index: 8;
  width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--ink); color: var(--ink);
  font-weight: 800; font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums;
  box-shadow: 0 4px 0 rgba(20, 58, 30, 0.35);
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease, background-color 200ms ease;
}
.em-pin:hover, .em-pin.is-active { transform: scale(1.12); box-shadow: 0 6px 0 rgba(20, 58, 30, 0.45); }
.em-pin.is-active { background: var(--ink); color: var(--gold); }
.em-pin:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
.em-pin[data-pin="1"] { --px: 52%;   --py: 55%; }
.em-pin[data-pin="2"] { --px: 69.5%; --py: 74%; }
.em-pin[data-pin="3"] { --px: 32%;   --py: 79%; }
.em-pin[data-pin="4"] { --px: 75.5%; --py: 74%; }
.em-pin[data-pin="5"] { --px: 56%;   --py: 11%; }
.em-pin[data-pin="6"] { --px: 79%;   --py: 88%; }
.em-pin[data-pin="7"] { --px: 16.5%; --py: 89%; }
.em-pin[data-pin="8"] { --px: 23%;   --py: 51%; }
.em-pin[data-pin="9"] { --px: 26%;   --py: 43%; }

/* hover / focus linking (app.js): the piece rises, the rest dim, the legend item lights */
.em-diagram.is-focus .em-diagram__piece:not(.is-active) { opacity: 0.55; }
.em-diagram__piece.is-active { transform: translateY(-6px); }
.em-diagram__piece.is-active img { filter: drop-shadow(0 20px 18px rgba(20, 58, 30, 0.28)); }

.em-diagram__legend {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: var(--s-6);
}
.em-diagram__group {
  padding: 20px 20px 16px; background: var(--card-white); border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.em-diagram__gtitle { font-size: 1.05rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.em-diagram__items { display: flex; flex-direction: column; }
.em-diagram__item {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); column-gap: 12px; align-items: start;
  padding: 10px 0; border-top: 1px solid var(--hairline-cream); scroll-margin-top: calc(var(--topbar-h) + 24px);
}
.em-diagram__item:first-child { border-top: 0; padding-top: 2px; }
.em-diagram__chip {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%;
  background: var(--gold); border: 2px solid var(--ink); color: var(--ink);
  font-weight: 800; font-size: 13px; line-height: 1; font-variant-numeric: tabular-nums;
}
.em-diagram__ilabel { display: inline; font-weight: 700; font-size: 0.98rem; line-height: 1.3; color: var(--ink); }
.em-diagram__ilabel {
  background: linear-gradient(var(--gold), var(--gold)) no-repeat 0 92% / 0% 0.3em;
  transition: background-size 320ms var(--ease-out);
}
.em-diagram__item.is-active .em-diagram__ilabel { background-size: 100% 0.3em; }
.em-diagram__itext { line-height: 1.3; }
.em-diagram__idesc { margin-top: 4px; font-size: 0.88rem; line-height: 1.5; color: var(--text-on-cream); }
.em-diagram__thumb { display: none; }
.em-diagram__close { margin-top: var(--s-7); text-align: center; }
.em-diagram__close a {
  font-size: var(--fs-lede); font-weight: 700; color: var(--ink);
  text-decoration: underline; text-decoration-color: var(--gold); text-decoration-thickness: 4px; text-underline-offset: 6px;
}
.em-diagram__close a:hover { text-decoration-thickness: 6px; }

/* ==================================================================== 06 Find your marae */
.em-profiles__note { margin-top: var(--s-4); font-size: var(--fs-small); color: var(--muted-on-cream); max-width: 60ch; }
.em-profiles__layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; align-items: start; }
html:not(.js) .em-profiles__layout { grid-template-columns: minmax(0, 1fr); }
html:not(.js) .em-picker { display: none; }

.em-picker {
  position: sticky; top: calc(var(--topbar-h) + 24px);
  display: flex; flex-direction: column; gap: 18px;
  padding: 24px 22px 22px; background: var(--card-white); border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.em-picker__title { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 1.5rem; line-height: 1.05; color: var(--ink); }
.em-picker__q legend { font-weight: 600; font-size: 0.98rem; line-height: 1.4; color: var(--ink); margin-bottom: 10px; }
.em-picker__q legend .pfw-ref { vertical-align: baseline; }
.em-picker__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.em-picker__opt { position: relative; display: inline-flex; cursor: pointer; }
.em-picker__opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.em-picker__opt span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px;
  border: 1.5px solid rgba(26, 60, 60, 0.35); border-radius: 999px; background: var(--cream);
  font-size: 0.9rem; font-weight: 500; line-height: 1.3; color: var(--ink);
  transition: background-color var(--dur-1) ease, color var(--dur-1) ease, border-color var(--dur-1) ease;
}
.em-picker__opt:hover span { border-color: var(--ink); }
.em-picker__opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.em-picker__opt input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.em-picker__result { font-weight: 600; font-size: 0.98rem; line-height: 1.45; color: var(--ink); padding-top: 14px; border-top: 1px solid var(--hairline-cream); }
.em-picker__reset {
  align-self: flex-start; min-height: 44px; padding: 0; border: 0; background: none;
  font-weight: 700; font-size: 0.95rem; color: var(--teal);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}

.em-profiles__gridwrap { position: relative; padding-left: 34px; }
.em-profiles__axis {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--fs-small); font-weight: 600; color: var(--muted-on-cream);
}
.em-profiles__axis .em-arrow { width: 40px; height: 18px; color: var(--ink); }
.em-profiles__axis--use { justify-content: flex-end; margin-bottom: 10px; }
.em-profiles__axis--size {
  position: absolute; left: 0; top: 50%; transform-origin: 0 0;
  transform: rotate(90deg) translate(-50%, -100%); white-space: nowrap;
}
.em-profiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.em-profile {
  position: relative; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 14px; background: var(--card-white); border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow); color: var(--text-on-cream);
  transition: background-color 250ms ease, color 250ms ease, opacity 250ms ease, transform 250ms var(--ease-out), box-shadow 250ms ease;
}
.js .em-profile.sr.vis { transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out), background-color 250ms ease, box-shadow 250ms ease; }
.em-profile:focus { outline: none; }
.em-profile__glyph { position: relative; height: 84px; margin-bottom: 6px; }
.em-profile__gpic { position: absolute; bottom: 0; }
.em-profile__gpic img { width: 100%; filter: drop-shadow(0 6px 6px rgba(20, 58, 30, 0.14)); }
.em-profile__glyph--smaller .em-profile__gpic--0 { left: 0; width: 46%; }
.em-profile__glyph--larger .em-profile__gpic--0 { left: 0; width: 64%; z-index: 1; }
.em-profile__glyph--larger .em-profile__gpic--1 { left: 50%; width: 42%; bottom: 14px; }
.em-profile__days { display: flex; gap: 5px; }
.em-profile__days i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid rgba(26, 60, 60, 0.5); }
.em-profile__days i.is-on { background: var(--ink); border-color: var(--ink); }
.em-profile__dayslabel { font-size: var(--fs-micro); color: var(--muted-on-cream); }
.em-profile__name { margin-top: 6px; font-size: 1.2rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.em-profile__model { font-size: var(--fs-micro); font-weight: 500; color: var(--muted-on-cream); }
.em-profile__desc { font-size: 0.9rem; line-height: 1.5; margin-top: 4px; }
.em-profile__facts { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.em-profile__fact { font-size: 0.82rem; line-height: 1.4; }
.em-profile__fact dt { font-weight: 700; color: var(--ink); }
.em-profile__fact dd { color: var(--text-on-cream); }
.em-profile__fact .pfw-ref { vertical-align: baseline; }
.em-profile__note { margin-top: 6px; font-size: 0.85rem; line-height: 1.45; font-weight: 500; }
.em-profile__soon {
  display: flex; gap: 8px; align-items: flex-start; margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--hairline-cream);
  font-size: 0.8rem; line-height: 1.4; color: var(--muted-on-cream);
}
.em-profile__facts { margin-bottom: 12px; }
.em-profile .em-profile__soon { margin-top: auto; }
.em-clock { flex: none; width: 16px; height: 16px; margin-top: 1px; opacity: 0.6; }
.em-profile__chip {
  position: absolute; top: 14px; right: 14px; padding: 3px 10px; border-radius: 999px;
  background: var(--gold); color: var(--ink); font-size: 0.78rem; font-weight: 800;
}
/* the match state (PFW open pillar card, MarkUp #26) */
.em-profile.is-match {
  background: var(--match-bg); color: var(--text-on-dark); border-color: var(--match-bg);
  box-shadow: 0 6px 0 var(--gold); transform: translateY(-4px);
}
.js .em-profile.sr.vis.is-match { transform: translateY(-4px); }
.em-profile.is-match .em-profile__name { color: var(--cream); }
.em-profile.is-match .em-profile__model, .em-profile.is-match .em-profile__dayslabel,
.em-profile.is-match .em-profile__soon, .em-profile.is-match .pfw-ref { color: var(--muted-on-dark); }
.em-profile.is-match .em-profile__fact dt { color: var(--cream); }
.em-profile.is-match .em-profile__fact dd { color: var(--text-on-dark); }
.em-profile.is-match .em-profile__days i { border-color: rgba(255, 252, 240, 0.6); }
.em-profile.is-match .em-profile__days i.is-on { background: var(--gold); border-color: var(--gold); }
.em-profile.is-match .em-profile__soon { border-top-color: var(--hairline-dark); }
.em-profile.is-dim { opacity: 0.6; }
.js .em-profile.sr.vis.is-dim { opacity: 0.6; }

/* ==================================================================== 07 What it frees up (ink) */
.em-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 32px; }
.em-tile { display: flex; flex-direction: column; gap: 16px; }
.em-tile--wide { grid-column: span 2; flex-direction: row; align-items: center; gap: 32px; }
.em-tiles .em-tile:last-child { grid-column: span 2; flex-direction: row; align-items: center; gap: 32px; }
.em-tile__art { flex: none; width: 100%; max-width: 280px; }
.em-tile--wide .em-tile__art, .em-tiles .em-tile:last-child .em-tile__art { width: 46%; max-width: 320px; }
.em-tile__art img { max-height: 200px; width: auto; max-width: 100%; aspect-ratio: var(--ar); transform: rotate(var(--tilt, 0deg)); }
.em-tile__title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; color: var(--cream); margin-bottom: 8px; text-wrap: balance; }
.em-tile__body { font-size: 0.98rem; line-height: 1.55; color: var(--text-on-dark); max-width: 44ch; }

/* ==================================================================== 08 Your next decision */
.em-swaps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.em-swap {
  display: flex; flex-direction: column; gap: 8px;
  padding: 18px 18px 18px; background: var(--card-white); border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.em-swap__pair { display: grid; grid-template-columns: 30% 22% minmax(0, 1fr); align-items: end; gap: 0 6px; height: 132px; margin-bottom: 8px; }
.em-swap__old img { max-height: 84px; width: auto; max-width: 100%; aspect-ratio: var(--ar); filter: grayscale(0.85) opacity(0.7); }
.em-swap__arrow { align-self: center; color: var(--ink); }
.em-swap__arrow .em-arrow { width: 100%; height: auto; }
.em-swap__new img { max-height: 132px; width: auto; max-width: 100%; aspect-ratio: var(--ar); margin-left: auto; filter: var(--cut-drop); }
.em-swap__title { font-size: 1.1rem; font-weight: 700; line-height: 1.25; color: var(--ink); }
.em-swap__text { font-size: 0.9rem; line-height: 1.5; }
.em-next__steps-intro { margin: var(--s-9) 0 var(--s-6); font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; color: var(--ink); max-width: 40ch; }
.em-stop__steps { display: flex; flex-direction: column; gap: 8px; }
.em-stop__steps li { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: baseline; font-weight: 600; line-height: 1.35; color: var(--ink); }
.em-stop__steps b {
  width: 26px; height: 26px; display: inline-grid; place-items: center; border-radius: 50%;
  background: var(--ink); color: var(--cream); font-size: 13px; font-weight: 800; transform: translateY(-2px);
}

/* ==================================================================== 09 The asks (teal) */
.em-askcards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.em-askcard {
  display: flex; flex-direction: column; padding: 22px 20px 18px;
  background: var(--cream); color: var(--teal); border-radius: var(--card-radius);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.3);
}
@media (hover: hover) and (pointer: fine) {
  .js .em-askcard.sr.vis { transition: opacity 600ms var(--ease-out), transform 280ms var(--ease-out); transition-delay: 0s !important; }
  .em-askcard:hover { transform: translateY(-4px); }
}
.em-askcard__who { font-size: 1.3rem; font-weight: 700; line-height: 1.2; color: var(--ink); }
.em-askcard__deciders { margin-top: 6px; font-size: 0.8rem; line-height: 1.45; color: var(--muted-on-cream); }
.em-askcard__list { margin-top: 12px; display: flex; flex-direction: column; }
.em-ask { padding: 12px 0; border-top: 1px solid var(--hairline-cream); font-size: 0.88rem; line-height: 1.5; }
.em-ask strong { display: block; color: var(--ink); font-size: 0.98rem; line-height: 1.3; margin-bottom: 3px; }
.em-askcard .pfw-ref { color: var(--muted-on-cream); }

/* ==================================================================== 10 Signup + share */
.em-signup__card {
  margin-top: var(--s-6); max-width: 520px; padding: 24px 24px 20px;
  background: var(--card-white); border: 1px solid var(--card-line);
  border-radius: var(--card-radius); box-shadow: var(--card-shadow);
}
.em-signup__form { display: flex; flex-direction: column; gap: 10px; }
.em-signup__intro { font-size: 0.98rem; line-height: 1.5; margin-bottom: 4px; }
.em-signup__label { font-weight: 700; font-size: 0.95rem; color: var(--ink); }
.em-signup__input {
  width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--ink);
  background: #fff; border: 1.5px solid rgba(26, 60, 60, 0.35); border-radius: 12px;
}
.em-signup__input::placeholder { color: rgba(79, 110, 108, 0.75); }
.em-signup__input:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; }
.em-signup__input[aria-invalid="true"] { border-color: var(--petrol-dark); }
.em-signup__check { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; font-size: 0.92rem; line-height: 1.45; cursor: pointer; padding: 4px 0; }
.em-signup__check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--ink); }
.em-signup__check input[aria-invalid="true"] { outline: 2px solid var(--petrol-dark); outline-offset: 2px; }
.em-signup__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.em-signup__error { font-size: 0.92rem; font-weight: 600; color: var(--petrol-dark); }
.em-signup__error:empty { display: none; }
.em-signup__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; margin-top: 4px; }
.em-signup__status { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.em-signup__status:empty { display: none; }
.em-signup__thanks { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.em-signup__thanks[hidden] { display: none; }
.em-signup__tick { width: 48px; height: 48px; }
.em-signup__thanks-title { font-size: 1.25rem; font-weight: 700; line-height: 1.3; color: var(--ink); outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .em-signup__thanks:not([hidden]) .em-signup__tick path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: em-tick 400ms var(--ease-out) 120ms forwards; }
}
@keyframes em-tick { to { stroke-dashoffset: 0; } }
.em-signup__done { margin-top: 8px; }

.em-signup__sharewrap { margin-top: var(--s-6); }
.em-share { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; }
.em-share__label { flex-basis: 100%; font-size: 1rem; font-weight: 700; color: var(--ink); }
.em-share__native[hidden], .em-share__row[hidden] { display: none; }
.em-share__row { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.em-share__link {
  display: inline-flex; align-items: center; min-height: 44px;
  background: none; border: 0; padding: 0 2px; font-weight: 700; font-size: 15px; color: var(--teal);
  text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px;
}
.em-share__link:hover { text-decoration-thickness: 3px; }
.em-signup__thanks .em-share { margin-top: 4px; }

.em-signup-band .pfw-cta__art { left: -26%; bottom: -4%; width: 50%; }
.em-signup-band .pfw-cta__art img { filter: var(--cut-drop); }
.em-cover .pfw-pdfcard__meta b { font-weight: 700; }

/* dialog (PFW download panel, reused for the signup) */
.pfw-dl {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto;
  margin: auto; padding: 0; border: 0; border-radius: var(--card-radius);
  background: var(--cream); color: var(--text-on-cream);
  box-shadow: 0 24px 60px rgba(6, 24, 11, 0.4);
}
.pfw-dl::backdrop { background: rgba(20, 58, 30, 0.55); }
.pfw-dl[open] { animation: pfw-dl-in 260ms var(--ease-out); }
.pfw-dl[open]::backdrop { animation: pfw-dl-fade 260ms ease; }
@keyframes pfw-dl-in { from { opacity: 0; transform: translateY(12px) scale(0.98); } }
@keyframes pfw-dl-fade { from { opacity: 0; } }
.em-dialog .em-signup { position: relative; padding: 32px 28px 26px; }
.pfw-dl__close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: transparent; color: var(--ink); font-size: 26px; line-height: 1;
}
.pfw-dl__close:hover { background: rgba(20, 58, 30, 0.07); }
.pfw-dl__title {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  font-size: clamp(1.5rem, 5vw, 1.9rem); line-height: 1.05; color: var(--ink); padding-right: 44px;
}
@media (prefers-reduced-motion: reduce) {
  .pfw-dl[open], .pfw-dl[open]::backdrop { animation: none; }
}

/* ==================================================================== 11 Steering Rōpū */
.em-ropu { padding: calc(var(--pad-section) * 0.6) 0; }
.em-ropu__inner { max-width: 820px; text-align: center; }
.em-ropu__title { font-size: var(--fs-h3); font-weight: 700; line-height: 1.25; color: var(--ink); margin-bottom: var(--s-4); }
.em-ropu__body { font-size: 0.98rem; line-height: 1.6; max-width: 66ch; margin: 0 auto; }
.em-ropu__foreword { margin: var(--s-6) auto 0; max-width: 60ch; }
.em-ropu__foreword blockquote { font-size: 1.05rem; font-weight: 500; line-height: 1.55; color: var(--ink); }
.em-ropu__foreword blockquote p::before { content: "\201C"; }
.em-ropu__foreword blockquote p::after { content: "\201D"; }
.em-ropu__foreword figcaption { margin-top: 10px; font-size: var(--fs-small); color: var(--muted-on-cream); }
.em-ropu__foreword figcaption b { color: var(--ink); }
.em-ropu__names { margin-top: var(--s-6); }
.em-ropu__label { font-size: 0.95rem; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.em-ropu__label .pfw-ref { vertical-align: baseline; }
.em-ropu__list { columns: 2; column-gap: 40px; max-width: 460px; margin: 0 auto; font-size: 0.92rem; line-height: 1.8; }
.em-ropu__draft {
  margin: var(--s-6) auto 0; max-width: 60ch; padding: 14px 18px; border-radius: 12px;
  background: var(--paper); font-size: var(--fs-small); line-height: 1.5; color: var(--text-on-cream);
}

/* ==================================================================== small shared glyphs */
.em-arrow { display: inline-block; vertical-align: middle; }

/* ==================================================================== responsive */
@media (max-width: 1180px) {
  .pfw-topbar__link.is-minor { display: none; }
}
@media (max-width: 1100px) {
  .em-askcards, .em-swaps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-diagram__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-profiles__layout { grid-template-columns: minmax(0, 1fr); }
  .em-picker { position: static; }
  .em-profiles__gridwrap { padding-left: 0; }
  .em-profiles__axis { display: none; }
  .em-profiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .em-tile--wide, .em-tiles .em-tile:last-child { grid-column: span 2; }
}
@media (max-width: 1023px) {
  .pfw-topbar__nav { display: none; }
}
@media (max-width: 900px) {
  .em-manaaki__copy, .em-manaaki__rail { grid-column: 1 / -1; }
  .em-manaaki__rail { margin-top: var(--s-7); }
  .em-manaaki__art--wide { display: none; }
  .em-manaaki__art--phone { display: block; max-width: 320px; margin: var(--s-6) auto 0; }
  .em-mismatch__card:last-child { padding-right: 26px; }
  .em-mismatch__art { position: relative; right: auto; bottom: auto; width: 150px; margin: 0 auto var(--s-4); }
}
@media (max-width: 767px) {
  :root { --topbar-h: 56px; --pad-section: 56px; }
  .pfw-topbar__brand { font-size: 15px; }
  body { padding-bottom: calc(56px + env(safe-area-inset-bottom)); }
  .pfw-rail {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-rail);
    background: rgba(255, 252, 240, 0.97); border-top: 1px solid var(--hairline-cream);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .pfw-rail__inner {
    display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px var(--gutter);
    scroll-snap-type: x proximity;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
            mask-image: linear-gradient(90deg, #000 calc(100% - 28px), transparent);
  }
  .pfw-rail__inner::-webkit-scrollbar { display: none; }
  .pfw-rail__chip {
    flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 44px; padding: 8px 13px;
    font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none; scroll-snap-align: center;
    color: var(--text-on-cream); border: 1.5px solid rgba(26, 60, 60, 0.28); border-radius: var(--wonk);
  }
  .pfw-rail__chip.is-here { background: var(--gold); color: var(--ink); border-color: var(--ink); }
  /* the rail steps aside while the spike's toggle and Play again sit low on screen (app.js) */
  .pfw-rail { transition: transform 260ms var(--ease-out); }
  .is-at-spike-controls .pfw-rail:not(:focus-within) { transform: translateY(calc(100% + 2px)); }

  .pfw-head { margin-bottom: var(--s-6); }
  .pfw-h2 { margin-bottom: var(--s-4); }

  /* hero: copy first, then the 4:5 scene pulled up under it (its top is calm) */
  .pfw-hero { --fs-hero: clamp(2.6rem, 12.5vw, 3.6rem); min-height: 0; flex-direction: column; align-items: stretch; padding: calc(var(--topbar-h) + 28px) 0 40px; }
  .pfw-hero__inner { grid-template-columns: minmax(0, 1fr); order: 1; }
  .pfw-hero__ctas { flex-direction: column; align-items: stretch; }
  .pfw-scene { position: relative; order: 2; top: auto; bottom: auto; width: 100%; margin: -34vw 0 -8px; }
  .pfw-scene__img { height: auto; aspect-ratio: 4 / 5; }

  .em-waffle__grid { grid-template-columns: repeat(10, 10px); gap: 4px; }
  .em-waffle__dot { width: 10px; height: 10px; }
  .em-waffle__dot--flood { box-shadow: 0 0 0 2px var(--gold); }
  .em-waffle__body { justify-content: center; }

  /* spike: the phone drawing, notes in a caption box under it */
  .em-spike__plot--wide { display: none; }
  .em-spike__plot--narrow { display: block; }
  .em-spike__caption { display: flex; flex-direction: column; gap: 10px; margin-top: var(--s-4); }
  .em-spike__capnote {
    padding: 12px 14px; border-radius: 12px; background: var(--cream); color: var(--ink);
    font-size: var(--fs-small); line-height: 1.45; font-weight: 500;
  }
  .em-spike__capnote .pfw-ref { color: var(--muted-on-cream); }
  .em-spike__toggle { display: flex; width: 100%; }
  html:not(.js) .em-spike__toggle { display: none; }
  /* reviewer: the toggle and "Play again" sat below the closer line, so with the chart in view they fell
     under the fixed bottom nav. On phones they follow the caption box directly; the closer comes after. */
  .em-spike__stage { display: flex; flex-direction: column; }
  .em-spike__caption { order: 1; }
  .em-spike__controls { order: 2; margin-top: var(--s-4); }
  .em-spike__closer { order: 3; }
  .em-spike__fineprint { order: 4; }
  .em-spike__toggle button { flex: 1 1 0; padding: 8px 10px; }

  .em-mismatch__grid { grid-template-columns: minmax(0, 1fr); }
  .em-fifth__stats { grid-template-columns: minmax(0, 1fr); }

  .em-sides { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .em-sides__col { padding: 0 !important; border-right: 0 !important; }
  .em-sides__col--home { padding-top: 32px !important; border-top: 1px solid var(--hairline-cream); }

  /* diagram on phones: stacked, not shrunk. A smaller stage with the wharekai and its
     wall kit; items whose pieces are off-stage show a thumbnail in the legend */
  .em-diagram__stage { aspect-ratio: 4 / 3; margin-top: 0; }
  .em-diagram__piece[data-piece="papakainga"], .em-diagram__piece[data-piece="kohanga"],
  .em-diagram__piece[data-piece="ev-van"], .em-diagram__piece[data-piece="fast-charger"],
  .em-diagram__piece[data-piece="atv"], .em-diagram__piece[data-piece="mower-tools"],
  .em-diagram__share, .em-diagram__cable, .em-diagram__leader, .em-diagram__grass, .em-diagram__gravel,
  .em-pin[data-pin="6"], .em-pin[data-pin="7"], .em-pin[data-pin="9"] { display: none; }
  .em-diagram__piece[data-piece="wharekai"]   { --l: 11%; --b: 12%; --w: 78%; }
  .em-diagram__piece[data-piece="power-pole"] { --l: 0%;  --b: 18%; --w: 17%; }
  .em-diagram__piece[data-piece="battery"]    { --l: 78%; --b: 6%;  --w: 11%; }
  .em-diagram__piece[data-piece="hwhp"]       { --l: 89%; --b: 6%;  --w: 10%; }
  .em-diagram__inset { --l: 70%; --b: 66%; --w: 28%; }
  .em-pin[data-pin="1"] { --px: 50%; --py: 42%; }
  .em-pin[data-pin="2"] { --px: 83.5%; --py: 80%; }
  .em-pin[data-pin="3"] { --px: 18%; --py: 80%; }
  .em-pin[data-pin="4"] { --px: 94%; --py: 72%; }
  .em-pin[data-pin="5"] { --px: 84%; --py: 4%; }
  .em-pin[data-pin="8"] { --px: 8.5%; --py: 46%; }
  .em-pin { width: 30px; height: 30px; margin: -15px 0 0 -15px; font-size: 13px; }
  .em-diagram__legend { grid-template-columns: minmax(0, 1fr); gap: 12px; margin-top: var(--s-5); }
  .em-diagram__item { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .em-diagram__thumb { display: block; width: 72px; align-self: center; }

  .em-profiles { grid-template-columns: minmax(0, 1fr); }

  .em-tiles { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .em-tile--wide, .em-tiles .em-tile:last-child { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 16px; }
  .em-tile__art, .em-tile--wide .em-tile__art, .em-tiles .em-tile:last-child .em-tile__art { width: 100%; max-width: 260px; }
  .em-tile__art img { max-height: 220px; }

  .em-swaps, .em-askcards { grid-template-columns: minmax(0, 1fr); }
  .em-next__steps-intro { margin-top: var(--s-8); }
  .pfw-timeline__rail { grid-template-columns: minmax(0, 1fr); row-gap: 36px; padding-left: 44px; }
  .pfw-timeline__rail::before {
    left: 13px; right: auto; top: 6px; bottom: 6px; width: 2px; height: auto;
    background: linear-gradient(180deg, var(--gold) 0 30%, rgba(26, 60, 60, 0.22) 30% 100%);
  }
  .pfw-stop { padding-top: 0; }
  .pfw-stop__node { left: -44px; top: 0; }

  .pfw-cta__grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .pfw-cta__visual { order: -1; justify-content: center; padding: 0; }
  .em-signup-band .pfw-cta__art { position: relative; left: auto; bottom: auto; width: 60%; margin: 0 auto; rotate: -3deg; }
  .em-cover { display: none; }
  .em-signup__card { padding: 20px 18px 18px; }

  .pfw-sources__list { columns: 1; }
  .em-ropu__list { columns: 1; }
}
@media (max-width: 480px) {
  :root { --gutter: 16px; }
  .pfw-btn { padding: 14px 24px; }
  .pfw-topbar__cta { padding: 6px 14px; font-size: 13px; }
  .pfw-stat { padding: 18px 18px 16px; }
  .em-dialog .em-signup { padding: 28px 20px 22px; }
}
/* touch: small text links get a 44px hit box */
@media (pointer: coarse) {
  .pfw-topbar__brand { display: inline-block; padding-block: 15px; }
  .pfw-topbar__cta { min-height: 44px; }
  .pfw-foot__top { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .sr { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}
