/* Seedlot: the seed bed, in two-colour risograph. The direction's own pieces, on top of base.css: the soil band, plant
   tags on stakes, seed packets, lot rows with their beds, the pink string, the bid tag, the harvest ledger.
   Reads only tokens. DESIGN.md has the rules. */

/* ---------- ground: cream, with a still print grain ---------- */
body {
  background-color: var(--bg);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .17  0 0 0 0 .11  0 0 0 0 .08  0 0 0 .07 0'/></filter><rect width='220' height='220' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
  font-feature-settings: 'ss01' 0;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--pink); color: var(--ink); }
:focus-visible { outline: 2.5px solid var(--ink); outline-offset: 2px; }

/* ---------- type ---------- */
h1, h2, .display { color: var(--ink); font-optical-sizing: auto; }
h1 { line-height: 0.96; }
h2 { font-size: clamp(30px, 3.8vw, 50px); line-height: 1; }
h3, .h3 { font: 700 19px/1.25 var(--font-text); letter-spacing: -0.01em; }
.label { font: 600 11.5px/1.35 var(--font-mono); font-stretch: 92%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kicker { font: 600 12px/1.3 var(--font-mono); font-stretch: 92%; letter-spacing: 0.08em; color: var(--green-ink); gap: 8px; }
.mono, .num, .chip { font-family: var(--font-mono); font-stretch: 92%; }
.mono { font-size: 0.92em; }
.num { font-weight: 600; font-variant-numeric: tabular-nums; }
.lede { color: var(--ink-2); }
.fine { font-size: 13.5px; }
.sprout { display: inline-flex; flex: none; vertical-align: -2px; }
.sprout svg { width: 100%; height: 100%; display: block; }
.packet { display: inline-block; flex: none; }
.packet svg { display: block; }
.fitted { width: 100%; overflow: hidden; }
.fitted svg { display: block; }
svg.bed { display: block; }

/* ---------- header ---------- */
#top { background: color-mix(in srgb, var(--bg) 92%, transparent); border-bottom: 1.5px solid var(--ink); }
.top-bar { gap: 30px; }
.brand { display: inline-flex; align-items: center; }
.wordmark { display: inline-flex; }
.wordmark svg { display: block; overflow: visible; }
.nav { gap: 2px; }
.nav a { border-radius: var(--r-pill); font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 8px 14px; }
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current] { background: var(--ink); color: var(--on-soil); }
.demo-strip { background: var(--ink); color: var(--on-soil-2); font-size: 13px; }
.demo-strip b { color: #F2C66B; font-family: var(--font-mono); font-stretch: 92%; letter-spacing: 0.06em; }

/* ---------- buttons: pills printed in soil; lifted, they get a hard shadow off register ---------- */
.btn { border-radius: var(--r-pill); border: 1.5px solid var(--ink); background: var(--surface); color: var(--ink); font-weight: 700; letter-spacing: -0.005em; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.btn:hover { border-color: var(--ink); transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn:active { transform: none; box-shadow: none; }
.btn.primary { background: var(--ink); color: var(--on-soil); border-color: var(--ink); }
.btn.primary:hover { filter: none; box-shadow: 3px 3px 0 var(--green); }
.btn.pink { background: var(--pink); color: var(--on-pink); border-color: var(--ink); }
.btn.pink:hover { box-shadow: 3px 3px 0 var(--ink); }
.btn.on-soil { background: transparent; color: var(--on-soil); border-color: var(--on-soil); }
.btn.on-soil:hover { box-shadow: 3px 3px 0 var(--green); }
.btn[disabled]:hover { transform: none; box-shadow: none; }
.wallet-btn { background: var(--surface); }
.icon-btn { border-radius: var(--r-pill); }
.link-arrow { font-weight: 700; color: var(--ink); white-space: nowrap; text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px; }
.link-arrow::after { content: ' →'; }
.link-arrow:hover { text-decoration-color: var(--pink); }

/* ---------- chips ---------- */
.chip { border-radius: var(--r-pill); height: 26px; padding: 0 10px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em; background: var(--surface); border: 1.5px solid var(--line-3); color: var(--ink-2); gap: 6px; }
.chip .sprout { width: 13px !important; height: 13px !important; vertical-align: 0; }
.chip.state-open { color: var(--green-ink); border-color: var(--green-ink); }
.chip.state-upcoming { border-style: dashed; }
.chip.state-opening { color: var(--green-ink); background: color-mix(in srgb, var(--green) 14%, var(--surface)); border-color: var(--green-ink); }
.chip.state-settled { color: var(--on-soil); background: var(--ink); border-color: var(--ink); }
.chip.status-won, .chip.status-partial { color: var(--green-ink); border-color: var(--green-ink); }
.chip.status-lost { color: var(--muted); }
.chip.status-void { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 50%, transparent); }
.chip.demo { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 50%, transparent); }
.seg { border-radius: var(--r-pill); background: var(--surface-2); border: 1.5px solid var(--line-2); }
.seg button { border-radius: var(--r-pill); font-weight: 700; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--on-soil); }
.seg button .count { font-family: var(--font-mono); font-stretch: 92%; font-size: 11.5px; opacity: 0.75; margin-left: 6px; }
.chips button { border-radius: var(--r-pill); background: var(--surface); height: 32px; font-family: var(--font-mono); font-stretch: 92%; font-weight: 600; font-size: 12.5px; border: 1.5px solid var(--line-3); }
.chips button:hover { border-color: var(--ink); }
.input, .prefix { border-radius: var(--r-sm); background: var(--surface); border: 1.5px solid var(--line-3); }
.prefix > .mono { white-space: nowrap; color: var(--muted); font-size: 13px; }
.prefix .input { border: 0; }
.prefix .input:focus { box-shadow: none; }
.field > .seg { justify-self: start; max-width: 100%; overflow-x: auto; }
.input:focus, .prefix:focus-within { border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 25%, transparent); }
.card { border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--line-2); box-shadow: none; }
.card > h3 + * { margin-top: 10px; }
.banner { border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line-2); }
.banner.good { border-color: var(--green-ink); }
.live-dot { background: var(--green); }

