/* Land Project — Vivek Lodha Agri Solutions UI
   Palette taken from the logo: deep leaf green, logo gold, sage and warm cream. Cream canvas and hairline cards,
   forest-green and sage bands, gold pill CTAs, outlined tags, "(01)" indices, big gold numbers, display type at 500/-0.02em. */

:root {
  --primary: #1e4c31;            /* deep leaf green: links, focus, meters, chart lines */
  --primary-active: #143723;
  --primary-disabled: #a9bfae;
  --accent: #daaa30;             /* logo gold: primary buttons, big numbers on dark, live dots */
  --accent-strong: #c8961f;      /* gold pressed */
  --accent-soft: #f6e7b3;        /* pale gold: icon plates, soft highlights */
  --on-accent: #143723;
  --sage: #8c9a6f;               /* mid olive band, from the reference */
  --on-sage: #14211a;
  --earth: #726232;              /* olive-brown from the furrows: use sparingly (soil accents) */
  --ink: #14211a;
  --body: #4b5a50;
  --muted: #66735f;
  --muted-soft: #a3ad9d;
  --hairline: #dcdad0;
  --hairline-soft: #ebe9df;
  --canvas: #fcfbf7;             /* warm cream page and cards */
  --surface-soft: #f3f1e8;       /* cream band */
  --surface-strong: #e8e6da;     /* chip and secondary-button ground */
  --surface-dark: #143723;       /* deep forest green replaces near-black */
  --surface-dark-elevated: #1e4c31;
  --on-primary: #fcfbf7;
  --on-dark: #fcfbf7;
  --on-dark-soft: #c4d1c1;
  --up: #27702b;
  --down: #b3261e;
  --accent-yellow: var(--accent);   /* kept as an alias */
  --brand-green: #184830;

  /* aliases kept for page-level styles */
  --ink-80: var(--body);
  --ink-48: var(--muted);
  --parchment: var(--surface-soft);
  --pearl: var(--surface-strong);
  --divider-soft: var(--hairline-soft);

  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 24px;
  --r-pill: 100px;
  --r-full: 9999px;

  --s-xxs: 4px;
  --s-xs: 8px;
  --s-sm: 12px;
  --s-base: 16px;
  --s-md: 20px;
  --s-lg: 24px;
  --s-xl: 32px;
  --s-xxl: 48px;
  --s-section: 96px;

  --font-display: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-text: "Inter", -apple-system, system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "JetBrains Mono", "Geist Mono", Consolas, "Courier New", monospace;

  --nav-h: 64px;
  --subnav-h: 56px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--body);
  font-family: var(--font-text);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--accent-soft); color: var(--ink); }
img, svg { max-width: 100%; display: block; }
p { margin: 0 0 var(--s-base) 0; }

.on-dark { color: var(--on-dark-soft); }
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4 { color: var(--on-dark); }
.on-dark strong { color: var(--on-dark); }
strong { color: var(--ink); font-weight: 600; }

/* ---------- Typography ---------- */
.display-mega, .hero-display { font-family: var(--font-display); font-size: 80px; font-weight: 500; line-height: 1.0; letter-spacing: -0.02em; }
.display-xl  { font-family: var(--font-display); font-size: 64px; font-weight: 500; line-height: 1.0; letter-spacing: -0.02em; }
.display-lg  { font-family: var(--font-display); font-size: 52px; font-weight: 500; line-height: 1.0; letter-spacing: -0.02em; }
.display-md  { font-family: var(--font-display); font-size: 44px; font-weight: 500; line-height: 1.09; letter-spacing: -0.02em; }
.display-sm  { font-family: var(--font-text); font-size: 36px; font-weight: 500; line-height: 1.11; letter-spacing: -0.02em; }
.title-lg, .lead { font-family: var(--font-text); font-size: 32px; font-weight: 400; line-height: 1.13; letter-spacing: -0.4px; color: var(--ink); }
.title-lg { font-weight: 500; letter-spacing: -0.02em; }
.lead { color: var(--body); }
.on-dark .lead { color: var(--on-dark-soft); }
.title-md, .tagline { font-size: 18px; font-weight: 600; line-height: 1.33; letter-spacing: 0; color: var(--ink); }
.title-sm { font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--ink); }
.body-md { font-size: 16px; line-height: 1.5; }
.body-strong { font-weight: 700; color: var(--ink); }
.body-sm { font-size: 14px; line-height: 1.5; }
.caption { font-size: 13px; line-height: 1.5; }
.caption-strong { font-size: 12px; font-weight: 600; line-height: 1.5; color: var(--ink); }
.fine-print { font-size: 13px; line-height: 1.5; color: var(--muted); }
.muted { color: var(--muted); }
.muted-80 { color: var(--body); }
.on-dark .muted, .on-dark .muted-80 { color: var(--on-dark-soft); }
.on-dark .title-md, .on-dark .tagline, .on-dark .title-sm, .on-dark .caption-strong { color: var(--on-dark); }
.num { font-family: var(--font-mono); font-weight: 500; font-variant-numeric: tabular-nums; }
.nav-link { font-size: 14px; font-weight: 500; line-height: 1.4; }
.up { color: var(--up) !important; }
.down { color: var(--down) !important; }
/* The good/bad colours are tuned for cream. On the green bands they vanish,
   so there they take pale tints, and go back to normal on paper. */
