:root {
  --vellum-day: #faf7f2;
  --vellum-dawn: #efe7d8;
  --surface: #ffffff;
  --vault-950: #0c1914;
  --vault-900: #13261f;
  --ink-900: #11211b;
  --ink-800: #1d352c;
  --ink-700: #2b473c;
  --ink-600: #445a51;
  --ink-500: #51665d;
  --emerald-700: #0c4d39;
  --emerald-600: #0f5c44;
  --emerald-500: #147356;
  --emerald-400: #279472;
  --emerald-100: #ddf2ea;
  --emerald-50: #f0f9f5;
  --copper-100: #fcead9;
  --copper-200: #f8d4b3;
  --copper-300: #f3b582;
  --copper-400: #e38b47;
  --copper-500: #c86420;
  --copper-800: #7a380c;
  --slate-500: #2b5c8f;
  --border: color-mix(in oklab, var(--ink-900) 12%, transparent);
  --plate-border: color-mix(in oklab, var(--emerald-500) 15%, transparent);
  --shadow-plate: 0 1px 0 rgba(255, 255, 255, 0.92) inset, 0 1px 2px rgba(17, 33, 27, 0.05), 0 18px 40px -18px rgba(15, 77, 57, 0.22);
  --shadow-lift: 0 1px 0 rgba(255, 255, 255, 0.92) inset, 0 2px 4px rgba(17, 33, 27, 0.06), 0 30px 60px -24px rgba(15, 77, 57, 0.34);
  --font-display: "Newsreader", Georgia, serif;
  --font-sans: "Instrument Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "DM Mono", ui-monospace, SFMono-Regular, monospace;
  --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --measure: 80rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --header-h: 4.5rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--vellum-day); color: var(--ink-900); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  background: var(--vellum-day);
  color: var(--ink-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
::selection { background: var(--copper-200); color: var(--ink-900); }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--emerald-500); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; left: -9999px; top: 0.75rem; z-index: 100;
  padding: 0.6rem 1rem; background: var(--ink-900); color: #fff; border-radius: 999px;
}
.skip-link:focus { left: 1rem; }

.container-x { width: min(100% - 2 * var(--gutter), var(--measure)); margin-inline: auto; }
.relative-z { position: relative; z-index: 2; }
.tabular { font-variant-numeric: tabular-nums; }
.mono, code { font-family: var(--font-mono); font-size: 0.88em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; max-width: 100%; }
.text-emerald { color: var(--emerald-500); }
.text-white { color: #fff; }
.w-full { width: 100%; }
.text-left { text-align: left; }
.stack { display: flex; flex-direction: column; gap: 1rem; min-width: 0; max-width: 100%; }
.row-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0.65rem; min-width: 0; max-width: 100%; }
.grid-2 { display: grid; gap: 1.35rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 780px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hint { margin: 0; font-size: 0.86rem; color: var(--ink-500); min-width: 0; max-width: 100%; overflow-wrap: anywhere; }
.card-muted { background: var(--vellum-dawn); border: 1px solid var(--border); border-radius: 18px; padding: 1.15rem; min-width: 0; max-width: 100%; }
.card-muted.row-wrap > .stack { flex: 1 1 12rem; min-width: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.eyebrow {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--emerald-600);
}
.eyebrow-copper { color: var(--copper-300); }
.eyebrow-copper-dark { color: var(--copper-800); }

.display-xl, .display-lg, .display-md, .display-sm, h1, h2, h3 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  overflow-wrap: break-word;
}
.display-xl { font-size: clamp(2.25rem, min(0.85rem + 5.4vw, 11.5svh), 5.8rem); line-height: 0.99; letter-spacing: -0.032em; }
.display-lg { font-size: clamp(2rem, 1.2rem + 3.2vw, 4rem); line-height: 1.04; letter-spacing: -0.028em; }
.display-md { font-size: clamp(1.65rem, 1.1rem + 2vw, 2.85rem); line-height: 1.08; letter-spacing: -0.024em; }
.display-sm { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.85rem); line-height: 1.16; letter-spacing: -0.02em; }
.subpage-main h1 { font-size: clamp(1.85rem, 3vw, 2.65rem); line-height: 1.12; }
.subpage-main h2 { font-size: clamp(1.3rem, 2vw, 1.7rem); line-height: 1.18; }
.subpage-main h3 { font-size: 1.15rem; }
.lede {
  margin: 1.2rem 0 0;
  font-size: clamp(1.02rem, 0.96rem + 0.36vw, 1.26rem);
  line-height: 1.55;
  color: var(--ink-600);
  max-width: 58ch;
}
.lede-dark { color: rgba(255, 255, 255, 0.76); }

