@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@400;500;600;700&family=Barlow+Condensed:wght@600;700;800&family=Barlow+Semi+Condensed:wght@500;600;700&family=Barlow:wght@400;500;600;700&display=swap");
/* =========================================================
   FruitBridge — design system: "The Grade Card"
   A fruit-grading colour deck. Each variety is a pigment chip:
   durian lime, mangosteen wine, mango saffron/orange. Ink on
   cool white stock. Hard edges, ruled data, catalogue codes.
   ========================================================= */
:root {
  /* pigments */
  --ink: #16120f;
  --lime: #c9d639;
  --olive: #8ea01a;
  --olive-700: #55610c;
  --wine-950: #1f0818;
  --wine-900: #330e29;
  --wine-800: #4a1236;
  --wine-700: #5a1745;
  --wine-600: #7d2761;
  --wine-100: #f0dce8;
  --wine-50: #f8eef4;
  --saffron: #f5a30a;
  --saffron-600: #b86f00;
  --saffron-100: #fde7b0;
  --saffron-50: #fff5dc;
  --orange: #e8590c;
  --lime-100: #eff3c4;
  --lime-50: #f7f9e1;
  --white: #ffffff;
  --paper: #f6f6f3;
  --paper-2: #ecebe6;

  /* legacy names used across JS-rendered pages, remapped to the new pigments */
  --green-950: var(--wine-950); --green-900: var(--wine-900); --green-800: var(--wine-800);
  --green-700: var(--wine-700); --green-600: var(--wine-600);
  --green-100: var(--lime-100); --green-50: var(--wine-50);
  --mango-600: var(--saffron-600); --mango-500: var(--saffron); --mango-100: var(--saffron-100); --mango-50: var(--saffron-50);
  --sand-100: var(--paper-2); --sand-50: var(--paper);

  --text: #1c1816;
  --muted: #5d5752;
  --border: #dcdad3;
  --border-strong: #b9b5ab;
  --success: #17703f; --success-bg: #e1f2e8;
  --warn: #8a5300; --warn-bg: #fdf0d3;
  --danger: #b42318; --danger-bg: #fdecea;
  --info: #1d5a85; --info-bg: #e4eff8;
  --purple: #5a1745; --purple-bg: #f0dce8;
  --radius: 4px;
  --radius-lg: 6px;
  --shadow-sm: 0 1px 2px rgba(22, 18, 15, .06);
  --shadow: 0 10px 28px rgba(22, 18, 15, .10);
  --shadow-lg: 0 24px 60px rgba(22, 18, 15, .22);
  --font: "Barlow", "Bai Jamjuree", system-ui, "Segoe UI", Roboto, sans-serif;
  --display: "Barlow Condensed", "Bai Jamjuree", "Arial Narrow", sans-serif;
  --mono: "Barlow Semi Condensed", "Bai Jamjuree", system-ui, sans-serif;
  --container: 1240px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  /* the swatch strip: five variety pigments, hard stops */
  --strip: linear-gradient(90deg, var(--lime) 0 20%, var(--olive) 20% 40%, var(--wine-700) 40% 60%, var(--saffron) 60% 80%, var(--orange) 80% 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scrollbar-color: var(--wine-700) var(--paper-2); }
body {
  margin: 0; font-family: var(--font); font-size: 15.5px; line-height: 1.6;
  color: var(--text); background: var(--paper); caret-color: var(--wine-700); accent-color: var(--wine-700);
  font-variant-numeric: lining-nums;
}
html[lang="th"] body { line-height: 1.75; }
::selection { background: var(--saffron); color: var(--ink); }
::-webkit-scrollbar { width: 12px; height: 12px; } ::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--wine-700); border: 3px solid var(--paper-2); border-radius: 8px; }
img, svg { max-width: 100%; display: block; }
a { color: var(--wine-700); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--wine-950); text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.12; margin: 0 0 .5em; color: var(--ink); letter-spacing: -.02em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.4vw, 4.4rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.02; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -.03em; }
h3 { font-size: 1.15rem; font-weight: 700; }
h4 { font-size: 1rem; font-weight: 700; }
html[lang="th"] h1, html[lang="th"] h2, html[lang="th"] h3 { letter-spacing: 0; line-height: 1.3; }
p { margin: 0 0 1em; }
small, .small { font-size: .85rem; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt-0 { margin-top: 0 } .mt-1 { margin-top: .5rem } .mt-2 { margin-top: 1rem } .mt-3 { margin-top: 1.5rem } .mt-4 { margin-top: 2.5rem }
.mb-0 { margin-bottom: 0 } .mb-1 { margin-bottom: .5rem } .mb-2 { margin-bottom: 1rem } .mb-3 { margin-bottom: 1.5rem }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; border-radius: 3px; box-shadow: 0 0 0 6px var(--saffron); }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 3px; z-index: 1000; }
.skip-link:focus { left: 8px; }
code, .mono, .lot { font-family: var(--mono); font-size: .88em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }
.section-sm { padding: 40px 0; }
.section-white { background: var(--white); }
.section-green { background: var(--wine-900); color: var(--wine-100); }
.section-green h2, .section-green h3 { color: #fff; }
.section-sand { background: var(--paper-2); }
/* kickers are retired: the heading carries itself */
.eyebrow { display: none; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 680px; line-height: 1.55; }
.section-head { max-width: 780px; margin-bottom: 2.4rem; }
.section-head.center { margin-left: auto; margin-right: auto; }

/* ---------- Grid ---------- */
.grid { display: grid; gap: 20px; }
.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)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.flex { display: flex; gap: 12px; align-items: center; }
.flex-wrap { flex-wrap: wrap; }
.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
@media (max-width: 1024px) { .grid-4, .grid-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4, .grid-5 { grid-template-columns: 1fr; } .section { padding: 52px 0; } .container { padding: 0 16px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: .93rem; line-height: 1.2; cursor: pointer; letter-spacing: .01em;
  text-decoration: none; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), transform .2s var(--ease); white-space: nowrap;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--wine-700); color: #fff; border-color: var(--wine-700); }
