/* ============================================================
   AGKaizen mini-app — brand stylesheet
   Tokens ported verbatim from the AGKaizen Design System
   (Claude Design project ab8d6189 · tokens/colors|typography|spacing.css)
   Fonts: Sequel Sans Black Display (display) + Seravek (body).
   Both fall back to the families declared in the design system.
   ============================================================ */

:root {
  /* ---- Brand green (primary) ---- */
  --green-900: #022E1D;
  --green-800: #033825;
  --green-700: #044F31;
  --green-600: #056F44;   /* core brand green (logo) */
  --green-500: #1E8B5C;
  --green-400: #3FA877;
  --green-300: #74C39B;
  --green-200: #ABDBC1;
  --green-100: #D8EEE3;
  --green-50:  #ECF6F0;

  /* ---- Warm neutrals ---- */
  --ink-900:  #201D18;
  --stone-800:#3A362F;
  --stone-700:#524D44;
  --stone-600:#6E685C;
  --stone-500:#8C8577;
  --stone-400:#ADA595;
  --stone-300:#CEC7B8;
  --stone-200:#E4DED2;
  --stone-100:#F1ECE2;
  --paper:    #FAF7F0;
  --white:    #FFFFFF;

  /* ---- Earthy accents ---- */
  --soil-700: #4A3728;
  --soil-600: #6B4E38;
  --soil-500: #8A6644;
  --clay-500: #B26A43;
  --harvest-500: #D6A63A;
  --harvest-300: #E9CE86;
  --olive-500: #7E8A4E;
  --olive-300: #B4BC86;

  /* ---- Semantic status ---- */
  --success: #1E8B5C;
  --warning: #D6A63A;
  --danger:  #B4462F;
  --info:    #3F7CA8;

  /* Surfaces */
  --surface-page:    var(--paper);
  --surface-card:    var(--white);
  --surface-sunken:  var(--stone-100);
  --surface-inverse: var(--green-800);
  --surface-brand:   var(--green-600);
  --surface-brand-soft: var(--green-50);

  /* Text */
  --text-strong:  var(--ink-900);
  --text-body:    var(--stone-800);
  --text-muted:   var(--stone-600);
  --text-subtle:  var(--stone-500);
  --text-on-brand:var(--white);
  --text-brand:   var(--green-700);
  --text-link:    var(--green-600);
  --text-link-hover: var(--green-800);

  /* Borders */
  --border-subtle: var(--stone-200);
  --border-default:var(--stone-300);
  --border-strong: var(--stone-400);
  --border-brand:  var(--green-600);

  --accent-earth:  var(--soil-500);
  --accent-harvest:var(--harvest-500);
  --accent-leaf:   var(--olive-500);
  --focus-ring: var(--green-400);

  /* Families */
  --font-display: "Sequel Sans", "Arial Black", "Helvetica Neue", system-ui, sans-serif;
  --font-body: "Sequel Sans Text", "Seravek", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, Menlo, Consolas, monospace;

  --weight-body: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-display: 900;

  --text-display-2xl: 76px;
  --text-display-xl:  60px;
  --text-display-lg:  46px;
  --text-h1: 36px;
  --text-h2: 28px;
  --text-h3: 22px;
  --text-h4: 18px;
  --text-body-lg: 19px;
  --text-body:    16px;
  --text-body-sm: 14px;
  --text-caption: 13px;
  --text-overline:12px;

  --leading-tight:  1.05;
  --leading-snug:   1.2;
  --leading-normal: 1.5;
  --leading-relaxed:1.65;

  /* Tracking follows the FONT, not the design token alone. -0.02em is
     Sequel Sans's designed letterfit and is applied only once the real face
     is confirmed loaded (html.brand-font, set by agk.js). If the woff2 ever
     fails to arrive, the fallback — Arial Black, or Roboto Black on the
     phones this is used on — keeps 0, because negative tracking on those
     faces is exactly what crushed words together before. Either way the
     word gap below is explicit. */
  --tracking-display: 0em;
  --tracking-tight:   0em;
  --word-gap-display: 0.06em;
  --tracking-normal:  0;
  --tracking-wide:    0.04em;
  --tracking-overline:0.14em;

  /* Spacing */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px;

  /* Radii — rounded is a core brand rule. Nothing is square. */
  --radius-xs: 6px;   --radius-sm: 10px;  --radius-md: 14px;
  --radius-lg: 20px;  --radius-xl: 28px;  --radius-2xl: 36px;
  --radius-pill: 999px;
  --radius-card: var(--radius-lg);
  --radius-button: var(--radius-pill);
  --radius-input: var(--radius-md);

  /* Shadows — soft, warm, never harsh black */
  --shadow-xs: 0 1px 2px rgba(32, 29, 24, 0.06);
  --shadow-sm: 0 2px 6px rgba(32, 29, 24, 0.07);
  --shadow-md: 0 6px 18px rgba(32, 29, 24, 0.09);
  --shadow-lg: 0 16px 40px rgba(32, 29, 24, 0.12);
  --shadow-brand: 0 10px 28px rgba(5, 111, 68, 0.22);

  --container-max: 1200px;
  --container-narrow: 760px;

  --ease-out: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-fast: 140ms;
  --dur-base: 220ms;
  --dur-slow: 380ms;
}