/* Header */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40; min-height: var(--header-h); height: auto; padding-block: 0.45rem;
  display: flex; align-items: center;
  transition: transform 0.45s var(--ease-expo);
}
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: rgba(250, 247, 242, 0); border-bottom: 1px solid transparent;
  transition: background 0.35s ease, border-color 0.35s ease;
}
.site-header[data-scrolled="true"]::before {
  background: rgba(250, 247, 242, 0.9);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom-color: rgba(17, 33, 27, 0.1);
}
.site-header[data-hidden="true"] { transform: translateY(calc(-100% - 2rem)); }
.site-header:focus-within { transform: translateY(0); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; min-width: 0; }
.brand-link { display: inline-flex; align-items: center; gap: 0.6rem; min-height: 44px; flex-shrink: 0; white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; flex-shrink: 0; display: block; transition: transform 0.35s var(--ease-expo); }
@media (prefers-reduced-motion: no-preference) { .brand-link:hover .brand-mark { transform: scale(1.06); } }
.brand-word { font-family: var(--font-display); font-size: 1.32rem; font-weight: 500; letter-spacing: -0.02em; }

.site-nav { display: none; align-items: center; gap: clamp(0.9rem, 1.35vw, 1.35rem); color: var(--ink-800); font-weight: 500; font-size: 0.93rem; white-space: nowrap; flex-shrink: 0; }
@media (min-width: 1100px) { .site-nav { display: flex; } }
.site-nav a.is-active { color: var(--emerald-600); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 0.65rem; min-width: 0; flex: 0 1 auto; }
.header-user-email { display: none; min-width: 0; max-width: clamp(9rem, 15vw, 15rem); font-size: 0.72rem; line-height: 1.15; text-align: right; overflow-wrap: anywhere; }
@media (min-width: 1120px) { .header-user-email { display: inline-block; } }
.nav-signin { display: none; font-size: 0.93rem; font-weight: 500; color: var(--ink-800); min-height: 44px; padding: 0.35rem 0.25rem; white-space: nowrap; }
.btn-primary.header-cta { display: none; flex-shrink: 0; }
@media (min-width: 520px) { .btn-primary.header-cta { display: inline-flex; white-space: nowrap; } }
@media (min-width: 1100px) { .nav-signin { display: inline-flex; align-items: center; } }

.mobile-menu-btn {
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--border); background: rgba(255, 255, 255, 0.88);
}
@media (min-width: 1100px) { .mobile-menu-btn { display: none; } }

.subpage-body .subpage-main { padding-top: calc(var(--header-h) + 2.25rem); padding-bottom: 4rem; }
.trust-card { padding: clamp(1.25rem, 3vw, 2.25rem); }
.trust-card p { margin: 0; color: var(--ink-600); min-width: 0; overflow-wrap: anywhere; }
.trust-card a:not(.btn-link) { color: var(--emerald-600); text-decoration: underline; text-underline-offset: 3px; }
.trust-list { margin: 0; padding-left: 1.25rem; display: grid; gap: 0.5rem; color: var(--ink-700); }

/* Interactive Controls */
.link-draw {
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat; background-position: 0 100%; background-size: 0% 1.5px;
  padding-bottom: 2px; transition: background-size 0.35s var(--ease-expo), color 0.25s ease;
}
.link-draw:hover { background-size: 100% 1.5px; color: var(--emerald-600); }