/* ---------- section heads ---------- */
.section-head { align-items: end; margin-bottom: 28px; }
.section-head .kicker { margin-bottom: 10px; }

/* ---------- home: the headline ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: clamp(28px, 4vw, 64px); align-items: end; padding-top: clamp(36px, 6vw, 80px); position: relative; z-index: 2; }
.hero-copy { display: grid; justify-items: start; gap: 22px; padding-bottom: 34px; }
.hero-copy .kicker { margin: 0; }
.headline { font-size: clamp(52px, 8.6vw, 128px); line-height: 0.9; letter-spacing: -0.045em; margin: 0; text-wrap: balance; }
.headline .hl-1, .headline .hl-2 { display: block; }
.headline .hl-1 { white-space: nowrap; }
.hl-seed { display: inline-block; width: 0.22em; height: 0.155em; margin-left: 0.05em; color: var(--ink); vertical-align: baseline; transform: rotate(-14deg); }
.hl-seed svg { width: 100%; height: 100%; display: block; overflow: visible; }
.strung { position: relative; white-space: nowrap; }
/* the pink string under "one price", tied to a stake at each end */
.strung::after { content: ''; position: absolute; left: -0.08em; right: -0.08em; bottom: 0.02em; height: 0.07em; min-height: 4px; border-radius: 1em; background: var(--pink); }
.strung::before { content: ''; position: absolute; left: -0.12em; right: -0.12em; bottom: -0.1em; height: 0.3em; border-left: max(3px, 0.05em) solid var(--wood); border-right: max(3px, 0.05em) solid var(--wood); border-radius: 2px; }
.hero-copy .lede { font-size: clamp(17px, 1.45vw, 20px); max-width: 34em; }
.ctas { margin: 0; }
.ca { border-radius: var(--r); border: 1.5px dashed var(--line-3); background: color-mix(in srgb, var(--surface) 70%, transparent); margin: 0; }
.ca.small { border-radius: var(--r-pill); height: 36px; background: var(--surface); border-style: solid; }
.ca-soon { color: var(--warn); font-weight: 700; }

