/* Kernel public site — design tokens and components. Source of truth: design-system/kernel/MASTER.md (v2) */
:root {
  color-scheme: dark;
  --bg: #05080D;
  --bg-2: #08101A;
  --surface: #0C1420;
  --surface-2: #111B2A;
  --glass: rgba(14, 22, 34, .62);
  --line: #1B2738;
  --line-2: #2A3A50;
  --ink: #EEF3F8;
  --ink-2: #C5D0DC;
  --muted: #8E9DB0;
  --water: #3FA7E0;          /* primary: irrigation / water blue */
  --water-hi: #8CCBF0;       /* light water for text accents on dark */
  --water-deep: #0E3F63;
  --water-glow: rgba(63, 167, 224, .32);
  --on-water: #04121D;
  --wheat: #E3B65E;          /* secondary accent: harvest wheat */
  --clay: #E58A73;           /* negative change */
  --silver: #C3CEDA;
  --c1: #4FB3EA; --c2: #E3B65E; --c3: #C3CEDA; --c4: #E58A73;
  --radius: 20px;
  --radius-sm: 12px;
  --display: "Outfit", "Geist", system-ui, sans-serif;
  --sans: "Geist", "Inter", "Segoe UI", system-ui, sans-serif;
  --mono: "Geist Mono", "JetBrains Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --t-fast: 160ms; --t-med: 280ms; --t-slow: 600ms;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1200px;
  /* surfaces that sit over the moving background */
  --panel: rgba(9, 15, 24, .86);
  --panel-2: rgba(9, 15, 24, .92);
  --nav-bg: rgba(8, 13, 21, .72);
  --nav-bg-2: rgba(6, 10, 16, .86);
  --menu-bg: rgba(6, 10, 16, .96);
  --chip-bg: rgba(10, 16, 26, .66);
  --askbar-bg: rgba(10, 17, 27, .88);
  --btn-bg: rgba(255, 255, 255, .03);
  --hover: rgba(255, 255, 255, .05);
  --water-tint: rgba(63, 167, 224, .08);
  --light-hi: #FFFFFF;
  --card-grad: linear-gradient(160deg, rgba(23, 36, 54, .96), rgba(9, 15, 24, .97) 55%);
  --card-shadow: 0 30px 60px -25px rgba(0, 0, 0, .8);
  --pillar-grad: linear-gradient(170deg, rgba(17, 27, 42, .9), rgba(8, 13, 21, .9));
  --segment-bg: rgba(7, 12, 19, .94);
  --segment-hover: rgba(14, 24, 38, .96);
  --featured-grad: linear-gradient(180deg, rgba(16, 40, 62, .9), rgba(9, 15, 24, .92));
  --cta-bg: radial-gradient(80% 120% at 50% 0%, rgba(63, 167, 224, .22), transparent 70%), rgba(8, 13, 21, .9);
  --foot-bg: rgba(5, 8, 13, .9);
  --backdrop: rgba(2, 4, 8, .72);
  --outline-word: rgba(140, 203, 240, .16);
  /* background field + charts (read by site.js) */
  --field-rgb: 79, 179, 234; --field-alt-rgb: 227, 182, 94; --field-strength: 1;
  --grid: rgba(255, 255, 255, .05);
  --tooltip-bg: rgba(9, 15, 24, .96);
}