/* The design system supplies real font files. If they are dropped into
   /assets/fonts/ these @font-face rules pick them up; otherwise the
   fallback stack above renders. */
/* The real brand face. Subset from AGKaizen's licensed desktop files to
   Latin plus the punctuation this app actually sets (en dash, middle dot,
   ×, →, ₂), so the whole family is 80 KB of woff2 rather than 220 KB of
   TTF. Chinese has no Sequel Sans cut and falls through the stack, which
   is correct — the wordmark is Latin-only by design.

   Display is the Black DISPLAY optical size, which is what the design
   system names; body uses the BODY optical sizes at four weights, so text
   set at 14px is not a headline face shrunk down. */
@font-face {
  font-family: "Sequel Sans";
  src: url("/assets/fonts/sequel-sans-black-disp.woff2") format("woff2");
  font-weight: 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sequel Sans Text";
  src: url("/assets/fonts/sequel-sans-book.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sequel Sans Text";
  src: url("/assets/fonts/sequel-sans-medium.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sequel Sans Text";
  src: url("/assets/fonts/sequel-sans-semibold.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Sequel Sans Text";
  src: url("/assets/fonts/sequel-sans-bold.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ---------------- base ---------------- */
*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; }
body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-body);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--font-display);
  word-spacing: 0.06em;                 /* heavy faces need the gap spelled out */
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-snug);
  color: var(--text-strong);
  margin: 0 0 var(--space-3);
}
h1 { font-size: var(--text-h1); }
h2 { font-size: var(--text-h2); }
h3 { font-size: var(--text-h3); }
h4 { font-size: var(--text-h4); letter-spacing: var(--tracking-tight); }
p { margin: 0 0 var(--space-4); }
a { color: var(--text-link); text-decoration: none; }
a:hover { color: var(--text-link-hover); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-xs); }
img { max-width: 100%; display: block; }

.agk-kicker {
  font-size: var(--text-overline);
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  font-weight: var(--weight-semibold);
  color: var(--text-brand);
  margin: 0 0 var(--space-2);
}
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.mono { font-family: var(--font-mono); }
.center { text-align: center; }

/* ---------------- shell ---------------- */
.container { max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-6); }
.container.narrow { max-width: var(--container-narrow); }

.agk-topbar {
  background: var(--green-800);
  color: var(--white);
  position: sticky; top: 0; z-index: 40;
}
.agk-topbar .inner {
  max-width: var(--container-max); margin: 0 auto;
  padding: var(--space-3) var(--space-6);
  display: flex; align-items: center; gap: var(--space-4);
}
/* The real AGKaizen lockup. Height is the only dimension set — the
   artwork keeps its own proportions on every surface it lands on. */