/* ---------- the plant tag (the live lot), on a stake that goes into the soil ---------- */
.hero-tag-slot { position: relative; align-self: end; }
.hero-tag { position: relative; display: grid; gap: 8px; justify-items: start; padding: 30px 22px 22px; border-radius: 22px 22px 12px 12px; background: var(--surface); border: 1.5px solid var(--ink); color: inherit; margin-bottom: 64px; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.hero-tag::after { content: ''; position: absolute; left: 50%; top: 100%; width: 12px; height: 110px; margin-left: -6px; background: var(--wood); border-radius: 0 0 4px 4px; z-index: -1; }
a.hero-tag:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); }
.ht-hole { position: absolute; left: 50%; top: 11px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--ink); }
.ht-top { display: flex; align-items: center; gap: 12px; width: 100%; }
.ht-names { display: grid; min-width: 0; }
.ht-name { font: 800 22px/1.1 var(--font-display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ht-sym { font-size: 12px; color: var(--muted); }
.ht-clock { font-size: clamp(34px, 3.4vw, 46px); line-height: 1; letter-spacing: -0.01em; margin-top: 6px; }
.ht-count { font-size: 12.5px; color: var(--ink-2); }
.ht-go { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; padding: 10px 16px; border-radius: var(--r-pill); background: var(--pink); border: 1.5px solid var(--ink); font-weight: 700; }
.hero-tag.skeleton { min-height: 230px; width: 100%; }
.empty-tag { width: 100%; }
.empty-tag .ht-name { white-space: normal; }

/* ---------- the soil band ---------- */
.soil { position: relative; }
.soil .fitted { margin-bottom: -1px; }
.soil-floor { background: var(--soil); color: var(--on-soil); padding: 0 0 clamp(36px, 5vw, 56px); }
.soil-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.soil-cap { font-size: 15px; color: var(--on-soil-2); max-width: 46em; margin-bottom: 22px; }
.soil .stat-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1.5px solid rgba(245, 239, 220, 0.22); }
.soil .stat { padding: 14px 14px 4px 0; gap: 6px; }
.soil .stat .label { color: var(--on-soil-2); }
.soil .stat-value { font-size: clamp(22px, 2.2vw, 30px); line-height: 1; color: var(--on-soil); }
.latest { display: grid; }
.latest .label { color: var(--on-soil-2); margin-bottom: 4px; }
.slip-row { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; padding: 9px 0; border-top: 1px dashed rgba(245, 239, 220, 0.24); font-size: 13.5px; }
.latest .fine { margin-top: 8px; color: var(--on-soil-2); }
.bed-seed.new { animation: seed-drop 700ms var(--ease) both; transform-box: fill-box; transform-origin: center; }
@keyframes seed-drop { 0% { transform: translateY(-80px) rotate(-30deg); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }

/* ---------- proof ---------- */
.proof-row { padding-top: clamp(40px, 5vw, 64px); }
.proof { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; font-size: 16px; color: var(--ink-2); }
.proof li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.proof .sprout { margin-top: 1px; }

/* ---------- lot rows: packet, name, bed, numbers ---------- */
.lot-list, .preview-box { container-type: inline-size; }
.lot-list { display: grid; gap: 14px; }
.lot-card { display: grid; grid-template-areas: 'bed' 'id' 'state' 'facts'; gap: 12px; padding: 14px; border-radius: var(--r-lg); border: 1.5px solid var(--line-2); background: var(--surface); color: inherit; transition: transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
a.lot-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink); border-color: var(--ink); }
.lc-id { grid-area: id; display: flex; align-items: center; gap: 12px; min-width: 0; }
.lc-names { display: grid; min-width: 0; }
.lc-name { font: 800 22px/1.1 var(--font-display); letter-spacing: -0.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lc-sym { font-size: 12px; color: var(--muted); }
.lc-state { grid-area: state; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lc-line { font-size: 12.5px; color: var(--ink-2); }
.lc-bed { grid-area: bed; border-radius: var(--r); overflow: hidden; background: var(--bg); }
.lc-bed svg { width: 100%; height: auto; }
.lc-facts { grid-area: facts; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border-top: 1.5px dashed var(--line-2); padding-top: 10px; }
.lc-facts div { display: grid; gap: 2px; }
.lc-facts dd { font-size: 14.5px; }
@container (min-width: 760px) {
  .lot-card { grid-template-columns: minmax(220px, 1fr) minmax(0, 1.5fr) minmax(170px, 0.7fr); grid-template-areas: 'id bed facts' 'state bed facts'; align-items: center; column-gap: 22px; row-gap: 8px; padding: 12px 18px 12px 14px; }
  .lc-state { align-self: start; }
  .lc-id { align-self: end; }
  .lc-facts { border-top: 0; padding-top: 0; grid-template-columns: 1fr; border-left: 1.5px dashed var(--line-2); padding-left: 18px; }
}
.lot-card.preview { border-color: var(--ink); }
.lot-card.skeleton { min-height: 120px; }
.skeleton .sk { border-radius: 6px; background: var(--surface-2); animation: pulse 1.6s infinite ease-in-out; }
.sk-packet { width: 46px; height: 58px; flex: none; }
.sk-bed { height: 70px; grid-area: bed; }
@keyframes pulse { 50% { opacity: 0.55; } }

/* ---------- open lots + the planting calendar ---------- */
.open-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.schedule-box { border-radius: var(--r-lg); border: 1.5px solid var(--ink); background: var(--surface); padding: 20px; display: grid; gap: 4px; }
.schedule-box .kicker { margin-bottom: 2px; }
.schedule-box h3 { font: 800 24px/1.1 var(--font-display); letter-spacing: -0.02em; margin-bottom: 8px; }
.schedule { display: grid; margin-bottom: 12px; }
.sched-row { display: grid; grid-template-columns: 52px 1fr; grid-template-areas: 'date lot' 'date in'; column-gap: 12px; row-gap: 2px; padding: 11px 0; border-top: 1.5px dashed var(--line-2); align-items: center; }
.sched-row:hover b { text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.sched-date { grid-area: date; display: grid; justify-items: center; padding: 6px 0 5px; border-radius: var(--r-sm); background: var(--bg-2); line-height: 1; }
.sched-date b { font: 800 22px/1 var(--font-display); }
.sched-date .mono { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin-top: 3px; }
.sched-lot { grid-area: lot; display: grid; font-size: 15px; }
.sched-lot .mono { font-size: 11.5px; }
.sched-in { grid-area: in; font-size: 11.5px; }

/* ---------- how a lot runs: one bed in four panels ---------- */
.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.tl-step { display: grid; gap: 8px; align-content: start; padding: 0 18px 22px; border-left: 1.5px solid var(--ink); }
.tl-step:first-child { border-left: 0; }
.tl-bed { margin: 0 -18px; background: var(--bg); }
.tl-bed svg { width: 100%; height: auto; }
.tl-cap { font-size: 11px; color: var(--on-soil); background: var(--soil); margin: -9px -18px 6px; padding: 0 18px 10px; }
.tl-n { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--green-ink); }
.tl-step h3 { font: 800 22px/1.1 var(--font-display); letter-spacing: -0.02em; }
.tl-step > p { font-size: 15px; }
.example-note { margin-top: 16px; }

/* ---------- the clearing chart ---------- */
.cc { display: grid; gap: 8px; }
.cc-demand { fill: none; stroke: var(--ink); stroke-width: 2; }
.cc-paid { fill: color-mix(in srgb, var(--green) 16%, transparent); }
.cc-clear { stroke: var(--pink); stroke-width: 2.4; }
.cc-floor { stroke: var(--muted); stroke-width: 1.2; stroke-dasharray: 2 4; }
.cc-offer { stroke: var(--ink-2); stroke-width: 1.2; stroke-dasharray: 6 4; }
.cc-axis { stroke: var(--line-3); stroke-width: 1; }
.cc-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 11.5px; color: var(--ink-2); }
.cc-k::before { content: ''; display: inline-block; width: 16px; margin-right: 6px; vertical-align: middle; border-top: 2.5px solid var(--pink); }
.cc-k.k-floor::before { border-top: 1.5px dotted var(--muted); }
.cc-k.k-offer::before { border-top: 1.5px dashed var(--ink-2); }

/* ---------- the harvest ledger ---------- */
.ledger { display: grid; }
.ledger-row { display: grid; grid-template-columns: minmax(220px, 2.2fr) 0.8fr 0.6fr 1fr 0.8fr 1fr 1fr; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1.5px dashed var(--line-2); font-size: 15px; color: inherit; }
.ledger-row.head { border-bottom: 1.5px solid var(--ink); padding-top: 0; padding-bottom: 10px; }
a.ledger-row:hover { background: color-mix(in srgb, var(--surface) 80%, transparent); }
.lg-lot { display: flex; align-items: center; gap: 12px; min-width: 0; }
.lg-id { display: grid; min-width: 0; }
.lg-id b { font: 800 18px/1.15 var(--font-display); letter-spacing: -0.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-id .mono { font-size: 11.5px; }
.lg-when { font-size: 13px; color: var(--ink-2); }
.lg-clear { display: inline-flex; align-items: center; gap: 8px; }
/* a stretch of the pink string between two stakes: marks a clearing price wherever one is shown */
.string-dot { display: inline-block; width: 18px; height: 10px; flex: none; background: linear-gradient(var(--pink), var(--pink)) center / 100% 2.5px no-repeat; border-left: 2.5px solid var(--wood); border-right: 2.5px solid var(--wood); border-radius: 1px; }

/* ---------- the record ---------- */
.feed-row { grid-template-columns: 76px 1fr auto 70px; padding: 11px 0; border-bottom: 1.5px dashed var(--line-2); font-size: 14.5px; }
.feed-sym { font-weight: 600; color: var(--green-ink); font-size: 12.5px; }
.feed-sym:hover { text-decoration: underline; }
.feed-row.k-cleared .feed-text, .feed-row.k-listed .feed-text { font-weight: 600; }
.feed-time { font-size: 11.5px; }
.tx { font-size: 11.5px; }

/* ---------- the closing band: soil ---------- */
.band { margin-top: clamp(64px, 9vw, 120px); background: var(--soil); color: var(--on-soil); padding: clamp(44px, 6vw, 80px) 0; display: block; }
.band::before { content: ''; position: absolute; left: 0; right: 0; top: -14px; height: 16px; background: var(--soil); clip-path: polygon(0 60%, 6% 35%, 13% 55%, 21% 30%, 30% 52%, 38% 28%, 47% 50%, 55% 32%, 63% 55%, 72% 30%, 80% 48%, 88% 26%, 95% 46%, 100% 34%, 100% 100%, 0 100%); }
.band-in { display: grid; justify-items: start; gap: 20px; }
.band .headline { font-size: clamp(44px, 6.4vw, 96px); color: var(--on-soil); }
.band h2 { color: var(--on-soil); }
.band .hl-seed { color: var(--on-soil); }
.band .lede { max-width: 40em; color: var(--on-soil-2); }
main:has(> .band:last-child) { padding-bottom: 0; }

/* ---------- page heads ---------- */
.page-head { gap: 12px; }
.page-head h1 { font-size: clamp(42px, 6vw, 84px); line-height: 0.95; letter-spacing: -0.04em; }
.page-head h1 .accent { color: var(--green-ink); }
.page-head .live-line { font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.page-head .lede + .live-line { margin-top: 2px; }
.page-head .kicker { margin-bottom: 2px; }

/* ---------- lots page ---------- */
.controls { gap: 12px; margin-bottom: 26px; }
.controls .input { max-width: 320px; border-radius: var(--r-pill); }
/* the state tabs scroll inside themselves on a narrow phone instead of widening the page */
.controls .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.controls .seg::-webkit-scrollbar { display: none; }
.controls .seg button { flex: none; }
.more { margin-top: 28px; }

/* ---------- a lot's page ---------- */
.crumbs { padding-top: 26px; font-size: 14px; color: var(--muted); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.lot-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 22px; align-items: center; padding: 16px 0 22px; }
.lot-head h1 { font-size: clamp(38px, 5vw, 68px); line-height: 0.98; letter-spacing: -0.04em; }
.lh-id { display: grid; gap: 10px; min-width: 0; }
.lh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: 14px; color: var(--ink-2); }
.lh-chips { display: inline-flex; gap: 8px; }
.lh-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.lot-bed { position: relative; }
.lot-bed .fitted { border-top: 1.5px solid var(--ink); }
.bed-cap { margin-top: 12px; color: var(--ink-2); max-width: 60em; }
.lot-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; margin-top: 30px; align-items: start; }
.lot-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; min-width: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; border-bottom: 1.5px solid var(--ink); padding-bottom: 10px; }
.panel-head h2 { font-size: clamp(26px, 2.6vw, 34px); }
/* the back of the packet: the rules, printed */
.packet-back { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 26px; align-items: start; padding: 20px; border-radius: var(--r-lg); background: var(--surface); border: 1.5px dashed var(--line-3); }
.pb-front { display: grid; gap: 10px; justify-items: start; }
.pb-when { font-size: 11.5px; color: var(--ink-2); }
.pb-title { color: var(--green-ink); margin-bottom: 4px; }
.rules { display: grid; }
.rule { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 12px; padding: 9px 0; border-bottom: 1.5px dashed var(--line-2); font-size: 14.5px; }
.rule dt { color: var(--ink-2); }
.rule dd { font-weight: 600; overflow-wrap: anywhere; font-size: 13px; }
.lot-desc { margin-top: 14px; color: var(--ink-2); }
/* the countdown: a slate tag */
.big-clock { position: relative; display: grid; gap: 4px; padding: 30px 22px 20px; border-radius: 22px 22px 12px 12px; background: var(--soil); color: var(--on-soil); }
.big-clock .ht-hole { background: var(--bg); border-color: var(--bg); }
.big-clock .label { color: var(--on-soil-2); }
.big-clock .num { font-size: clamp(36px, 4vw, 54px); line-height: 1; }
.big-clock .bc-sub { font: 400 12px var(--font-mono); font-stretch: 92%; color: var(--on-soil-2); }
.bids { display: grid; overflow-x: auto; }
.bid-row { display: grid; grid-template-columns: 80px 110px minmax(0, 1fr) 110px 110px; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1.5px dashed var(--line-2); font-size: 14px; }
.bid-row.opened { grid-template-columns: 34px 110px 92px 70px 70px 96px 96px minmax(96px, auto); }
.bid-row.head { border-bottom: 1.5px solid var(--ink); padding: 0 0 8px; }
.bid-row .chip { justify-self: start; }
.bid-row.mine { background: color-mix(in srgb, var(--green) 8%, transparent); }
.bid-row .br-who { font-weight: 600; }
.bid-row.mine .br-who { color: var(--green-ink); }
.br-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.sealed-field { display: inline-flex; align-items: center; gap: 8px; }
.seed-ico { display: inline-block; width: 13px; height: 8px; border-radius: 50% / 60%; background: var(--ink); transform: rotate(-18deg); }
.sealed-word { font: 600 11px var(--font-mono); font-stretch: 92%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.br-fp { color: var(--muted); font-size: 12px; }
.br-mine { grid-column: 2 / -1; font-size: 12px; color: var(--green-ink); }
.bid-row.st-lost, .bid-row.st-void { color: var(--muted); }
.bid-row.st-lost .num, .bid-row.st-void .num { font-weight: 400; }
.bid-row.reveal { animation: reveal 420ms var(--ease) both; animation-delay: calc(var(--n) * 70ms); }
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } }
/* the string, where the tokens ran out */
.cut-line { display: flex; align-items: center; gap: 0; padding: 10px 0; font: 600 11.5px var(--font-mono); font-stretch: 92%; letter-spacing: 0.04em; color: var(--ink); }
.cut-line::before, .cut-line::after { content: ''; flex: 1; height: 3px; border-radius: 2px; background: var(--pink); }
.cut-line span { padding: 5px 12px; border-radius: var(--r-pill); background: var(--pink); }