/* Light theme (MASTER.md v2.1): same water-blue accent, no green, every text color AA on --bg and --surface */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #F5F8FB;
  --bg-2: #EDF2F7;
  --surface: #FFFFFF;
  --surface-2: #EDF2F7;
  --glass: rgba(255, 255, 255, .7);
  --line: #DCE4EE;
  --line-2: #C3D0DE;
  --ink: #0B1726;
  --ink-2: #2C3D52;
  --muted: #536379;
  --water: #1B76B5;
  --water-hi: #0F5E94;
  --water-deep: #BBD7EC;
  --water-glow: rgba(27, 118, 181, .22);
  --on-water: #FFFFFF;
  --wheat: #8C5E0A;
  --clay: #B03F27;
  --silver: #6A7A8E;
  --c1: #1B76B5; --c2: #B37A10; --c3: #6A7A8E; --c4: #C2502F;
  --panel: rgba(255, 255, 255, .9);
  --panel-2: rgba(255, 255, 255, .96);
  --nav-bg: rgba(255, 255, 255, .78);
  --nav-bg-2: rgba(255, 255, 255, .93);
  --menu-bg: rgba(255, 255, 255, .98);
  --chip-bg: rgba(255, 255, 255, .8);
  --askbar-bg: rgba(255, 255, 255, .96);
  --btn-bg: rgba(255, 255, 255, .7);
  --hover: rgba(11, 23, 38, .05);
  --water-tint: rgba(27, 118, 181, .08);
  --light-hi: #22364F;
  --card-grad: linear-gradient(160deg, #FFFFFF, #F0F5FA 60%);
  --card-shadow: 0 24px 50px -28px rgba(15, 40, 70, .35);
  --pillar-grad: linear-gradient(170deg, #FFFFFF, #F3F7FB);
  --segment-bg: #FFFFFF;
  --segment-hover: #F2F7FC;
  --featured-grad: linear-gradient(180deg, #E5F0FA, #FFFFFF);
  --cta-bg: radial-gradient(80% 120% at 50% 0%, rgba(27, 118, 181, .14), transparent 70%), #FFFFFF;
  --foot-bg: rgba(255, 255, 255, .86);
  --backdrop: rgba(11, 23, 38, .45);
  --outline-word: rgba(27, 118, 181, .16);
  --field-rgb: 27, 118, 181; --field-alt-rgb: 179, 122, 16; --field-strength: .75;
  --grid: rgba(11, 23, 38, .07);
  --tooltip-bg: rgba(255, 255, 255, .98);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 88px; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); transition: background-color var(--t-med), color var(--t-med);
  min-height: 100dvh; overflow-x: clip; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.025em; line-height: 1.08; margin: 0; text-wrap: balance; }
p { margin: 0; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img, svg { display: block; }
:focus-visible { outline: 2px solid var(--water-hi); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 10px; z-index: 200; }
.skip:focus { left: 8px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-family: var(--mono); font-feature-settings: "tnum" 1; letter-spacing: -.02em; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------------------------------------------------------------- background field (canvas) */
.field { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
.field canvas { width: 100%; height: 100%; }
.field::after { content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0%, transparent 40%, var(--bg) 100%); }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; top: 14px; left: 0; right: 0; z-index: 100; padding: 0 var(--gutter); }
.nav__bar { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 18px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--nav-bg); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  transition: border-color var(--t-med) var(--ease), background var(--t-med) var(--ease); }
.nav.is-scrolled .nav__bar { border-color: var(--line-2); background: var(--nav-bg-2); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 28px; height: 28px; }
.brand span { font-family: var(--display); font-weight: 600; font-size: 21px; letter-spacing: -.03em; }
.nav__links { display: flex; gap: 4px; margin: 0 auto; list-style: none; padding: 0; }
.nav__links a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 15px;
  transition: color var(--t-fast), background var(--t-fast); }
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--ink); background: var(--hover); }
.nav__menu { display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line-2);
  background: transparent; cursor: pointer; align-items: center; justify-content: center; }