.on-dark .up { color: #8fd694 !important; }
.on-dark .down { color: #f3a39c !important; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--s-lg); }
.container-narrow { width: 100%; max-width: 880px; margin: 0 auto; padding: 0 var(--s-lg); }
.center { text-align: center; }
.stack > * + * { margin-top: var(--s-base); }
.row { display: flex; gap: var(--s-sm); align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-lg); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-lg); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-lg); }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }
/* grid and flex children must be allowed to shrink so tables, canvases and inputs scroll inside instead of widening the page */
.grid-2 > *, .grid-3 > *, .grid-4 > *, .two > *, .card, .field, .chart-frame { min-width: 0; }
.input { min-width: 0; }
canvas { max-width: 100%; }

/* ---------- Bands ---------- */
.tile { padding: var(--s-section) 0; scroll-margin-top: calc(var(--nav-h) + var(--subnav-h)); }
.tile-light { background: var(--canvas); }
.tile-parchment, .tile-soft { background: var(--surface-soft); }
.tile-dark, .tile-dark-2, .tile-dark-3 { background: var(--surface-dark); color: var(--on-dark-soft); }
.tile-sage { background: var(--sage); color: var(--on-sage); }
.tile-sage h1, .tile-sage h2, .tile-sage h3, .tile-sage h4 { color: var(--ink); }
.tile-sage .muted, .tile-sage .fine-print, .tile-sage .caption { color: #2f3d32; }
.tile-sage .card { background: var(--canvas); border-color: transparent; }
.tile-sage .tag { border-color: rgba(20, 33, 26, 0.45); color: var(--ink); }
@media (max-width: 735px) { .tile { padding: var(--s-xxl) 0; } }

/* ---------- Top nav (64px) ---------- */
.nav-global {
  background: var(--canvas);
  color: var(--ink);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--hairline);
}
.nav-global.on-dark { background: var(--surface-dark); color: var(--on-dark); border-bottom-color: rgba(255, 255, 255, 0.08); }
.nav-global .container { display: flex; align-items: center; gap: var(--s-xl); }
.nav-global .brand { color: inherit; font-size: 18px; font-weight: 600; letter-spacing: -0.2px; display: inline-flex; align-items: center; gap: 10px; }
.nav-global .brand:hover { text-decoration: none; }
.nav-global .brand-mark { height: 40px; width: auto; display: block; }
.nav-global .brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.nav-global .brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; color: var(--brand-green); }
.nav-global .brand-sub { margin-top: 3px; font-size: 10px; font-weight: 600; letter-spacing: 1.8px; text-transform: uppercase; color: var(--muted); }
.nav-global.on-dark .brand-name { color: var(--on-dark); }
.nav-global.on-dark .brand-sub { color: var(--on-dark-soft); }
.nav-global nav { display: flex; gap: 24px; flex: 1; }
.nav-global nav a { color: inherit; font-size: 14px; font-weight: 500; line-height: 1.4; opacity: 0.9; }
.nav-global nav a:hover { opacity: 1; text-decoration: none; }
.nav-global .actions { display: flex; gap: var(--s-xs); align-items: center; }
@media (max-width: 768px) { .nav-global nav { display: none; } .nav-global .container { justify-content: space-between; } }
@media (max-width: 640px) { .nav-global .actions .btn-secondary { display: none; } }