/* ---------- the bid tag ---------- */
.lot-side { position: sticky; top: calc(var(--top-h) + 18px); display: grid; gap: 14px; }
.slip { position: relative; background: var(--surface); border: 1.5px solid var(--ink); border-radius: 22px 22px var(--r) var(--r); padding: 34px 22px 22px; }
.slip-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding-bottom: 12px; border-bottom: 1.5px dashed var(--line-3); }
.slip-head h2 { font-size: 30px; }
.slip-head .mono { font-size: 11.5px; font-weight: 600; letter-spacing: 0.06em; color: var(--muted); text-transform: uppercase; }
.slip .field { margin-top: 14px; }
.slip .field > .label { display: flex; justify-content: space-between; gap: 8px; }
.slip .chips { margin-top: 2px; flex-wrap: wrap; }
.cover-line { display: flex; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--bg-2); font: 400 12.5px var(--font-mono); font-stretch: 92%; }
.cover-line b { font-weight: 700; }
.slip-total { display: flex; justify-content: space-between; align-items: baseline; margin: 16px 0 12px; padding-top: 12px; border-top: 1.5px solid var(--line-2); font-weight: 700; }
.slip-total .num { font-size: 19px; }
.slip .notes { margin-top: 14px; }
.notes .icon { color: var(--green-ink); }
.slip .todo { margin-top: 8px; }
.side-card { border-radius: var(--r-lg); border: 1.5px solid var(--line-2); background: var(--surface); padding: 20px; display: grid; gap: 10px; }
.side-card h3 { font: 800 24px/1.1 var(--font-display); letter-spacing: -0.02em; }
.side-bed { border-radius: var(--r); overflow: hidden; background: var(--bg); }
.side-bed svg { width: 100%; height: auto; }
.result-card { border-color: var(--ink); }
.result-price { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font: 600 clamp(38px, 4vw, 54px)/1 var(--font-mono); font-stretch: 92%; letter-spacing: -0.02em; }
.result-price .string-dot { width: 30px; height: 18px; }
.result-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 10px; border-top: 1.5px dashed var(--line-2); }
.your-bids { display: grid; gap: 8px; }
.your-bid { display: grid; gap: 4px; padding: 12px; border-radius: var(--r); border: 1.5px solid color-mix(in srgb, var(--green-ink) 45%, transparent); background: color-mix(in srgb, var(--green) 6%, var(--surface)); font: 400 12.5px var(--font-mono); font-stretch: 92%; }
.your-bid b { font-weight: 700; }
a.your-bid:hover { border-color: var(--ink); }
.your-bid .row { gap: 8px; }
.sealed-done { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 6px 0 4px; }
.planted { width: 220px; border-radius: var(--r); overflow: hidden; }
.planted svg { width: 100%; height: auto; }