@media (max-width: 860px) {
  .nav__links { display: none; position: absolute; top: calc(100% + 8px); left: var(--gutter); right: var(--gutter);
    flex-direction: column; padding: 8px; border-radius: 20px; border: 1px solid var(--line-2); background: var(--menu-bg); }
  .nav.is-open .nav__links { display: flex; }
  .nav__links a { padding: 12px 14px; font-size: 16px; }
  .nav__menu { display: inline-flex; }
  .nav__bar .btn--sm { display: none; }
  .nav.is-open .nav__links .nav__cta { display: block; }
}
.nav__cta { display: none; }
.theme-toggle { width: 40px; height: 40px; flex: none; border-radius: 50%; border: 1px solid var(--line-2); background: var(--btn-bg);
  color: var(--ink-2); cursor: pointer; display: inline-grid; place-items: center; padding: 0;
  transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.theme-toggle:hover { border-color: var(--water); color: var(--ink); background: var(--water-tint); }
.theme-toggle .icon { width: 18px; height: 18px; }
@media (max-width: 860px) { .nav__bar .theme-toggle { margin-left: auto; } .nav__bar .theme-toggle + .nav__menu { margin-left: 0; } }

/* ---------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--btn-bg); color: var(--ink);
  font-weight: 500; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), box-shadow var(--t-med); }
.btn:hover { border-color: var(--water); background: var(--water-tint); }
.btn:active { transform: scale(.97); }
.btn--light { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn--light:hover { background: var(--light-hi); border-color: var(--light-hi); box-shadow: 0 0 0 6px var(--hover); }
.btn--water { background: var(--water); color: var(--on-water); border-color: var(--water); font-weight: 600; }
.btn--water:hover { background: var(--water-hi); border-color: var(--water-hi); box-shadow: 0 0 32px var(--water-glow); }
.btn--sm { min-height: 40px; padding: 8px 16px; font-size: 14px; }
.btn[disabled] { opacity: .5; cursor: progress; }

/* ---------------------------------------------------------------- sections */
.section { padding: clamp(80px, 12vw, 150px) 0; position: relative; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--water-hi); font-weight: 500; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.section__head { max-width: 760px; margin-bottom: clamp(36px, 6vw, 64px); }
.section__head h2 { font-size: clamp(34px, 5.4vw, 64px); margin-top: 14px; }
.section__head p { color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); margin-top: 16px; max-width: 620px; }
.section__head--center { margin-left: auto; margin-right: auto; text-align: center; }
.section__head--center p { margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- hero + ask bar */
.hero { min-height: 100dvh; display: flex; align-items: center; padding: 130px 0 70px; }
.hero__inner { text-align: center; width: 100%; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 8px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--chip-bg); font-size: 13.5px; color: var(--ink-2); }
.pill b { color: var(--ink); font-weight: 600; }
.nowrap { white-space: nowrap; }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--water); box-shadow: 0 0 0 4px rgba(63,167,224,.18); margin-left: 4px; }
.hero h1 { font-size: clamp(46px, 9.2vw, 118px); letter-spacing: -.045em; margin: 26px auto 0; line-height: .98; max-width: 11ch; }
.hero h1 em { font-style: normal; color: transparent; background: linear-gradient(100deg, var(--water-hi), var(--water) 60%, #2C7FB8);
  -webkit-background-clip: text; background-clip: text; }
.hero__lede { color: var(--ink-2); font-size: clamp(17px, 1.9vw, 21px); max-width: 640px; margin: 24px auto 0; }

.ask { position: relative; max-width: 780px; margin: 40px auto 0; text-align: left; }
.ask__bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 22px; border-radius: 999px;
  background: var(--askbar-bg); border: 1px solid var(--line-2);
  box-shadow: 0 0 0 1px rgba(63,167,224,.06), 0 30px 80px -20px rgba(63,167,224,.25);
  transition: border-color var(--t-med), box-shadow var(--t-med); }
.ask__bar:focus-within { border-color: var(--water); box-shadow: 0 0 0 4px rgba(63,167,224,.16), 0 30px 80px -20px rgba(63,167,224,.4); }
.ask__bar .icon { color: var(--water-hi); }
.ask__bar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 18px; padding: 12px 0; }
.ask__bar input::placeholder { color: var(--muted); }
.ask__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.chip { min-height: 36px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--chip-bg);
  color: var(--ink-2); font-size: 14px; cursor: pointer; text-decoration: none; transition: border-color var(--t-fast), color var(--t-fast), background var(--t-fast); }
.chip:hover { border-color: var(--water); color: var(--ink); background: var(--water-tint); }
@media (max-width: 600px) {
  .ask__bar { padding-left: 16px; }
  .ask__bar input { font-size: 16px; }
  .ask__bar .btn { padding: 10px 16px; }
  .ask__chips .chip:nth-child(n+4) { display: none; }
}

.answer { margin-top: 18px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); text-align: left; }
.answer__steps { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 6px; font-size: 14px; color: var(--muted); }
.answer__steps li { display: flex; gap: 10px; align-items: baseline; animation: fadeUp var(--t-med) var(--ease) both; }
.answer__steps li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--water); flex: none; transform: translateY(-2px); }
.answer__working { display: flex; align-items: center; gap: 10px; font-weight: 500; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-2); border-top-color: var(--water); animation: spin 0.9s linear infinite; }
.answer__head { font-family: var(--display); font-size: clamp(19px, 2.2vw, 24px); line-height: 1.3; letter-spacing: -.015em; }
.answer__facts { margin: 12px 0 0; padding-left: 20px; color: var(--ink-2); font-size: 15px; display: grid; gap: 4px; }
.answer__chart { height: 220px; margin-top: 16px; }
.answer__note, .answer__src { font-size: 13px; color: var(--muted); margin-top: 12px; }
.answer__src code { font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.answer__foot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-top: 16px;
  padding-top: 14px; border-top: 1px solid var(--line); }
