/* Restocked: the supply cupboard. Shelf-edge yellow price labels, kraft cases, one accent per shop. */
:root {
  color-scheme: light;
  --ground: #F5F6F2;
  --surface: #FFFFFF;
  --ink: #16211C;
  --muted: #5C6962;
  --rule: #DDE2DC;
  --brand: #0F5C47;           /* master shop; a sector shop swaps --accent */
  --accent: var(--brand);
  --label: #FFD84A;           /* shelf-edge label */
  --label-ink: #1A1A12;
  --kraft: #CFA36B; --kraft-dark: #A87C47; --kraft-tape: #E7C796;
  --ok: #1E7A45; --warn: #9A5B00; --bad: #B42318; --ship: #2F5BD3;
  --display: "Bricolage Grotesque", "Arial Black", system-ui, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --r: 8px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 16px/1.5 var(--body); padding-bottom: env(safe-area-inset-bottom, 0px); }
a { color: inherit; }
img, svg { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; margin: 0; text-wrap: balance; letter-spacing: -.01em; }
.mono { font-family: var(--mono); }
[hidden] { display: none !important; }

.ribbon { background: var(--ink); color: #E9EEE9; font-size: 13px; text-align: center; padding: 6px 16px; padding-top: calc(6px + env(safe-area-inset-top, 0px)); }

/* header */
.top { background: var(--surface); border-bottom: 1px solid var(--rule); position: sticky; top: 0; z-index: 20; }
.top-row { max-width: 1240px; margin: 0 auto; padding: 12px 20px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.logo svg { width: 30px; height: 30px; }
.logo-box { fill: var(--kraft); }
.logo-tape { stroke: var(--kraft-dark); stroke-width: 2; fill: none; }
.logo-flap { stroke: var(--accent); stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.logo-word { font: 800 22px/1 var(--display); letter-spacing: -.02em; }
.logo-sector { font: 600 13px/1 var(--body); color: var(--accent); border-left: 2px solid var(--rule); padding-left: 8px; }
.logo-sector:empty { display: none; }
.search { position: relative; display: flex; max-width: 620px; width: 100%; justify-self: center; }
.search input { flex: 1; min-width: 0; border: 2px solid var(--ink); border-right: 0; border-radius: 999px 0 0 999px; padding: 10px 18px; background: var(--surface); font-size: 16px; }
.search input:focus { outline: none; border-color: var(--accent); }
.search button { border: 2px solid var(--ink); background: var(--ink); color: #fff; border-radius: 0 999px 999px 0; padding: 0 16px; cursor: pointer; }
.search button svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; vertical-align: middle; }
.suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 12px 32px rgb(22 33 28 / .14); overflow: hidden; z-index: 30; }
.suggest a { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 10px 14px; text-decoration: none; border-bottom: 1px solid var(--rule); }
.suggest a:last-child { border-bottom: 0; }
.suggest a:hover, .suggest a[aria-selected="true"] { background: var(--ground); }
.suggest small { display: block; color: var(--muted); }
.suggest .p { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.top-actions { display: flex; gap: 10px; align-items: center; }
.menu { position: relative; }
.acct-btn { display: grid; text-align: left; line-height: 1.15; border: 1px solid var(--rule); background: var(--surface); border-radius: var(--r); padding: 6px 12px; cursor: pointer; }
.acct-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.acct-btn b { font-size: 14px; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: 0 12px 32px rgb(22 33 28 / .14); padding: 12px; z-index: 30; display: grid; gap: 6px; }
.menu-pop h4 { margin: 4px 4px 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.menu-pop button, .menu-pop a { all: unset; cursor: pointer; padding: 8px 10px; border-radius: 6px; display: grid; }
.menu-pop button:hover, .menu-pop a:hover, .menu-pop button:focus-visible { background: var(--ground); }
.menu-pop small { color: var(--muted); }
.menu-pop .vat { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--rule); margin-top: 4px; padding: 10px 10px 2px; }
.basket-btn { position: relative; display: flex; align-items: center; gap: 6px; background: var(--accent); color: #fff; border: 0; border-radius: var(--r); padding: 10px 14px; cursor: pointer; font-weight: 700; }
.basket-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.sectors { max-width: 1240px; margin: 0 auto; padding: 0 20px; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.sectors a { text-decoration: none; padding: 10px 12px; font-weight: 600; font-size: 15px; white-space: nowrap; border-bottom: 3px solid transparent; color: var(--muted); }
.sectors a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.sectors a:hover { color: var(--ink); }
.sectors .sep { flex: 1; }
@media (max-width: 760px) {
  .top-row { grid-template-columns: 1fr auto; gap: 10px; padding: 10px 16px; }
  .search { grid-column: 1 / -1; grid-row: 2; max-width: none; }
  .acct-label { display: none; }
  .sectors { padding: 0 16px; }
}

/* page */
main:focus, main:focus-visible { outline: none; }
main { max-width: 1240px; margin: 0 auto; padding: 24px 20px 64px; display: grid; gap: 40px; outline: none; }
@media (max-width: 760px) { main { padding: 18px 16px 56px; gap: 32px; } }
.crumbs { font-size: 14px; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--muted); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.section-head h2 { font-size: 26px; }
.section-head a { font-weight: 600; color: var(--accent); }

/* hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: center; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; padding: clamp(22px, 4vw, 44px); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 6px; background: var(--accent); }
.hero h1 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 800; }
.hero p { color: var(--muted); font-size: 18px; max-width: 52ch; margin: 14px 0 0; }
.hero .chips { margin-top: 20px; }
.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: 100%; max-width: 380px; height: auto; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } .hero-art { display: none; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--rule); background: var(--ground); border-radius: 999px; padding: 6px 12px; font-size: 14px; text-decoration: none; cursor: pointer; }
.chip:hover { border-color: var(--ink); }
.proof { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 18px; padding: 0; list-style: none; font-size: 15px; font-weight: 600; }
.proof li::before { content: "✓"; color: var(--accent); margin-right: 8px; font-weight: 800; }

/* sector cards */
.shops { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .shops { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .shops { grid-template-columns: 1fr; } }
.shop { --accent: var(--sa); display: grid; gap: 8px; text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-top: 6px solid var(--sa); border-radius: var(--r); padding: 18px; }
.shop:hover { box-shadow: 0 8px 24px rgb(22 33 28 / .10); }
.shop b { font: 800 20px/1.1 var(--display); }
.shop span { color: var(--muted); font-size: 15px; }
.shop i { font-style: normal; color: var(--sa); font-weight: 700; font-size: 14px; }

/* category tiles */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cat { display: grid; gap: 2px; text-decoration: none; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; }
.cat:hover { border-color: var(--ink); }
.cat b { font-size: 16px; }
.cat span { font-size: 13px; color: var(--muted); }

/* product grid */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card { display: grid; grid-template-rows: auto 1fr auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; }
.card-art { background: linear-gradient(#EEF1EC, #E4E8E2); aspect-ratio: 4 / 3; display: grid; place-items: center; text-decoration: none; position: relative; }
.card-art svg { width: 78%; height: auto; }
.badges { position: absolute; top: 8px; left: 8px; display: flex; gap: 4px; flex-wrap: wrap; }
.badge { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface); border: 1px solid var(--rule); }
.badge.eco { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, white); }
.badge.ship { color: var(--ship); border-color: color-mix(in srgb, var(--ship) 40%, white); }
.badge.out { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, white); }
.card-body { padding: 12px 14px 4px; display: grid; gap: 4px; align-content: start; }
.card-body a { text-decoration: none; font-weight: 700; line-height: 1.3; }
.card-body a:hover { text-decoration: underline; }
.pack { font-size: 14px; color: var(--muted); }
.card-foot { padding: 10px 14px 14px; display: grid; gap: 10px; }
.card-foot .btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }

/* shelf-edge label: the price */
.tag { display: grid; grid-template-columns: 1fr auto; align-items: end; background: var(--label); color: var(--label-ink); border-radius: 4px; padding: 6px 10px 6px; position: relative; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .08); }
.tag::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--accent); border-radius: 4px 0 0 4px; }
.tag .price { font: 800 24px/1 var(--display); font-variant-numeric: tabular-nums; }
.tag .price s { font: 500 14px var(--body); opacity: .6; margin-left: 6px; }
.tag .vat { font-size: 11px; font-weight: 600; opacity: .75; display: block; margin-top: 2px; }
.tag .unitp { font: 600 12px/1.2 var(--mono); text-align: right; }
.tag .unitp small { display: block; font: 500 10.5px var(--mono); opacity: .7; }
.tag.big .price { font-size: 40px; }
.tag.big { padding: 12px 16px; }
.tag.big .unitp { font-size: 15px; }

.btn { border: 2px solid var(--ink); background: var(--surface); border-radius: var(--r); padding: 9px 12px; font-weight: 700; cursor: pointer; text-align: center; text-decoration: none; display: inline-block; }
.btn:hover { background: var(--ground); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.buy { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.wide { width: 100%; }
.stock { font-size: 13px; font-weight: 600; }
.stock.in { color: var(--ok); } .stock.out { color: var(--bad); } .stock.ship { color: var(--ship); }

/* search page */
.results { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
@media (max-width: 860px) { .results { grid-template-columns: 1fr; } }
.filters { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; display: grid; gap: 14px; }
.filters fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.filters legend { font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.filters label { display: flex; gap: 8px; align-items: center; font-size: 15px; cursor: pointer; }
.filters select { width: 100%; padding: 8px; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.result-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.result-head h1 { font-size: 28px; }
.empty { background: var(--surface); border: 1px dashed var(--rule); border-radius: var(--r); padding: 28px; text-align: center; color: var(--muted); }

/* product page */
.pdp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36px; align-items: start; }
@media (max-width: 860px) { .pdp { grid-template-columns: 1fr; gap: 20px; } }
.pdp-art { background: linear-gradient(#EEF1EC, #E1E6DF); border-radius: 14px; aspect-ratio: 1; display: grid; place-items: center; position: relative; }
.pdp-art svg { width: 76%; }
.pdp-info { display: grid; gap: 16px; }
.pdp-info h1 { font-size: clamp(28px, 3.4vw, 40px); }
.sku { font: 500 13px var(--mono); color: var(--muted); }
.why { font-size: 13px; color: var(--muted); }
.why summary { cursor: pointer; font-weight: 600; color: var(--ink); }
.why ol { margin: 8px 0 0; padding-left: 20px; font-family: var(--mono); font-size: 12.5px; }
.breaks { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.breaks th, .breaks td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.breaks td:last-child, .breaks th:last-child { text-align: right; }
.buybox { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 16px; display: grid; gap: 12px; }
.qty { display: inline-flex; border: 2px solid var(--ink); border-radius: var(--r); overflow: hidden; }
.qty button { width: 40px; border: 0; background: var(--surface); font-size: 20px; cursor: pointer; }
.qty input { width: 56px; text-align: center; border: 0; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.buyrow { display: flex; gap: 8px; flex-wrap: wrap; align-items: stretch; }
.buyrow .btn { flex: 1; min-width: 130px; }
.opts { display: grid; gap: 8px; }
.opt { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; border: 1px solid var(--rule); border-radius: var(--r); padding: 10px 12px; cursor: pointer; }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.opt small { display: block; color: var(--muted); }
.opt b { font-variant-numeric: tabular-nums; }
.opt select { margin-left: 6px; padding: 2px 4px; border: 1px solid var(--rule); border-radius: 4px; }
.co2 { display: grid; gap: 4px; border-left: 4px solid var(--ok); background: color-mix(in srgb, var(--ok) 7%, var(--surface)); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; font-size: 15px; }
.co2 a { font-weight: 700; color: var(--ok); }
.ship-note { border-left: 4px solid var(--ship); background: color-mix(in srgb, var(--ship) 7%, var(--surface)); padding: 10px 14px; border-radius: 0 var(--r) var(--r) 0; font-size: 15px; }
.points { font-size: 14px; color: var(--muted); }
.points b { color: var(--ink); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgb(10 16 13 / .4); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: var(--surface); z-index: 50; display: grid; grid-template-rows: auto 1fr; box-shadow: -12px 0 40px rgb(0 0 0 / .18); padding-top: env(safe-area-inset-top, 0px); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--rule); }
.drawer-head h2 { font-size: 22px; }
.x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; color: var(--muted); }
.drawer-body { overflow-y: auto; padding: 16px 20px 24px; display: grid; gap: 14px; align-content: start; padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
.line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: start; padding-bottom: 12px; border-bottom: 1px solid var(--rule); }
.line .thumb { background: var(--ground); border-radius: 6px; aspect-ratio: 1; display: grid; place-items: center; }
.line .thumb svg { width: 86%; }
.line a { font-weight: 700; text-decoration: none; font-size: 14.5px; line-height: 1.3; }
.line small { display: block; color: var(--muted); font-size: 13px; }
.line .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.line .amt s { display: block; font-weight: 400; color: var(--muted); font-size: 12.5px; }
.line .ctl { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: 13px; }
.line .qty { border-width: 1px; } .line .qty button { width: 28px; font-size: 16px; } .line .qty input { width: 36px; font-size: 14px; }
.linkbtn { all: unset; cursor: pointer; color: var(--muted); text-decoration: underline; font-size: 13px; }
.linkbtn:focus-visible { outline: 2px solid var(--accent); }
.freebar { display: grid; gap: 6px; font-size: 14px; }
.freebar .bar { height: 8px; background: var(--ground); border-radius: 999px; overflow: hidden; }
.freebar .bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.totals { display: grid; gap: 4px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; font-size: 15px; }
.totals .grand { font-size: 19px; font-weight: 800; border-top: 1px solid var(--rule); padding-top: 8px; margin-top: 4px; }
.swap { border: 1px solid color-mix(in srgb, var(--ok) 35%, white); background: color-mix(in srgb, var(--ok) 6%, var(--surface)); border-radius: var(--r); padding: 10px 12px; font-size: 14px; display: grid; gap: 6px; }
.swap .btn { border-color: var(--ok); color: var(--ok); padding: 6px 10px; font-size: 14px; justify-self: start; }
.promo { display: flex; gap: 6px; }
.promo input { flex: 1; min-width: 0; padding: 8px 10px; border: 1px solid var(--rule); border-radius: 6px; text-transform: uppercase; }
.msg-ok { color: var(--ok); font-size: 14px; } .msg-bad { color: var(--bad); font-size: 14px; }

/* checkout / forms */
.two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; display: grid; gap: 14px; }
.panel h2 { font-size: 22px; }
.field { display: grid; gap: 4px; }
.field label { font-weight: 600; font-size: 14px; }
.field input, .field select { padding: 10px 12px; border: 1px solid #B9C2BB; border-radius: 6px; background: var(--surface); font-size: 16px; }
.field small { color: var(--muted); font-size: 13px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .row2 { grid-template-columns: 1fr; } }
.err { color: var(--bad); font-weight: 600; font-size: 14px; }
.confirm { text-align: center; display: grid; gap: 12px; justify-items: center; padding: 32px 20px; }
.confirm h1 { font-size: clamp(30px, 4vw, 44px); }
.confirm .num { font: 600 18px var(--mono); background: var(--label); padding: 4px 12px; border-radius: 4px; }

/* dialog */
dialog { border: 0; border-radius: 14px; padding: 0; width: min(480px, calc(100% - 32px)); box-shadow: 0 24px 64px rgb(0 0 0 / .25); color: var(--ink); }
dialog::backdrop { background: rgb(10 16 13 / .45); }
.dlg { padding: 24px; display: grid; gap: 14px; }
.dlg h2 { font-size: 24px; }
.dlg .x { position: absolute; top: 12px; right: 14px; }
.offer { text-align: center; }
.offer .code { font: 600 22px var(--mono); background: var(--label); padding: 6px 14px; border-radius: 4px; justify-self: center; letter-spacing: .06em; }

/* chat */
.ask-btn { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 35; background: var(--ink); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px; font-weight: 700; box-shadow: 0 8px 24px rgb(0 0 0 / .22); cursor: pointer; }
.chat { position: fixed; right: 20px; bottom: calc(76px + env(safe-area-inset-bottom, 0px)); z-index: 36; width: min(380px, calc(100% - 32px)); height: min(540px, calc(100% - 120px)); background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; box-shadow: 0 24px 64px rgb(0 0 0 / .22); display: grid; grid-template-rows: auto 1fr auto; overflow: hidden; }
@media (max-width: 480px) { .chat { right: 16px; } .ask-btn { right: 16px; } }
.chat-head { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.chat-head span { font: 500 11px var(--mono); color: var(--muted); margin-right: auto; }
.chat-log { overflow-y: auto; padding: 14px; display: grid; gap: 10px; align-content: start; }
.bubble { max-width: 88%; padding: 10px 12px; border-radius: 12px; font-size: 15px; }
.bubble.me { justify-self: end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.bubble.bot { background: var(--ground); border-bottom-left-radius: 4px; }
.mini { display: grid; gap: 6px; margin-top: 8px; }
.mini a { display: flex; justify-content: space-between; gap: 8px; background: var(--surface); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 8px; text-decoration: none; font-size: 13.5px; }
.mini a b { white-space: nowrap; font-variant-numeric: tabular-nums; }
.chat-form { display: flex; border-top: 1px solid var(--rule); }
.chat-form input { flex: 1; min-width: 0; border: 0; padding: 12px 14px; font-size: 15px; }
.chat-form input:focus { outline: none; }
.chat-form button { border: 0; background: var(--accent); color: #fff; padding: 0 16px; font-weight: 700; cursor: pointer; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; z-index: 60; font-weight: 600; font-size: 15px; box-shadow: 0 8px 24px rgb(0 0 0 / .2); }

/* trade + console tables */
.tiers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 960px) { .tiers { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .tiers { grid-template-columns: 1fr; } }
.tier { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; display: grid; gap: 8px; align-content: start; }
.tier b { font: 800 20px var(--display); }
.tier .pct { font: 800 34px/1 var(--display); color: var(--accent); }
.tier small { color: var(--muted); }
.rules { counter-reset: r; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 32px 1fr; gap: 10px; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; }
.rules li::before { content: counter(r); font: 800 18px/32px var(--display); width: 32px; height: 32px; text-align: center; border-radius: 50%; background: var(--label); }
.tbl-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--rule); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: 1px solid var(--rule); }
table.t tr:last-child td { border-bottom: 0; }
table.t .n { text-align: right; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 760px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.kpi { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.kpi span { font-size: 13px; color: var(--muted); }
.kpi b { font: 800 28px/1.1 var(--display); font-variant-numeric: tabular-nums; }
.kpi small { font-size: 12.5px; color: var(--muted); }
.state { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.state.live { background: color-mix(in srgb, var(--ok) 14%, white); color: var(--ok); }
.state.queue { background: color-mix(in srgb, var(--ship) 12%, white); color: var(--ship); }
.state.planned { background: var(--ground); color: var(--muted); }
.sample { font: 600 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, white); padding: 2px 6px; border-radius: 4px; }
.ideas { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ideas li { background: var(--surface); border: 1px solid var(--rule); border-radius: var(--r); padding: 12px 14px; display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; }
.bars { display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 150px 1fr 64px; gap: 10px; align-items: center; font-size: 14px; }
.bars i { display: block; height: 12px; background: var(--accent); border-radius: 3px; }
.bars span:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.note { font-size: 14px; color: var(--muted); }

/* footer */
.foot { background: var(--ink); color: #CBD5CE; padding: 40px 20px calc(80px + env(safe-area-inset-bottom, 0px)); }
.foot-grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
.foot-logo { font: 800 22px var(--display); color: #fff; }
.foot h4 { color: #fff; margin: 0 0 8px; font-size: 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.foot p { margin: 6px 0 0; font-size: 14px; }
.foot a { color: #CBD5CE; font-size: 14px; }

@media (prefers-reduced-motion: no-preference) {
  .card, .shop, .btn { transition: box-shadow .15s ease, background-color .15s ease, filter .15s ease; }
  .drawer { animation: slide .22s ease-out; }
  @keyframes slide { from { transform: translateX(24px); opacity: .6; } }
}
