/* ==========================================================================
   Electric Marae - "sun arc" line identity (night branch, 2026-10-12)
   Carries the report's own cover concept through the page: warm dark
   brown #231c17 and cream #ece3cb panels, thin gold-orange line work
   (#c97e2c arc, #cca837 rules), a red #ba4430 marae accent and light blue
   #8fb3f0 for solar and electricity. Clean type: Rubik (light, for display)
   and Inter. Loaded after night.css; re-points its tokens, then adds the
   hero, summary, savings charts, case studies and the line-icon system.
   ========================================================================== */

:root {
  --night:     #231c17;   /* the cover's dark panel */
  --night-2:   #2a221c;
  --night-3:   #342a22;
  --night-4:   #40342a;
  --ink-deep:  #1b1511;
  --amber:     #e8901f;   /* the sun */
  --glow:      #f4c06a;
  --ember:     #ba4430;   /* the marae */
  --parchment: #ece3cb;   /* the cover's cream */
  --text-n:    #e2d8c2;
  --muted-n:   #b3a48c;
  --kawakawa:  #8fb3f0;
  --line-n:    rgba(236, 227, 203, 0.14);

  --arc:       #c97e2c;
  --rule:      #cca837;
  --sky-blue:  #8fb3f0;
  --cream:     var(--night);

  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-display: 'Rubik', 'Inter', system-ui, sans-serif;
  --fs-hero: clamp(3rem, 8vw, 6.6rem);

  --card-shadow: none;
  --card-shadow-hover: none;
  --cut-drop: none;
  --shadow-hard: 0 0 0 3px rgba(232, 144, 31, 0.28);
  --spike-peak: rgba(232, 144, 31, 0.18);
  --grid-blue: var(--sky-blue);
}