/* ---------- the opening: every stem grows to its price together, then the string pulls tight ---------- */
/* the final frame is the resting state, so with motion off everything is simply there */
.grow .bed-stem { stroke-dasharray: 1; animation: stem-grow 1100ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }
.grow .bed-leaves, .grow .bed-plant circle { animation: fade-in 420ms var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms + 850ms); }
.grow .bed-string path { stroke-dasharray: 1; animation: stem-grow 700ms var(--ease) both; animation-delay: 1500ms; }
.grow .bed-string rect, .grow .bed-string circle, .grow .bed-tag { animation: fade-in 300ms var(--ease) both; animation-delay: 1400ms; }
@keyframes stem-grow { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* ---------- listing ---------- */
.launch-grid { gap: 28px; }
.step-card { border-radius: var(--r-lg); }
.step-title { font: 800 26px/1.1 var(--font-display); letter-spacing: -0.02em; }
.step-title .step-n { font: 600 12.5px var(--font-mono); border: 1.5px solid var(--ink); background: var(--bg); }
.launch-side .card h3 { font: 800 21px/1.15 var(--font-display); letter-spacing: -0.015em; }
.launch-side .kicker { margin: 0; }
.drop { border-radius: var(--r); background: var(--surface); border: 1.5px dashed var(--line-3); }
.drop.over { border-color: var(--green-ink); }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.meaning { display: grid; gap: 6px; font-size: 14px; color: var(--ink-2); }
.meaning b { color: var(--ink); font-family: var(--font-mono); font-stretch: 92%; font-size: 0.92em; }
.costs { font-size: 14px; }
.costs .total { border-top: 1.5px solid var(--line-2); }
.flow-mark { border: 1.5px solid var(--line-3); font-stretch: 92%; }
.flow-steps li.now .flow-mark { border-color: var(--ink); }
.flow-steps li.done .flow-mark { background: var(--ink); color: var(--on-soil); border-color: var(--ink); }
.flow-steps li:last-child.done .flow-mark { background: var(--green); color: var(--ink); border-color: var(--ink); }
.big-line b { font-size: 20px; }

/* ---------- how it works ---------- */
.how-steps { display: grid; gap: 0; }
.how-step { display: grid; grid-template-columns: 90px minmax(0, 1fr) minmax(0, 1fr); gap: 28px; padding: 28px 0; border-bottom: 1.5px dashed var(--line-2); align-items: start; }
.how-step:first-child { border-top: 1.5px solid var(--ink); }
.how-step .tl-n { padding-top: 8px; }
.how-step h3 { font: 800 32px/1.05 var(--font-display); letter-spacing: -0.025em; margin-bottom: 10px; }
.how-pic { border: 1.5px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); }
.how-pic .tl-bed { margin: 0; }
.how-pic .tl-cap { margin: -1px 0 0; padding: 0 16px 12px; display: block; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sign-card { border-radius: var(--r-lg); border: 1.5px solid var(--line-2); background: var(--surface); padding: 22px; display: grid; gap: 10px; align-content: start; }
.sign-card h3 { font: 800 24px/1.1 var(--font-display); letter-spacing: -0.02em; }
.sign-tx { display: grid; gap: 6px; padding: 12px 14px; border-radius: var(--r); background: var(--bg-2); font: 400 12.5px var(--font-mono); font-stretch: 92%; }
.sign-tx b { font-weight: 700; }
.example-bed { border: 1.5px solid var(--ink); border-radius: var(--r-lg); overflow: hidden; background: var(--bg); margin-bottom: 24px; }
.example-bed > .fine { padding: 12px 18px 14px; background: var(--soil); color: var(--on-soil-2); margin-top: -1px; }
.worked { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
.worked .bids { border-top: 1.5px solid var(--ink); }
.trust { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.trust-card { border: 1.5px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); padding: 20px; display: grid; gap: 8px; align-content: start; }
.trust-card:last-child { border-color: var(--ink); }
.trust-card h3 { font: 800 22px/1.15 var(--font-display); letter-spacing: -0.02em; }
.faq details { border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line-2); }
.faq details[open] { border-color: var(--ink); }
.faq summary { font-weight: 700; }
.risks { display: grid; gap: 10px; max-width: 760px; }
.risks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; color: var(--ink-2); }
.risks li::before { content: '!'; font: 700 12px var(--font-mono); display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--bad); color: var(--bad); margin-top: 2px; }

