/* Jenin — "The Last Harvest" · v6 (design team, 2026-10-13). Started as a copy of styles.css (v1);
   v1-only rules (hero card, thumbnails, the hero scale-down, the v1 mobile block) were removed.
   Desktop layout = absolutely positioned layers using design px from layout.json.
   Every element carries its design coordinates as --x/--y (and --w/--h); the
   containing section supplies its own top as --sy, so the numbers copied from
   layout.json stay global. Nested containers set --sx/--sy on their children. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); overflow-x: clip; }
img { display: block; }
p, h1, h2, h3, dl, dd, ul { margin: 0; padding: 0; font-weight: inherit; font-size: inherit; }
ul { list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.visually-hidden {
  position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Vertical nudges (design px) measured with tools/inkcheck.mjs against the reference.
   Re-measure once the licensed fonts are in: these compensate for fallback-font metrics. */
:root {
  --display-dy: 7; --body-tight-dy: -1; --body-relaxed-dy: -1.5; --nav-dy: 1; --name-dy: -1;
}

/* ---------- page + sections ---------- */
.page {
  /* Scale from the page's real content width, not 100vw: on systems with classic
     scrollbars 100vw includes the scrollbar and the right edge would be clipped. */
  container-type: inline-size;
  --u: calc(100cqw / var(--design-width));
  position: relative;
  background: var(--paper) url(../design6/background/plate.webp) top center / 100% auto no-repeat;
  font-family: var(--font-sans);
}
.section { position: relative; height: calc(var(--sh) * var(--u)); }
.bid { background: var(--bid-bg); }
.footer { background: var(--footer-bg); color: var(--footer-fg); }