.btn-primary, .btn-secondary, .btn-ghost, .btn-link {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 46px; padding: 0.68rem 1.35rem; border-radius: 999px;
  font-weight: 600; font-size: 0.94rem; line-height: 1.25; text-align: center;
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, transform 0.14s ease;
}
.btn-primary.btn-sm, .btn-secondary.btn-sm, .btn-ghost.btn-sm { min-height: 44px; padding: 0.5rem 1.05rem; font-size: 0.86rem; }
.btn-primary {
  overflow: hidden;
  background: var(--emerald-500); color: #fff;
  box-shadow: 0 10px 24px -12px rgba(20, 115, 86, 0.5);
}
.btn-primary::before {
  content: ""; position: absolute; left: 0; right: 0; top: -45%; bottom: -45%; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle, var(--copper-200) 0%, var(--copper-300) 55%, var(--copper-400) 100%);
  transform: translateY(92%); transition: transform 0.65s var(--ease-expo);
}
.btn-primary:hover::before { transform: translateY(-20%); }
.btn-primary:hover { color: var(--ink-900); }
.btn-primary > * { position: relative; z-index: 1; }
.btn-secondary, .btn-ghost {
  background: rgba(255, 255, 255, 0.88); border: 1px solid var(--border); color: var(--ink-800);
}
.btn-secondary:hover, .btn-ghost:hover { background: #fff; border-color: var(--emerald-500); color: var(--emerald-600); }
.btn-primary:active, .btn-secondary:active, .btn-ghost:active { transform: scale(0.97); }
.btn-primary:disabled, .btn-secondary:disabled, .btn-ghost:disabled { opacity: 0.6; cursor: not-allowed; }
.arrow { display: inline-block; transition: transform 0.3s var(--ease-expo); }
.btn-primary:hover .arrow, .btn-ghost:hover .arrow { transform: translateX(3px); }

.plate {
  background: var(--surface); border: 1px solid var(--plate-border);
  border-radius: 26px; box-shadow: var(--shadow-plate); min-width: 0; max-width: 100%;
}
.plate-lift { transition: transform 0.6s var(--ease-expo), box-shadow 0.6s var(--ease-expo); }
.plate-lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* Hero */
.hero {
  position: relative; isolation: isolate; min-height: min(90svh, 840px);
  padding: calc(var(--header-h) + clamp(2.5rem, 6vw, 5rem)) 0 clamp(4rem, 7vw, 6.5rem);
  background: linear-gradient(180deg, var(--vellum-dawn) 0%, var(--vellum-day) 74%);
  display: flex; align-items: center; overflow: hidden;
}
.transit-layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.transit-canvas { width: 100%; height: 100%; display: block; }
.hero-veil {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse at 28% 46%, rgba(250, 247, 242, 0.92), rgba(250, 247, 242, 0) 68%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-grid { display: grid; gap: 2rem; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1.02fr) minmax(0, 1.08fr); gap: 1.5rem; } }
.hero-copy { max-width: 44rem; min-width: 0; }
.hero-art { margin: 0; display: grid; place-items: center; min-width: 0; }
.underline-wrap { position: relative; display: inline-block; max-width: 100%; }
.copper-underline { position: absolute; left: 0; bottom: -0.08em; width: 100%; height: 0.2em; pointer-events: none; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.85rem; margin-top: 1.85rem; }
.cta-center { justify-content: center; }
.hero-proof { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 2rem; }
.proof-pill {
  padding: 0.42rem 0.85rem; border-radius: 999px; font-size: 0.84rem; color: var(--ink-700);
  background: rgba(255, 255, 255, 0.84); border: 1px solid var(--plate-border);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
}

/* Shift Cards */
.section-turn { padding: clamp(4rem, 7.5vw, 6.5rem) 0; }
.thesis-heading { max-width: 22ch; }
.thesis-lede { margin-bottom: 2.5rem; }
.cards-3 { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cards-3 .plate { padding: 1.65rem; }
.seal-badge { margin-bottom: 1rem; }
.cards-3 h3 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 1.42rem; }
.cards-3 p { margin: 0; color: var(--ink-600); font-size: 0.96rem; }