/* ---------- empty states, 404 ---------- */
.empty { padding: 48px 16px; }
.empty-bed { display: block; border-radius: var(--r); overflow: hidden; margin-bottom: 6px; }
.empty-bed svg { display: block; max-width: 100%; height: auto; }
.empty h3 { font: 800 25px/1.15 var(--font-display); letter-spacing: -0.02em; }
.nf { display: grid; justify-items: center; text-align: center; gap: 14px; padding: clamp(60px, 10vw, 120px) 16px; }
.nf h1 { font-size: clamp(42px, 6.4vw, 80px); letter-spacing: -0.04em; }

/* ---------- profile ---------- */
.addr-title { font-size: clamp(28px, 4vw, 44px); letter-spacing: -0.02em; }
.mine-list { display: grid; gap: 10px; }

/* ---------- modal, toasts, wallet menu ---------- */
.modal-veil { background: rgba(43, 29, 20, 0.5); backdrop-filter: none; }
.modal-panel { border-radius: var(--r-lg); background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.modal-head h2 { font-size: 28px; }
.toast { border-radius: var(--r-pill); background: var(--ink); color: var(--on-soil); box-shadow: none; }
.toast.good { background: var(--green); color: var(--ink); }
.menu { border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--ink); box-shadow: 4px 4px 0 var(--ink); }
.menu-item:hover { background: var(--bg-2); }
.wallet-row { border-radius: var(--r); background: var(--surface); border: 1.5px solid var(--line-2); }
.wallet-row:hover:not([disabled]) { border-color: var(--ink); }