/* ---------- positioning helpers ---------- */
.abs {
  position: absolute;
  left: calc((var(--x, 0) - var(--sx, 0)) * var(--u));
  top: calc((var(--y) - var(--sy)) * var(--u));
  margin: 0;
}
.box { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
img.box, .box > img:only-child { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }

/* ---------- 104.5% horizontal scale (DESIGN_SPEC §3.2) ---------- */
.hs   { transform: scaleX(var(--hscale)); transform-origin: left top; white-space: nowrap; }
.hs-c { display: inline-block; transform: scaleX(var(--hscale)); transform-origin: center; white-space: nowrap; }

/* ---------- type styles ----------
   --dy nudges the first line so the glyph tops land on the layout.json line tops. */
[class*="t-"], .display { top: calc((var(--y) - var(--sy) + var(--dy, 0)) * var(--u)); }

.display {
  font-family: var(--font-display); font-weight: 300; text-transform: uppercase;
  font-size: calc(var(--display-size) * var(--u));
  letter-spacing: var(--display-track);
  line-height: calc(var(--lh, var(--display-step)) * var(--u));
  --dy: var(--display-dy, 0);
  white-space: nowrap; color: var(--ink);
}
.display .ln { display: block; width: fit-content; transform: scaleX(var(--hscale)); }
.display-c { left: 0; width: 100%; }
.display-c .ln { margin-inline: auto; transform-origin: center; padding-left: var(--display-track); } /* balance trailing tracking */
.display-l .ln { transform-origin: left; }
.bid-heading { --display-size: 80.44; --lh: 89.77; --dy: 8.4; } /* 'Bid to preserve…' is set smaller (80.44 / 1.116 leading) */

.t-body {
  font-size: calc(var(--body-size) * var(--u));
  letter-spacing: var(--body-track);
  font-weight: 400;
}
.t-body strong { font-weight: 500; }
.tight   { line-height: calc(var(--body-step-tight) * var(--u));   --dy: var(--body-tight-dy, 0); }
.relaxed { line-height: calc(var(--body-step-relaxed) * var(--u)); --dy: var(--body-relaxed-dy, 0); }
.tight.stack p + p   { margin-top: calc(var(--body-step-tight) * var(--u)); }
.relaxed.stack p + p { margin-top: calc(var(--body-step-relaxed) * var(--u)); }
.gap-2 { margin-top: calc(2 * var(--body-step-tight) * var(--u)) !important; } /* Rescued col B: two blank lines (layout.json) */
.center-text { left: 0; width: 100%; text-align: center; }
.inline-link { text-decoration: none; }
.inline-link:hover { text-decoration: underline; }

.t-nav {
  font-weight: 500; font-size: calc(var(--nav-size) * var(--u)); letter-spacing: var(--nav-track);
  text-transform: uppercase; color: var(--ink-nav); line-height: calc(18.6 * var(--u)); --dy: var(--nav-dy, 0);
}
.t-eyebrow {
  font-weight: 500; font-size: calc(var(--eyebrow-size) * var(--u)); letter-spacing: var(--eyebrow-track);
  text-transform: uppercase; line-height: calc(32.6 * var(--u)); white-space: nowrap; --dy: var(--eyebrow-dy, 0);
}
.t-label-sm {
  font-size: calc(var(--label-sm-size) * var(--u)); letter-spacing: 0.04em; text-transform: uppercase;
  line-height: calc(15.4 * var(--u)); --dy: var(--label-sm-dy, 0);
}
.t-strong { font-weight: 500; -webkit-text-stroke: calc(0.27 * var(--u)) currentColor; }
.t-label {
  font-size: calc(var(--label-size) * var(--u)); letter-spacing: 0.04em; text-transform: uppercase;
  line-height: calc(19.7 * var(--u)); --dy: var(--label-dy, 0);
}
.t-price-lg { font-size: calc(var(--price-lg-size) * var(--u)); letter-spacing: 0.02em; line-height: calc(46.2 * var(--u)); --dy: var(--price-lg-dy, 0); }
.t-price-xl { font-size: calc(var(--price-xl-size) * var(--u)); letter-spacing: 0.02em; line-height: calc(59.5 * var(--u)); --dy: var(--price-xl-dy, 0); }
.t-stat     { font-size: calc(var(--stat-value-size) * var(--u)); letter-spacing: 0.02em; line-height: calc(31.8 * var(--u)); --dy: var(--stat-dy, 0); }
.t-name     { font-weight: 500; font-size: calc(var(--portrait-name-size) * var(--u)); line-height: calc(27.7 * var(--u)); --dy: var(--name-dy, 0); }
.t-card-title { font-weight: 500; font-size: calc(var(--card-title-size) * var(--u)); letter-spacing: var(--card-title-track); line-height: calc(34.4 * var(--u)); --dy: var(--card-title-dy, 0); }
.t-prefix   { font-weight: 500; font-size: calc(var(--input-prefix-size) * var(--u)); letter-spacing: 0.02em; color: var(--input-prefix); line-height: calc(27.8 * var(--u)); --dy: var(--prefix-dy, 0); }
.t-button   { font-weight: 500; font-size: calc(var(--button-size) * var(--u)); letter-spacing: 0.04em; text-transform: uppercase; line-height: calc(20.2 * var(--u)); --dy: var(--button-dy, 0); }
.t-footer {
  font-family: var(--font-footer); font-size: calc(var(--footer-size) * var(--u)); letter-spacing: 0.02em;
  line-height: calc(24.2 * var(--u)); --dy: var(--footer-dy, 0);
  left: 0; width: calc(1608.8 * var(--u)); text-align: center; /* text centred on x 804.4 per layout.json */
}

.rule { background: var(--ink); min-height: 0.5px; min-width: 0.5px; }

/* ---------- buttons ---------- */
.btn {
  display: flex; align-items: center; justify-content: center;
  border-radius: calc(var(--r, var(--radius-button)) * var(--u));
  font-weight: 500; font-size: calc(var(--button-size) * var(--u)); letter-spacing: 0.04em;
  text-transform: uppercase; line-height: 1;
  transition: background-color .15s ease;
}
.btn > span { padding-left: 0.04em; }
.btn-sm { font-size: calc(var(--button-sm-size) * var(--u)); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: #AE8E27; }
.btn-black { background: #000; color: #fff; }
.btn-black:hover { background: #262626; }

/* ---------- focus ---------- */
:focus { outline: none; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.footer :focus-visible, .btn-black:focus-visible { outline-color: #000; }

/* ---------- media ---------- */
.video { display: block; }
.video > img:first-child { width: 100%; height: 100%; }
.audio {
  background: url(/design/svg/icon-audio-play.svg) center / 100% 100% no-repeat;
  border-radius: 50%;
}
.audio[aria-pressed="true"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 51 51'%3E%3Ccircle cx='25.33' cy='25.42' r='23.86'/%3E%3Crect x='18' y='16' width='5' height='19' fill='%23fff'/%3E%3Crect x='28' y='16' width='5' height='19' fill='%23fff'/%3E%3C/svg%3E");
}

/* ---------- bid ---------- */
.stats dd { margin: 0; }
.bid-input {
  background: var(--input-bg);
  border: calc(0.55 * var(--u)) solid #000;
  border-radius: calc(var(--radius-input) * var(--u));
  cursor: text;
}
.bid-input .divider { background: var(--input-muted); }
.bid-input input {
  width: calc(300 * var(--u)); height: calc(61 * var(--u));
  border: 0; background: transparent; outline: none; padding: 0 0 0 calc(10.5 * var(--u));
  font-family: var(--font-sans); font-weight: 500; font-size: calc(var(--button-size) * var(--u));
  letter-spacing: 0.04em; color: var(--ink);
}
.bid-input:focus-within { outline: 2px solid #000; outline-offset: 3px; }
.bid-input input:not(:placeholder-shown) ~ .ph { display: none; }
.ph { color: var(--input-muted); pointer-events: none; }
.bid-status { font-size: calc(var(--label-sm-size) * var(--u)); letter-spacing: 0.04em; line-height: calc(20 * var(--u)); }
.bid-status.error { color: #8A1C1C; }

/* ---------- support ---------- */
.donate-panel { background: #000; }

/* ---------- video modal ---------- */
.video-modal { border: 0; padding: 0; background: #000; width: min(90vw, 1280px); }
.video-modal::backdrop { background: rgb(0 0 0 / .85); }
.video-modal video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; }
.video-close {
  position: absolute; top: 8px; right: 12px; z-index: 1; color: #fff; font-size: 32px; line-height: 1;
}

/* ==========================================================================
   Motion (added 2026-10-07). Soft and short, and the final state is always the
   design: the keyframes only animate opacity, `translate` and `clip-path`, which
   compose with the layout's own `transform: scaleX()` instead of replacing it.
   - Hero  [data-intro]: plays once on load. --i is the order (120 ms steps).
       ink  = calligraphy written in from the right (Arabic reads right to left)
       rise = fade in while moving up a little
   - Rest  [data-reveal]: plays once when the element is ~15% inside the viewport
       (IntersectionObserver in main.js). --d staggers neighbours by 110 ms.
       up / ink / fade as above.
   Visitors who prefer reduced motion, and pages without JS, get the static page.
   ========================================================================== */
@keyframes jlh-rise { from { opacity: 0; translate: 0 calc(28 * var(--u)); } }
@keyframes jlh-fade { from { opacity: 0; } }
@keyframes jlh-ink  { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }

@media (prefers-reduced-motion: no-preference) {
  [data-intro] {
    animation: jlh-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
    animation-delay: calc(150ms + var(--i, 0) * 120ms);
  }
  [data-intro="ink"] { animation-name: jlh-ink; animation-duration: 1.2s; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }

  /* Scroll reveals: hidden (paused on the first frame) only once main.js has added
     .js-motion, so without JS nothing is ever hidden. main.js adds .is-in when the element
     is ~15% inside the viewport; it then plays once, like the hero intro. */
  .js-motion [data-reveal] {
    animation: jlh-rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both paused;
    animation-delay: calc(var(--d, 0) * 110ms);
  }
  .js-motion [data-reveal="fade"] { animation-name: jlh-fade; }
  .js-motion [data-reveal="ink"] { animation-name: jlh-ink; animation-duration: 1.4s; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  .js-motion [data-reveal].is-in { animation-play-state: running; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

/* ==========================================================================
   v6 additions
   ========================================================================== */
:root { --eyebrow-size: 25.15; --footer-dy: 4; }

/* hero tagline — Indivisible Regular 24 (h-scaled 104.5%), tracking .06em, 1.152 leading */
.t-tagline { font-size: calc(24 * var(--u)); letter-spacing: 0.06em; line-height: calc(27.65 * var(--u)); --dy: var(--body-tight-dy, 0); }
/* delivery note under the shop button — 15.51, grey, underlined */
.t-note { font-size: calc(15.51 * var(--u)); letter-spacing: -0.02em; line-height: calc(23.87 * var(--u)); color: #7A7875; text-decoration: underline; text-decoration-thickness: calc(0.59 * var(--u)); text-underline-offset: calc(3 * var(--u)); --dy: -1; }
.t-place { font-weight: 500; font-size: calc(19.74 * var(--u)); letter-spacing: -0.02em; line-height: calc(23 * var(--u)); }
.t-name { letter-spacing: -0.02em; }

/* ---------- vessel gallery: the design photo plus two more, switched by the dots ---------- */
.gallery { overflow: hidden; background: #E8E8E8; }
.slides, .slide { position: absolute; inset: 0; width: 100%; height: 100%; }
.slide { opacity: 0; transition: opacity .45s ease; }
.slide.is-active { opacity: 1; }
.slide.cover { object-fit: cover; }
.dots { display: flex; }
.dots button { flex: none; border-radius: 50%; }
.gallery-dots { gap: calc(12.2 * var(--u)); }
.gallery-dots button { width: calc(9.9 * var(--u)); height: calc(9.9 * var(--u)); background: #F4F4F4; }
.gallery-dots button[aria-current="true"] { background: var(--gold); }

/* ---------- farmers carousel ---------- */
.farmer-track {
  left: 0; width: 100%; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; outline-offset: -2px;
}
.farmer-track::-webkit-scrollbar { display: none; }
.farmer-list { display: flex; gap: calc(35.2 * var(--u)); width: max-content; padding: 0 calc(64.5 * var(--u)); }
.farmer { position: relative; flex: none; width: calc(447 * var(--u)); height: calc(710 * var(--u)); scroll-snap-align: start; scroll-margin-left: calc(64.5 * var(--u)); }
.farmer > * { position: absolute; left: 0; margin: 0; }
.farmer .portrait { /* each card's own crop box (--pt top offset, --ph height, --px x offset) */
  left: calc(var(--px, 0) * var(--u)); top: calc(var(--pt, 0) * var(--u)); width: calc(447 * var(--u)); height: calc(var(--ph, 514.5) * var(--u));
  object-fit: cover; border-radius: calc(37.4 * var(--u));
}
.farmer .t-name  { left: calc(0.2 * var(--u)); top: calc((563 + var(--name-dy, 0)) * var(--u)); }
.farmer .t-place { left: calc(0.2 * var(--u)); top: calc(596.5 * var(--u)); }
.listen {
  left: calc(0.2 * var(--u)); top: calc(657.7 * var(--u)); width: calc(298.6 * var(--u)); height: calc(51.5 * var(--u));
  display: flex; align-items: center; padding-left: calc(58.3 * var(--u));
  background: #F2F2F2; border: 1px solid var(--gold); border-radius: calc(3 * var(--u)); color: var(--gold);
  font-weight: 500; font-size: calc(var(--button-size) * var(--u)); letter-spacing: 0.04em; text-transform: uppercase; line-height: 1;
}
.listen .hs-c { transform-origin: left center; }
.listen::before { /* play triangle, 16.7 × 19.8 at 25.5 from the left */
  content: ""; position: absolute; left: calc(25.5 * var(--u)); top: calc(15.9 * var(--u));
  width: calc(16.7 * var(--u)); height: calc(19.8 * var(--u)); background: var(--gold);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.listen[aria-pressed="true"]::before { clip-path: polygon(0 0, 35% 0, 35% 100%, 0 100%, 0 0, 65% 0, 100% 0, 100% 100%, 65% 100%, 65% 0); }
.listen:hover { background: #fff; }
.farmer-dots { gap: calc(20.1 * var(--u)); }
.farmer-dots button { width: calc(16.2 * var(--u)); height: calc(16.2 * var(--u)); background: #fff; }
.farmer-dots button[aria-current="true"] { background: #C09E2E; }

/* ==========================================================================
   Below 900px — PROPOSAL (the design is desktop-only; same approach as the v1 mobile).
   One column in reading order. The hero art is a scaled copy of the desktop composition,
   and the Arabic calligraphy keeps overlapping its photo with the design's own proportions.
   ========================================================================== */
@media (max-width: 899px) {
  :root, .page { --u: 0.75px; }
  :root { --display-dy: 0; --body-tight-dy: 0; --body-relaxed-dy: 0; --nav-dy: 0; --name-dy: 0; --footer-dy: 0; }
  .page { background-size: 1618px auto; background-repeat: repeat-y; background-position: top center; }

  .section {
    height: auto; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between;
    gap: 24px 16px; padding: 48px max(16px, calc((100% - 680px) / 2));
  }
  .section > *, .section article, .section .stats, .section .bid-form { width: 100%; }

  .page .abs, .page [class*="t-"], .page .display { position: static; left: auto; top: auto; }
  .box, img.box, .box > img:only-child { width: 100%; height: auto; }
  .hs { transform: none; white-space: normal; }
  .t-body { letter-spacing: 0; }
  .t-body br:not(.keep), .t-note br { display: none; }
  .bid-heading { --display-size: 88.44; }

  .display { font-size: clamp(28px, 7.6vw, 56px); letter-spacing: 0.08em; line-height: 1.12; white-space: normal; text-align: center; }
  .display .ln { width: auto; transform: none; padding-left: 0; text-wrap: balance; }
  .display-c { width: 100%; }

  /* ---- hero ---- */
  .hero { padding-top: 14px; padding-bottom: 8px; gap: 10px 16px; }
  .hero .logo { order: -1; width: 170px; margin-inline: auto; }
  .hero .logo img { width: 100%; height: auto; }
  .nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 16px; }
  .nav .t-nav { font-size: 11.5px; letter-spacing: 0.14em; line-height: 1.2; }
  /* Scaled copy of the desktop art: design x 20–1562, y 225–1272 (calligraphy + vessel, cut where the film starts). */
  .hero-art {
    position: relative; flex: none; container-type: inline-size; overflow: hidden;
    width: min(100cqw, 680px); margin-inline: calc((100% - min(100cqw, 680px)) / 2);
    aspect-ratio: 1542 / 1047; --u: calc(100cqw / 1542); --sx: 20; --sy: 225;
  }
  .page .hero-art .abs { position: absolute; left: calc((var(--x, 0) - var(--sx)) * var(--u)); top: calc((var(--y) - var(--sy)) * var(--u)); }
  .page .hero-art img.box { width: calc(var(--w) * var(--u)); height: calc(var(--h) * var(--u)); }
  .t-eyebrow { text-align: center; white-space: normal; font-size: clamp(16px, 4.4vw, 22px); line-height: 1.3; }
  .t-tagline { text-align: center; font-size: clamp(16px, 4.2vw, 20px); line-height: 1.35; letter-spacing: 0.04em; }

  /* ---- buttons ---- */
  .btn.box { width: auto; min-width: 200px; height: 52px; padding: 0 28px; }

  /* ---- story ---- */
  .story { padding-top: 32px; }
  .page .video { position: relative; }
  .video > img:first-child { height: auto; }
  /* The zaytoun calligraphy overlaps the top of the hands photo by 53.5 of its 1311.5 width (design). */
  #initiative > img.callig { width: 81%; margin: 8px 0 calc(-3.3% - 24px) auto; position: relative; z-index: 1; }

  /* ---- auction ---- */
  .page .gallery { position: relative; aspect-ratio: 737.5 / 848.5; height: auto; }
  .page .gallery .slides, .page .gallery .slide { position: absolute; }
  .page .gallery-dots { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); gap: 10px; }
  .gallery-dots button { width: 10px; height: 10px; }
  .bid .rule { display: none; }
  .stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: space-between; gap: 8px; padding: 16px 0; border-block: 1px solid #000; }
  .stats > div { display: flex; flex-direction: column; gap: 6px; }
  .bid > p.t-label { margin-bottom: -16px; }
  .bid-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
  .page .bid-input { position: relative; display: flex; align-items: center; gap: 12px; min-width: 0; height: 52px; padding: 0 14px; border-width: 1px; }
  .bid-input .divider { width: 1px; height: 22px; }
  .bid-input input { flex: 1; min-width: 0; width: auto; height: 100%; padding: 0; }
  .page .bid-input .ph { position: absolute; left: 86px; top: 50%; transform: translateY(-50%); font-size: 14px; }
  .bid-form .btn.box { min-width: 0; height: 52px; padding: 0 20px; }
  .bid-status { grid-column: 1 / -1; font-size: 14px; }
  .bid > .btn.box { flex: 1 1 0; min-width: 0; padding: 0 12px; }

  /* ---- support ---- */
  #support article { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; margin-top: 8px; }
  .page .donate-panel { position: relative; height: auto; aspect-ratio: 718.8 / 618; display: grid; place-items: center; }
  .page .donate-panel img.box { width: 33%; }
  .center-text { text-align: center; }
  .center-text .hs-c { display: inline; transform: none; white-space: normal; }
  .t-card-title { font-size: 22px; }
  .t-note { font-size: 13px; line-height: 1.5; }

  /* ---- farmers: grove photo with the fallaheen calligraphy overlapping it (design proportions), then the carousel ---- */
  #farmers > img:not(.callig) { width: 71.6%; margin-left: 14.2%; margin-right: auto; }
  #farmers > img.callig { width: 79.4%; margin-left: 8.6%; margin-right: auto; margin-top: calc(-12.3% - 24px); position: relative; }
  .page .farmer-track { width: auto; margin-inline: calc(-1 * max(16px, (100vw - 680px) / 2)); flex: 1 1 100%; }
  .farmer-list { gap: 16px; padding: 0 max(16px, calc((100vw - 680px) / 2)); }
  .farmer { width: min(72vw, 300px); height: auto; display: flex; flex-direction: column; align-items: flex-start; scroll-margin-left: max(16px, calc((100vw - 680px) / 2)); }
  .page .farmer > * { position: static; }
  .page .farmer .portrait { width: 100%; height: auto; aspect-ratio: 447 / 514.5; border-radius: 18px; }
  .farmer .t-name { margin-top: 14px; font-size: 18px; line-height: 1.3; }
  .farmer .t-place { font-size: 15px; line-height: 1.4; }
  .page .listen { position: relative; left: auto; top: auto; margin-top: 16px; width: auto; height: 44px; padding: 0 18px 0 46px; font-size: 14px; border-radius: 3px; }
  .listen::before { left: 18px; top: 50%; translate: 0 -50%; width: 13px; height: 15px; }
  .page .farmer-dots { justify-content: center; gap: 14px; }
  .farmer-dots button { width: 12px; height: 12px; }
  #farmers > .btn.box { margin-inline: auto; }

  /* ---- footer ---- */
  .page .footer { padding: 28px 16px; justify-content: center; }
  .t-footer { width: 100%; }
}

/* ==========================================================================
   Bid form + Terms (popups). Fixed px sizes (not design units): a form must stay
   readable at every width. Centred card on desktop, full screen on phones.
   ========================================================================== */
.jm { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; color: var(--ink); font-family: var(--font-sans); }
.jm::backdrop { background: rgb(20 18 14 / .62); }
.jm[open] { display: grid; place-items: center; width: 100%; height: 100%; }
.jm-sheet {
  position: relative; width: min(640px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); overflow-y: auto; overscroll-behavior: contain;
  background: #F4F4F4; border-radius: 6px; padding: 44px 48px 40px; box-shadow: 0 30px 80px rgb(0 0 0 / .35);
}
.jm[open] .jm-sheet { animation: jm-in .35s cubic-bezier(.2,.7,.2,1); }
@keyframes jm-in { from { opacity: 0; translate: 0 18px; } }
.jm-close { position: absolute; top: 12px; right: 14px; width: 40px; height: 40px; font-size: 30px; line-height: 1; color: #333; border-radius: 50%; }
.jm-close:hover { background: #e6e6e6; }
.jm-eyebrow { font-weight: 500; font-size: 13px; letter-spacing: .24em; text-transform: uppercase; color: #555; }
.jm-title { margin-top: 10px; font-family: var(--font-display); font-weight: 300; font-size: clamp(30px, 4.4vw, 42px); letter-spacing: .1em; text-transform: uppercase; line-height: 1.1; }

.bm-current { margin-top: 26px; padding: 18px 0; border-block: 1px solid #000; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 28px; }
.bm-label { font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.bm-price { font-size: 34px; letter-spacing: .02em; line-height: 1.1; margin-top: 4px; }
.bm-current-note { flex: 1 1 220px; font-size: 14px; line-height: 1.45; color: #333; }
.bm-phase { margin-top: 18px; padding: 12px 14px; background: #fff; border-left: 3px solid var(--gold); font-size: 15px; line-height: 1.45; }

.bm-group { margin: 26px 0 0; padding: 0; border: 0; min-width: 0; }
.bm-group legend { padding: 0; margin-bottom: 12px; font-weight: 500; font-size: 17px; }
.bm-group legend small { font-weight: 400; font-size: 13px; color: #555; }
.bm-field { display: block; margin-top: 12px; }
.bm-field > span:first-child { display: block; font-size: 14px; margin-bottom: 6px; color: #222; }
.bm-field input, .bm-amount {
  width: 100%; height: 50px; border: 1px solid #000; border-radius: 6px; background: #EBEBEC;
  font: 400 17px var(--font-sans); color: var(--ink); padding: 0 14px;
}
.bm-field input:focus, .bm-amount:focus-within { outline: 2px solid #000; outline-offset: 2px; }
.bm-amount { display: flex; align-items: center; gap: 12px; }
.bm-amount > span { font-weight: 500; font-size: 17px; color: var(--input-prefix); padding-right: 12px; border-right: 1px solid var(--input-muted); line-height: 22px; }
.bm-amount input { flex: 1; min-width: 0; height: 100%; border: 0; background: none; padding: 0; outline: none; font-size: 20px; letter-spacing: .02em; }
.bm-amount input:focus, .bm-amount input:focus-visible { outline: none; } /* the box itself shows the ring */
.bm-help { margin-top: 6px; font-size: 13px; color: #555; }
.bm-check { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; font-size: 15px; line-height: 1.45; cursor: pointer; }
.bm-check input { flex: none; width: 19px; height: 19px; margin: 1px 0 0; accent-color: #000; }
.bm-link { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 500; }
.bm-link:hover { color: #8a6d12; }
.bm-invalid input, input.bm-invalid, .bm-invalid.bm-amount { border-color: #8A1C1C; background: #fbf0f0; }
.bm-group.bm-invalid legend, .bm-check.bm-invalid { color: #8A1C1C; }

.bm-how { margin-top: 26px; background: #fff; border-radius: 6px; padding: 0 18px; }
.bm-how summary { cursor: pointer; padding: 15px 0; font-weight: 500; font-size: 16px; list-style-position: inside; }
.bm-how ol { margin: 0; padding: 0 0 16px 20px; font-size: 14.5px; line-height: 1.55; }
.bm-how li + li { margin-top: 8px; }
.bm-privacy { margin-top: 14px; font-size: 13px; color: #555; line-height: 1.45; }
.bm-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.bm-field-error { margin: 6px 0 0; font-size: 14px; line-height: 1.4; color: #8A1C1C; }
.bm-field-error::before { content: "! "; font-weight: 600; }
.bm-check + .bm-field-error { margin: 2px 0 0 29px; }
.bm-group > .bm-field-error { margin-top: 8px; }
.bm-error.is-info { background: #fff; color: var(--ink); border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0; }
.bm-error { margin-top: 10px; padding: 12px 14px; background: #fbf0f0; color: #8A1C1C; border-radius: 6px; font-size: 15px; }
.bm-submit {
  margin-top: 24px; width: 100%; height: 58px; border-radius: 6px; background: var(--gold); color: var(--ink);
  font-weight: 500; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; transition: background-color .15s;
}
.bm-submit:hover { background: #AE8E27; }
.bm-submit:disabled { background: #d8d2bf; color: #666; cursor: not-allowed; }
.bm-submit.is-busy span::after { content: "…"; }
.bm-form.is-closed > :not(.jm-eyebrow, .jm-title, .bm-current, .bm-phase) { display: none; }
.bm-form.is-closed .bm-current-note { display: none; }
.bm-done p { margin-top: 14px; font-size: 16px; line-height: 1.55; }
.bm-done-amount { font-size: 30px !important; letter-spacing: .02em; margin-top: 18px !important; }
.bm-done:focus { outline: none; }

/* Terms: a calm reading layout */
.terms-modal .jm-sheet { width: min(760px, calc(100vw - 32px)); background: #FAFAF8; padding: 52px 64px 44px; }
.terms { font-size: 16px; line-height: 1.65; }
.terms-lede { margin-top: 18px; font-size: 18px; line-height: 1.55; }
.terms h3 { margin: 30px 0 8px; padding-top: 22px; border-top: 1px solid #ddd; font-family: var(--font-display); font-weight: 300; font-size: 24px; letter-spacing: .06em; text-transform: uppercase; }
.terms p + p { margin-top: 10px; }
.terms ul { margin: 0; padding-left: 20px; }
.terms li + li { margin-top: 6px; }
.terms a { text-decoration: underline; text-underline-offset: 3px; }

html.jm-lock { overflow: hidden; }

@media (max-width: 640px) {
  .jm-sheet, .terms-modal .jm-sheet { width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; padding: 56px 20px 32px; }
  .bm-price { font-size: 28px; }
}