/* Rule Engine */
.section-rules { position: relative; padding: clamp(4rem, 7vw, 6.5rem) 0; overflow: hidden; }
.transit-soft { opacity: 0.6; }
.rules-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.pill-tabs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-bottom: 1.5rem; }
.pill-tab {
  display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
  padding: 0.55rem 1.05rem; border-radius: 999px; font-weight: 500; font-size: 0.9rem;
  background: rgba(255, 255, 255, 0.88); border: 1px solid var(--border); color: var(--ink-800);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
}
.pill-tab:hover { border-color: var(--emerald-400); }
.pill-tab.is-active { background: var(--emerald-500); border-color: var(--emerald-500); color: #fff; }
.mono-idx { font-family: var(--font-mono); font-size: 0.78rem; opacity: 0.85; }
.portal-panel { display: grid; gap: 2rem; padding: clamp(1.4rem, 3.2vw, 2.5rem); grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .portal-panel { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); } }
.portal-copy, .portal-visual { min-width: 0; }
.portal-desc { margin: 0.85rem 0 1.2rem; color: var(--ink-600); }
.portal-bullets { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.55rem; color: var(--ink-700); font-size: 0.95rem; }
.portal-visual { background: var(--emerald-50); border: 1px solid var(--plate-border); border-radius: 20px; padding: 1.25rem; display: grid; gap: 0.75rem; }
.vis-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; padding: 0.8rem 1rem; border-radius: 14px; background: #fff; border: 1px solid rgba(20, 115, 86, 0.12); }
.vis-row > div { min-width: 0; flex: 1 1 11rem; }
.vis-row strong { display: block; font-size: 0.94rem; color: var(--ink-900); }
.vis-row small { color: var(--ink-500); font-size: 0.8rem; }
.vis-badge { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.75rem; padding: 0.3rem 0.65rem; border-radius: 999px; background: var(--copper-100); color: var(--copper-800); max-width: 100%; overflow-wrap: anywhere; }
.vis-badge.is-emerald { background: var(--emerald-100); color: var(--emerald-700); }