.agk-logo { display: inline-flex; align-items: center; }
.agk-logo img { display: block; height: 30px; width: auto; }
.agk-logo.stacked img { height: 96px; }
.agk-topbar .spacer { flex: 1; }
.agk-topbar nav { display: flex; gap: 4px; flex-wrap: wrap; }
.agk-topbar nav a {
  color: var(--green-100); padding: 7px 14px;
  border-radius: var(--radius-pill); font-size: var(--text-body-sm);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.agk-topbar nav a:hover { background: rgba(255,255,255,.10); color: var(--white); }
.agk-topbar nav a.active { background: var(--green-600); color: var(--white); }

.page { padding: var(--space-10) 0 var(--space-20); }
.page-head { margin-bottom: var(--space-8); }
.page-head p { max-width: 62ch; color: var(--text-muted); margin: 0; }

/* ---------------- card ---------------- */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  padding: var(--space-6);
}
.card.sunken { background: var(--surface-sunken); box-shadow: none; }
.card.brand { background: var(--surface-brand-soft); border-color: var(--green-200); }
.card.inverse { background: var(--green-800); border-color: var(--green-700); color: var(--green-100); }
.card.inverse h1, .card.inverse h2, .card.inverse h3, .card.inverse h4 { color: var(--white); }
.card.pad-lg { padding: var(--space-8); }
.card-title { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-4); }
.card-title h3 { margin: 0; }

.grid { display: grid; gap: var(--space-5); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
@media (max-width: 900px) {
  .grid.cols-3, .grid.cols-4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 620px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
}

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  font-family: var(--font-body); font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold);
  padding: 11px 22px; border-radius: var(--radius-button);
  border: 1px solid transparent; cursor: pointer;
  transition: transform var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              filter var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
  text-decoration: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--green-600); color: var(--white); box-shadow: var(--shadow-brand); }