/* ---------- Secondary nav (56px, white, hairline) ---------- */
.nav-sub {
  position: sticky;
  top: var(--nav-h);
  z-index: 40;
  height: var(--subnav-h);
  background: var(--canvas);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
}
.nav-sub .container { display: flex; align-items: center; justify-content: space-between; gap: var(--s-lg); }
.nav-sub .links { display: flex; gap: 20px; align-items: center; }
.nav-sub .links a:not(.btn) { color: var(--body); font-size: 14px; font-weight: 500; line-height: 1.4; }
@media (max-width: 735px) { .nav-sub .links a:not(.btn) { display: none; } }

/* ---------- Buttons (pill, 44px) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  cursor: pointer;
  font-family: var(--font-text);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  height: 44px;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}
.btn:hover { text-decoration: none; }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #cf9e26; }
.btn-primary:active { background: var(--accent-strong); }
.btn-primary[disabled] { background: var(--primary-disabled); color: var(--on-primary); cursor: not-allowed; }
.btn-secondary, .btn-utility, .btn-pearl { background: var(--surface-strong); color: var(--ink); }
.btn-secondary:active, .btn-utility:active, .btn-pearl:active { background: var(--hairline); }
.btn-secondary[disabled], .btn-utility[disabled], .btn-pearl[disabled] { color: var(--muted-soft); cursor: not-allowed; }
.on-dark .btn-secondary, .on-dark .btn-utility, .on-dark .btn-pearl { background: rgba(255, 255, 255, 0.12); color: var(--on-dark); }
.btn-outline { background: transparent; color: var(--on-dark); border: 1px solid var(--on-dark); padding: 11px 19px; }
.btn-outline:active { background: rgba(255, 255, 255, 0.08); }
.btn-tertiary { background: transparent; color: var(--primary); padding: 9px 0; margin: -9px 0; height: auto; }
.btn-hero { height: 56px; padding: 16px 32px; }
.btn-sm { height: 36px; padding: 8px 16px; font-size: 14px; }

/* ---------- Cards (24px radius, 32px padding, hairline on white) ---------- */
.card {
  background: var(--canvas);
  color: var(--body);
  border: 1px solid var(--hairline);
  border-radius: var(--r-xl);
  padding: var(--s-xl);
  transition: box-shadow 160ms ease;
}
.card:hover { box-shadow: var(--shadow-soft); }
.card h3 { font-size: 18px; font-weight: 600; line-height: 1.33; margin: 0 0 var(--s-xs) 0; }
.card .value { font-family: var(--font-mono); font-weight: 500; font-size: 34px; line-height: 1.1; color: var(--ink); margin: var(--s-xs) 0; }
.on-dark .card { background: var(--surface-dark-elevated); border-color: rgba(255, 255, 255, 0.06); color: var(--on-dark-soft); }
.on-dark .card:hover { box-shadow: none; }
.on-dark .card .value { color: var(--on-dark); }
.ui-card { background: var(--surface-dark-elevated); color: var(--on-dark-soft); border-radius: var(--r-xl); padding: var(--s-xl); }
.ui-card h3, .ui-card h4 { color: var(--on-dark); }