/* Dark Vault */
.section-vault { position: relative; }
.arch-divider { display: block; width: 100%; height: 56px; margin-bottom: -1px; }
.vault-body { position: relative; background: var(--vault-950); color: #fff; padding: clamp(3.5rem, 6.5vw, 5.5rem) 0 clamp(4rem, 7vw, 6.5rem); border-bottom-left-radius: 2rem; border-bottom-right-radius: 2rem; overflow: hidden; }
.vault-grid-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; }
.vault-grid { display: grid; gap: 1.25rem; margin-top: 2.5rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .vault-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .vault-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.vault-card { background: var(--vault-900); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 22px; padding: 1.5rem; min-width: 0; }
.vault-tag { display: inline-block; margin-bottom: 0.85rem; font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.13em; color: var(--copper-300); }
.vault-card h3 { margin: 0 0 0.5rem; font-family: var(--font-display); font-size: 1.3rem; }
.vault-card p { margin: 0; color: rgba(255, 255, 255, 0.75); font-size: 0.93rem; }
.vault-link { color: var(--copper-300); text-decoration: underline; text-underline-offset: 3px; }
.vault-body :focus-visible { outline-color: var(--copper-300); }

/* Workbench */
.section-workbench { padding: clamp(4rem, 7.5vw, 6.5rem) 0; }
.workbench-lede { margin-bottom: 2.25rem; }
.workbench-plate { padding: clamp(1.35rem, 3vw, 2.35rem); }
.wb-top-controls { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.25rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); margin-bottom: 1.75rem; }
.wb-label { display: block; margin-bottom: 0.55rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.13em; color: var(--ink-500); text-transform: uppercase; }
.wb-pills, .wb-lengths { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.wb-pill, .wb-len {
  min-height: 44px; padding: 0.5rem 0.95rem; border-radius: 999px; font-size: 0.88rem; font-weight: 500;
  border: 1px solid var(--border); background: #fff; color: var(--ink-800);
  white-space: normal; overflow-wrap: anywhere; max-width: 100%;
}
.wb-len { min-width: 44px; font-family: var(--font-mono); }
.wb-pill.is-active, .wb-len.is-active { background: var(--emerald-500); border-color: var(--emerald-500); color: #fff; }
.wb-unit { font-size: 0.86rem; color: var(--ink-500); }
.wb-grid { display: grid; gap: 1.75rem; grid-template-columns: minmax(0, 1fr); }
.wb-left, .wb-right { min-width: 0; }
@media (min-width: 960px) { .wb-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); align-items: start; } }
.stage-list { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: 0.8rem; }
.stage-item { display: flex; align-items: flex-start; gap: 0.85rem; color: var(--ink-500); }
.stage-item.is-active { color: var(--ink-900); }
.stage-stamp { flex-shrink: 0; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; font-family: var(--font-mono); font-size: 0.76rem; background: var(--copper-100); color: var(--copper-800); }
.stage-item.is-active .stage-stamp { background: var(--emerald-500); color: #fff; }
.stage-item strong { font-family: var(--font-display); font-size: 1.15rem; font-weight: 500; }
.stage-tag { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-500); margin-left: 0.35rem; }
.stage-item p { margin: 0.18rem 0 0; font-size: 0.9rem; color: var(--ink-600); }
.scrubber-box { background: var(--emerald-50); border: 1px solid var(--plate-border); border-radius: 20px; padding: 1.2rem; min-width: 0; }
.scrubber-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; flex-wrap: wrap; }
.scrubber-head .wb-label { margin-bottom: 0; }
.replay-btn { min-height: 44px; padding: 0.45rem 0.95rem; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.76rem; }
.range-brass {
  width: 100%; height: 44px; margin: 0.35rem 0 0.55rem; cursor: pointer;
  appearance: none; -webkit-appearance: none; background: transparent;
}
.range-brass::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--copper-300), var(--emerald-100));
}
.range-brass::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px;
  border-radius: 999px; background: var(--emerald-500); border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(12, 25, 20, 0.28);
}
.range-brass::-moz-range-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--copper-300), var(--emerald-100));
}
.range-brass::-moz-range-thumb {
  width: 22px; height: 22px; border-radius: 999px;
  background: var(--emerald-500); border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(12, 25, 20, 0.28);
}
.scrubber-caption { margin: 0 0 1rem; font-size: 0.94rem; color: var(--ink-800); }
.mono-cycle { font-family: var(--font-mono); font-size: 0.78rem; color: var(--emerald-600); margin-right: 0.45rem; }
.bar-chart { display: flex; gap: 0.45rem; height: 80px; margin-bottom: 0.65rem; align-items: stretch; overflow-x: auto; }
.bar-col { flex: 1 0 44px; min-height: 44px; display: flex; flex-direction: column; border-radius: 10px; overflow: hidden; border: 2px solid transparent; opacity: 0.6; }
.bar-col.is-active { opacity: 1; border-color: var(--emerald-500); }
.bar-seg-slate { background: #6b96c4; }
.bar-seg-copper { background: var(--copper-300); }
.bar-seg-emerald { background: var(--emerald-400); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 0.85rem; font-size: 0.8rem; color: var(--ink-600); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-right: 0.35rem; }
.dot-emerald { background: var(--emerald-500); }
.dot-copper { background: var(--copper-400); }
.dot-slate { background: var(--slate-500); }
.compass-stage { display: grid; place-items: center; padding: 0.25rem 0 0.75rem; }
.compass-svg { width: min(100%, 275px); height: auto; overflow: visible; }
.compass-top { font-family: var(--font-mono); font-size: 10px; fill: var(--ink-900); letter-spacing: 0.14em; }
.compass-num { font-family: var(--font-mono); font-size: 15px; font-weight: 500; fill: var(--ink-900); }
@media (prefers-reduced-motion: no-preference) { #compass-orbit { animation: compass-sweep 14s linear infinite; } }
@keyframes compass-sweep { from { transform: translate(160px, 160px) rotate(0deg); } to { transform: translate(160px, 160px) rotate(360deg); } }
.savings-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.9rem 1.1rem; margin-bottom: 1.1rem; border-radius: 16px; background: var(--vellum-day); border: 1px solid var(--border); }
.savings-amount { font-family: var(--font-display); font-size: 1.45rem; font-weight: 500; color: var(--emerald-700); }
.plan-chip { font-family: var(--font-mono); font-size: 0.75rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: var(--emerald-100); color: var(--emerald-700); max-width: 100%; overflow-wrap: anywhere; }
.meters-grid { display: grid; gap: 0.8rem 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .meters-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.meter-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.84rem; margin-bottom: 0.3rem; }
.meter-head strong { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-500); }
.meter-track { height: 5px; border-radius: 999px; background: var(--emerald-100); overflow: hidden; }
.meter-fill { height: 100%; border-radius: 999px; background: var(--emerald-500); transition: width 0.45s var(--ease-expo); }
.wb-footnote { margin: 1.5rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border); font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.1em; color: var(--ink-500); }
.wb-bottom-cta { margin-top: 1.4rem; }

