/* EN-GEM Agronomy Program — MSU SARC
   Design system: warm field-paper surfaces, MSU navy ink, gold accent, Manrope (matches the EN-GEM wordmark). */

@font-face { font-family: "Manrope"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-style: normal; font-display: swap; src: url("../fonts/manrope-latin-800-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ink: #0e1b2c;
  --ink-2: #26364b;
  --muted: #566273;
  --faint: #7d8796;
  --navy: #003875;
  --navy-deep: #0a2140;
  --gold: #f2b51d;
  --gold-soft: #fbe7b0;
  --paper: #f7f5ef;
  --paper-2: #efebe1;
  --surface: #ffffff;
  --line: #e3ded2;
  --line-2: #cfc9ba;
  --focus: #1c5cab;
  --ok: #0f7a3d;

  /* data colors (validated: dataviz palette slots 1–3, all-pairs) */
  --c-sw: #2a78d6;
  --c-ww: #eb6834;
  --c-hy: #1baf7a;
  --c-other: #b8b4a9;
  --c-none: #eeebe4;
  --seq-1: #cde2fb;
  --seq-2: #86b6ef;
  --seq-3: #3987e5;
  --seq-4: #1c5cab;
  --seq-5: #0d366b;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(14, 27, 44, .05), 0 12px 32px -18px rgba(14, 27, 44, .22);
  --shadow-lg: 0 2px 4px rgba(14, 27, 44, .05), 0 24px 60px -28px rgba(14, 27, 44, .35);
  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.6; font-weight: 400; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg { max-width: 100%; }
a { color: var(--navy); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); line-height: 1.12; letter-spacing: -0.02em; font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.2vw, 2.6rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; font-weight: 700; }
p { margin: 0 0 1em; }
.num, .tabular { font-variant-numeric: tabular-nums; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- header ---------- */
.top-strip { background: var(--navy-deep); color: #c9d4e3; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; font-weight: 600; }
.top-strip .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 36px; }
.top-strip a { color: #fff; text-decoration: none; letter-spacing: .04em; white-space: nowrap; }
.top-strip a:hover { text-decoration: underline; }
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.site-head-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); }
.brand img { height: 64px; width: auto; display: block; }
.brand-caption { border-left: 1px solid var(--line-2); padding-left: 14px; font-size: 11px; line-height: 1.35; letter-spacing: .12em; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; color: var(--ink-2); font-weight: 600; font-size: 14.5px; padding: 9px 12px; border-radius: 999px; transition: background .15s, color .15s; white-space: nowrap; }
.nav a:hover { background: var(--paper); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--ink); color: #fff; }
.nav a.nav-cta { border: 1px solid var(--line-2); }
.menu-button { display: none; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 14px; border-radius: 999px; cursor: pointer; min-height: 44px; }
.menu-button svg { width: 18px; height: 18px; }
@media (max-width: 1080px) {
  .brand-caption { display: none; }
  .menu-button { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 10px var(--gutter) 18px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-radius: 10px; font-size: 16px; }
}
@media (max-width: 520px) { .top-strip .wrap span { font-size: 10.5px; letter-spacing: .05em; } .brand img { height: 50px; } .site-head-inner { min-height: 66px; } }

/* ---------- buttons, labels ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 700; font-size: 15px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--navy); color: #fff; }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #ffc634; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { background: #fff; color: var(--ink); }
.btn-sm { min-height: 38px; padding: 8px 14px; font-size: 13.5px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--navy); margin-bottom: 14px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: var(--gold); border-radius: 2px; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--ink-2); line-height: 1.6; max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }
.badge-gold { background: var(--gold-soft); color: #5a4100; }
.badge-navy { background: #dfe8f5; color: var(--navy); }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration: none; }
.link-arrow svg { width: 16px; height: 16px; transition: transform .15s; }
.link-arrow:hover svg { transform: translateX(3px); }

/* ---------- layout ---------- */
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section-tight { padding: clamp(40px, 5vw, 64px) 0; }
.section-white { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: clamp(28px, 4vw, 44px); flex-wrap: wrap; }
.section-head .lead { margin: 12px 0 0; }
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 2.6vw, 30px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }
.card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .2s, box-shadow .2s, border-color .2s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); color: inherit; }
.card-link .link-arrow { margin-top: auto; padding-top: 18px; color: var(--navy); }
.icon-tile { width: 52px; height: 52px; border-radius: 14px; background: var(--paper); border: 1px solid var(--line); display: grid; place-items: center; margin-bottom: 18px; color: var(--ink); }
.icon-tile svg { width: 30px; height: 30px; }