/* ---------- Badge pills (uppercase caption-strong) ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px; border-radius: var(--r-pill);
  font-size: 12px; font-weight: 600; line-height: 1.5; letter-spacing: 0.02em; text-transform: uppercase;
  background: var(--surface-strong); color: var(--ink);
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); flex: none; }
.chip-measured::before { background: var(--ink); }
.chip-estimated::before { background: var(--muted-soft); }
.chip-missing { background: transparent; border: 1px dashed var(--hairline); color: var(--muted); }
.chip-missing::before { background: transparent; border: 1px solid var(--muted-soft); }
.chip-plain::before { display: none; }
.chip-sample { color: var(--muted); }
.chip-sample::before { background: transparent; border: 1px dashed var(--muted); }
.chip-live::before { background: var(--accent); animation: lp-pulse 1.6s ease-in-out infinite; }
.on-dark .chip { background: rgba(255, 255, 255, 0.08); color: var(--on-dark-soft); }
.on-dark .chip-measured { color: var(--on-dark); }
.on-dark .chip-measured::before { background: var(--on-dark); }
.on-dark .chip-missing { background: transparent; border-color: rgba(255, 255, 255, 0.2); }
.chip.up { color: var(--up); }
.chip.down { color: var(--down); }
.chip.up::before { background: var(--up); }
.chip.down::before { background: var(--down); }
@keyframes lp-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) { .chip-live::before { animation: none; } }

/* ---------- Tag (small outlined eyebrow label) ---------- */
.tag {
  display: inline-flex; align-items: center;
  padding: 4px 10px; border: 1px solid var(--hairline); border-radius: var(--r-pill);
  font-size: 11px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--body); background: transparent;
  white-space: nowrap;
}
.on-dark .tag { border-color: rgba(255, 255, 255, 0.28); color: var(--on-dark-soft); }
@media (max-width: 360px) { .tag { white-space: normal; max-width: 100%; text-align: left; } }

/* ---------- Index numbers "(01)" ---------- */
.num-index { font-family: var(--font-mono); font-weight: 500; font-size: 13px; color: var(--primary); letter-spacing: 0.04em; }
.on-dark .num-index { color: var(--accent); }

/* ---------- Stats (big display numbers, gold on dark bands) ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-lg); }
.stats > * { min-width: 0; }
.stat-value { font-family: var(--font-display); font-weight: 500; font-size: 56px; line-height: 1; letter-spacing: -0.03em; color: var(--accent); }
.stat-label { margin-top: 8px; font-size: 14px; color: var(--on-dark-soft); }
@media (max-width: 834px) { .stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .stat-value { font-size: 40px; } }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr; } }
@media (min-width: 1025px) { .stat-value { font-size: 72px; } }

/* ---------- Inputs (12px radius, 48px) ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; line-height: 1.4; color: var(--ink); }
.input {
  font-family: var(--font-text);
  font-size: 16px; line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 12px 16px;
  height: 48px;
  width: 100%;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.input-compact { height: 40px; padding: 8px 12px; font-size: 14px; }
.input.num { font-family: var(--font-mono); font-weight: 500; }

/* ---------- Tables ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.5; }
.table th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--hairline); font-size: 12px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.table td { text-align: left; padding: 12px; border-bottom: 1px solid var(--hairline-soft); vertical-align: top; color: var(--ink); }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; }
.on-dark .table th { border-color: rgba(255, 255, 255, 0.12); color: var(--on-dark-soft); }
.on-dark .table td { border-color: rgba(255, 255, 255, 0.08); color: var(--on-dark); }
.table-wrap { overflow-x: auto; }

/* ---------- Meter ---------- */
.meter { height: 6px; background: var(--surface-strong); border-radius: var(--r-pill); overflow: hidden; }
.meter > span { display: block; height: 100%; background: var(--ink); border-radius: var(--r-pill); }
.meter-primary > span { background: var(--primary); }
.on-dark .meter { background: rgba(255, 255, 255, 0.1); }
.on-dark .meter > span { background: var(--on-dark); }
.on-dark .meter-primary > span { background: var(--accent); }

/* ---------- Asset-row lists ---------- */
.list-clean { list-style: none; margin: 0; padding: 0; }
.list-clean li { padding: 12px 0; border-bottom: 1px solid var(--hairline-soft); display: flex; justify-content: space-between; gap: var(--s-md); align-items: center; }
.list-clean li:last-child { border-bottom: 0; }
.list-clean li strong { font-family: var(--font-mono); font-weight: 500; }
.on-dark .list-clean li { border-color: rgba(255, 255, 255, 0.08); }