/* Begin & Footer */
.section-begin { position: relative; overflow: hidden; text-align: center; padding: clamp(4.5rem, 8vw, 7.5rem) 0; background: radial-gradient(ellipse at 50% 25%, rgba(252, 234, 217, 0.82), var(--vellum-day) 72%); }
.begin-inner { max-width: 48rem; }
.begin-lede { margin-inline: auto; }
.site-footer { position: relative; background: var(--vellum-day); }
.footer-body { background: var(--vault-950); color: #fff; padding: 2.5rem 0 3rem; }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; padding-bottom: 2.25rem; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; } }
.footer-tagline { margin: 0.8rem 0 0; color: rgba(255, 255, 255, 0.72); max-width: 32ch; }
.footer-col { display: flex; flex-direction: column; gap: 0.45rem; min-width: 0; }
.footer-col h4 { margin: 0 0 0.4rem; font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--copper-300); }
.footer-col a, .footer-link-btn { color: rgba(255, 255, 255, 0.82); font-size: 0.92rem; text-align: left; min-height: 44px; display: inline-flex; align-items: center; max-width: 100%; overflow-wrap: anywhere; }
.footer-col a:hover, .footer-link-btn:hover { color: #fff; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; padding-top: 1.4rem; font-family: var(--font-mono); font-size: 0.76rem; color: rgba(255, 255, 255, 0.62); }

/* Dialogs, Forms, Tables, Alerts */
dialog.mobile-menu, dialog.action-modal {
  border: 1px solid var(--plate-border); border-radius: 24px; padding: 1.5rem;
  background: #fff; color: var(--ink-900); box-shadow: var(--shadow-lift);
  opacity: 0; transform: translateY(10px) scale(0.98);
  transition: opacity 0.25s ease-out, transform 0.25s var(--ease-expo), display 0.25s, overlay 0.25s;
  transition-behavior: allow-discrete;
}
dialog.mobile-menu[open], dialog.action-modal[open] { opacity: 1; transform: translateY(0) scale(1); }
@starting-style { dialog.mobile-menu[open], dialog.action-modal[open] { opacity: 0; transform: translateY(10px) scale(0.98); } }
dialog::backdrop { background: rgba(12, 25, 20, 0.48); backdrop-filter: blur(6px); }
dialog.mobile-menu { width: min(calc(100% - 2rem), 24rem); margin: 1rem auto auto; }
dialog.action-modal { width: min(calc(100% - 2rem), 28rem); }
.mobile-menu-head, .modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.1rem; }
.dialog-close { width: 44px; height: 44px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--border); display: grid; place-items: center; color: var(--ink-700); }
.mobile-menu-links { display: grid; gap: 0.25rem; margin-bottom: 1.15rem; }
.mobile-nav-link { padding: 0.7rem 0.5rem; min-height: 44px; display: flex; align-items: center; border-bottom: 1px solid var(--border); font-weight: 500; max-width: 100%; overflow-wrap: anywhere; }
.modal-form { display: grid; gap: 0.95rem; }
.modal-status { margin: 0; font-size: 0.88rem; color: var(--emerald-700); min-height: 1.2em; }
.field { display: grid; gap: 0.35rem; font-size: 0.88rem; font-weight: 600; color: var(--ink-800); min-width: 0; }
.field input, .field select, .field textarea, .ws-status-select {
  width: 100%; max-width: 100%; min-width: 0; min-height: 44px; padding: 0.58rem 0.85rem; border-radius: 12px;
  border: 1px solid var(--border); font: inherit; font-size: 1rem; font-weight: 400;
  color: var(--ink-900); background: var(--vellum-day);
}
.field textarea { min-height: 92px; resize: vertical; }
.field input[type="file"] { padding: 0.55rem; background: var(--emerald-50); }
.table-wrap { width: 100%; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: 14px; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 0.88rem; min-width: 480px; }
th, td { text-align: left; padding: 0.7rem 0.8rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--vellum-dawn); font-weight: 700; color: var(--ink-900); white-space: nowrap; }
.alert { padding: 0.85rem 1rem; border-radius: 12px; border: 1px solid var(--border); font-size: 0.92rem; overflow-wrap: anywhere; }
.alert-warn { background: #fef3c7; color: #8c3f0e; border-color: #f59e0b; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #ef4444; }
.alert-ok { background: var(--emerald-50); color: var(--emerald-700); border-color: #279472; }

@media (prefers-reduced-motion: reduce) {
  .plate-lift, .btn-primary, .btn-primary::before, .meter-fill, .brand-mark { transition-duration: 0.01s; }
}