.answer__check { font-size: 13px; color: var(--water-hi); display: flex; gap: 6px; align-items: center; }
.answer__check.is-warn { color: var(--wheat); }
.chart-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.chart-actions--end { display: flex; justify-content: flex-end; margin-top: 10px; }
.answer__next { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.error { color: var(--clay); }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- commodity helix (scroll-driven, curved) */
.helix { position: relative; height: calc(100dvh + var(--helix-scroll, 2600px)); }
.helix__stage { position: sticky; top: 0; height: 100dvh; overflow: hidden; perspective: 1500px; perspective-origin: 50% 40%; }
.helix__head { position: absolute; top: clamp(90px, 13vh, 130px); left: 0; right: 0; text-align: center; z-index: 2; padding: 0 var(--gutter); pointer-events: none; }
.helix__head h2 { font-size: clamp(30px, 4.6vw, 54px); margin-top: 10px; }
.helix__word { position: absolute; left: 50%; top: 56%; transform: translate(-50%, -50%); font-family: var(--display); font-weight: 700;
  font-size: clamp(80px, 19vw, 300px); letter-spacing: -.06em; line-height: 1; color: transparent;
  -webkit-text-stroke: 1px var(--outline-word); white-space: nowrap; pointer-events: none; user-select: none; }
.helix__ring { position: absolute; left: 50%; top: 58%; width: 0; height: 0; transform-style: preserve-3d; }
.hcard { position: absolute; left: 0; top: 0; width: var(--card-w, 290px); height: var(--card-h, 370px);
  margin-left: calc(var(--card-w, 290px) / -2); margin-top: calc(var(--card-h, 370px) / -2);
  display: flex; flex-direction: column; padding: 22px; border-radius: 22px; text-decoration: none; color: var(--ink);
  background: var(--card-grad);
  border: 1px solid var(--line-2); box-shadow: var(--card-shadow), inset 0 1px 0 rgba(255,255,255,.05);
  backface-visibility: hidden; will-change: transform, opacity; transition: border-color var(--t-fast), box-shadow var(--t-med); }
.hcard:hover, .hcard:focus-visible { border-color: var(--water); box-shadow: 0 30px 70px -20px var(--water-glow), inset 0 1px 0 rgba(255,255,255,.08); }
.hcard__kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--water-hi); }
.hcard__name { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; line-height: 1.05; }
.hcard__stat { margin-top: auto; display: block; }
.hcard__value, .hcard__label, .hcard__kicker, .hcard__name { display: block; }
.hcard__value { font-family: var(--mono); font-size: 30px; letter-spacing: -.03em; }
.hcard__value small { font-size: 15px; color: var(--ink-2); letter-spacing: 0; }
.hcard__label { font-size: 13px; color: var(--muted); margin-top: 2px; }
.hcard__spark { height: 70px; margin: 14px -6px 0; }
.hcard__go { display: flex; justify-content: space-between; align-items: center; font-size: 14px; color: var(--ink-2); margin-top: 12px;
  padding-top: 12px; border-top: 1px solid var(--line); }