/* ---------- Footer (white, body-sm) ---------- */
.footer { background: var(--surface-soft); color: var(--body); padding: 64px 0 40px; border-top: 1px solid var(--hairline); font-size: 14px; }
.footer .footer-logo { display: block; height: 120px; width: auto; margin: 0 0 var(--s-xl) -3px; }
.footer .cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-lg); }
.footer h4 { margin: 0 0 var(--s-sm) 0; font-size: 16px; font-weight: 600; line-height: 1.25; }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { line-height: 2; }
.footer li a { color: var(--body); display: inline-block; padding: 4px 0; }
.footer .legal { margin-top: var(--s-xxl); padding-top: var(--s-md); border-top: 1px solid var(--hairline-soft); font-size: 13px; color: var(--muted); }
@media (max-width: 834px) { .footer .cols { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Maps ---------- */
.map { width: 100%; height: 100%; background: var(--surface-dark-elevated); }
.map-frame { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--hairline); height: 320px; }
.on-dark .map-frame { border-color: rgba(255, 255, 255, 0.1); }
.maplibregl-ctrl-attrib { font-size: 10px; }

/* Which way is north. Four labels on the edges of every field map, so that
   "at D1, on the SW side" can be found on the picture without guessing. */
.map-compass { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.map-compass span {
  position: absolute;
  font-family: var(--font-text);
  font-size: 11px; font-weight: 700; line-height: 1; letter-spacing: 0.08em;
  color: #fff;
  background: rgba(20, 33, 26, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  padding: 3px 6px;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}
.map-compass-n { top: 8px; left: 50%; transform: translateX(-50%); }
/* S sits above the attribution bar, which runs along the bottom of the map. */
.map-compass-s { bottom: 34px; left: 50%; transform: translateX(-50%); }
.map-compass-e { right: 8px; top: 50%; transform: translateY(-50%); }
.map-compass-w { left: 8px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .map-compass span { font-size: 10px; padding: 2px 5px; } }

/* ---------- Notice ---------- */
.notice { background: var(--surface-soft); border: 1px solid var(--hairline-soft); color: var(--body); border-radius: var(--r-md); padding: 12px 16px; font-size: 14px; line-height: 1.5; }

/* ---------- Photos (landing page cards, collage) ---------- */
.feature-card.has-photo { padding: 0; overflow: hidden; }
.feature-photo { position: relative; height: 200px; background: var(--surface-strong); }
.feature-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-photo .num-index { position: absolute; left: 14px; top: 12px; margin: 0; background: rgba(20, 55, 35, 0.78); color: var(--accent); padding: 4px 9px; border-radius: var(--r-pill); }
.feature-body { padding: var(--s-xl); }
.collage { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: var(--s-xxl); }
.collage img { flex: none; border-radius: 50%; object-fit: cover; display: block; box-shadow: 0 12px 32px rgba(20, 33, 26, 0.22); }
.collage .c-xl { width: 152px; height: 152px; }
.collage .c-lg { width: 120px; height: 120px; }
.collage .c-md { width: 96px; height: 96px; }
.collage .c-sm { width: 72px; height: 72px; }
.collage .lift { margin-top: -36px; }
.collage .drop { margin-top: 36px; }
@media (max-width: 1024px) { .collage { flex-wrap: wrap; justify-content: center; } .collage .lift, .collage .drop { margin-top: 0; } }
@media (max-width: 640px) { .collage .c-xl { width: 112px; height: 112px; } .collage .c-lg { width: 88px; height: 88px; } .collage .c-md { width: 72px; height: 72px; } .collage .c-sm { width: 56px; height: 56px; } }

/* ---------- Utilities ---------- */
.hide { display: none !important; }
/* The hidden attribute carries only the browser's own display:none, which any
   author rule here outranks. Make it mean what everyone expects it to mean. */
[hidden] { display: none !important; }
.mt-xs { margin-top: var(--s-xs); } .mt-sm { margin-top: var(--s-sm); } .mt-md { margin-top: var(--s-md); }
.mt-lg { margin-top: var(--s-lg); } .mt-xl { margin-top: var(--s-xl); } .mt-xxl { margin-top: var(--s-xxl); }
.mb-md { margin-bottom: var(--s-md); } .mb-lg { margin-bottom: var(--s-lg); } .mb-xl { margin-bottom: var(--s-xl); }
.gap-lg { gap: var(--s-lg); }
.space-between { justify-content: space-between; }
.w-100 { width: 100%; }
.maxw-720 { max-width: 720px; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Responsive type ---------- */
@media (max-width: 1024px) { .display-mega, .hero-display { font-size: 64px; } }
@media (max-width: 768px)  { .display-mega, .hero-display { font-size: 52px; } .display-lg { font-size: 44px; } }
@media (max-width: 640px)  { .display-mega, .hero-display { font-size: 44px; } .display-lg { font-size: 36px; } .display-md { font-size: 32px; } .lead, .title-lg { font-size: 22px; } }
@media (max-width: 420px)  { .display-mega, .hero-display { font-size: 36px; } }

@media print {
  .nav-global, .nav-sub, .no-print { display: none !important; }
  .tile { padding: 24px 0; }
  .tile-dark, .tile-dark-2, .tile-dark-3 { background: #fff !important; color: var(--body) !important; }
  .tile-sage { background: #fff !important; color: var(--body) !important; }
  .tile-sage .card { border-color: var(--hairline); }
  .on-dark .card { background: #fff; color: var(--body); border-color: var(--hairline); }
  .on-dark h1, .on-dark h2, .on-dark h3 { color: var(--ink) !important; }
  /* The dark sections turn white on paper, but only the section and the card
     were repainted, so everything the dark rules colour DIRECTLY stayed white:
     the year beside each flood row, the meter bars, the sub-headings, the
     table text, the chips. A rule that matches an element always beats a
     colour inherited from its parent, so each one has to be named here. */
  .on-dark, .on-dark .card { color: var(--body) !important; }
  .on-dark .caption-strong, .on-dark .title-md, .on-dark .title-sm, .on-dark .tagline,
  .on-dark strong, .on-dark .card .value, .on-dark .table td, .flood-row .num { color: var(--ink) !important; }
  .on-dark .muted, .on-dark .muted-80, .on-dark .legend, .on-dark .table th { color: var(--muted) !important; }
  .on-dark .meter { background: rgba(0, 0, 0, 0.10) !important; }
  .on-dark .meter > span { background: var(--ink) !important; }
  .on-dark .meter-primary > span { background: var(--primary) !important; }
  .on-dark .chip { background: var(--surface-strong) !important; color: var(--body) !important; }
  .on-dark .chip-measured { color: var(--ink) !important; }
  .on-dark .chip-measured::before { background: var(--ink) !important; }
  .on-dark .chip-missing { background: transparent !important; border-color: var(--hairline) !important; }
  .chip-live::before { animation: none !important; }
  /* The new dark-band components: gold numbers, cream tags and translucent
     buttons would vanish on white paper, so they take their light colours. */
  .on-dark .tag { border-color: var(--hairline) !important; color: var(--body) !important; }
  .on-dark .num-index { color: var(--primary) !important; }
  .stat-value { color: var(--ink) !important; }
  .stat-label { color: var(--body) !important; }
  .on-dark .btn-secondary, .on-dark .btn-utility, .on-dark .btn-pearl { background: var(--surface-strong) !important; color: var(--ink) !important; }
  .on-dark .btn-outline { color: var(--ink) !important; border-color: var(--hairline) !important; }
  .on-dark .up { color: var(--up) !important; }
  .on-dark .down { color: var(--down) !important; }
  .on-dark .table th, .on-dark .table td, .on-dark .list-clean li,
  .on-dark .map-frame, .flood-row { border-color: var(--hairline) !important; }
  .map-frame { height: 260px; break-inside: avoid; }
  .collage, .feature-photo { display: none !important; }
  body { font-size: 13px; }
}
:root { --planner-border: #dce3dd; }
.crop-browser { max-width: 540px; }
.crop-search { margin-top: 8px; }
.crop-season-tabs { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; }
.crop-season-tab { flex: 0 0 auto; border: 1px solid var(--hairline); border-radius: var(--r-pill); background: var(--surface); color: var(--body); padding: 9px 14px; font: inherit; cursor: pointer; }
.crop-season-tab[aria-selected="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.crop-season-tab [data-tab-count] { display: inline-grid; min-width: 24px; height: 24px; margin-left: 5px; padding: 0 6px; place-items: center; border-radius: var(--r-pill); background: var(--surface-strong); color: var(--body); font-size: 12px; }
.crop-season-tab[aria-selected="true"] [data-tab-count] { background: rgba(255,255,255,.18); color: #fff; }
.crop-season-panels { margin-top: 12px; }
.crop-season-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.crop-season-head h3, .crop-season-head p { margin: 0; }
.crop-verdict-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.crop-verdict-counts strong { color: var(--ink); }
.planner-group { margin-top: 14px; border-top: 1px solid var(--planner-border); }
.planner-group > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 2px; cursor: pointer; }
.planner-group > summary::marker { color: var(--muted); }
.planner-group-results { display: grid; gap: 8px; }
.planner-card { padding: 0; overflow-wrap: anywhere; }
.planner-card > summary { list-style: none; }
.planner-card > summary::-webkit-details-marker { display: none; }
.planner-card-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; cursor: pointer; }
.planner-card-summary::after { content: '+'; flex: 0 0 auto; color: var(--muted); font-size: 20px; line-height: 1; }
.planner-card[open] .planner-card-summary::after { content: '−'; }
.planner-card-summary > span:first-child { display: grid; gap: 3px; min-width: 0; }
.planner-card-reason { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 620px; }
.planner-card-details { padding: 0 16px 16px; border-top: 1px solid var(--planner-border); }
.planner-card h4 { margin: 12px 0 6px; }
.planner-gate { padding: 10px 0; border-bottom: 1px solid var(--planner-border); }
.crop-practice, .crop-nutrients { margin-top: 12px; padding-top: 4px; }
.crop-nutrients ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.crop-practice ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.crop-practice li { margin: 3px 0; }
.sheet-link { font-weight: 600; text-decoration: underline; }
.planner-gate ul, .planner-card-details > ul { margin: 6px 0 0; padding-left: 20px; font-size: 14px; }
.crop-history { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--planner-border); font-size: 14px; }
.crop-show-all { margin-top: 14px; }
.crop-evidence-details > summary { cursor: pointer; }
.crop-evidence-details > summary > span { display: grid; gap: 3px; }
.table-scroll { overflow-x: auto; }
#soilEvidence, #fieldEvidence { width: 100%; font-size: 12px; border-collapse: collapse; text-align: left; }
#soilEvidence th, #soilEvidence td, #fieldEvidence th, #fieldEvidence td { padding: 7px; border-bottom: 1px solid var(--planner-border); vertical-align: top; }
.source-truth-summary { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.source-truth-summary p { margin: 0; }
.source-status-counts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.source-registry-details > summary { display: flex; justify-content: space-between; gap: 16px; cursor: pointer; padding-top: 14px; border-top: 1px solid var(--planner-border); }
.source-registry-list { border-top: 1px solid var(--planner-border); }
.source-record { border-bottom: 1px solid var(--planner-border); }
.source-record:last-child { border-bottom: 0; }
.source-record > summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 2px; cursor: pointer; }
.source-record-title { display: grid; gap: 3px; min-width: 0; }
.source-record-body { padding: 0 2px 18px; }
.source-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 20px; }
.source-field { min-width: 0; }
.source-field dt { color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; }
.source-field dd { margin: 3px 0 0; font-size: 13px; overflow-wrap: anywhere; }
.source-limitations { margin: 14px 0 0; padding-left: 20px; }
.source-observation + .source-observation { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--planner-border); }
.source-inputs { margin: 12px 0 0; max-height: 220px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 11px; color: var(--body); background: var(--surface-soft); border-radius: var(--r-sm); padding: 10px; }

@media (max-width: 640px) {
  .crop-season-head { display: block; }
  .crop-verdict-counts { justify-content: flex-start; margin-top: 10px; }
  .planner-card-summary { align-items: flex-start; gap: 8px; }
  .planner-card-summary .chip { margin-left: auto; }
  .planner-card-reason { white-space: normal; }
  .source-truth-summary { display: block; }
  .source-status-counts { justify-content: flex-start; margin-top: 12px; }
  .source-record > summary { align-items: flex-start; }
  .source-fields { grid-template-columns: 1fr; }
}

@media print {
  .crop-season-panels { margin-top: 0; }
  .planner-season { break-before: page; }
  .planner-season:first-child { break-before: auto; }
  .planner-card { break-inside: avoid; }
  .planner-card-summary::after { display: none; }
}