/* ---------- footer ---------- */
#foot { border-top: 1.5px solid var(--ink); background: var(--surface-2); }
main:has(> .band:last-child) + #foot { border-top: 0; }
.foot { grid-template-columns: minmax(0, 1fr) auto; gap: 32px; }
.foot-brand { display: grid; gap: 10px; justify-items: start; }
.foot-line { font: 800 21px/1.15 var(--font-display); letter-spacing: -0.02em; color: var(--ink-2); }
.foot-links { display: grid; grid-template-columns: repeat(3, minmax(130px, auto)); gap: 28px; }
.foot-links:has(.foot-col:nth-child(4)) { grid-template-columns: repeat(4, minmax(120px, auto)); }
.foot-col { display: grid; gap: 9px; align-content: start; }
.foot-col .label { margin-bottom: 4px; }
.foot-col a { color: var(--ink-2); font-size: 15px; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 3px; }
.foot-base { border-top: 1.5px dashed var(--line-2); }
.foot-right { display: inline-flex; gap: 18px; align-items: center; }

/* ---------- motion off: complete and still ---------- */
[data-motion="off"] .btn:hover, [data-motion="off"] a.lot-card:hover, [data-motion="off"] a.hero-tag:hover { transform: none; }

/* ---------- narrower screens ---------- */
@media (max-width: 1100px) {
  .soil .stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tl-step:nth-child(3) { border-left: 0; }
  .tl-step:nth-child(n + 3) { border-top: 1.5px solid var(--ink); }
  .lot-grid { grid-template-columns: minmax(0, 1fr) 360px; }
  .worked { grid-template-columns: 1fr; }
  .rule { grid-template-columns: 150px minmax(0, 1fr); }
  /* the bid tables fold into two-line rows once the main column is narrow */
  .bid-row, .bid-row.opened { grid-template-columns: 1fr auto; gap: 4px 12px; }
  .bid-row.head { display: none; }
  .bid-row .br-fields, .bid-row .br-fp, .bid-row .br-mine { grid-column: 1 / -1; }
  .bid-row.opened .br-rank { display: none; }
  .bid-row.opened .br-size::before { content: '× '; }
  .bid-row.opened .br-filled::before { content: 'filled '; font-weight: 400; color: var(--muted); }
  .bid-row.opened .br-paid::before { content: 'paid '; font-weight: 400; color: var(--muted); }
  .bid-row.opened .br-change::before { content: 'change '; font-weight: 400; color: var(--muted); }
}
@media (max-width: 980px) {
  .hero, .open-grid, .lot-grid, .soil-grid { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .hero-copy { padding-bottom: 0; }
  .hero-tag-slot { max-width: 420px; width: 100%; }
  .soil-grid { gap: 28px; }
  /* one column: the clock and the bid tag come first, under the lot's name */
  .lot-side { position: static; order: -1; }
  .ledger-row { grid-template-columns: minmax(180px, 2fr) 0.8fr 0.5fr 1fr 0.8fr 1fr; }
  .ledger-row > :last-child { display: none; }
  .how-step { grid-template-columns: 1fr; gap: 12px; }
  .trust, .signs, .proof { grid-template-columns: 1fr; }
  .packet-back { grid-template-columns: 1fr; }
  .pb-front { grid-template-columns: auto 1fr; align-items: end; }
  .pb-front .packet { width: 72px !important; height: 91px !important; }
}
@media (max-width: 860px) {
  .tabbar { border-radius: var(--r-pill); background: color-mix(in srgb, var(--surface) 96%, transparent); border: 1.5px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
  .tabbar a { border-radius: var(--r-pill); font-weight: 700; }
  .tabbar a[aria-current] { background: var(--ink); color: var(--on-soil); }
  .lot-head { grid-template-columns: auto minmax(0, 1fr); }
  .lot-head .lh-packet .packet { width: 52px !important; height: 66px !important; }
  .lh-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .feed-row { grid-template-columns: 64px 1fr 52px; }
  .controls .input { max-width: none; }
}
@media (max-width: 680px) {
  .headline { font-size: clamp(44px, 13.4vw, 72px); }
  .headline .hl-1 { white-space: normal; }
  .soil .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timeline { grid-template-columns: 1fr; }
  .tl-step { border-left: 0; }
  .tl-step + .tl-step { border-top: 1.5px solid var(--ink); }
  .ledger-row.head { display: none; }
  .ledger-row { grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 0; }
  .ledger-row > :last-child { display: block; }
  .ledger-row .lg-lot { grid-column: 1 / -1; }
  .ledger-row > [data-k]::before { content: attr(data-k) ' '; font: 600 10.5px var(--font-mono); font-stretch: 92%; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-right: 4px; }
  .rule { grid-template-columns: 1fr; gap: 2px; }
  .foot { grid-template-columns: 1fr; }
  #foot { padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
  .section-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .foot-links, .foot-links:has(.foot-col:nth-child(4)) { grid-template-columns: 1fr 1fr; }
  .foot-base { flex-direction: column; }
  .panel-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .hero-tag { margin-bottom: 48px; }
  .slip-row { grid-template-columns: auto 1fr auto; }
}

/* ---------- /privcon, the admin ---------- */
.admin { display: grid; gap: 18px; max-width: 760px; }
.admin-who { gap: 8px; }
.admin-card h2 { font-size: 28px; margin: 0 0 6px; }
.admin-input .input { flex: 1 1 320px; min-width: 0; }
.admin-toggle { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-top: 1.5px dashed var(--line-2); }
.admin-toggle:first-of-type { border-top: 0; }
.admin-toggle b { margin-right: 10px; }
.admin-toggle p { margin: 6px 0 0; }
.admin-log { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 14.5px; }
@media (max-width: 560px) { .admin-toggle { flex-direction: column; align-items: flex-start; } }