.btn-primary:hover:not(:disabled) { background: var(--wine-950); border-color: var(--wine-950); color: #fff; }
.btn-accent { background: var(--saffron); color: var(--ink); border-color: var(--ink); }
.btn-accent:hover:not(:disabled) { background: var(--ink); color: var(--saffron); }
.btn-outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.btn-outline:hover:not(:disabled) { background: var(--ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--wine-700); }
.btn-ghost:hover:not(:disabled) { background: var(--wine-50); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #8f1c13; color: #fff; }
.btn-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }
.btn-light:hover { background: #fff; color: var(--wine-900); }
.btn-sm { padding: 6px 12px; font-size: .84rem; }
.btn-lg { padding: 15px 28px; font-size: 1.02rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--white); border-bottom: 2px solid var(--ink); }
.site-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 5px; background: var(--strip); }
.demo-bar { background: var(--saffron); color: var(--ink); font-size: .8rem; text-align: center; padding: 5px 12px; font-weight: 500; }
.demo-bar strong { font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.03em; flex-shrink: 0; }
.logo:hover { color: var(--ink); text-decoration: none; }
.logo-mark { width: 34px; height: 34px; }
.logo small { display: block; font-size: .62rem; font-weight: 600; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin-top: 0; }
.main-nav { display: flex; align-items: center; gap: 2px; flex: 1; flex-wrap: wrap; }
.main-nav a, .nav-drop > button { padding: 8px 10px; border-radius: 3px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .9rem; background: none; border: 0; font-family: inherit; cursor: pointer; border-bottom: 3px solid transparent; }
.main-nav a:hover, .nav-drop > button:hover { background: var(--paper-2); color: var(--ink); text-decoration: none; }
.main-nav a[aria-current="page"] { border-bottom-color: var(--wine-700); background: transparent; }
.nav-drop { position: relative; }
.nav-drop-menu { position: absolute; top: calc(100% + 8px); left: 0; min-width: 250px; background: #fff; border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; display: none; }
.nav-drop.open .nav-drop-menu { display: block; }
.nav-drop-menu a { display: block; padding: 9px 12px; }
.header-tools { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.toggle-group { display: inline-flex; border: 2px solid var(--ink); border-radius: 3px; overflow: hidden; }
.toggle-group button { border: 0; background: #fff; padding: 4px 9px; font: inherit; font-family: var(--mono); font-size: .74rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.toggle-group button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: .85rem; }
.avatar { width: 34px; height: 34px; border-radius: 3px; background: var(--wine-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: .8rem; flex-shrink: 0; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.1rem; }
.role-pill { font-family: var(--mono); font-size: .66rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 2px; background: var(--saffron); color: var(--ink); }
.menu-btn { display: none; margin-left: auto; background: none; border: 2px solid var(--ink); border-radius: 3px; padding: 7px 9px; cursor: pointer; color: var(--ink); }
@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .main-nav, .header-tools { display: none; }
  .site-header.nav-open .main-nav, .site-header.nav-open .header-tools { display: flex; }
  .header-inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  .site-header.nav-open .main-nav { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0; border-top: 1px solid var(--border); }
  .site-header.nav-open .header-tools { order: 4; flex-basis: 100%; flex-wrap: wrap; padding-bottom: 12px; }
  .nav-drop-menu { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  .nav-drop > button { width: 100%; text-align: left; }
}

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c9c4bc; padding: 64px 0 24px; margin-top: 12px; font-size: .9rem; position: relative; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 8px; background: var(--strip); }
.site-footer h4 { color: #fff; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; font-family: var(--mono); font-weight: 600; }
.site-footer a { color: #e7e3dc; text-decoration: none; }
.site-footer a:hover { color: var(--saffron); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(4, 1fr); gap: 28px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin: 7px 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.14); margin-top: 40px; padding-top: 18px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-footer .logo { color: #fff; }
.site-footer .logo small { color: #a9a39a; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Hero: white stock, ink type, pigment strip ---------- */
.hero { position: relative; overflow: hidden; background: var(--white); color: var(--text); border-bottom: 2px solid var(--ink); }
.hero-bg { display: none; }
.hero .container { position: relative; z-index: 1; padding-top: 84px; padding-bottom: 76px; }
.hero h1 { color: var(--ink); max-width: 980px; }
.hero p.lead { color: var(--muted); font-size: 1.2rem; }
.hero .btn-row { margin-top: 28px; }
.hero-sm .container { padding-top: 56px; padding-bottom: 52px; }
.hero-sm h1 { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.hero .btn-light { color: var(--ink); border-color: var(--ink); }
.hero .btn-light:hover { background: var(--ink); color: #fff; }
.hero:not(.hero-home)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--strip); }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-badges { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 30px; font-size: .88rem; font-weight: 600; color: var(--ink); }
.hero-badges span { display: inline-flex; align-items: center; gap: 7px; }
.hero-badges svg { width: 18px; height: 18px; color: var(--wine-700); }

/* home: the grade deck */
.hero-home .container { padding-bottom: 0; }
.hero-top { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: end; padding-bottom: 44px; }
.hero-top h1 { margin: 0; }
.hero-top .lead { margin-bottom: 0; }
@media (max-width: 900px) { .hero-top { grid-template-columns: 1fr; gap: 20px; } .hero .container { padding-top: 48px; } }
.deck { display: flex; height: clamp(360px, 44vw, 470px); border-top: 2px solid var(--ink); }
.deck-chip { flex: 1 1 0; min-width: 0; background: var(--chip); color: var(--on, var(--ink)); position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: 18px 18px 20px; text-decoration: none; overflow: hidden; transition: flex-grow .7s var(--ease); border-right: 2px solid var(--ink); }
.deck-chip:last-child { border-right: 0; }
.deck-chip:hover { color: var(--on, var(--ink)); text-decoration: none; }
.deck-chip.is-open { flex-grow: 5.2; }
.dc-code { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .1em; white-space: nowrap; }
.dc-name { font-weight: 800; letter-spacing: -.03em; line-height: 1; font-size: 1.45rem; writing-mode: vertical-rl; transform: rotate(180deg); align-self: flex-start; white-space: nowrap; }
.is-open .dc-name { writing-mode: horizontal-tb; transform: none; font-size: clamp(2.2rem, 4.6vw, 4rem); }
.dc-detail { min-width: 320px; opacity: 0; transform: translateY(10px); transition: opacity .3s var(--ease), transform .5s var(--ease); display: grid; gap: 10px; }
.is-open .dc-detail { opacity: 1; transform: none; transition-delay: .3s; }
.dc-facts { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 28px; margin: 0; }
.dc-facts dt { font-family: var(--mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; opacity: .78; }
.dc-facts dd { margin: 0; font-weight: 800; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.dc-go { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; text-decoration: underline; text-underline-offset: 4px; }
.dc-season { font-family: var(--mono); font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.deck-note { margin: 0; padding: 16px 0 22px; font-size: .84rem; color: var(--muted); }
.deck-foot { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; align-items: center; }
.deck-foot .hero-badges { margin-top: 0; padding: 18px 0; }
@media (max-width: 760px) {
  .deck { flex-direction: column; height: auto; }
  .deck-chip { flex: none; min-height: 74px; border-right: 0; border-bottom: 2px solid var(--ink); flex-direction: row; align-items: center; gap: 14px; transition: min-height .6s var(--ease); flex-wrap: wrap; }
  .deck-chip:last-child { border-bottom: 0; }
  .deck-chip.is-open { min-height: 210px; align-content: space-between; }
  .dc-name, .is-open .dc-name { writing-mode: horizontal-tb; transform: none; font-size: 1.5rem; }
  .is-open .dc-name { font-size: 2rem; }
  .dc-detail { min-width: 0; width: 100%; display: none; }
  .is-open .dc-detail { display: grid; }
  .dc-facts { grid-template-columns: repeat(3, auto); gap: 4px 18px; }
}

/* ---------- Cards ---------- */
.card { background: var(--white); border: 1px solid var(--border); border-top: 3px solid var(--ink); border-radius: var(--radius); padding: 24px; }
.card-tight { padding: 16px; }
.card h3 { margin-bottom: .35em; }
.card-hover { transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3, .card-head h2 { margin: 0; }
.icon-box { width: 44px; height: 44px; border-radius: 3px; background: var(--wine-700); color: #fff; display: inline-flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.icon-box svg { width: 22px; height: 22px; }
.icon-box.mango { background: var(--saffron); color: var(--ink); }
.section-green .card { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.16); border-top-color: var(--saffron); color: var(--wine-100); }
.section-green .card h3 { color: #fff; }
.section-green .icon-box { background: var(--saffron); color: var(--ink); }
.section-green .muted { color: #cdb3c3; }

.kpi { background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--ink); border-radius: var(--radius); padding: 16px 18px; }
.kpi .label { font-family: var(--mono); font-size: .68rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; }
.kpi .value { font-size: 1.9rem; font-weight: 800; color: var(--ink); margin-top: 4px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.kpi .sub { font-size: .8rem; color: var(--muted); }
.kpi.accent { border-top-color: var(--saffron); }
.kpi.green { border-top-color: var(--wine-700); }
.hero-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.hero-kpis .kpi { background: transparent; border: 0; border-left: 1px solid rgba(255,255,255,.2); border-radius: 0; padding: 6px 24px; }
.hero-kpis .kpi:first-child { border-left: 0; padding-left: 0; }
.hero-kpis .kpi .label { color: #d9bfd0; } .hero-kpis .kpi .value { color: #fff; font-size: 2.6rem; } .hero-kpis .kpi .sub { color: #cdb3c3; }
@media (max-width: 800px) { .hero-kpis { grid-template-columns: 1fr 1fr; gap: 20px 0; } .hero-kpis .kpi:nth-child(3) { border-left: 0; padding-left: 0; } }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 2px; font-family: var(--mono); font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; background: var(--paper-2); color: var(--muted); white-space: nowrap; line-height: 1.6; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-green { background: var(--wine-700); color: #fff; }
.badge-mango { background: var(--saffron-100); color: #6b3f00; }
.verified { display: inline-flex; align-items: center; gap: 4px; color: var(--success); font-weight: 700; font-size: .8rem; }
.verified svg { width: 16px; height: 16px; }
.demo-tag { display: inline-block; font-family: var(--mono); font-size: .66rem; font-weight: 700; padding: 1px 7px; border-radius: 2px; background: var(--saffron); color: var(--ink); text-transform: uppercase; letter-spacing: .08em; vertical-align: middle; }
.cert { display: inline-block; font-family: var(--mono); font-size: .68rem; font-weight: 600; padding: 1px 7px; border-radius: 2px; border: 1px solid var(--ink); color: var(--ink); margin: 0 4px 4px 0; }

/* ---------- Tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--border); border-top: 2px solid var(--ink); border-radius: var(--radius); background: #fff; }
table.table { width: 100%; border-collapse: collapse; font-size: .9rem; font-variant-numeric: tabular-nums; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: var(--white); border-bottom: 2px solid var(--ink); font-family: var(--mono); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); white-space: nowrap; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--lime-50); }
.table td.num, .table th.num { text-align: right; white-space: nowrap; }
.table .best td { background: var(--lime-100); }
.table-compare th:first-child, .table-compare td:first-child { position: sticky; left: 0; background: var(--paper); z-index: 1; font-weight: 700; min-width: 150px; }
.table-compare td { min-width: 190px; }
.table-compare .best-col { background: var(--lime-100); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
.field label, .label { display: block; font-weight: 700; font-size: .84rem; margin-bottom: 5px; color: var(--ink); }
.field .hint { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=tel], input[type=number], input[type=date], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: .94rem; padding: 10px 12px; border-radius: var(--radius); border: 1.5px solid var(--border-strong); background: #fff; color: var(--text);
}
textarea { min-height: 96px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px var(--saffron); }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--danger); }
.field .error { display: none; color: var(--danger); font-size: .8rem; margin-top: 4px; font-weight: 600; }
.field.invalid .error { display: block; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 4px; width: 16px; height: 16px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { border: 2px solid var(--border); border-radius: var(--radius); padding: 16px; cursor: pointer; display: block; background: #fff; transition: border-color .2s var(--ease); }
.radio-card:hover { border-color: var(--ink); }
.radio-card input { position: absolute; opacity: 0; }
.radio-card.selected, .radio-card:has(input:checked) { border-color: var(--wine-700); background: var(--wine-50); }
.radio-card:focus-within { outline: 3px solid var(--ink); outline-offset: 2px; }
.input-group { display: flex; }
.input-group input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.input-group .btn { border-top-left-radius: 0; border-bottom-left-radius: 0; }

/* ---------- Portal layout ---------- */
.page-head { background: #fff; border-bottom: 2px solid var(--ink); padding: 30px 0 26px; }
.page-head h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin-bottom: 4px; }
.page-head p { margin: 0; color: var(--muted); }
.breadcrumb { font-family: var(--mono); font-size: .74rem; color: var(--muted); margin-bottom: 8px; letter-spacing: .02em; }
.breadcrumb a { color: var(--muted); }
.portal-body { padding-top: 32px; padding-bottom: 72px; }
.layout-sidebar { display: grid; grid-template-columns: 270px 1fr; gap: 28px; align-items: start; }
@media (max-width: 900px) { .layout-sidebar { grid-template-columns: 1fr; } }
.filters { position: sticky; top: 100px; }
.filters fieldset { border: 0; padding: 0; margin: 0 0 16px; }
.filters legend { font-family: var(--mono); font-weight: 600; font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink); margin-bottom: 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); width: 100%; }
.filters .check { margin: 4px 0; }
@media (max-width: 900px) { .filters { position: static; } }
.toolbar { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { flex: 1; min-width: 220px; max-width: 420px; }
.alert { padding: 12px 16px; border-radius: var(--radius); border: 1px solid; font-size: .9rem; display: flex; gap: 10px; align-items: flex-start; }
.alert-info { background: var(--info-bg); border-color: #b5d2e8; color: #123d5c; }
.alert-warn { background: var(--warn-bg); border-color: #efce8c; color: #5e3800; }
.alert-success { background: var(--success-bg); border-color: #a9d8bc; color: #0f4d2e; }
.alert-danger { background: var(--danger-bg); border-color: #f1b4ad; color: #7a1710; }
.alert .btn { margin-left: auto; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty svg { width: 48px; height: 48px; margin: 0 auto 10px; opacity: .5; }

/* ---------- Product cards: each is a chip of its variety ---------- */
.product-card { display: flex; flex-direction: column; gap: 10px; }
.product-card .top { display: flex; gap: 14px; align-items: flex-start; }
.fruit-thumb { width: 64px; height: 64px; border-radius: 3px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.fruit-thumb.durian { background: var(--lime); } .fruit-thumb.mangosteen { background: var(--wine-100); } .fruit-thumb.mango { background: var(--saffron-100); }
.fruit-thumb svg { width: 46px; height: 46px; }
.fruit-thumb.lg { width: 120px; height: 120px; } .fruit-thumb.lg svg { width: 88px; height: 88px; }
.spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; font-size: .84rem; margin: 0; }
.spec-list dt { color: var(--muted); } .spec-list dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.price-line { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--ink); padding-top: 10px; margin-top: auto; }
.price { font-size: 1.35rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.price small { font-size: .78rem; color: var(--muted); font-weight: 600; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 700; }

/* ---------- Tabs / accordion ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--ink); margin-bottom: 22px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 16px; font: inherit; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 4px solid transparent; margin-bottom: -2px; white-space: nowrap; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--saffron); }
.tabs button .count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 2px; background: var(--paper-2); font-family: var(--mono); font-size: .72rem; margin-left: 4px; }
.tabs.pill { border: 2px solid var(--ink); background: #fff; padding: 3px; border-radius: var(--radius); display: inline-flex; gap: 2px; }
.tabs.pill button { border-radius: 2px; border: 0; margin: 0; }
.tabs.pill button[aria-selected="true"] { background: var(--ink); color: #fff; }
.accordion details { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; }
.accordion details[open] { border-color: var(--ink); }
.accordion summary { padding: 17px 20px; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-family: var(--mono); font-size: 1.3rem; line-height: 1; color: var(--wine-700); }
.accordion details[open] summary::after { content: "–"; }
.accordion details > div { padding: 0 20px 18px; color: var(--muted); }

/* ---------- Steps / timeline: the five-chip fan ---------- */
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: #fff; }
.step { position: relative; padding: 0 0 22px; border-right: 2px solid var(--ink); }
.step:last-child { border-right: 0; }
.step .num { height: 84px; padding: 12px 16px; background: var(--lime); color: var(--ink); font-weight: 800; font-size: 2.6rem; line-height: 1; letter-spacing: -.04em; display: flex; align-items: flex-end; margin-bottom: 16px; }
.step:nth-child(2) .num { background: var(--olive); }
.step:nth-child(3) .num { background: var(--wine-700); color: #fff; }
.step:nth-child(4) .num { background: var(--saffron); }
.step:nth-child(5) .num { background: var(--orange); }
.step h3 { font-size: 1.02rem; padding: 0 16px; }
.step p { font-size: .88rem; color: var(--muted); margin: 0; padding: 0 16px; }
@media (max-width: 1000px) { .steps { grid-template-columns: 1fr 1fr; } .step { border-bottom: 2px solid var(--ink); } .step:nth-child(2n) { border-right: 0; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } .step { border-right: 0; } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 36px; }
.timeline li::before { content: ""; position: absolute; left: 10px; top: 22px; bottom: 0; width: 2px; background: var(--border-strong); }
.timeline li:last-child::before { display: none; }
.timeline .dot { position: absolute; left: 0; top: 2px; width: 22px; height: 22px; border-radius: 3px; border: 2px solid var(--border-strong); background: #fff; display: flex; align-items: center; justify-content: center; }
.timeline li.done .dot { background: var(--wine-700); border-color: var(--wine-700); color: #fff; }
.timeline li.done::before { background: var(--wine-700); }
.timeline li.current .dot { border-color: var(--ink); background: var(--saffron); box-shadow: 0 0 0 4px var(--saffron-100); }
.timeline li.failed .dot { background: var(--danger); border-color: var(--danger); color: #fff; }
.timeline .dot svg { width: 12px; height: 12px; }
.timeline .t-title { font-weight: 700; }
.timeline .t-meta { font-size: .8rem; color: var(--muted); font-family: var(--mono); }
.progress-track { display: flex; gap: 4px; }
.progress-track span { flex: 1; height: 8px; border-radius: 1px; background: var(--border); }
.progress-track span.on { background: var(--wine-700); }
.progress-track span.fail { background: var(--danger); }

/* ---------- Modal / toast ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(22,18,15,.6); display: flex; align-items: flex-start; justify-content: center; z-index: 500; padding: 40px 16px; overflow-y: auto; }
.modal { background: #fff; border: 2px solid var(--ink); border-radius: var(--radius-lg); width: 100%; max-width: 620px; box-shadow: var(--shadow-lg); animation: pop .3s var(--ease); }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 2px solid var(--ink); }
.modal-head h2 { font-size: 1.25rem; margin: 0; }
.modal-body { padding: 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; background: var(--paper); }
.icon-btn { background: none; border: 0; padding: 6px; border-radius: 3px; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--paper-2); color: var(--ink); }
@keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.toasts { position: fixed; bottom: 20px; right: 20px; z-index: 600; display: flex; flex-direction: column; gap: 10px; max-width: min(380px, calc(100vw - 40px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .9rem; animation: pop .3s var(--ease); border-bottom: 4px solid var(--saffron); }
.toast.error { border-bottom-color: #ff6b5e; }

/* ---------- Flip cards / org chart ---------- */
.team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 1000px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .team-grid { grid-template-columns: 1fr; } }
.flip { perspective: 1000px; height: 220px; cursor: pointer; background: none; border: 0; padding: 0; width: 100%; font: inherit; text-align: center; }
.flip.founder { height: 270px; max-width: 420px; margin: 0 auto 28px; display: block; }
.flip-inner { position: relative; width: 100%; height: 100%; transition: transform .6s var(--ease); transform-style: preserve-3d; }
.flip:hover .flip-inner, .flip:focus-visible .flip-inner, .flip.flipped .flip-inner { transform: rotateY(180deg); }
.flip-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 1px solid var(--border); border-top: 3px solid var(--ink); background: #fff; }
.flip-back { transform: rotateY(180deg); background: var(--wine-800); color: var(--wine-100); border-color: var(--wine-800); border-top-color: var(--saffron); font-size: .92rem; }
.flip-face .avatar { width: 72px; height: 72px; font-size: 1.4rem; margin-bottom: 12px; background: var(--wine-700); }
.flip:nth-child(4n+1) .flip-face .avatar { background: var(--olive); color: var(--ink); }
.flip:nth-child(4n+3) .flip-face .avatar { background: var(--saffron); color: var(--ink); }
.flip.founder .avatar { width: 92px; height: 92px; font-size: 1.8rem; background: var(--saffron); color: var(--ink); }
.flip-face .name { font-weight: 800; color: var(--ink); }
.flip-face .role { font-size: .85rem; color: var(--wine-700); font-weight: 600; margin-top: 2px; }
.flip-back .name { color: #fff; font-weight: 800; margin-bottom: 8px; }
.flip-hint { font-size: .72rem; color: var(--muted); margin-top: 10px; }
.org-chart { display: flex; flex-direction: column; align-items: center; gap: 0; font-size: .85rem; overflow-x: auto; padding: 8px 0; }
.org-node { background: #fff; border: 1.5px solid var(--ink); border-radius: var(--radius); padding: 8px 14px; text-align: center; font-weight: 700; min-width: 150px; }
.org-node small { display: block; font-weight: 500; color: var(--muted); }
.org-node.top { background: var(--ink); color: #fff; }
.org-node.top small { color: #cfc9c0; }
.org-line { width: 2px; height: 20px; background: var(--ink); }
.org-row { display: flex; gap: 16px; position: relative; padding-top: 20px; justify-content: center; }
.org-row::before { content: ""; position: absolute; top: 0; left: 12%; right: 12%; height: 2px; background: var(--ink); }
.org-row > .org-col { display: flex; flex-direction: column; align-items: center; position: relative; }
.org-row > .org-col::before { content: ""; position: absolute; top: -20px; width: 2px; height: 20px; background: var(--ink); }
.org-sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 0; }
.org-sub .org-node { min-width: 130px; font-size: .8rem; background: var(--paper); border-color: var(--border-strong); }
@media (max-width: 760px) { .org-row { flex-direction: column; padding-top: 0; } .org-row::before, .org-row > .org-col::before { display: none; } .org-row > .org-col { gap: 8px; } }

/* ---------- Charts ---------- */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; overflow: visible; }
.chart text { font-family: var(--mono); font-size: 10.5px; fill: var(--muted); }
.chart .bar { transition: opacity .15s; } .chart .bar:hover { opacity: .8; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--muted); margin-top: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 1px; display: inline-block; }

/* ---------- Calendar ---------- */
.cal { border-collapse: separate; border-spacing: 3px; width: 100%; font-size: .82rem; }
.cal th { font-family: var(--mono); font-size: .7rem; font-weight: 600; color: var(--muted); padding: 6px; text-align: center; }
.cal th.row-h { text-align: left; color: var(--ink); white-space: nowrap; padding-right: 12px; font-family: var(--font); font-size: .84rem; font-weight: 700; }
.cal td { height: 36px; border-radius: 2px; background: var(--paper-2); text-align: center; }
.cal td.peak { background: var(--wine-700); color: #fff; font-weight: 700; }
.cal td.avail { background: var(--lime); color: var(--ink); }
.cal td.now { outline: 3px solid var(--ink); outline-offset: -3px; }

/* ---------- Misc ---------- */
.stars { color: var(--saffron-600); letter-spacing: 1px; white-space: nowrap; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: 2px; }
.star-input input { position: absolute; opacity: 0; }
.star-input label { font-size: 1.8rem; color: var(--border-strong); cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--saffron); }
.star-input input:focus-visible + label { outline: 3px solid var(--ink); }
.meter { height: 8px; border-radius: 1px; background: var(--paper-2); overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--wine-700); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 32px; } }
.illus { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--lime-50); }
.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 30px; margin: 10px 0; }
.check-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 2px; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316120f' stroke-width='3.2'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }
.section-green .check-list li::before { background-color: var(--saffron); }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border: 1.5px solid var(--ink); border-radius: 2px; background: #fff; font-size: .84rem; font-weight: 600; cursor: pointer; color: var(--ink); font-family: inherit; }
.chip:hover { background: var(--ink); color: #fff; }
.doc-sheet { border: 1px solid var(--border-strong); border-radius: var(--radius); padding: 26px; background: #fff; font-size: .9rem; }
.doc-sheet h3 { border-bottom: 2px solid var(--ink); padding-bottom: 8px; }
.stamp { display: inline-block; border: 3px solid var(--success); color: var(--success); padding: 4px 12px; border-radius: 3px; font-family: var(--mono); font-weight: 700; transform: rotate(-4deg); letter-spacing: .12em; }
.stamp.fail { border-color: var(--danger); color: var(--danger); }
.cta-band { background: var(--wine-800); color: #fff; border-radius: var(--radius-lg); padding: 48px 44px 54px; display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; position: relative; overflow: hidden; }
.cta-band::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; background: var(--strip); }
.cta-band h2 { color: #fff; margin: 0 0 6px; }
.cta-band p { color: #e3c9d8; margin: 0; }
.qr { width: 120px; height: 120px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; border: 0; }
.notice-sim { font-size: .78rem; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }

@media print {
  .site-header, .site-footer, .no-print, .toasts, .modal-foot, .demo-bar { display: none !important; }
  .modal-backdrop { position: static; background: none; padding: 0; }
  .modal { box-shadow: none; max-width: none; }
  body { background: #fff; }
  body.printing-modal > *:not(.modal-backdrop) { display: none !important; }
}
/* Reduced motion: drop movement, keep colour/opacity feedback so state changes still read. */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after { animation: none !important; transition-property: color, background-color, border-color, opacity !important; }
  html { scroll-behavior: auto; }
}

/* nav fit tweaks */
.main-nav { flex-wrap: nowrap; }
.main-nav a, .nav-drop > button { white-space: nowrap; }
@media (max-width: 1560px) { .logo small { display: none; } .main-nav a, .nav-drop > button { padding: 8px 8px; font-size: .86rem; } .user-chip > span:last-child { display: none; } }
.ic { width: 18px; height: 18px; flex-shrink: 0; display: inline-block; vertical-align: -3px; }
.menu-btn .ic { width: 22px; height: 22px; }
.filter-toggle { display: none; }
@media (max-width: 900px) {
  .filter-toggle { display: inline-flex; margin-bottom: 12px; }
  .filters:not(.open) form { display: none; }
}
@media (max-width: 900px) { .filters:not(.open) { padding: 12px; } .filters:not(.open) .filter-toggle { margin-bottom: 0; } }
/* brand logo image */
.logo-mark { width: auto; height: 54px; object-fit: contain; }
.logo-mark.on-dark { background: #fff; border-radius: 3px; padding: 4px 6px; height: 56px; }
@media (max-width: 680px) { .logo-mark { height: 40px; } }

/* language & currency switchers */
.mini-select { width: auto; padding: 5px 26px 5px 9px; font-size: .8rem; font-weight: 700; color: var(--ink); border-radius: 3px; border: 2px solid var(--ink); background-color: #fff; cursor: pointer; }
/* co-founders */
.founders { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.founders .flip.founder { margin: 0; flex: 1 1 320px; max-width: 420px; }
.org-founders { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* hard-edged ruled elements: square corners where a thick rule is the accent */
.card, .kpi, .flip-face, .main-nav a, .nav-drop > button, .tabs button, .toast { border-radius: 0; }
@media (max-width: 760px) { .deck-chip { transition: none; } }

/* ---- finish-review fixes ---- */
/* five-up card rows become five pigment chips: variety colour is the top band, no icon tiles */
.grid-5 > .card { border-top-width: 12px; }
.grid-5 > .card:nth-child(1) { border-top-color: var(--lime); }
.grid-5 > .card:nth-child(2) { border-top-color: var(--olive); }
.grid-5 > .card:nth-child(3) { border-top-color: var(--wine-700); }
.grid-5 > .card:nth-child(4) { border-top-color: var(--saffron); }
.grid-5 > .card:nth-child(5) { border-top-color: var(--orange); }
.grid-5 > .card > .icon-box { display: none; }
/* listings: the variety is the chip */
.product-card:has(.fruit-thumb.durian) { border-top: 12px solid var(--lime); }
.product-card:has(.fruit-thumb.mangosteen) { border-top: 12px solid var(--wine-700); }
.product-card:has(.fruit-thumb.mango) { border-top: 12px solid var(--saffron); }
/* KPIs as a ledger line, not big-number tiles */
.hero-kpis .kpi { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; }
.hero-kpis .kpi .value { order: 1; font-size: 1.7rem; margin: 0; }
.hero-kpis .kpi .label { order: 2; }
.hero-kpis .kpi .sub { order: 3; flex-basis: 100%; }
/* sub-page heroes: pigment bars fill the empty right half */
@media (min-width: 900px) {
  .hero:not(.hero-home)::before { content: ""; position: absolute; right: 0; top: 0; bottom: 10px; width: min(30%, 420px);
    background: linear-gradient(90deg, var(--lime) 0 20%, var(--olive) 20% 40%, var(--wine-700) 40% 60%, var(--saffron) 60% 80%, var(--orange) 80% 100%); }
  .hero:not(.hero-home) h1, .hero:not(.hero-home) .lead { max-width: min(62%, 760px); }
}
/* team on phones: 2-up compact */
@media (max-width: 520px) {
  .team-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .team-grid .flip { height: 190px; }
  .team-grid .flip-face { padding: 10px; }
  .team-grid .flip-face .avatar { width: 48px; height: 48px; font-size: 1rem; }
  .team-grid .flip-hint { display: none; }
  .team-grid .flip-face .name { font-size: .88rem; } .team-grid .flip-face .role { font-size: .74rem; }
}
/* dropdown sits above the header colour strip */
.site-header::after { z-index: 0; }
.nav-drop-menu { z-index: 10; }
/* variety cards on home: colour follows the deck (1-5), text never escapes the card */
.product-card:has(.fruit-thumb.durian), .product-card:has(.fruit-thumb.mangosteen), .product-card:has(.fruit-thumb.mango) { border-top-width: 12px; }
.grid-5 > .product-card:nth-child(1) { border-top-color: var(--lime); } .grid-5 > .product-card:nth-child(2) { border-top-color: var(--olive); }
.grid-5 > .product-card:nth-child(3) { border-top-color: var(--wine-700); } .grid-5 > .product-card:nth-child(4) { border-top-color: var(--saffron); }
.grid-5 > .product-card:nth-child(5) { border-top-color: var(--orange); }
.grid-5 > .product-card { padding: 18px; }
.product-card .top > div { min-width: 0; }
.product-card .badge { white-space: normal; }
.product-card .price-line { flex-wrap: wrap; gap: 2px 10px; }
.grid-5 .fruit-thumb { width: 52px; height: 52px; } .grid-5 .fruit-thumb svg { width: 38px; height: 38px; }
.product-card .badge { font-size: .62rem; letter-spacing: .02em; }
/* mobile: single-column grids must be allowed to shrink below content width */
@media (max-width: 680px) { .grid-2, .grid-3, .grid-4, .grid-5, .form-grid, .split, .layout-sidebar { grid-template-columns: minmax(0, 1fr); } }
.grid > *, .form-grid > *, .split > *, .layout-sidebar > * { min-width: 0; }
.card { min-width: 0; overflow-wrap: anywhere; }
/* pages that set an inline sidebar width still collapse to one column */
@media (max-width: 900px) { .layout-sidebar { grid-template-columns: minmax(0, 1fr) !important; } }
.cal { display: block; overflow-x: auto; }

/* ---- type: pallet-label voice. Barlow Condensed (road/cargo signage) for display, Barlow for text ---- */
h1, h2, h3, .logo, .step .num, .price, .kpi .value, .dc-name, .dc-facts dd, .modal-head h2, .stamp { font-family: var(--display); }
h1, h2 { text-transform: uppercase; font-weight: 800; letter-spacing: .005em; line-height: .98; }
h1 { font-size: clamp(3rem, 8.2vw, 6rem); }
.hero-sm h1 { font-size: clamp(2.5rem, 5.6vw, 4.4rem); }
.page-head h1 { font-size: clamp(2.2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(2rem, 3.8vw, 3.2rem); }
h3 { font-size: 1.35rem; font-weight: 700; letter-spacing: .01em; }
html[lang="th"] h1, html[lang="th"] h2 { text-transform: none; line-height: 1.2; font-family: "Bai Jamjuree", var(--display); }
.logo { font-size: 1.5rem; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.price { font-weight: 700; font-size: 1.6rem; letter-spacing: 0; }
.kpi .value, .hero-kpis .kpi .value { font-weight: 700; letter-spacing: 0; }
.dc-name { font-weight: 800; text-transform: uppercase; letter-spacing: .01em; font-size: 1.9rem; }
.is-open .dc-name { font-size: clamp(3rem, 7vw, 6rem); }
.dc-facts dd { font-weight: 700; font-size: 1.6rem; }
.step .num { font-weight: 800; letter-spacing: 0; font-size: 3.4rem; }
.badge, .demo-tag, .cert, .role-pill, .table th, .kpi .label, .dc-code, .dc-facts dt, .breadcrumb, .filters legend, .site-footer h4, .toggle-group button, .timeline .t-meta, .cal th, .tabs button .count { font-family: var(--mono); font-weight: 600; }
.btn { letter-spacing: .02em; }
/* deck: the fruit itself sits in each chip */
/* Deck motion. Only transform / opacity / clip-path animate; layout never does (except the chip's own flex-grow).
   Closed: the fruit is a small sticker parked in the chip's corner. Open: it springs up to full size while
   spinning in like a fruit rolling onto the grading table. Page load: chips are dealt up one by one. */
.dc-art { position: absolute; right: clamp(10px, 2.4%, 34px); bottom: clamp(10px, 3%, 26px); width: clamp(190px, 23vw, 330px); aspect-ratio: 1; pointer-events: none;
  transform-origin: 100% 100%; transform: scale(.24); transition: transform .5s cubic-bezier(.5, 0, .2, 1); }
.dc-art svg { width: 100%; height: 100%; display: block; }
.is-open .dc-art { transform: none; transition: transform .85s cubic-bezier(.3, 1.45, .45, 1) .06s; }
.is-open .dc-art svg { animation: dc-roll .95s cubic-bezier(.25, .9, .3, 1) .06s both; }
.dc-detail, .dc-name, .dc-code { position: relative; z-index: 1; }
.deck-chip { transition: flex-grow .75s cubic-bezier(.65, 0, .2, 1); animation: dc-deal .7s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 80ms); }
.is-open .dc-name { animation: dc-wipe .6s cubic-bezier(.2, .8, .2, 1) .14s both; }
.deck-chip:not(.is-open) .dc-name { animation: dc-rise .45s ease-out .12s both; }
.dc-detail { transition: opacity .18s ease-out; transform: none; }
.is-open .dc-detail { transition-delay: 0s; }
.is-open .dc-season, .is-open .dc-facts > div, .is-open .dc-go { animation: dc-up .5s cubic-bezier(.2, .8, .2, 1) both; }
.is-open .dc-season { animation-delay: .26s; }
.is-open .dc-facts > div:nth-child(1) { animation-delay: .33s; }
.is-open .dc-facts > div:nth-child(2) { animation-delay: .40s; }
.is-open .dc-facts > div:nth-child(3) { animation-delay: .47s; }
.is-open .dc-go { animation-delay: .56s; }
@keyframes dc-deal { from { clip-path: inset(100% 0 0 0); transform: translateY(24px); } to { clip-path: inset(0); transform: none; } }
@keyframes dc-roll { from { rotate: -200deg; } to { rotate: 0deg; } }
@keyframes dc-wipe { from { clip-path: inset(-40% 100% -40% 0); translate: -14px 0; } to { clip-path: inset(-40% -10% -40% 0); translate: 0 0; } }
@keyframes dc-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
@keyframes dc-up { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }
@media (max-width: 760px) {
  .dc-art { width: 112px; right: 14px; top: 12px; bottom: auto; transform-origin: 100% 0; transform: scale(.5); }
  .deck-chip { transition: none; }
}
.fruit-thumb svg { width: 100%; height: 100%; padding: 3px; }
h1 { font-size: clamp(2.8rem, 6.4vw, 5rem); }
.deck { height: clamp(340px, 40vw, 430px); }
.hero .container { padding-top: 56px; }
.hero-top { padding-bottom: 32px; }
.is-open .dc-name { font-size: clamp(2.8rem, 6vw, 5rem); }
.cal, .table-wrap { position: relative; }
@media (max-width: 760px) { .deck-chip { justify-content: flex-start; padding-right: 100px; } .dc-name, .is-open .dc-name { flex: 1; } .dc-art, .is-open .dc-art { width: 64px; right: 16px; } .is-open .dc-art { width: 96px; } }
@media (max-width: 760px) { .deck { height: auto; } }
@media (max-width: 680px) { .btn { white-space: normal; text-align: center; } }

/* ---- type floor: Barlow reads small, so nothing ships under ~13px ---- */
body { font-size: 17px; }
small, .small { font-size: .9rem; }
.badge { font-size: .8rem; padding: 2px 9px; }
.demo-tag, .role-pill { font-size: .78rem; }
.cert { font-size: .8rem; }
.table th { font-size: .82rem; }
.table { font-size: .98rem; }
.kpi .label, .hero-kpis .kpi .label { font-size: .84rem; }
.kpi .sub, .hero-kpis .kpi .sub { font-size: .9rem; }
.dc-code { font-size: .86rem; }
.dc-facts dt { font-size: .8rem; }
.dc-season { font-size: .86rem; }
.dc-go { font-size: 1rem; }
.breadcrumb { font-size: .88rem; }
.filters legend { font-size: .82rem; }
.site-footer h4 { font-size: .86rem; }
.site-footer { font-size: 1rem; }
.toggle-group button { font-size: .86rem; }
.timeline .t-meta { font-size: .9rem; }
.cal th { font-size: .82rem; } .cal { font-size: .92rem; }
.chart text { font-size: 13px; }
.flip-hint { font-size: .84rem; }
.flip-face .role { font-size: .95rem; }
.org-chart { font-size: .95rem; } .org-sub .org-node { font-size: .9rem; }
.spec-list { font-size: .95rem; }
.hero-badges { font-size: 1rem; }
.deck-note { font-size: .92rem; }
.field label, .label { font-size: .95rem; }
.field .hint { font-size: .86rem; }
.main-nav a, .nav-drop > button { font-size: 1rem; }
.btn { font-size: 1rem; } .btn-sm { font-size: .92rem; }
.mini-select { font-size: .9rem; }
.logo small { font-size: .7rem; }
.product-card .badge { font-size: .74rem; }
@media (max-width: 1560px) { .main-nav a, .nav-drop > button { font-size: .95rem; } }
.dc-facts dt { font-size: .86rem; }
.demo-bar { font-size: .9rem; }
.role-pill, .demo-tag { font-size: .82rem; }
.product-card .badge { font-size: .8rem; }
.chart text { font-size: 17px; }
.avatar { font-size: .9rem; }
html[lang="th"] body { font-size: 18px; }
html[lang="th"] .badge, html[lang="th"] .table th, html[lang="th"] .dc-code { text-transform: none; letter-spacing: 0; }
.badge, .product-card .badge { font-size: .85rem; }
.demo-tag, .role-pill, .cert { font-size: .85rem; }
.calendar span, .cal span, .legend, .legend span { font-size: .9rem; }
/* Thai menu labels are longer: collapse to the hamburger earlier so the header never overflows */
@media (max-width: 1560px) {
  html[lang="th"] .menu-btn { display: inline-flex; }
  html[lang="th"] .main-nav, html[lang="th"] .header-tools { display: none; }
  html[lang="th"] .site-header.nav-open .main-nav, html[lang="th"] .site-header.nav-open .header-tools { display: flex; }
  html[lang="th"] .header-inner { flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
  html[lang="th"] .site-header.nav-open .main-nav { order: 3; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 8px 0; border-top: 1px solid var(--border); }
  html[lang="th"] .site-header.nav-open .header-tools { order: 4; flex-basis: 100%; flex-wrap: wrap; padding-bottom: 12px; }
  html[lang="th"] .nav-drop-menu { position: static; box-shadow: none; border: 0; padding-left: 12px; }
  html[lang="th"] .nav-drop > button { width: 100%; text-align: left; }
}

/* Thai: deck names need room for tone marks above and vowels below (line-height 1 clipped "มังคุด"). */
html[lang="th"] .dc-name { font-family: "Bai Jamjuree", var(--display); line-height: 1.4; letter-spacing: 0; text-transform: none; }
html[lang="th"] .is-open .dc-name { font-size: clamp(2.4rem, 5vw, 4.2rem); }

/* Home variety cards: every card shares the same row tracks (subgrid), so head, figures and price line up
   across the row whatever the name or badge length. The badge gets the card's full width instead of the
   narrow column beside the thumbnail, so Thai labels stay on one line. */
.grid-5 > .product-card { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 12px; align-content: start; }
.grid-5 > .product-card .top { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; row-gap: 10px; align-items: center; align-content: space-between; }
.grid-5 > .product-card .top > div:not(.fruit-thumb) { display: contents; }
.grid-5 > .product-card .top h3 { margin: 0; }
.grid-5 > .product-card .top .badge { grid-column: 1 / -1; justify-self: start; white-space: normal; }
.grid-5 > .product-card .spec-list { align-self: start; margin: 0; }
.grid-5 > .product-card .price-line { align-self: end; margin-top: 0; flex-direction: column; align-items: flex-start; gap: 2px; }