.btn-primary:hover { filter: brightness(1.06); color: var(--white); }
.btn-secondary { background: transparent; color: var(--text-brand); border-color: var(--border-brand); }
.btn-secondary:hover { background: var(--green-50); color: var(--text-brand); }
.btn-ghost { background: transparent; color: var(--text-muted); }
.btn-ghost:hover { background: var(--stone-100); color: var(--text-body); }
.btn-earth { background: var(--soil-500); color: var(--white); }
.btn-earth:hover { filter: brightness(1.06); color: var(--white); }
.btn-danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: #fbeeeb; color: var(--danger); }
.btn-lg { font-size: var(--text-body); padding: 14px 30px; }
.btn-sm { font-size: var(--text-caption); padding: 7px 14px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------------- badge ---------------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
  padding: 4px 12px; border-radius: var(--radius-pill);
  background: var(--green-50); color: var(--green-700); border: 1px solid transparent;
  white-space: nowrap;
}
.badge.solid { background: var(--green-600); color: var(--white); }
.badge.earth { background: #f5efe8; color: var(--soil-600); }
.badge.harvest { background: #fbf3de; color: #8a6a15; }
.badge.neutral { background: var(--stone-100); color: var(--text-muted); }
.badge.danger { background: #fbeeeb; color: var(--danger); }
.badge.outline { background: transparent; border-color: var(--border-default); color: var(--text-muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }

/* ---------------- forms ---------------- */
.field { margin-bottom: var(--space-4); }
.field label {
  display: block; font-size: var(--text-body-sm); font-weight: var(--weight-semibold);
  color: var(--text-strong); margin-bottom: 6px;
}
.field .hint { font-size: var(--text-caption); color: var(--text-subtle); margin-top: 5px; }
.field .err { font-size: var(--text-caption); color: var(--danger); margin-top: 5px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
input[type=text], input[type=tel], input[type=email], input[type=number], input[type=password], select, textarea {
  width: 100%; font-family: var(--font-body); font-size: var(--text-body);
  color: var(--text-strong); background: var(--white);
  border: 1px solid var(--border-default); border-radius: var(--radius-input);
  padding: 11px 14px; transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--green-500);
  box-shadow: 0 0 0 4px rgba(63,168,119,.18);
}
textarea { min-height: 96px; resize: vertical; }
.row { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, minmax(0,1fr)); }
@media (max-width: 620px) { .row { grid-template-columns: 1fr; } }

/* ---------------- table ---------------- */
.table-frame {
  border: 1px solid var(--border-subtle); border-radius: var(--radius-card);
  background: var(--white); overflow: hidden; box-shadow: var(--shadow-sm);
}
.table-frame .table-scroll { overflow-x: auto; }
table.agk { width: 100%; border-collapse: collapse; font-size: var(--text-body-sm); }
table.agk th {
  text-align: left; font-size: var(--text-overline); text-transform: uppercase;
  letter-spacing: var(--tracking-wide); color: var(--text-subtle);
  font-weight: var(--weight-semibold); padding: 12px var(--space-5);
  background: var(--stone-100); border-bottom: 1px solid var(--border-subtle); white-space: nowrap;
}
table.agk td { padding: 13px var(--space-5); border-bottom: 1px solid var(--border-subtle); vertical-align: middle; }
table.agk tr:last-child td { border-bottom: none; }
table.agk tbody tr:hover { background: var(--green-50); }
.empty-row { padding: var(--space-10); text-align: center; color: var(--text-subtle); }

/* ---------------- stat ---------------- */
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat .num {
  font-family: var(--font-display); font-weight: 900; font-size: var(--text-display-lg);
  line-height: 1; letter-spacing: var(--tracking-display); color: var(--green-700);
}
.stat .label {
  font-size: var(--text-overline); text-transform: uppercase;
  letter-spacing: var(--tracking-overline); color: var(--text-subtle);
  font-weight: var(--weight-semibold);
}
.stat .sub { font-size: var(--text-caption); color: var(--text-muted); }

/* ---------------- misc ---------------- */
.divider { height: 1px; background: var(--border-subtle); margin: var(--space-6) 0; border: 0; }
.stack > * + * { margin-top: var(--space-4); }
.inline { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%) translateY(120%);
  background: var(--green-800); color: var(--white); padding: 13px 24px;
  border-radius: var(--radius-pill); box-shadow: var(--shadow-lg);
  font-size: var(--text-body-sm); z-index: 90;
  transition: transform var(--dur-base) var(--ease-out); max-width: 90vw;
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.err { background: var(--danger); }

/* ---------------- language switcher ---------------- */
.lang-switch {
  display: inline-flex; gap: 2px; padding: 2px; flex: none;
  background: var(--stone-100); border-radius: var(--radius-pill);
}
.lang-switch button {
  font: inherit; font-size: var(--text-caption); font-weight: var(--weight-semibold);
  line-height: 1; padding: 6px 11px; border: 0; cursor: pointer;
  background: transparent; color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.lang-switch button:hover { color: var(--text-body); }
.lang-switch button.active { background: var(--green-600); color: var(--white); }
.agk-topbar .lang-switch { background: rgba(255,255,255,.12); }
.agk-topbar .lang-switch button { color: var(--green-100); }
.agk-topbar .lang-switch button.active { background: var(--green-500); color: var(--white); }

/* ---------------- product card (design-system pattern) ----------------
   Mirrors components/product/ProductCard.jsx: square tinted tile, category
   badge top-left, weight badge top-right, display-face NPK, mono spec line,
   "Read more →" with an arrow that steps right on hover. */
.pcard {
  display: flex; flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden; text-align: left; width: 100%;
  font: inherit; color: var(--text-body); cursor: pointer; padding: 0;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.pcard:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.pcard .tile {
  position: relative; aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, var(--green-50), #EFEAE0);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.pcard .tile .shot { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.pcard .tile .npk {
  font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: clamp(20px, 7vw, 30px); color: var(--green-600);
  letter-spacing: var(--tracking-display);
  text-align: center; padding: 0 10px; line-height: 1.05;
}
.pcard .tile .badge { position: absolute; top: 12px; }
.pcard .tile .badge.tl { left: 12px; }
.pcard .tile .badge.tr { right: 12px; }
.pcard .body { padding: var(--space-4); display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard .body .agk-kicker { margin: 0; font-size: 10px; }
.pcard .body h3 {
  margin: 0; font-family: var(--font-display); font-size: var(--text-body);
  font-weight: var(--weight-display); color: var(--text-strong); line-height: 1.15;
}
.pcard .body .specline {
  font-family: var(--font-mono); font-size: var(--text-caption);
  letter-spacing: .02em; color: var(--green-700);
}
.pcard .body .crops { font-size: var(--text-body-sm); color: var(--text-muted); }
.pcard .body .more {
  margin-top: auto; padding-top: 8px; font-size: var(--text-body-sm);
  font-weight: var(--weight-semibold); color: var(--text-link);
  display: inline-flex; align-items: center; gap: 6px;
}
.pcard .body .more .arr {
  width: 15px; height: 15px; flex: none;
  transition: transform var(--dur-fast) var(--ease-out);
}
.pcard:hover .body .more .arr { transform: translateX(3px); }

/* print */
@media print {
  .no-print { display: none !important; }
  body { background: var(--white); }
  .card { box-shadow: none; border-color: var(--border-default); }
}

/* Winning row in the guess-the-weight standings. */
tr.row-win td { background: #fdf6e4; font-weight: var(--weight-semibold); }
tr.row-win td:first-child { box-shadow: inset 3px 0 0 var(--harvest-500); }

/* ==================================================================
   Public navigation — one bar on every farmer-facing page.
   Two rows on purpose: identity and language stay put while the section
   pills scroll, which is what a phone at a booth actually needs.
   ================================================================== */
.agk-nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border-subtle);
}
.agk-nav .row {
  display: flex; align-items: center; gap: var(--space-3);
  max-width: 960px; margin: 0 auto; padding: 9px var(--space-5) 7px;
}
.agk-nav .nav-brand { display: inline-flex; align-items: center; }
.agk-nav .nav-brand img { display: block; height: 27px; width: auto; }
.agk-nav .nav-brand:hover { opacity: .85; }
.agk-nav .spacer { flex: 1; }
.agk-nav .nav-back {
  display: inline-flex; align-items: center; gap: 5px; font: inherit;
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
  color: var(--text-muted); background: none; border: 0; cursor: pointer;
  padding: 6px 8px 6px 0; margin-left: -4px;
}
.agk-nav .nav-back svg { width: 17px; height: 17px; }
.agk-nav .nav-back:hover { color: var(--green-700); }
.agk-nav .nav-back span { display: none; }
@media (min-width: 420px) { .agk-nav .nav-back span { display: inline; } }

.agk-nav .pills {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  max-width: 960px; margin: 0 auto; padding: 0 var(--space-5) 9px;
}
.agk-nav .pills::-webkit-scrollbar { display: none; }
.agk-nav .pills a {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 7px 13px; border-radius: var(--radius-pill);
  font-size: var(--text-caption); font-weight: var(--weight-semibold);
  color: var(--text-muted); background: var(--white);
  border: 1px solid var(--border-subtle); white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.agk-nav .pills a svg { width: 15px; height: 15px; }
.agk-nav .pills a:hover { color: var(--green-700); border-color: var(--green-300); }
.agk-nav .pills a.on {
  background: var(--green-600); border-color: var(--green-600); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.agk-nav .lang-switch { flex: none; }

/* ==================================================================
   Motion — everything here is opt-in per element and switches off
   entirely under prefers-reduced-motion.
   ================================================================== */
[data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
[data-reveal].shown { opacity: 1; transform: none; }
/* Stagger children of a revealed group so a list arrives as a wave. */
[data-reveal-stagger] > * { transition-delay: calc(var(--i, 0) * 55ms); }

@keyframes agk-pop { 0% { transform: scale(.94); opacity: 0 } 100% { transform: none; opacity: 1 } }
@keyframes agk-slide-in { from { opacity: 0; transform: translateX(18px) } to { opacity: 1; transform: none } }
@keyframes agk-pulse { 0%,100% { opacity: 1 } 50% { opacity: .45 } }
@keyframes agk-spin { to { transform: rotate(360deg) } }
.agk-pop { animation: agk-pop .34s var(--ease-out) both; }
.agk-step-in { animation: agk-slide-in .3s var(--ease-out) both; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  .agk-pop, .agk-step-in { animation: none; }
  * { scroll-behavior: auto !important; }
}

/* Crop icons from the Agri-2026 panels, as tintable masks. */
.crop-ic {
  display: inline-block; width: 1.5em; height: 1.5em; vertical-align: -0.35em;
  background: currentColor;
  -webkit-mask: var(--src) center / contain no-repeat;
          mask: var(--src) center / contain no-repeat;
}
.crop-ic.lg { width: 2.4em; height: 2.4em; }

/* A crop the product is FOR, as an icon with its name — the panel language. */
.crop-chip {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  font: inherit; background: none; border: 1.5px solid transparent; cursor: pointer;
  border-radius: var(--radius-md); padding: 8px 12px 7px; color: var(--text-muted);
  font-size: 10px; letter-spacing: var(--tracking-wide); text-transform: uppercase;
  font-weight: var(--weight-semibold); min-width: 74px;
  transition: color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out);
}
.crop-chip:hover { color: var(--green-700); background: var(--green-50); }
.crop-chip[aria-pressed="true"] {
  color: var(--green-700); border-color: var(--green-500); background: var(--green-50);
}
.crop-chip .crop-ic { width: 30px; height: 30px; vertical-align: 0; }

/* ==================================================================
   Interaction layer — motion that answers the finger.

   This runs on a touchscreen at a trade booth, so every tappable thing
   acknowledges the tap where it was tapped: press-scale under the finger,
   a ripple from the contact point, and a spring back. All of it is
   pointer-driven, and all of it stops dead under prefers-reduced-motion.
   ================================================================== */
.agk-press {
  position: relative;
  transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.agk-press.is-down { transform: scale(var(--press-scale, .97)); }
.agk-press.is-down.lift { transform: scale(var(--press-scale, .97)) translateY(1px); }

/* The ripple lives in ::after so nothing is injected into the DOM. */
.agk-press::after {
  content: ''; position: absolute; left: var(--rx, 50%); top: var(--ry, 50%);
  width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: currentColor; opacity: 0; transform: scale(0);
  pointer-events: none; mix-blend-mode: multiply;
}
.agk-press.rippling::after { animation: agk-ripple .55s var(--ease-out) forwards; }
.agk-press.on-dark::after { mix-blend-mode: screen; }
@keyframes agk-ripple {
  0%   { opacity: .22; transform: scale(0); }
  100% { opacity: 0;   transform: scale(var(--ripple-scale, 18)); }
}
/* Elements that clip their own content need the ripple contained. */
.agk-press { overflow: hidden; }
.agk-press.no-clip { overflow: visible; }

/* Pointer tilt: the card leans toward the cursor and lifts. Desktop only —
   on touch the press-scale already carries the feedback. */
@media (hover: hover) and (pointer: fine) {
  .agk-tilt { transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out); }
  .agk-tilt.tilting {
    transform: perspective(700px)
               rotateX(calc(var(--ty, 0) * -6deg))
               rotateY(calc(var(--tx, 0) * 6deg))
               translateY(-4px);
    box-shadow: var(--shadow-lg);
  }
}

/* A figure the visitor can tap to watch it count again. */
.agk-replay { cursor: pointer; }
.agk-replay:active { transform: scale(.98); }

@media (prefers-reduced-motion: reduce) {
  .agk-press, .agk-tilt { transition: none; }
  .agk-press.is-down { transform: none; }
  .agk-press.rippling::after { animation: none; }
  .agk-tilt.tilting { transform: none; }
}

/* ==================================================================
   "Suitable for" — the crop strip from the foot of the Agri 2026 panels,
   rebuilt inside the product popup. Tap a crop, it expands.
   ================================================================== */
.sf { border-top: 1px solid var(--border-subtle); margin-top: var(--space-5); padding-top: var(--space-4); }
.sf-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3);
  font-size: var(--text-overline); text-transform: uppercase;
  letter-spacing: var(--tracking-overline); color: var(--text-subtle);
  font-weight: var(--weight-semibold); margin: 0 0 var(--space-3);
}
.sf-head span { text-transform: none; letter-spacing: 0; font-weight: 400;
                font-size: var(--text-caption); color: var(--text-subtle); }
.sf-crops { display: flex; flex-wrap: wrap; gap: 4px; }
.sf-crop[aria-expanded="true"] {
  color: var(--green-700); border-color: var(--green-500); background: var(--green-50);
}
.sf-crop[aria-expanded="true"] .crop-ic { transform: scale(1.08); }
.sf-crop .crop-ic { transition: transform .2s var(--ease-out); }

.sf-panel { margin-top: var(--space-3); }
.sf-panel.sf-in { animation: sf-open .28s var(--ease-out); }
@keyframes sf-open { from { opacity: 0; transform: translateY(-6px) } to { opacity: 1; transform: none } }
.sf-note { font-size: var(--text-body-sm); color: var(--text-body); margin: 0 0 var(--space-3);
           line-height: var(--leading-relaxed); }
.sf-note.muted { color: var(--text-subtle); font-size: var(--text-caption); }
.sf-ask { margin-bottom: var(--space-2); }

/* The panel's own claim pills, kept in the panel's voice. */
.sf-claims { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-4); }
.sf-claims span {
  font-size: 11px; font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--green-700); background: var(--green-50);
  border: 1px solid var(--green-200); border-radius: var(--radius-pill); padding: 5px 11px;
}
@media (prefers-reduced-motion: reduce) {
  .sf-panel.sf-in { animation: none; }
  .sf-crop .crop-ic { transition: none; }
}


/* Real Sequel Sans is present: take its designed letterfit. */
html.brand-font { --tracking-display: -0.02em; }

/* ==================================================================
   Type safety net — no word or figure may collide.

   Every display-face element gets a positive word gap, and anything
   carrying figures is tabular and untracked: "RM 5,544–53,760" must never
   close up around the comma or the en dash.
   ================================================================== */
.agk-display, [class*="num"], .amt, .big, .rate, .val, .kg,
.kv-item .v, .res-hero .rate, .hero-result .big, .stepper .val,
.dial .val, .total-row .v, .use-row .rate, .stage .nums .n {
  letter-spacing: 0 !important;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3, h4, .agk-display, .btn, .name, .title-btn {
  word-spacing: 0.06em;
}
/* A range is one token: never let it break across lines mid-number. */
/* "4 kg and above" — the tail of an open-ended rate, in body type so it
   never reads as part of the figure. */
.use-row .rate i { font-family: var(--font-body); font-style: normal; font-size: 10px;
  font-weight: var(--weight-semibold); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--text-subtle); margin-left: 5px; }

.kv-item .v, .use-row .rate, .stage .nums .n, .psheet .price,
.hero-result .big, .amt { text-wrap: nowrap; }