.hcard__go .icon { width: 18px; height: 18px; color: var(--water-hi); transition: transform var(--t-fast); }
.hcard:hover .hcard__go .icon { transform: translateX(4px); }
.helix__meta { position: absolute; bottom: clamp(20px, 5vh, 44px); left: 0; right: 0; display: flex; justify-content: center; align-items: center; gap: 16px; z-index: 2; }
.helix__count { font-family: var(--mono); font-size: 13px; color: var(--muted); min-width: 64px; text-align: right; }
.helix__dots { display: flex; gap: 6px; }
.helix__dots button { width: 24px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; display: grid; place-items: center; }
.helix__dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--line-2); transition: background var(--t-fast), transform var(--t-fast); }
.helix__dots button[aria-current="true"]::before { background: var(--water); transform: scale(1.5); }
.helix__current { font-size: 14px; color: var(--ink-2); min-width: 150px; }
@media (max-width: 600px) {
  .helix { --card-w: 228px; --card-h: 310px; }
  .hcard { padding: 18px; }
  .hcard__name { font-size: 23px; }
  .hcard__value { font-size: 25px; }
  .hcard__spark { height: 56px; }
  .helix__current, .helix__count { display: none; }
  .helix__dots button { width: 20px; }
}
/* Fallback: reduced motion or no 3D — a plain grid of the same cards */
.helix.is-flat { height: auto; padding: clamp(80px, 12vw, 140px) 0; }
.helix.is-flat .helix__stage { position: static; height: auto; overflow: visible; perspective: none; }
.helix.is-flat .helix__head { position: static; margin-bottom: 40px; }
.helix.is-flat .helix__word, .helix.is-flat .helix__meta { display: none; }
.helix.is-flat .helix__ring { position: static; width: auto; height: auto; transform: none !important; display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.helix.is-flat .hcard { position: relative; margin: 0; width: auto; transform: none !important; opacity: 1 !important; }

/* ---------------------------------------------------------------- feature pillars */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pillar { position: relative; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--pillar-grad); overflow: hidden; }
.pillar::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(63,167,224,.5), transparent 40%); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: 0; transition: opacity var(--t-med); }
.pillar:hover::before { opacity: 1; }
.pillar__icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: var(--water-hi);
  background: rgba(63,167,224,.1); border: 1px solid rgba(63,167,224,.25); }