/* ---------- page hero (inner pages) ---------- */
.page-hero { padding: clamp(40px, 6vw, 76px) 0 clamp(32px, 4vw, 52px); border-bottom: 1px solid var(--line); background: radial-gradient(1200px 400px at 100% 0%, #fff 0%, rgba(255,255,255,0) 70%), var(--paper); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 18ch; }
.page-hero .lead { margin-top: 16px; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }

/* ---------- home hero ---------- */
.hero { padding: clamp(36px, 6vw, 80px) 0 clamp(40px, 6vw, 72px); background: radial-gradient(900px 500px at 85% 20%, #ffffff 0%, rgba(255,255,255,0) 65%), var(--paper); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; letter-spacing: -0.035em; }
.hero h1 span { color: var(--navy); display: block; }
.hero .lead { margin: 22px 0 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-proof { margin-top: 28px; display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.hero-proof span { display: inline-flex; align-items: center; gap: 8px; }
.hero-proof svg { width: 16px; height: 16px; color: var(--ok); }
.hero-map { position: relative; }
.hero-map .card { padding: 18px 18px 14px; }
.hero-map-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 2px 4px 6px; }
.hero-map-head strong { font-size: 15px; }
@media (max-width: 920px) { .hero-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- stats ---------- */
.stat-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.stat { background: var(--surface); padding: 24px 24px 22px; }
.stat-value { font-size: clamp(2rem, 3.4vw, 2.8rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: .45em; font-weight: 700; letter-spacing: 0; color: var(--muted); margin-left: 4px; }
.stat-label { margin-top: 10px; font-weight: 700; font-size: 14.5px; }
.stat-meta { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 860px) { .stat-band { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stat-band { grid-template-columns: minmax(0, 1fr); } }
.source-line { margin-top: 14px; font-size: 12.5px; color: var(--muted); }

/* ---------- G x E x M ---------- */
.gem { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.gem-item { padding: clamp(22px, 3vw, 34px); position: relative; }
.gem-item + .gem-item { border-left: 1px solid var(--line); }
.gem-letter { font-size: 64px; font-weight: 800; line-height: .9; color: var(--paper-2); position: absolute; right: 22px; top: 18px; letter-spacing: -0.04em; }
.gem-item svg.gem-art { height: 70px; width: auto; display: block; margin-bottom: 18px; color: var(--ink); }
.gem-item h3 { font-size: 1.25rem; }
.gem-item p { color: var(--muted); margin: 8px 0 0; }
.gem-x { font-weight: 800; color: var(--gold); }
@media (max-width: 820px) { .gem { grid-template-columns: minmax(0, 1fr); } .gem-item + .gem-item { border-left: 0; border-top: 1px solid var(--line); } }

/* ---------- spotlight ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
@media (max-width: 920px) { .split { grid-template-columns: minmax(0, 1fr); } }
.big-number { font-size: clamp(2.8rem, 6vw, 4.4rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 10px 0; margin: 22px 0 0; padding: 0; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; padding-left: 18px; font-weight: 800; font-variant-numeric: tabular-nums; text-align: right; }
.kv > * { padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* ---------- dark band ---------- */
.band-dark { background: var(--navy-deep); color: #dbe3ee; border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
.band-dark h3 { color: #fff; font-size: 1.5rem; margin-bottom: 8px; }
.band-dark p { margin: 0; max-width: 60ch; }

/* ---------- people ---------- */
.person { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 24px; align-items: start; }
.monogram { width: 88px; height: 88px; border-radius: 22px; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 28px; letter-spacing: -0.02em; }
.person h3 { font-size: 1.6rem; }
.role { font-weight: 700; color: var(--ink-2); margin: 6px 0 2px; }
@media (max-width: 560px) { .person { grid-template-columns: minmax(0, 1fr); } }
.list-clean { list-style: none; padding: 0; margin: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-clean li:last-child { border-bottom: 0; }

/* ---------- research / resources ---------- */
.theme-nav { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 28px; }
.theme-nav a { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.theme-nav a:hover { border-color: var(--line-2); box-shadow: var(--shadow); }
.theme-nav strong { display: block; font-size: 15px; }
.theme-nav span.small { color: var(--muted); }
.theme-nav svg { width: 28px; height: 28px; flex: none; margin-top: 2px; }
@media (max-width: 860px) { .theme-nav { grid-template-columns: minmax(0, 1fr); } }
.theme { scroll-margin-top: 100px; }
.theme + .theme { margin-top: clamp(48px, 6vw, 80px); }
.theme-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 26px; }
.theme-num { font-size: 13px; font-weight: 800; letter-spacing: .14em; color: var(--navy); text-transform: uppercase; padding-top: 6px; }
.project { display: flex; flex-direction: column; }
.project .badge { align-self: flex-start; margin-bottom: 14px; }
.project h3 { font-size: 1.12rem; }
.project p { color: var(--ink-2); }
.project .partners { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line-2); font-size: 13.5px; color: var(--muted); }
.resource-list a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 4px; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink); }
.resource-list a:hover strong { text-decoration: underline; }
.resource-list a span.small { display: block; color: var(--muted); font-weight: 400; }
.resource-list svg { width: 18px; height: 18px; flex: none; color: var(--navy); }
.note { border-left: 3px solid var(--gold); background: #fffaf0; padding: 14px 18px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink-2); font-size: 14.5px; }

/* ---------- crop-testing site map ---------- */
.sites-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 920px) { .sites-layout { grid-template-columns: minmax(0, 1fr); } }
.sites-map svg { display: block; width: 100%; height: auto; }
.site-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.site-card { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; display: flex; justify-content: space-between; align-items: center; gap: 12px; cursor: pointer; width: 100%; font: inherit; text-align: left; color: var(--ink); transition: border-color .15s, background .15s; }
.site-card + .site-card { margin-top: 8px; }
.site-card:hover, .site-card.active { border-color: var(--ink); }
.site-card.active { background: var(--paper); }
.site-card.dim { opacity: .4; }
.site-tag { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.dot-winter { background: var(--c-ww); }
.dot-spring { background: var(--c-sw); }
.dot-both { background: conic-gradient(var(--c-ww) 0 50%, var(--c-sw) 50% 100%); }
.dot-station { background: var(--ink); box-shadow: 0 0 0 3px var(--gold); }

/* ---------- segmented / chips / selects ---------- */
.seg { display: inline-flex; background: var(--paper-2); border-radius: 999px; padding: 3px; gap: 2px; border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 700; color: var(--ink-2); padding: 6px 16px; border-radius: 999px; cursor: pointer; min-height: 36px; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 2px 8px -4px rgba(0,0,0,.2); }
.chip { border: 1px solid var(--line-2); background: #fff; color: var(--ink-2); font: inherit; font-size: 14px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; min-height: 40px; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; transition: border-color .15s, background .15s; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip .chip-year { font-size: 11px; font-weight: 700; color: var(--faint); }
.chip[aria-pressed="true"] .chip-year { color: #b8c4d4; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.select { appearance: none; -webkit-appearance: none; font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%230e1b2c' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; border: 1px solid var(--line-2); border-radius: 12px; padding: 10px 40px 10px 14px; min-height: 44px; width: 100%; cursor: pointer; }
.select:hover { border-color: var(--ink); }

/* ---------- atlas ---------- */
.atlas-controls { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 85px; z-index: 30; }
.atlas-controls-inner { display: grid; grid-template-columns: auto minmax(180px, 1fr) minmax(200px, 1.2fr) auto; gap: 14px 18px; align-items: end; padding-top: 14px; padding-bottom: 14px; }
@media (max-width: 1080px) { .atlas-controls { top: 66px; position: static; } }
@media (max-width: 860px) { .atlas-controls-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .atlas-controls-inner .field-measure { grid-column: 1 / -1; } .atlas-controls-inner .field-reset { grid-column: 1 / -1; } .seg { width: 100%; } .seg button { flex: 1; padding: 8px 6px; } }
@media (max-width: 520px) { .atlas-controls-inner { grid-template-columns: minmax(0, 1fr); } }
.crop-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 18px 0 6px; }
.crop-row .sep { width: 1px; height: 26px; background: var(--line-2); margin: 0 4px; }
@media (max-width: 640px) { .crop-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: thin; } }
.atlas-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(320px, 1fr); gap: 22px; align-items: start; padding: 14px 0 0; }
@media (max-width: 1020px) { .atlas-grid { grid-template-columns: minmax(0, 1fr); } }
.map-card { padding: 18px 18px 16px; }
.map-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px 18px; flex-wrap: wrap; margin: 0 4px 6px; }
.map-title h2 { font-size: 1.35rem; letter-spacing: -0.015em; }
.map-title p { margin: 4px 0 0; font-size: 13.5px; color: var(--muted); }
.map-wrap { position: relative; }
.map-svg { display: block; width: 100%; height: auto; touch-action: manipulation; }
.map-svg .county { stroke: #fff; stroke-width: .9; vector-effect: non-scaling-stroke; cursor: pointer; transition: opacity .25s, fill .3s; }
.map-svg .county:hover { stroke: var(--ink); stroke-width: 1.6; }
.map-svg .county.dim { opacity: .28; }
.map-svg .county.sel { stroke: var(--ink); stroke-width: 2.6; }
.map-svg .district { fill: none; stroke: #4c5868; stroke-width: 1.4; vector-effect: non-scaling-stroke; pointer-events: none; opacity: .75; }
.map-svg .state-line { fill: none; stroke: var(--ink); stroke-width: 1.6; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .lbl { font-family: var(--font); font-weight: 700; fill: var(--ink); paint-order: stroke; stroke: rgba(255,255,255,.92); stroke-linejoin: round; pointer-events: none; }
.map-svg .lbl-v { font-weight: 600; fill: var(--ink-2); }
.map-svg .lbl-dist { font-weight: 800; letter-spacing: .12em; fill: #4c5868; text-transform: uppercase; }
.map-svg .sel-ring { fill: none; stroke: var(--gold); stroke-width: 3; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-svg .county-hl { fill: none; stroke: var(--ink); stroke-width: 2; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(255,255,255,.75); text-align: center; }
.map-msg > div { max-width: 420px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px 20px; box-shadow: var(--shadow); }
.map-msg p { margin: 0 0 12px; color: var(--ink-2); }
.tooltip { position: absolute; z-index: 5; pointer-events: none; background: var(--ink); color: #fff; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.45; min-width: 170px; max-width: 260px; box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s; }
.tooltip.show { opacity: 1; transform: none; }
.tooltip strong { font-size: 14px; display: block; }
.tooltip .tt-sub { color: #aab7c8; font-size: 12px; }
.tooltip .tt-row { display: flex; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.tooltip .tt-row b { font-weight: 800; }
.legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 10px 4px 0; font-size: 12.5px; color: var(--ink-2); }
.legend .lg-title { font-weight: 800; color: var(--ink); margin-right: 2px; }
.legend .lg-item { display: inline-flex; align-items: center; gap: 6px; }
.legend .sw { width: 14px; height: 14px; border-radius: 4px; display: inline-block; flex: none; border: 1px solid rgba(0,0,0,.06); }
.legend .sw-hatch { background: repeating-linear-gradient(45deg, #d9d5cb 0 2px, #f6f4ef 2px 5px); }
.legend .ramp { display: inline-flex; align-items: stretch; }
.legend .ramp span { width: 46px; height: 12px; display: block; }
.legend .ramp-labels { display: flex; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.legend .ramp-wrap { display: inline-flex; flex-direction: column; gap: 3px; }
.legend .ramp-labels span { width: 46px; text-align: left; transform: translateX(-6px); }
.map-foot { display: flex; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 12px 4px 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }

.panel { position: sticky; top: 168px; }
@media (max-width: 1020px) { .panel { position: static; } }
.panel .card { padding: 22px; }
.panel-kicker { font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--navy); }
.panel h3 { font-size: 1.45rem; letter-spacing: -0.02em; margin: 6px 0 4px; }
.panel .panel-sub { font-size: 13.5px; color: var(--muted); margin: 0 0 16px; }
.panel-close { float: right; border: 1px solid var(--line-2); background: #fff; border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 12px; cursor: pointer; color: var(--ink-2); min-height: 34px; }
.panel-close:hover { border-color: var(--ink); }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 18px; }
.kpi { background: #fff; padding: 13px 14px; }
.kpi-v { font-size: 1.35rem; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.kpi-v small { font-size: .6em; font-weight: 700; color: var(--muted); letter-spacing: 0; }
.kpi-l { font-size: 12.5px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.kpi-l b { color: var(--ink-2); font-weight: 700; }
.kpi.wide { grid-column: 1 / -1; }
.delta-up { color: var(--ok); font-weight: 800; }
.delta-down { color: #b3361b; font-weight: 800; }
.block-title { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; font-weight: 800; color: var(--ink); margin: 20px 0 10px; }
.block-title span { font-weight: 600; color: var(--muted); font-size: 12px; }
.bars { display: flex; flex-direction: column; gap: 2px; }
.bar-row { display: grid; grid-template-columns: minmax(96px, 128px) minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 6px; border-radius: 8px; font-size: 13.5px; border: 0; background: transparent; font-family: inherit; text-align: left; color: var(--ink); width: 100%; cursor: pointer; }
.bar-row:hover, .bar-row.hl { background: var(--paper); }
.bar-row.static { cursor: default; }
.bar-row.static:hover { background: transparent; }
.bar-row.cur { background: #eef3fb; }
.bar-row .bl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.bar-row .bt { height: 10px; background: var(--paper-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.bar-row .bt i { display: block; height: 100%; background: var(--seq-4); border-radius: 0 4px 4px 0; min-width: 2px; }
.bar-row.cur .bt i { background: var(--ink); }
.bar-row .bv { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; font-size: 13px; }
.bar-row .bv small { color: var(--muted); font-weight: 600; margin-left: 4px; }
.bar-row.other .bl { color: var(--muted); font-style: italic; font-weight: 500; }
.bar-row.other .bt i { background: repeating-linear-gradient(45deg, #b9b4a8 0 2px, #e6e2d9 2px 5px); }
.panel-note { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); }
.trend svg { display: block; width: 100%; height: auto; overflow: visible; }
.trend .ax { stroke: var(--line); stroke-width: 1; }
.trend .tl { font-size: 10.5px; fill: var(--muted); font-family: var(--font); font-variant-numeric: tabular-nums; }
.trend .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend .pt { stroke: #fff; stroke-width: 2; }
.trend .xh { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.trend-key { display: flex; gap: 14px; font-size: 12px; color: var(--ink-2); margin-top: 4px; }
.trend-key i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.status { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); margin-bottom: 16px; }
.status svg { width: 20px; height: 20px; flex: none; color: var(--navy); margin-top: 1px; }
.econ { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.econ div { background: var(--paper); border-radius: 10px; padding: 10px; }
.econ b { display: block; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.econ span { font-size: 11.5px; color: var(--muted); }

.table-card { margin-top: 22px; }
.table-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.table-head h2 { font-size: 1.3rem; }
.table-scroll { overflow: auto; max-height: 640px; border: 1px solid var(--line); border-radius: 12px; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; min-width: 760px; }
table.data th, table.data td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data th:first-child, table.data td:first-child, table.data th:nth-child(2), table.data td:nth-child(2) { text-align: left; }
table.data thead th { background: var(--paper); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); font-weight: 800; position: sticky; top: 0; }
table.data thead th button { all: unset; cursor: pointer; display: flex; width: 100%; justify-content: flex-end; gap: 6px; align-items: center; }
table.data thead th:first-child button, table.data thead th:nth-child(2) button { justify-content: flex-start; }
table.data thead th button:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
table.data tbody tr { cursor: pointer; }
table.data tbody tr:hover { background: #fbfaf7; }
table.data tbody tr.cur { background: #eef3fb; }
table.data tbody tr.other td { color: var(--muted); font-style: italic; }
table.data td.na { color: var(--faint); }
.about-data h3 { margin: 26px 0 8px; font-size: 1.05rem; }
.about-data p, .about-data li { color: var(--ink-2); font-size: 15px; }
.about-data ul { padding-left: 20px; }
.about-data li { margin-bottom: 6px; }

/* ---------- footer ---------- */
.site-foot { background: var(--navy-deep); color: #b9c5d6; padding: clamp(48px, 6vw, 72px) 0 28px; margin-top: 0; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.foot-grid img { height: 64px; width: auto; display: block; margin-bottom: 16px; }
.site-foot h4 { color: #fff; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.site-foot a { color: #e3e9f2; text-decoration: none; display: block; padding: 4px 0; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.foot-base { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12.5px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: minmax(0, 1fr); } }

@media print {
  .site-head, .top-strip, .atlas-controls, .menu-button, .site-foot { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; }
}
[hidden] { display: none !important; }
.map-svg .lbl-inv { fill: #fff; stroke: rgba(10, 33, 64, .7); }
.map-svg .lbl-v.lbl-inv { fill: #e3ecf9; }
.kpis .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
.site-mk .mk-ring { fill: none; stroke: var(--gold); stroke-width: 2.5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .2s; }
.site-mk.on .mk-ring { opacity: 1; }

/* =====================================================================
   Crop Atlas v2: dark "studio" (map, panel, trends, tables)
   ===================================================================== */
.studio {
  --s-bg: #0a1424; --s-bg2: #0c182b; --s-card: #101d32; --s-card2: #15253d;
  --s-line: rgba(255,255,255,.08); --s-line2: rgba(255,255,255,.16);
  --s-ink: #eef3fa; --s-ink2: #b8c4d6; --s-muted: #8796ac; --s-up: #46d38a; --s-down: #ff8f7d;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(57,135,229,.20), transparent 62%),
    radial-gradient(800px 420px at -5% 0%, rgba(242,181,29,.09), transparent 58%),
    var(--s-bg);
  color: var(--s-ink); padding-bottom: clamp(48px, 6vw, 80px);
}
.studio a { color: #9fcbff; }
.studio h1, .studio h2, .studio h3 { color: #fff; }
.studio-head { padding-top: clamp(34px, 5vw, 64px); padding-bottom: 28px; }
.studio .crumbs, .studio .crumbs a { color: var(--s-muted); }
.studio .eyebrow { color: var(--gold); }
.studio-head h1 { font-size: clamp(2.3rem, 5.2vw, 4rem); letter-spacing: -0.035em; max-width: 17ch; line-height: 1.02; }
.studio-head h1 .yr { color: var(--gold); }
.studio-head .lead { color: var(--s-ink2); margin-top: 16px; }
.snap { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--s-line); border: 1px solid var(--s-line); border-radius: 20px; overflow: hidden; margin-top: 30px; }
.snap-tile { background: rgba(16, 29, 50, .88); padding: 18px 20px 16px; }
.snap-v { font-size: clamp(1.6rem, 2.7vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; color: #fff; font-variant-numeric: tabular-nums; line-height: 1.1; }
.snap-v small { font-size: .46em; color: var(--s-muted); margin-left: 5px; letter-spacing: 0; font-weight: 700; }
.snap-l { font-size: 13.5px; color: var(--s-ink2); margin-top: 4px; font-weight: 600; }
.snap-s { font-size: 12px; color: var(--s-muted); margin-top: 6px; }
@media (max-width: 860px) { .snap { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.ctrl-bar { position: sticky; top: 85px; z-index: 30; background: rgba(9, 18, 33, .9); -webkit-backdrop-filter: blur(14px) saturate(1.3); backdrop-filter: blur(14px) saturate(1.3); border-top: 1px solid var(--s-line); border-bottom: 1px solid var(--s-line); }
.ctrl-inner { display: grid; grid-template-columns: 150px auto minmax(170px, 1fr) minmax(170px, 1fr) auto; gap: 12px 16px; align-items: end; padding-top: 14px; padding-bottom: 14px; }
@media (max-width: 1080px) { .ctrl-bar { position: static; } .ctrl-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .ctrl-inner .field-measure, .ctrl-inner .field-reset { grid-column: 1 / -1; } .studio .seg { width: 100%; } .studio .ctrl-inner .seg button { flex: 1; padding: 6px 4px; } }
@media (max-width: 520px) { .ctrl-inner { grid-template-columns: minmax(0, 1fr); } }
.studio .field label { color: var(--s-muted); }
.studio .select { background: var(--s-card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23eef3fa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center; color: var(--s-ink); border-color: var(--s-line2); }
.studio .select:hover { border-color: rgba(255,255,255,.4); }
.studio .select option, .studio .select optgroup { background: #fff; color: #0e1b2c; }
.studio .seg { background: rgba(255,255,255,.04); border-color: var(--s-line2); }
.studio .seg button { color: var(--s-ink2); }
.studio .seg button:hover { color: #fff; }
.studio .seg button[aria-pressed="true"] { background: #fff; color: #0a1424; }
.studio .seg button[aria-disabled="true"] { opacity: .38; cursor: not-allowed; }
.studio .seg-sm button { min-height: 32px; padding: 4px 12px; font-size: 13px; }
.studio .btn-ghost { color: var(--s-ink); border-color: var(--s-line2); background: transparent; }
.studio .btn-ghost:hover { background: rgba(255,255,255,.07); color: #fff; }
.studio :focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.studio .crop-row { padding: 20px 0 8px; gap: 8px; }
.studio .chip { background: rgba(255,255,255,.035); border-color: var(--s-line2); color: var(--s-ink); font-weight: 650; }
.studio .chip:hover { border-color: rgba(255,255,255,.45); }
.studio .chip[aria-pressed="true"] { background: #fff; border-color: #fff; color: #0a1424; box-shadow: 0 0 0 4px rgba(255,255,255,.08); }
.studio .chip.na { opacity: .42; }
.chip-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.chip-dots { display: inline-flex; }
.chip-dots i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1.5px solid #0f1c30; margin-left: -4px; }
.chip-dots i:first-child { margin-left: 0; }
.chip[aria-pressed="true"] .chip-dots i { border-color: #fff; }
.chip-sep { width: 1px; height: 24px; background: var(--s-line2); margin: 0 2px; }
.chip-yr:empty { display: none; }

.studio .atlas-grid { grid-template-columns: minmax(0, 1.8fr) minmax(330px, 1fr); gap: 20px; padding-top: 12px; }
@media (max-width: 1080px) { .studio .atlas-grid { grid-template-columns: minmax(0, 1fr); } }
.studio .map-card, .studio .panel, .trend-card, .studio .table-card { background: linear-gradient(180deg, #111f36 0%, #0e1b2f 100%); border: 1px solid var(--s-line); border-radius: 22px; box-shadow: 0 30px 60px -36px rgba(0,0,0,.75); }
.studio .map-card { padding: 22px 22px 16px; }
.studio .map-title h2 { color: #fff; font-size: clamp(1.15rem, 1.8vw, 1.45rem); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.studio .map-title p { color: var(--s-muted); max-width: 72ch; }
.t-yr, .t-reg { display: inline-flex; align-items: center; font-size: 12px; font-weight: 800; letter-spacing: .06em; padding: 4px 10px; border-radius: 999px; }
.t-yr { background: rgba(242,181,29,.16); color: var(--gold); }
.t-reg { background: rgba(255,255,255,.08); color: var(--s-ink2); }
.studio .map-wrap { margin-top: 8px; }
.studio .legend { color: var(--s-ink2); margin-top: 14px; }
.studio .legend .lg-title { color: #fff; }
.studio .legend .sw { border-color: rgba(255,255,255,.12); }
.studio .legend .sw-hatch, .map-dark ~ .legend .sw-hatch { background: repeating-linear-gradient(45deg, #2a3d5a 0 2px, #152338 2px 5px); }
.studio .legend .ramp span:first-child { border-radius: 4px 0 0 4px; }
.studio .legend .ramp span:last-child { border-radius: 0 4px 4px 0; }
.studio .legend .ramp-labels { color: var(--s-muted); }
.lg-n { color: var(--s-muted); font-variant-numeric: tabular-nums; }
.studio .map-foot { border-color: var(--s-line); color: var(--s-muted); }
.studio .map-msg { background: rgba(10, 20, 36, .55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); border-radius: 14px; }
.studio .map-msg > div { background: #13233b; border-color: var(--s-line2); box-shadow: 0 20px 40px -20px rgba(0,0,0,.8); }
.studio .map-msg p { color: var(--s-ink2); }
.studio .map-msg b { color: #fff; }

/* dark map */
.map-dark .map-svg .county { stroke: #0b1628; stroke-width: .8; transition: fill .45s ease, opacity .3s; }
.map-dark .map-svg .county:hover { stroke: #0b1628; stroke-width: .8; }
.map-dark .map-svg .county.dim { opacity: .2; }
.map-dark .map-svg .district { stroke: rgba(255,255,255,.4); stroke-width: 1.25; opacity: 1; }
.map-dark .map-svg .state-line { stroke: rgba(255,255,255,.6); stroke-width: 1.4; }
.map-dark .map-svg .county-hl { stroke: #fff; stroke-width: 2.2; }
.map-svg .sel-outline { fill: none; stroke: var(--gold); stroke-width: 2.8; vector-effect: non-scaling-stroke; pointer-events: none; }
.map-dark .map-svg .lbl { fill: #0a1424; stroke: rgba(255,255,255,.88); }
.map-dark .map-svg .lbl-v { fill: #1c2a40; }
.map-svg .lbl.lbl-inv, .map-dark .map-svg .lbl.lbl-inv { fill: #fff; stroke: rgba(6, 12, 24, .8); }
.map-svg .lbl.lbl-v.lbl-inv, .map-dark .map-svg .lbl.lbl-v.lbl-inv { fill: #dbe6f5; }
.map-dark .map-svg .lbl-dist { fill: rgba(255,255,255,.82); stroke: rgba(6, 12, 24, .8); }

/* tooltip (light and dark) */
.tooltip .tt-head strong { display: block; font-size: 14.5px; }
.tooltip .tt-head span { display: block; font-size: 12px; color: #aab7c8; }
.tooltip .tt-row { padding: 1px 0; }
.tooltip .tt-row span i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.tooltip .tt-lead { display: flex; align-items: center; gap: 8px; font-weight: 800; margin: 8px 0 4px; }
.tooltip .tt-lead .sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.tooltip .tt-big { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 6px; font-variant-numeric: tabular-nums; }
.tooltip .tt-big small { font-size: 12px; font-weight: 600; color: #93a3ba; margin-left: 6px; letter-spacing: 0; }
.tooltip .tt-grid { display: grid; grid-template-columns: auto auto; gap: 2px 16px; font-size: 12.5px; }
.tooltip .tt-grid span { color: #93a3ba; }
.tooltip .tt-grid b { text-align: right; font-variant-numeric: tabular-nums; }
.tooltip .tt-spark { margin-top: 9px; padding-top: 8px; border-top: 1px solid rgba(255,255,255,.1); }
.tooltip .tt-spark span { display: block; font-size: 11px; color: #93a3ba; }
.tooltip .tt-note { font-size: 12px; color: #a8b6c9; margin: 6px 0 0; }
.map-dark .tooltip { background: rgba(8, 16, 30, .96); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px; min-width: 220px; max-width: 290px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); box-shadow: 0 20px 44px -16px rgba(0,0,0,.85); }

/* side panel */
.studio .panel { padding: 22px; top: 172px; color: var(--s-ink); }
.p-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.p-eyebrow { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); }
.p-eyebrow i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.studio .panel h3 { color: #fff; font-size: 1.55rem; margin: 8px 0 4px; }
.p-sub { color: var(--s-muted); font-size: 13.5px; margin: 0 0 16px; line-height: 1.5; }
.p-close { border: 1px solid var(--s-line2); background: transparent; color: var(--s-ink2); border-radius: 999px; font: inherit; font-size: 12.5px; font-weight: 700; padding: 6px 12px; cursor: pointer; min-height: 34px; }
.p-close:hover { color: #fff; border-color: rgba(255,255,255,.45); }
.studio .kpis { background: var(--s-line); border-color: var(--s-line); border-radius: 14px; }
.studio .kpi { background: var(--s-card2); padding: 13px 14px; }
.studio .kpi-v { color: #fff; font-size: 1.4rem; }
.studio .kpi-v small { color: var(--s-muted); }
.studio .kpi-l { color: var(--s-muted); }
.kpi-s { font-size: 12px; color: var(--s-ink2); margin-top: 4px; }
.p-latest { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; padding: 12px 14px; border-radius: 14px; background: rgba(242,181,29,.08); border: 1px solid rgba(242,181,29,.24); margin: 0 0 6px; font-size: 14px; }
.p-latest span { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--gold); width: 100%; }
.p-latest b { color: #fff; }
.p-latest em { font-style: normal; font-weight: 700; }
.studio .up { color: var(--s-up); }
.studio .down { color: var(--s-down); }
.p-fact { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 14px; background: var(--s-card2); margin-top: 18px; }
.p-fact .sw { width: 12px; height: 12px; border-radius: 3px; flex: none; margin-top: 5px; }
.p-fact p { margin: 0; font-size: 14px; color: var(--s-ink2); line-height: 1.5; }
.p-fact b { color: #fff; }
.p-change { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.35fr); gap: 8px; margin: -6px 0 6px; }
.p-change > div { background: var(--s-card2); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.p-change span { display: block; font-size: 11.5px; color: var(--s-muted); }
.p-change b { font-size: 1.15rem; font-weight: 800; }
.p-change .spark { display: block; margin-top: 2px; max-width: 100%; }
.p-note { background: var(--s-card2); padding: 12px 14px; border-radius: 12px; color: var(--s-ink2); font-size: 14px; }
.studio .block-title { color: #fff; margin-top: 22px; }
.studio .block-title span { color: var(--s-muted); }
.studio .bar-row { color: var(--s-ink); }
.studio .bar-row .bl { display: flex; align-items: center; gap: 7px; }
.studio .bar-row .bl i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.studio .bar-row .bt { background: #1b2a43; border-radius: 0 5px 5px 0; }
.studio .bar-row .bt i { border-radius: 0 5px 5px 0; }
.studio .bar-row .bv small { color: var(--s-muted); }
.studio .bar-row:hover, .studio .bar-row.hov { background: rgba(255,255,255,.06); }
.studio .bar-row.on { background: rgba(255,255,255,.09); }
.studio .bar-row.static:hover { background: transparent; }
.studio .econ { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.studio .econ > div { background: var(--s-card2); border-radius: 12px; padding: 10px 12px; }
.studio .econ b { display: block; color: #fff; font-size: 1.05rem; }
.studio .econ span { font-size: 11.5px; color: var(--s-muted); }
.chips-sm { display: flex; flex-wrap: wrap; gap: 6px; }
.chip-sm { font: inherit; font-size: 12.5px; font-weight: 600; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--s-line2); background: transparent; color: var(--s-ink); display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.chip-sm:hover { border-color: rgba(255,255,255,.45); }
.chip-sm i { width: 8px; height: 8px; border-radius: 50%; }

/* trends */
.trend-card { margin-top: 20px; padding: clamp(18px, 2.4vw, 26px); }
.tr-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; flex-wrap: wrap; }
.tr-title h2 { font-size: clamp(1.2rem, 2vw, 1.55rem); margin: 8px 0 6px; }
.tr-title p { color: var(--s-muted); margin: 0; font-size: 14px; max-width: 74ch; }
.tr-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tr-readout { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: baseline; margin: 18px 0 12px; padding: 11px 16px; background: var(--s-card2); border-radius: 12px; font-size: 13.5px; color: var(--s-muted); min-height: 44px; }
.tr-readout b { color: var(--gold); font-size: 15px; }
.tr-readout em { font-style: normal; color: #fff; font-weight: 700; margin-left: 4px; font-variant-numeric: tabular-nums; }
.tr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 760px) { .tr-grid { grid-template-columns: minmax(0, 1fr); } }
.tchart { margin: 0; background: var(--s-bg2); border: 1px solid var(--s-line); border-radius: 16px; padding: 12px 10px 6px; min-width: 0; }
.tchart figcaption { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding: 2px 6px 4px; }
.tc-title { font-weight: 800; color: #fff; font-size: 14px; }
.tc-legend { display: flex; gap: 12px; font-size: 12px; color: var(--s-ink2); }
.tc-legend i { display: inline-block; width: 16px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.tc-note { font-size: 12px; color: var(--s-muted); }
.tc-svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.tc-grid { stroke: #1c2b43; stroke-width: 1; }
.tc-base { stroke: #34465f; stroke-width: 1; }
.tc-tick { fill: #7f8ea5; font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.tc-sel { fill: rgba(242,181,29,.11); }
.tc-cross { stroke: rgba(255,255,255,.55); stroke-width: 1; opacity: 0; pointer-events: none; }
.tc-dot { opacity: 0; stroke: #0c182b; stroke-width: 1.5; pointer-events: none; }
.tc-bar { transition: filter .12s; }
.tc-bar.on { filter: brightness(1.25); }
.tc-bar.hov { filter: brightness(1.5); }
.tc-dl { fill: #c9d4e3; font-size: 11px; font-weight: 700; font-family: var(--font); paint-order: stroke; stroke: #0c182b; stroke-width: 3; }
.tr-table .table-scroll { max-height: 440px; }

/* tables in the studio */
.studio .table-card { margin-top: 20px; padding: clamp(18px, 2.4vw, 26px); }
.studio .table-head h2 { color: #fff; }
.studio .table-head p { color: var(--s-muted) !important; }
.studio .table-scroll { border-color: var(--s-line); }
.studio table.data { color: var(--s-ink); }
.studio table.data thead th { background: #13223a; color: var(--s-ink2); border-color: var(--s-line); }
.studio table.data th, .studio table.data td { border-color: var(--s-line); }
.studio table.data tbody tr:hover td, .studio table.data tbody tr.hov td, .studio table.data tbody tr.hov th { background: rgba(255,255,255,.05); }
.studio table.data tr.on td { background: rgba(242,181,29,.10); }
.studio .link-btn { all: unset; cursor: pointer; color: #fff; font-weight: 700; }
.studio .link-btn:hover { color: var(--gold); text-decoration: underline; }
.studio .link-btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
table.score th[scope="row"] { text-align: left; font-weight: 700; color: #fff; white-space: nowrap; }
table.score th[scope="row"] i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 9px; }
table.score small { display: block; font-size: 11px; color: var(--s-muted); font-weight: 600; }
table.score td { vertical-align: middle; }
table.score .c-trend { width: 170px; }
table.score .spark { display: block; margin-left: auto; }
table.score tr.score-row { cursor: pointer; }
table.score tr.score-row:hover th, table.score tr.score-row:focus-visible th { color: var(--gold); }
.studio .muted { color: var(--s-muted); }

/* mini map on the home page: a dark "screen" */
.mini-screen { background: linear-gradient(180deg, #111f36 0%, #0b172a 100%); border-radius: 24px; padding: 18px 18px 14px; border: 1px solid rgba(255,255,255,.06); box-shadow: 0 40px 70px -40px rgba(10, 20, 36, .8); color: #eef3fa; }
.mini-screen .hero-map-head strong { color: #fff; }
.mini-screen .hero-map-head .t-yr { margin-left: 6px; }
.mini-screen .legend { color: #b8c4d6; }
.mini-screen .legend .lg-title { color: #fff; }
.mini-screen .legend .sw { border-color: rgba(255,255,255,.12); }
.mini-screen .legend .sw-hatch { background: repeating-linear-gradient(45deg, #2a3d5a 0 2px, #152338 2px 5px); }
.mini-screen .link-arrow { color: var(--gold); }
.mini-screen .source-line { color: #8796ac; }
.studio .flat { color: var(--s-ink2); }

/* crop testing program */
.crop-group { display: flex; flex-direction: column; }
.crop-group h3 { font-size: 1.15rem; }
.crop-list { list-style: none; margin: 12px 0 0; padding: 0; }
.crop-list li { position: relative; padding: 7px 0 7px 20px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.crop-list li:first-child { border-top: 0; }
.crop-list li::before { content: ""; position: absolute; left: 2px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.crop-group-note { margin: auto 0 0; padding-top: 14px; font-size: 13px; color: var(--muted); }
.ct-part { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; margin-bottom: clamp(26px, 3.5vw, 40px); }
.ct-num { font-size: clamp(2.6rem, 5vw, 4rem); font-weight: 800; line-height: .9; letter-spacing: -0.04em; color: var(--gold); font-variant-numeric: tabular-nums; }
.ct-part .lead { margin-top: 12px; }
.onstation { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 24px; align-items: start; }
.onstation-loc { position: sticky; top: 110px; }
.onstation-h { font-size: 1.15rem; margin: 4px 0 16px; }
.onstation-grid .card { padding: 22px; }
@media (max-width: 900px) { .onstation { grid-template-columns: minmax(0, 1fr); } .onstation-loc { position: static; } }
.theme-nav-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1080px) { .theme-nav-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .theme-nav-4 { grid-template-columns: minmax(0, 1fr); } }
.ct-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
#crop-testing { scroll-margin-top: 100px; }
.og-list { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.og-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; padding: 18px 20px; }
.og-row + .og-row { border-top: 1px solid var(--line); }
.og-row .icon-tile { width: 44px; height: 44px; margin: 0; border-radius: 12px; }
.og-row .icon-tile svg { width: 24px; height: 24px; }
.og-row h4 { font-size: 1.02rem; margin: 2px 0 4px; }
.og-row p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