/* ---------------------------------------------------------------- type: clean, light display */
.pfw-h1, .pfw-h2, .em-picker__title, .pfw-stat__value, .em-sides__fig b {
  font-family: var(--font-display);
  font-variation-settings: normal;
  letter-spacing: -0.015em;
}
.pfw-h1 { font-weight: 300; }
.pfw-h2 { font-weight: 400; }
.pfw-h2 em, .pfw-h1 em { font-style: normal; color: var(--glow); }
.pfw-pullline p { font-family: var(--font-display); font-style: normal; font-weight: 300; }
.pfw-topbar__brand { font-family: var(--font-display); font-variation-settings: normal; font-weight: 500; }
.pfw-topbar.is-scrolled { background: rgba(35, 28, 23, 0.92); }
@supports (backdrop-filter: blur(8px)) {
  .pfw-topbar.is-scrolled { background: rgba(35, 28, 23, 0.74); }
}
.pfw-btn { color: #1e1610; box-shadow: none; }
.pfw-btn:hover { box-shadow: var(--shadow-hard); }

/* cards: flat panels with a hairline, no drop shadows */
.em-profile, .em-mismatch__card, .em-diagram__group, .pfw-asks, .em-picker,
.em-frees__tile, .em-tile, .em-next__swap, .em-swap, .em-signup, .em-costbars, .em-ropu__card {
  box-shadow: none !important; border: 1px solid var(--line-n);
}
.em-tile { transform: none !important; }

/* thin rule under section heads, like the cover's gold rule */
.pfw-head .pfw-h2::after, .em-sum .pfw-h2::after {
  content: ""; display: block; width: 72px; height: 3px; margin-top: 0.45em; background: var(--rule);
}
.em-rule { display: block; width: min(320px, 60%); height: 4px; background: var(--rule); margin: 18px 0 28px; }

/* ---------------------------------------------------------------- line icons */
.is-line { display: block; }
.em-line { display: block; width: 100%; height: auto; overflow: visible; }
.em-line .l, .em-line .r, .em-line .b, .em-line .g, .em-line .d { fill: none; vector-effect: non-scaling-stroke; }
.em-line .r:not([stroke-width]) { stroke-width: 3; }
.em-line .l { stroke: var(--arc); }
.em-line .l:not([stroke-width]) { stroke-width: 2.2; }
.em-line .d { stroke: var(--arc); opacity: 0.6; }
.em-line .d:not([stroke-width]) { stroke-width: 1.4; }
.em-line .r { stroke: var(--ember); }
.em-line .b { stroke: var(--sky-blue); }
.em-line .b:not([stroke-width]) { stroke-width: 2; }
.em-line .g { stroke: var(--rule); }
.em-line .g:not([stroke-width]) { stroke-width: 1.6; }
.em-line .w { fill: rgba(244, 192, 106, 0.85); stroke: none; }
/* thick strokes drawn with explicit stroke-width scale with the drawing, not the screen */
.em-line [stroke-width] { vector-effect: none; }
.em-cut.is-line, .em-diagram__pic.is-line, .em-profile__gpic.is-line { filter: none; }
.em-cut.is-line { max-width: 220px; margin-inline: auto; }
.em-swap .em-cut.is-line { max-width: 120px; }
.em-diagram__pic.is-line .em-line .l:not([stroke-width]) { stroke-width: 2.6; }
.em-diagram__thumb .is-line { width: 56px; }
.em-profile__gpic.is-line { width: 72%; }

/* ---------------------------------------------------------------- cream panels (the cover's top half) */
.em-panel-cream, .pfw-band--ink {
  --ink: #231c17; --parchment: #231c17; --text-n: #3b2f25; --muted-n: #6e5e4a;
  --text-on-dark: #3b2f25; --muted-on-dark: #6e5e4a; --text-on-cream: #3b2f25; --muted-on-cream: #6e5e4a;
  --line-n: rgba(35, 28, 23, 0.16); --hairline-dark: rgba(35, 28, 23, 0.16); --hairline-cream: rgba(35, 28, 23, 0.16);
  --amber: #b4600f; --glow: #9a4f0c; --arc: #a8641f; --card-white: #f5efdf; --night-3: #f5efdf;
  background: #ece3cb; color: #3b2f25;
}
.em-panel-cream .pfw-h2, .pfw-band--ink .pfw-h2 { color: #231c17; }
.em-panel-cream .pfw-ref, .pfw-band--ink .pfw-ref { color: #6e5e4a; }
.pfw-band--ink::before { display: none; }
.pfw-band--ink .em-line .w { fill: rgba(232, 144, 31, 0.55); }

/* ---------------------------------------------------------------- hero: the sun arc */
.pfw-hero.em-hero-arc {
  display: block; min-height: 0; padding: 0;
  background: var(--night); color: var(--parchment);
  overflow: visible; isolation: isolate;
}
.em-arc__stage {
  position: relative; overflow: clip; isolation: isolate;
  min-height: max(100svh, 640px);
  display: flex; align-items: flex-start;
  padding: calc(var(--topbar-h) + clamp(28px, 6vh, 72px)) 0 0;
}
/* scroll-scrubbed: scene.js adds .is-scrub; the stage sticks while the tall track scrolls past */
.em-hero-arc.is-scrub { height: 175vh; }
.em-hero-arc.is-scrub .em-arc__stage { position: sticky; top: 0; height: 100svh; min-height: 0; }

.em-arc__art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.em-arc__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.em-arc__path { fill: none; stroke: var(--arc); stroke-width: 2; opacity: 0.55; vector-effect: non-scaling-stroke; }
.em-arc__lit {
  fill: none; stroke: #f2a541; stroke-width: 2.4; vector-effect: non-scaling-stroke; opacity: 0.95;
  filter: drop-shadow(0 0 6px rgba(242, 165, 65, 0.7));
}
.em-arc__ground { fill: none; stroke: var(--rule); stroke-width: 1.6; vector-effect: non-scaling-stroke; opacity: 0.85; }
/* no-JS / reduced motion: the lit trail runs to the resting sun */
.em-arc__lit { stroke-dasharray: 63 100; }

/* warm ethereal glow: a wash from the horizon and a bloom that follows the sun */
.em-arc__wash {
  position: absolute; inset: 0; opacity: 0.55;
  background:
    radial-gradient(120% 70% at 50% 100%, rgba(232, 144, 31, 0.22) 0%, rgba(186, 68, 48, 0.08) 45%, rgba(35, 28, 23, 0) 75%),
    linear-gradient(180deg, rgba(35, 28, 23, 0) 40%, rgba(120, 62, 22, 0.18) 100%);
}
.em-arc__bloom {
  position: absolute; left: 0; top: 0; width: 140vmax; height: 140vmax; margin: -70vmax 0 0 -70vmax;
  border-radius: 50%; opacity: 0.6;
  background: radial-gradient(closest-side, rgba(255, 196, 110, 0.32), rgba(232, 144, 31, 0.12) 35%, rgba(186, 68, 48, 0.05) 60%, rgba(35, 28, 23, 0) 100%);
  left: var(--sx); top: var(--sy);
}
/* live (scene.js): sun, bloom and lit trail are driven per frame by transform */
.is-live .em-arc__bloom, .is-live .em-arc__sun { left: 0; top: 0; will-change: transform; }
.em-arc__sun {
  position: absolute; width: clamp(26px, 3.4vw, 46px); aspect-ratio: 1;
  translate: -50% -50%;
  left: var(--sx); top: var(--sy);
}
.em-arc__core, .em-arc__halo { position: absolute; inset: 0; border-radius: 50%; }
.em-arc__core {
  background: radial-gradient(circle at 42% 40%, #ffe2a8 0%, #f6a83a 45%, #e8901f 70%, #d9771a 100%);
  box-shadow: 0 0 18px 4px rgba(242, 165, 65, 0.65), 0 0 60px 18px rgba(232, 144, 31, 0.35);
}
.em-arc__halo { inset: -140%; background: radial-gradient(closest-side, rgba(255, 200, 120, 0.45), rgba(232, 144, 31, 0.14) 50%, rgba(232, 144, 31, 0) 100%); }
.em-arc__halo--far { inset: -420%; background: radial-gradient(closest-side, rgba(255, 190, 110, 0.18), rgba(232, 144, 31, 0.06) 45%, rgba(232, 144, 31, 0) 100%); }

.em-arc__marae {
  position: absolute; left: 50%; bottom: calc(100% - var(--g, 88%));
  width: clamp(120px, 15vw, 230px); translate: -50% 0; margin-bottom: -1px;
}
.em-arc__marae .em-line .g { display: none; }   /* the hero's own ground line runs edge to edge */
.em-arc__marae .em-line { overflow: visible; }
.em-arc__roofglow {
  position: absolute; left: 50%; top: 30%; width: 150%; aspect-ratio: 2; translate: -50% -50%;
  border-radius: 50%; opacity: 0.5;
  background: radial-gradient(closest-side, rgba(242, 165, 65, 0.35), rgba(232, 144, 31, 0) 100%);
}

.em-hero-arc .pfw-hero__inner { position: relative; z-index: 1; display: block; width: 100%; }
.em-hero-arc .pfw-hero__copy { max-width: 640px; }
.em-arc__kicker { font: 600 0.82rem/1 var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted-n); margin: 0 0 18px; }
.em-hero-arc .em-h1__reo {
  display: block; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.15rem, 1.9vw, 1.55rem);
  color: var(--glow); margin-bottom: 0.25em;
}
.em-hero-arc .pfw-h1 { color: var(--parchment); line-height: 0.95; }
.em-arc__rule { display: block; width: min(300px, 56%); height: 4px; background: var(--rule); margin: 22px 0 0; }
.em-hero-arc .pfw-hero__sub { color: var(--text-n); max-width: 40ch; font-size: clamp(1.02rem, 1.4vw, 1.2rem); margin-top: 18px; }
.em-hero-arc .pfw-hero__ctas { margin-top: 24px; }
.em-hero-arc .pfw-btn--ghost { color: #ece3cb; box-shadow: inset 0 0 0 1.5px rgba(236, 227, 203, 0.55); }
.em-hero-arc .pfw-btn--ghost:hover { background: rgba(236, 227, 203, 0.08); }

@media (prefers-reduced-motion: no-preference) {
  .em-arc__halo { animation: em-shimmer 5.5s ease-in-out infinite; }
  .em-arc__halo--far { animation: em-shimmer 8s ease-in-out -2s infinite; }
  .em-arc__roofglow { animation: em-shimmer 7s ease-in-out -1s infinite; }
}
@keyframes em-shimmer {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.08); opacity: 0.78; }
}

@media (max-width: 767px) {
  .em-arc__stage { padding-top: calc(var(--topbar-h) + 22px); }
  .em-hero-arc .pfw-hero__ctas { flex-direction: row; flex-wrap: wrap; }
  .em-hero-arc .pfw-hero__ctas .pfw-btn { flex: 1 1 auto; }
  .em-arc__marae { width: clamp(96px, 28vw, 140px); }
  .em-arc__sun { width: 24px; }
}

/* ---------------------------------------------------------------- interlude: line night scene */
.em-interlude.em-interlude--line {
  display: block; min-height: 0; padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
  background: var(--ink-deep);
}
.em-interlude--line::after { display: none; }
.em-interlude__art { max-width: 1240px; margin: 0 auto clamp(16px, 3vw, 32px); padding: 0 clamp(16px, 4vw, 40px); }
.em-night .em-night__stars circle { fill: var(--parchment); opacity: 0.55; }
.em-night .w { fill: rgba(244, 192, 106, 0.9); filter: drop-shadow(0 0 10px rgba(242, 165, 65, 0.6)); }
@media (prefers-reduced-motion: no-preference) {
  .em-night__steam { animation: em-steam 4s ease-in-out infinite; }
  .em-night__win { animation: em-flicker 6s ease-in-out infinite; }
}
@keyframes em-steam { 0%, 100% { opacity: 0.25; transform: translateY(6px); } 50% { opacity: 0.75; transform: translateY(-4px); } }
@keyframes em-flicker { 0%, 100% { opacity: 1; } 47% { opacity: 0.86; } 53% { opacity: 0.96; } }

/* ---------------------------------------------------------------- summary: the headline number */
.em-sum { padding: clamp(56px, 9vw, 120px) 0; }
.em-kicker { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 62ch; color: #3b2f25; margin: 0 0 12px; }
.em-sum .pfw-h2 { max-width: 18ch; }
.em-sum__big { margin-top: clamp(28px, 4vw, 48px); }
.em-sum__value {
  font: 300 clamp(3rem, 10vw, 8rem)/0.95 var(--font-display); letter-spacing: -0.03em; color: #231c17; margin: 0;
}
.em-sum__label { font-size: clamp(1.1rem, 1.8vw, 1.45rem); max-width: 46ch; color: #3b2f25; margin: 12px 0 0; }
.em-sum__stats { list-style: none; padding: 0; margin: 0 0 clamp(36px, 5vw, 56px); display: grid; gap: 18px 32px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.em-sum__stat { border-top: 1px solid rgba(35, 28, 23, 0.25); padding-top: 14px; }
.em-sum__stat b { display: block; font: 400 clamp(1.8rem, 3.2vw, 2.6rem)/1 var(--font-display); color: #b4600f; margin-bottom: 8px; }
.em-sum__stat span { color: #3b2f25; }
.em-sum__btitle { font: 500 1.05rem var(--font-body); text-transform: uppercase; letter-spacing: 0.06em; color: #6e5e4a; margin: 0 0 14px; }
.em-sum__bens { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.em-sum__ben { position: relative; padding: 18px 18px 16px 58px; border: 1px solid rgba(35, 28, 23, 0.16); border-radius: 14px; background: #f5efdf; }
.em-sum__ben h3 { font: 600 1.05rem/1.3 var(--font-body); color: #231c17; margin: 0 0 6px; }
.em-sum__ben p { margin: 0; color: #3b2f25; font-size: 0.97rem; }
.em-sum__n {
  position: absolute; left: 16px; top: 16px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center; font: 600 0.9rem var(--font-body);
  color: #ece3cb; background: var(--ember);
}
.em-sum__note { margin: 22px 0 0; font-size: 0.92rem; color: #6e5e4a; max-width: 70ch; }

/* ---------------------------------------------------------------- savings charts (one-for-one with the report) */
.em-savings { background: var(--night); padding: clamp(56px, 8vw, 110px) 0; }
.em-savings__ass { border: 1px solid var(--line-n); border-radius: 14px; padding: 18px 20px; margin: 0 0 28px; }
.em-savings__ass h3 { font: 600 0.95rem var(--font-body); letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted-n); margin: 0 0 10px; }
.em-savings__ass ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.em-savings__ass li { padding-left: 18px; position: relative; }
.em-savings__ass li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 9px; height: 2px; background: var(--rule); }
.em-savings__charts { display: grid; gap: 28px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }

.em-bars { margin: 0; border: 1px solid var(--line-n); border-radius: 14px; padding: 20px 20px 16px; }
.em-bars__title { font: 500 1.15rem var(--font-display); color: var(--parchment); }
.em-bars__unit { color: var(--muted-n); font: 400 0.9rem var(--font-body); }
.em-bars__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 12px; font-size: 0.85rem; }
.em-bars__legend span::before { content: ""; display: inline-block; width: 14px; height: 10px; margin-right: 6px; vertical-align: -1px; border-radius: 2px; }
.k-before { color: var(--arc); }
.k-after { color: var(--sky-blue); }
.k-save { color: var(--glow); font-weight: 600; }
.em-bars__legend .k-before::before { border: 1.5px solid var(--arc); }
.em-bars__legend .k-after::before { background: var(--sky-blue); }
.em-bars__legend .k-save::before { border-bottom: 2px dashed var(--glow); height: 0; width: 14px; }
.em-bars__table { width: 100%; border-collapse: collapse; font-size: 0.88rem; table-layout: fixed; }
.em-bars__table col, .em-bars__table th[scope="row"] { width: 32%; }
.em-bars__table td.em-bars__save { width: 19%; }
.em-bars__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.em-bars__table th[scope="row"] { text-align: left; font-weight: 500; color: var(--text-n); padding: 9px 10px 9px 0; width: 30%; vertical-align: middle; }
.em-bars__cell { padding: 9px 0; vertical-align: middle; }
.em-bars__track { position: relative; display: block; height: 22px; }
.em-bars__bar { position: absolute; left: 0; top: 0; height: 100%; width: calc(var(--w) * 100%); border-radius: 2px; }
.em-bars__bar--before { border: 1.5px solid var(--arc); background: rgba(201, 126, 44, 0.12); }
.em-bars__bar--after { background: var(--sky-blue); height: 10px; top: 6px; }
.em-bars__nums { display: flex; gap: 12px; margin-top: 4px; font-variant-numeric: tabular-nums; font-size: 0.82rem; }
.em-bars__save { text-align: right; padding-left: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: middle; }
.em-bars__caption { margin: 12px 0 0; font-size: 0.82rem; color: var(--muted-n); }
.em-bars tr + tr th, .em-bars tr + tr td { border-top: 1px solid var(--line-n); }

.em-savings__ptitle { font: 400 clamp(1.4rem, 2.4vw, 1.9rem) var(--font-display); color: var(--parchment); margin: clamp(40px, 6vw, 64px) 0 16px; }
.em-pays { list-style: none; padding: 0; margin: 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.em-pay { border: 1px solid var(--line-n); border-radius: 14px; padding: 20px; }
.em-pay h4 { font: 500 1.2rem var(--font-display); color: var(--parchment); margin: 0 0 4px; }
.em-pay__machines { color: var(--muted-n); font-size: 0.9rem; margin: 0 0 12px; }
.em-pay dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; }
.em-pay dt { font-size: 0.8rem; color: var(--muted-n); }
.em-pay dd { margin: 2px 0 0; font: 400 1.35rem var(--font-display); color: var(--parchment); }
.em-pay div:first-child dd { color: var(--arc); }
.em-pay div:last-child dd { color: var(--sky-blue); }
.em-pay__back { margin: 0; border-top: 1px solid var(--line-n); padding-top: 10px; }
.em-pay__back b { color: var(--glow); }
.em-savings__note { margin: 20px 0 0; color: var(--muted-n); font-size: 0.92rem; max-width: 72ch; }

/* ---------------------------------------------------------------- profile cards: modelled results */
.em-res { margin-top: 14px; border-top: 1px solid var(--line-n); padding-top: 12px; display: grid; gap: 12px; }
.em-res__lbl { margin: 0 0 6px; font-size: 0.78rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted-n); }
.em-res__bars { position: relative; height: 16px; }
.em-res__bar { position: absolute; left: 0; top: 0; height: 100%; border-radius: 2px; }
.em-res__bar--before { width: 100%; border: 1.5px solid var(--arc); background: rgba(201, 126, 44, 0.1); }
.em-res__bar--after { width: calc(var(--w) * 100%); height: 8px; top: 4px; background: var(--sky-blue); }
.em-res__nums { margin: 6px 0 0; font-size: 0.85rem; display: flex; flex-wrap: wrap; gap: 2px 12px; font-variant-numeric: tabular-nums; }
.em-res__nums .k-save { flex-basis: 100%; }

/* ---------------------------------------------------------------- case studies */
.em-cases { padding: clamp(56px, 8vw, 110px) 0; }
.em-cases__list { list-style: none; padding: 0; margin: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.em-case { background: #f5efdf; border: 1px solid rgba(35, 28, 23, 0.16); border-radius: 16px; padding: 14px 14px 20px; display: flex; flex-direction: column; }
.em-case__media { display: grid; gap: 8px; margin-bottom: 14px; }
.em-case__media.has-photo { position: relative; }
.em-case__media.has-photo .em-case__map { position: absolute; right: 8px; bottom: 8px; width: 40%; box-shadow: 0 0 0 3px #f5efdf; border-radius: 8px; }
.em-case__media.has-photo .em-case__map img { aspect-ratio: 4 / 3; border-radius: 8px; }
.em-case__media picture, .em-case__media img { display: block; width: 100%; border-radius: 10px; }
.em-case__media img { height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.em-case__map img { object-fit: contain; background: #e9e2cf; }
.em-case__where { margin: 0 4px; font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; color: #6e5e4a; }
.em-case__name { font: 400 1.6rem/1.15 var(--font-display); color: #231c17; margin: 4px 4px 10px; }
.em-case__kit { list-style: none; padding: 0; margin: 0 4px 12px; display: flex; flex-wrap: wrap; gap: 6px; }
.em-case__kit li { font-size: 0.82rem; padding: 4px 10px; border-radius: 999px; border: 1px solid #a8641f; color: #6b3d10; }
.em-case__kit li:first-child { border-color: #5878b0; color: #2c4a7e; }
.em-case__facts { margin: 0 4px 12px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 0.85rem; }
.em-case__facts div { display: contents; }
.em-case__facts dt { font-weight: 600; color: #231c17; }
.em-case__facts dd { margin: 0; color: #3b2f25; }
.em-case__text { margin: 0 4px 12px; color: #3b2f25; }
.em-case__lesson { margin: auto 4px 0; padding-top: 12px; border-top: 2px solid var(--ember); color: #231c17; }
.em-case__lesson b { display: block; font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ember); margin-bottom: 4px; }
.em-cases__note { margin: 18px 0 0; font-size: 0.88rem; color: #6e5e4a; }

/* the diagram's ground and line work in the arc colours */
.em-diagram__horizon { stroke: var(--rule) !important; }
.em-diagram__grass, .em-diagram__gravel { stroke: var(--arc) !important; opacity: 0.5; }
.em-diagram__lines path { stroke: var(--sky-blue) !important; }
.em-pin { background: var(--ember); color: #ece3cb; box-shadow: 0 0 0 3px rgba(35, 28, 23, 0.9); }
.em-diagram__ring path { stroke: var(--arc) !important; fill: rgba(35, 28, 23, 0.9) !important; }

html { background: var(--night); }
body { background: var(--night); }

/* phone section rail in the warm ground */
.pfw-rail { background: rgba(27, 21, 17, 0.94); border-top: 1px solid var(--line-n); }
.pfw-rail__chip { border-color: var(--line-n); color: var(--parchment); }

/* profile glyphs: line icons sit side by side on the card's ground */
.em-profile__glyph:has(.is-line) { display: flex; align-items: flex-end; gap: 6px; min-height: 0; height: auto; }
.em-profile__glyph .em-profile__gpic.is-line { position: static !important; transform: none !important; width: 50% !important; max-width: 120px; margin: 0 !important; }
.em-profile__glyph .em-profile__gpic--1.is-line { width: 38% !important; }

/* frees-up tiles: flat cream cards with breathing room */
.em-tile { padding: clamp(16px, 2vw, 24px); background: #f5efdf; border-radius: 16px; }
.em-tile__art .em-cut.is-line { max-width: 200px; margin: 0 auto; }

/* ---------------------------------------------------------------- diagram: daytime cut-out illustration
   OJ 2026-10-12: the Electric Marae diagram goes back to the daytime cut-out art (img/cut) on a cream
   daytime panel; the line work (ground, share arcs, leader, ring) stays in the arc colours. */
.em-diagram-band--day { background: linear-gradient(180deg, #f6efdc 0%, #ece3cb 70%); }
.em-diagram-band--day .em-diagram__pic { filter: none; }
.em-diagram-band--day .em-diagram__horizon { stroke: var(--arc) !important; }
.em-diagram-band--day .em-diagram__lines path { stroke: #4f7fcf !important; }
.em-diagram-band--day .em-diagram__ring path { fill: #fbf6ea !important; stroke: var(--arc) !important; }
.em-diagram-band--day .em-diagram__group { background: #f6efdc; border-color: rgba(35, 28, 23, 0.16); }
.em-diagram-band--day .em-diagram__gtitle, .em-diagram-band--day .em-diagram__ilabel { color: #231c17; }
.em-diagram-band--day .em-diagram__idesc { color: #4a3d31; }

/* ---------------------------------------------------------------- contrast fixes (2026-10-13)
   --cream is the night colour in this theme and --ink is light, so older components that
   used --cream for light text, or --ink on gold, went dark-on-dark / cream-on-orange. */
.em-spike__closer,
.em-spike__toggle button,
.em-spike.is-once .em-spike__replay,
.pfw-foot__top,
#sources .pfw-asks__label { color: var(--text-n); }
.em-spike__toggle { border-color: rgba(236, 227, 203, 0.45); }
.em-spike__toggle button[aria-pressed="true"],
.pfw-skip { background: var(--amber); color: #1e1610; }
.pfw-foot__top:hover { color: var(--glow); }
.pfw-dl::backdrop { background: rgba(27, 21, 17, 0.72); }