.pillar__icon .icon { width: 22px; height: 22px; }
.pillar h3 { font-size: clamp(22px, 2.4vw, 28px); margin-top: 22px; }
.pillar p { color: var(--muted); margin-top: 10px; }
.pillar ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 14.5px; color: var(--ink-2); }
.pillar li { display: flex; gap: 10px; }
.pillar li::before { content: ""; width: 5px; height: 5px; margin-top: 9px; border-radius: 50%; background: var(--water); flex: none; }
.tier-tag { position: absolute; top: clamp(24px, 3vw, 36px); right: clamp(24px, 3vw, 36px); font-size: 12px; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--ink-2); }
.tier-tag--pro { color: var(--water-hi); border-color: rgba(63,167,224,.4); }
.tier-tag--max { color: var(--wheat); border-color: rgba(227,182,94,.4); }
@media (max-width: 760px) { .pillars { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- example answers */
.examples { display: grid; gap: 20px; }
.example { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(20px, 3vw, 40px); align-items: center;
  padding: clamp(22px, 3vw, 36px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.example:nth-child(even) { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.example:nth-child(even) .example__text { order: 2; }
.example__q { display: inline-block; padding: 10px 16px; border-radius: 16px 16px 16px 4px; background: var(--surface-2);
  border: 1px solid var(--line-2); font-size: 15px; color: var(--ink); }
.example__a { font-family: var(--display); font-size: clamp(19px, 2vw, 23px); line-height: 1.35; letter-spacing: -.015em; margin-top: 18px; }
.example__tag { display: inline-block; margin-top: 18px; font-size: 12.5px; color: var(--wheat); letter-spacing: .04em; }
.example__chart { height: 300px; }
.example__src { font-size: 12.5px; color: var(--muted); margin-top: 8px; }
.example__src code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .example, .example:nth-child(even) { grid-template-columns: 1fr; }
  .example:nth-child(even) .example__text { order: 0; }
  .example__chart { height: 250px; }
}

/* ---------------------------------------------------------------- segments */
.segments { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.segment { padding: clamp(22px, 2.6vw, 32px); background: var(--segment-bg); transition: background var(--t-med); }
.segment:hover { background: var(--segment-hover); }
.segment__n { font-family: var(--mono); font-size: 12.5px; color: var(--water-hi); }
.segment h3 { font-size: 21px; margin-top: 14px; }
.segment p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.segment__ask { text-decoration: none; color: inherit; display: block; border-radius: 6px; }
.segment__ask:hover q { color: var(--ink); border-left-color: var(--water); }
.segment q { display: block; margin-top: 16px; font-size: 14px; color: var(--ink-2); quotes: "“" "”"; padding-left: 12px; border-left: 2px solid var(--water-deep); }
@media (max-width: 900px) { .segments { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .segments { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- tiers */
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: stretch; }
.tier { display: flex; flex-direction: column; padding: clamp(24px, 3vw, 34px); border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--panel); }
.tier--featured { border-color: rgba(63,167,224,.55); background: var(--featured-grad);
  box-shadow: 0 30px 80px -30px var(--water-glow); }
.tier__name { font-family: var(--display); font-size: 28px; font-weight: 600; display: flex; align-items: center; gap: 10px; }
.tier__badge { font-family: var(--sans); font-size: 11.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 3px 9px;
  border-radius: 999px; background: var(--water); color: var(--on-water); }
.tier__for { color: var(--muted); margin-top: 6px; font-size: 15px; }
.tier__price { font-family: var(--mono); font-size: 14px; color: var(--ink-2); margin-top: 20px; padding: 10px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.tier ul { list-style: none; padding: 0; margin: 20px 0 26px; display: grid; gap: 10px; font-size: 15px; color: var(--ink-2); }
.tier li { display: flex; gap: 10px; align-items: flex-start; }
.tier li .icon { width: 18px; height: 18px; color: var(--water-hi); margin-top: 3px; }
.tier .btn { margin-top: auto; width: 100%; }
@media (max-width: 900px) { .tiers { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; } }

/* ---------------------------------------------------------------- CTA band + footer */
.cta-band { text-align: center; padding: clamp(48px, 7vw, 90px) var(--gutter); border-radius: 28px; border: 1px solid var(--line-2);
  background: var(--cta-bg); }
.cta-band h2 { font-size: clamp(32px, 5vw, 58px); }
.cta-band p { color: var(--ink-2); margin: 16px auto 0; max-width: 560px; }
.cta-band .btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 30px; }

.foot { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; background: var(--foot-bg); }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.foot h4 { font-family: var(--sans); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.foot ul { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 4px; }
.foot ul a { display: inline-block; padding: 4px 0; color: var(--ink-2); text-decoration: none; font-size: 14.5px; }
.foot ul a:hover { color: var(--ink); }
.foot__tag { color: var(--muted); font-size: 15px; margin-top: 14px; max-width: 320px; }
.foot__legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); display: grid; gap: 6px; }
@media (max-width: 760px) { .foot__grid { grid-template-columns: 1fr 1fr; } .foot__grid > :first-child { grid-column: 1 / -1; } }

/* ---------------------------------------------------------------- waitlist dialog */
.dialog { border: 1px solid var(--line-2); border-radius: 24px; background: var(--surface); color: var(--ink); padding: 0; width: min(480px, calc(100% - 32px)); }
.dialog::backdrop { background: var(--backdrop); backdrop-filter: blur(4px); }
.dialog__body { padding: 28px; }
.dialog h2 { font-size: 28px; }
.dialog p { color: var(--ink-2); margin-top: 12px; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; flex-wrap: wrap; }
.wl__field { display: block; margin-top: 16px; }
.wl__field > span { display: block; font-size: 14px; color: var(--ink-2); margin-bottom: 6px; }
.wl__field em { font-style: normal; color: var(--muted); }
.wl__field input, .wl__field select, .wl__field textarea { width: 100%; min-height: 44px; padding: 10px 14px; font: inherit;
  font-size: 16px; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; }
.wl__field textarea { resize: vertical; }
.wl__field input:focus-visible, .wl__field select:focus-visible, .wl__field textarea:focus-visible {
  outline: 2px solid var(--water); outline-offset: 2px; }
.wl__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.wl__error { color: #E5484D; min-height: 1.2em; font-size: 14px; }
.wl__fine { font-size: 13px; color: var(--muted) !important; }

/* ---------------------------------------------------------------- commodity page */
.c-hero { padding: 150px 0 40px; text-align: center; position: relative; }
.c-hero__kicker { color: var(--water-hi); }
.c-hero h1 { font-size: clamp(56px, 13vw, 170px); letter-spacing: -.055em; line-height: .92; margin-top: 18px; }
.c-hero__rule { height: 1px; margin-top: clamp(20px, 3vw, 36px); background: linear-gradient(90deg, transparent, var(--water) 50%, transparent); opacity: .6; }
.c-over { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: end; padding: 44px 0 40px; }
.c-over h2 { font-size: clamp(24px, 2.6vw, 32px); }
.c-over p { color: var(--ink-2); font-size: clamp(16px, 1.6vw, 19px); margin-top: 14px; max-width: 720px; }
.c-over .btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 760px) { .c-over { grid-template-columns: 1fr; } }
.c-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.c-stat { padding: 28px 20px; text-align: center; }
.c-stat + .c-stat { border-left: 1px solid var(--line); }
.c-stat__value { font-family: var(--mono); font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; }
.c-stat__label { color: var(--ink-2); font-size: 14.5px; margin-top: 6px; }
.c-stat__meta { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.delta { font-family: var(--mono); font-size: 12.5px; }
.delta.up { color: var(--water-hi); }
.delta.down { color: var(--clay); }
@media (max-width: 860px) {
  .c-stats { grid-template-columns: repeat(2, 1fr); }
  .c-stat:nth-child(3) { border-left: 0; }
  .c-stat:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 480px) {
  .c-stat { padding: 22px 10px; }
  .c-stat__value { font-size: 19px; white-space: nowrap; }
}
.c-charts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.c-chart { padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); min-width: 0; }
.c-chart--wide { grid-column: 1 / -1; }
.c-chart h3 { font-size: 19px; }
.c-chart__box { height: 300px; margin-top: 12px; }
.c-chart__src { font-size: 12px; color: var(--muted); margin-top: 8px; }
.c-chart__src code { font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.c-chart__foot { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-start; justify-content: space-between; margin-top: 8px; }
.c-chart__foot details { flex: 1 1 200px; min-width: 0; }
.c-chart details { font-size: 13px; color: var(--muted); }
.c-chart summary { cursor: pointer; padding: 6px 0; }
.c-chart table { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 12px; margin-top: 6px; }
.c-chart td, .c-chart th { padding: 4px 6px; border-bottom: 1px solid var(--line); text-align: right; }
.c-chart th:first-child, .c-chart td:first-child { text-align: left; }
.c-chart .tablewrap { max-height: 220px; overflow: auto; }
@media (max-width: 860px) { .c-charts { grid-template-columns: 1fr; } .c-chart__box { height: 260px; } }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.tab { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2);
  cursor: pointer; font-size: 14px; transition: all var(--t-fast); }
.tab[aria-selected="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab:hover:not([aria-selected="true"]) { border-color: var(--water); color: var(--ink); }
.qlist { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.q { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--panel); color: var(--ink); text-decoration: none; font-size: 15.5px;
  transition: border-color var(--t-fast), background var(--t-fast); }
.q:hover { border-color: var(--water); background: var(--water-tint); }
.q .icon { color: var(--water-hi); width: 18px; height: 18px; }
.qnote { font-size: 13px; color: var(--muted); margin-top: 14px; }
@media (max-width: 760px) { .qlist { grid-template-columns: 1fr; } }

.reports { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.report { position: relative; padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.report__thumb { height: 120px; border-radius: 12px; margin-bottom: 20px; border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(63,167,224,.08), transparent), repeating-linear-gradient(90deg, transparent 0 38px, var(--hover) 38px 39px); position: relative; overflow: hidden; }
.report__thumb svg { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); }
.report h3 { font-size: 20px; }
.report p { color: var(--muted); font-size: 15px; margin-top: 8px; }
.report .tier-tag { top: 36px; right: 36px; background: var(--panel-2); }
@media (max-width: 900px) { .reports { grid-template-columns: 1fr; } }

.others { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------------- why Kernel (comparison) */
.compare { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.compare__row { display: grid; grid-template-columns: 1.1fr 1.4fr 1.8fr; gap: 16px; padding: 14px 20px; border-top: 1px solid var(--line); }
.compare__row:first-child { border-top: 0; }
.compare__row > div:first-child { font-weight: 600; color: var(--ink); }
.compare__row > div:nth-child(2) { color: var(--muted); }
.compare__row > div:nth-child(3) { color: var(--ink); }
.compare__row--head { background: var(--surface-2); font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.compare__row--head > div:nth-child(3) { color: var(--water); }
.compare__fine { margin-top: 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) {
  .compare__row { grid-template-columns: 1fr; gap: 4px; padding: 14px 16px; }
  .compare__row--head { display: none; }
  .compare__row > div:nth-child(2)::before { content: "USDA: "; font-weight: 600; }
  .compare__row > div:nth-child(3)::before { content: "Kernel: "; font-weight: 600; color: var(--water); }
}

/* streamed headline: shown while the number check runs, replaced by the checked answer */
.answer__draft { opacity: .72; }
.answer__checking { font-size: 13px; color: var(--muted); margin: 4px 0 10px; }

.tier__price span { font-size: .5em; font-weight: 500; color: var(--muted); }

/* ---------------------------------------------------------------- sign-in + member status */
.wrap--narrow { max-width: 560px; }
.signin { padding-top: clamp(120px, 16vh, 180px); }
.signin h1 { font-size: clamp(32px, 5vw, 48px); margin-top: 10px; }
.signin__lead { color: var(--ink-2); margin-top: 14px; }
.signin__bad { color: #E5484D; min-height: 1.2em; margin-top: 16px; }
.nav__member { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.nav__member a { color: var(--muted); margin-left: 8px; }

.signin__or { font: 600 18px/1.3 var(--display); margin: 36px 0 0; padding-top: 24px; border-top: 1px solid var(--line); }

/* ---------------------------------------------------------------- account + admin pages */
.acct { padding-top: clamp(120px, 16vh, 170px); padding-bottom: 80px; }
.acct h1 { font-size: clamp(30px, 4.5vw, 44px); margin-top: 10px; }
.acct__card { margin-top: 24px; padding: clamp(20px, 3vw, 28px); border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.acct__card h2 { font-size: 20px; }
.acct__card p { color: var(--ink-2); margin: 10px 0 0; }
.acct__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; margin-top: 16px; }
.acct__stat span { display: block; font-size: 13px; color: var(--muted); }
.acct__stat strong { display: block; font: 600 22px/1.3 var(--display); margin-top: 2px; overflow-wrap: anywhere; }
.acct__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.acct__danger { border-color: rgba(229, 72, 77, .45); }
.acct__danger h2 { color: #E5484D; }
.btn--danger { background: #E5484D; border-color: #E5484D; color: #fff; font-weight: 600; }
.btn--danger:hover { background: #CE3A3F; border-color: #CE3A3F; }
.acct__msg { min-height: 1.2em; margin-top: 12px; color: var(--ink-2); }
.acct__msg.is-bad { color: #E5484D; }
.wrap--mid { max-width: 1040px; }
.adm-table-wrap { overflow-x: auto; margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.adm-table th, .adm-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.adm-table th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; white-space: nowrap; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table td.num { font-family: var(--mono); white-space: nowrap; }
.adm-table select { min-height: 36px; padding: 4px 8px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: inherit; }
.adm-table .btn { min-height: 36px; padding: 6px 12px; font-size: 13px; }
.adm-off td { opacity: .5; }
.adm-form { display: grid; grid-template-columns: 2fr 1fr 2fr auto; gap: 12px; align-items: end; }
.adm-form .wl__field { margin-top: 0; }
@media (max-width: 720px) { .adm-form { grid-template-columns: 1fr; } }
.adm-link { display: flex; gap: 8px; margin-top: 12px; }
.adm-link input { flex: 1; min-width: 0; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); font: 13px var(--mono); }
.adm-check { grid-column: 1 / -1; display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.adm-check[hidden] { display: none; }
.adm-check input { width: 18px; height: 18px; accent-color: var(--water); }

/* ---------------------------------------------------------------- legal pages (/privacy, /terms) */
.legal { padding-top: clamp(120px, 16vh, 170px); }
.legal h1 { font-size: clamp(30px, 4.5vw, 44px); margin-top: 10px; }
.legal h2 { font-size: 21px; margin-top: 36px; }
.legal h3 { font-size: 17px; margin-top: 24px; }
.legal p, .legal li { color: var(--ink-2); }
.legal a { color: var(--water); }
.legal__table { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
.legal__table table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.legal__table th, .legal__table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal__table tr:last-child td { border-bottom: 0; }
