:root {
  --bg: #ffffff;
  --surface: #f3f6f4;
  --ink: #15201c;
  --muted: #5b6762;
  --line: #dce3df;
  --accent: #0f6b54;
  --accent-ink: #ffffff;
  --offer: #b03a1e;
  --alert-bg: #fff2e8;
  --alert-ink: #7a2c12;
  --ok: #1d7a4a;
  --radius: 10px;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1513; --surface: #17201d; --ink: #e7eeea; --muted: #9aa8a2; --line: #2a3531;
    --accent: #43b892; --accent-ink: #06140f; --offer: #f08a66; --alert-bg: #3a1e14; --alert-ink: #ffd2bf; --ok: #5fd39a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1513; --surface: #17201d; --ink: #e7eeea; --muted: #9aa8a2; --line: #2a3531;
  --accent: #43b892; --accent-ink: #06140f; --offer: #f08a66; --alert-bg: #3a1e14; --alert-ink: #ffd2bf; --ok: #5fd39a;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font: 17px/1.55 var(--body); }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; margin: 0 0 .4em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1rem; font-family: var(--body); font-weight: 600; }
p { margin: 0 0 .8em; }
code { font-size: .85em; background: var(--surface); padding: .1em .35em; border-radius: 4px; word-break: break-all; }

.wrap { max-width: 1120px; margin: 0 auto; padding-inline: 20px; }
main.wrap { padding-block: 28px 56px; min-height: 60vh; }
.narrow { max-width: 620px; margin-inline: auto; }
.card { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.muted { color: var(--muted); }
.small, .hint { font-size: .88rem; }
.hint { color: var(--muted); display: block; margin-top: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.alert { background: var(--alert-bg); color: var(--alert-ink); padding: 10px 14px; border-radius: 8px; }
.note { color: var(--muted); }
.offer { color: var(--offer); font-weight: 600; }
.section-title { margin-top: 2.2rem; }

.top { border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 700; font-size: 1.3rem; color: var(--ink); text-decoration: none; letter-spacing: -.01em; }
.logo span { color: var(--accent); }
nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
nav a { color: var(--ink); text-decoration: none; }
nav a:hover { color: var(--accent); }
.cart-link b { background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 0 7px; font-size: .8rem; }
.inline { display: inline; margin: 0; }

.btn { display: inline-block; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 8px; padding: 11px 18px; font: 600 1rem var(--body); cursor: pointer; text-decoration: none; }
.btn:hover { filter: brightness(1.08); }
.btn.small { padding: 7px 12px; font-size: .92rem; }
.btn.ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.linkish { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; }
textarea { font-family: ui-monospace, Consolas, monospace; font-size: .9rem; }
.stack { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check, .radio { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input, .radio input { width: auto; margin-top: 5px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; margin: 0; }
legend { font-weight: 600; font-size: .92rem; padding: 0 4px; }

.hero { padding-block: 24px 8px; max-width: 760px; }
.eyebrow { text-transform: uppercase; letter-spacing: .09em; font-size: .78rem; font-weight: 600; color: var(--accent); }
.lede { font-size: 1.15rem; color: var(--muted); }

.brand-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.brand-card { display: block; text-decoration: none; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.brand-card:hover { border-color: var(--accent); }
.brand-card img, .brand-card .ph { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--surface); display: block; }
.brand-card-body { padding: 14px 16px; }
.meta { color: var(--muted); font-size: .92rem; margin: 0; }

.brand-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.terms { display: flex; gap: 24px; margin: 0; }
.terms dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.terms dd { margin: 0; font-weight: 600; font-size: 1.1rem; }
.filters { display: flex; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.filters input { flex: 1 1 220px; }
.filters select { flex: 0 1 240px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px 18px; }
.product img, .product .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; background: var(--surface); display: block; margin-bottom: 8px; }
.product h3 { margin-bottom: 4px; }
.price { margin: 0; font-variant-numeric: tabular-nums; }
.add { display: flex; gap: 8px; margin-top: 8px; }
.add input { width: 72px; padding: 6px 8px; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.table-wrap { overflow-x: auto; }
table.lines { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.lines th, .lines td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.lines th { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.lines .num { text-align: right; white-space: nowrap; }
.qty { display: inline-flex; gap: 6px; align-items: center; }
.qty input { width: 64px; padding: 4px 6px; }
.summary dl { margin: 0 0 10px; }
.summary dl > div { display: flex; justify-content: space-between; padding: 6px 0; font-variant-numeric: tabular-nums; }
.summary dd { margin: 0; }
.summary .total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 700; font-size: 1.15rem; }

.pill { display: inline-block; font-size: .8rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface); color: var(--muted); }
.pill.paid { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.awaiting_payment { background: color-mix(in srgb, var(--offer) 14%, transparent); color: var(--offer); }
.pill.failed, .pill.cancelled, .pill.refunded { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; }
.stats > div { background: var(--surface); border-radius: 8px; padding: 12px 14px; }
.stats span { display: block; font-size: .8rem; color: var(--muted); }
.stats b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.list { padding-left: 1.2em; }
.list li { margin-bottom: 6px; }
.prose h2 { margin-top: 1.6em; }

.foot { border-top: 1px solid var(--line); padding-block: 20px 36px; color: var(--muted); font-size: .9rem; }

@media (max-width: 760px) {
  .cart-layout { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .terms { gap: 16px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
