/* ===========================================================================
   One stylesheet for the whole site: shop front and admin panel.
   The accent colours are written into :root by the layout from the owner's
   settings, so re-branding is a colour picker, not a deploy.
   =========================================================================== */
:root {
  --accent: #1f6feb;
  --accent-dark: #144a9e;
  --ink: #10151c;
  --body: #495563;
  --muted: #6b7785;
  --line: #e3e8ef;
  --line-soft: #eef2f7;
  --bg: #ffffff;
  --bg-soft: #f7f9fc;
  --bg-sink: #eef2f7;
  --ok: #0f8a4f;
  --warn: #b5730d;
  --bad: #c4362f;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(16, 21, 28, .06), 0 8px 24px -12px rgba(16, 21, 28, .18);
  --shadow-lg: 0 24px 60px -28px rgba(16, 21, 28, .35);
  --wrap: 1180px;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--body);
  font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { color: var(--ink); line-height: 1.2; margin: 0 0 .5rem; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 2.85rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
small { font-size: .82rem; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
.wrap-narrow { width: min(760px, 100% - 2.5rem); margin-inline: auto; }
.section { padding: 4.5rem 0; }
.section-sm { padding: 2.5rem 0; }
.sink { background: var(--bg-soft); }
.center { text-align: center; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: .5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; }
.row { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.row-between { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.push { margin-left: auto; }
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.eyebrow { font: 600 .74rem/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 .75rem; }
.lead { font-size: 1.15rem; color: var(--body); max-width: 62ch; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .72rem 1.35rem; border-radius: var(--radius); border: 1px solid var(--line);
  background: #fff; color: var(--ink); font: 600 .95rem/1 var(--sans); cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, transform .06s; text-decoration: none;
}
.btn:hover { text-decoration: none; border-color: #cfd8e3; background: var(--bg-soft); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: #fff; }
.btn-danger { background: #fff; border-color: #e7b4b0; color: var(--bad); }
.btn-danger:hover { background: #fdf3f2; border-color: var(--bad); }
.btn-sm { padding: .45rem .8rem; font-size: .85rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
label { display: block; font-weight: 600; color: var(--ink); font-size: .9rem; margin: 0 0 .35rem; }
/* Matched by exclusion rather than by listing every type, because an <input>
   with no type attribute is a text field and matches none of them. */
input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=submit]):not([type=button]):not([type=image]):not([type=hidden]),
select, textarea {
  width: 100%; padding: .65rem .8rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; color: var(--ink); font: inherit; font-size: .95rem;
}
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=button]):focus, select:focus, textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; border-color: var(--accent); }
input[type=color] { padding: .2rem; height: 42px; }
textarea { min-height: 110px; resize: vertical; }
.field { margin-bottom: 1.1rem; }
.field-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.help { color: var(--muted); font-size: .84rem; margin: .35rem 0 0; }
.check { display: flex; gap: .55rem; align-items: flex-start; margin: 0 0 .7rem; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--accent); }
.check label { margin: 0; font-weight: 500; }
.error { color: var(--bad); font-size: .85rem; margin: .35rem 0 0; }

/* ── Cards, alerts, badges ───────────────────────────────────────────────── */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.5rem; }
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.1rem 1.5rem; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { margin: 0; font-size: 1.05rem; }
.card-body { padding: 1.5rem; }
.alert { padding: .9rem 1.1rem; border-radius: var(--radius); border: 1px solid; margin: 0 0 1.5rem; font-size: .95rem; }
.alert-ok { background: #eefaf3; border-color: #b8e6cd; color: #0b6b3e; }
.alert-bad { background: #fdf3f2; border-color: #f0c4c0; color: #97302a; }
.alert-info { background: #eff5ff; border-color: #c5dafd; color: #1a4fa8; }
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: 999px; font: 600 .74rem/1.5 var(--sans); background: var(--bg-sink); color: var(--body); white-space: nowrap; }
.badge-ok { background: #e6f6ee; color: var(--ok); }
.badge-warn { background: #fdf3e2; color: var(--warn); }
.badge-bad { background: #fdecea; color: var(--bad); }
.badge-info { background: #e9f1fe; color: var(--accent); }

/* ── Site header and footer ──────────────────────────────────────────────── */
.announce { background: var(--ink); color: #fff; text-align: center; padding: .55rem 1rem; font-size: .88rem; }
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(255,255,255,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 1.5rem; padding: .9rem 0; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--ink); font-size: 1.12rem; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand img { height: 34px; width: auto; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; display: grid; place-items: center; font-size: .95rem; font-weight: 800; }
.site-nav { display: flex; gap: .25rem; align-items: center; margin-left: auto; flex-wrap: wrap; }
.site-nav a { padding: .5rem .8rem; border-radius: var(--radius); color: var(--body); font-weight: 500; font-size: .95rem; }
.site-nav a:hover { background: var(--bg-soft); color: var(--ink); text-decoration: none; }
.site-nav a.active { color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, transparent); }
.cart-link { position: relative; }
.cart-count { position: absolute; top: 0; right: 0; transform: translate(35%, -25%); background: var(--accent); color: #fff; border-radius: 999px; min-width: 19px; height: 19px; padding: 0 5px; font: 700 .7rem/19px var(--sans); text-align: center; }
.site-footer { background: var(--ink); color: #aab4c0; padding: 3.5rem 0 2rem; margin-top: 5rem; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: .8rem; }
.site-footer a { color: #cfd7e0; }
.site-footer .cols { display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer .foot-links { display: grid; gap: .45rem; }
.site-footer .base { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; font-size: .85rem; }

/* ── Hero and content blocks ─────────────────────────────────────────────── */
.hero { padding: 5rem 0 4rem; background:
  radial-gradient(1000px 400px at 15% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%),
  linear-gradient(180deg, var(--bg-soft), #fff); border-bottom: 1px solid var(--line); }
.hero .inner { display: grid; gap: 3rem; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero .inner:has(> :only-child) { grid-template-columns: 1fr; }
.hero .inner:has(> :only-child) .lead { max-width: 68ch; }
.hero img { border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); }
.hero .actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.75rem; }
@media (max-width: 860px) { .hero .inner { grid-template-columns: 1fr; } .hero { padding: 3rem 0; } }

.block-features { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.6rem; }
.feature .n { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-weight: 800; margin-bottom: .9rem; }
.feature h3 { font-size: 1.05rem; }
.feature p { margin: 0; font-size: .95rem; }
.cta-band { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border-radius: var(--radius-lg); padding: 3rem; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 55ch; margin-inline: auto; }
.cta-band .btn { background: #fff; border-color: #fff; color: var(--accent-dark); }
.stat-band { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); text-align: center; }
.stat-band .n { font-size: 2.4rem; font-weight: 800; color: var(--ink); line-height: 1.1; letter-spacing: -.03em; }
.faq-item { border-bottom: 1px solid var(--line); padding: 1.1rem 0; }
.faq-item h3 { font-size: 1.02rem; margin-bottom: .35rem; }
.faq-item p { margin: 0; }
.prose h2 { margin-top: 2rem; }
.prose p:last-child { margin-bottom: 0; }

/* ── Product grid ────────────────────────────────────────────────────────── */
.product-grid { display: grid; gap: 1.5rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.product-card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; transition: box-shadow .18s, transform .18s, border-color .18s; }
.product-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: #d7dfea; }
.product-card .thumb { aspect-ratio: 4/3; background: var(--bg-sink); display: grid; place-items: center; overflow: hidden; position: relative; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card .thumb .ph { color: var(--muted); font: 600 .78rem/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; }
.product-card .body { padding: 1.1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.product-card h3 { font-size: 1rem; margin: 0; }
.product-card h3 a { color: var(--ink); }
.product-card .cat { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.product-card .price { margin-top: auto; padding-top: .6rem; display: flex; align-items: baseline; gap: .5rem; }
.product-card .price b { font-size: 1.15rem; color: var(--ink); }
.product-card .price s { color: var(--muted); font-size: .9rem; }
.flag { position: absolute; top: .7rem; left: .7rem; z-index: 1; }
.flag-sale { background: var(--bad); color: #fff; }
.flag-out { background: var(--ink); color: #fff; }

/* ── Product page ────────────────────────────────────────────────────────── */
.product-detail { display: grid; gap: 3rem; grid-template-columns: 1fr 1fr; align-items: start; }
@media (max-width: 860px) { .product-detail { grid-template-columns: 1fr; gap: 2rem; } }
.gallery .main { aspect-ratio: 4/3; background: var(--bg-sink); border-radius: var(--radius-lg); overflow: hidden; display: grid; place-items: center; }
.gallery .main img { width: 100%; height: 100%; object-fit: cover; }
.gallery .thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: .6rem; margin-top: .8rem; }
.gallery .thumbs img { aspect-ratio: 1; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.price-row { display: flex; align-items: baseline; gap: .75rem; margin: 1rem 0; }
.price-row .now { font-size: 2rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; }
.price-row s { color: var(--muted); font-size: 1.1rem; }
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.spec-table th, .spec-table td { text-align: left; padding: .6rem 0; border-bottom: 1px solid var(--line-soft); }
.spec-table th { color: var(--muted); font-weight: 500; width: 40%; }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th { text-align: left; padding: .7rem 1rem; background: var(--bg-soft); color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: .8rem 1rem; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--bg-soft); }
table.data .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ── Cart and checkout ───────────────────────────────────────────────────── */
.cart-layout { display: grid; gap: 2rem; grid-template-columns: 1.6fr 1fr; align-items: start; }
@media (max-width: 900px) { .cart-layout { grid-template-columns: 1fr; } }
.summary { position: sticky; top: 90px; }
.summary .line { display: flex; justify-content: space-between; padding: .45rem 0; font-size: .95rem; }
.summary .line.total { border-top: 1px solid var(--line); margin-top: .6rem; padding-top: .9rem; font-size: 1.15rem; font-weight: 700; color: var(--ink); }
.qty { display: flex; gap: .3rem; align-items: center; }
.qty input { width: 62px; text-align: center; padding: .4rem; }
.pay-option { display: flex; gap: .8rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; cursor: pointer; align-items: flex-start; }
.pay-option:hover { border-color: #cfd8e3; background: var(--bg-soft); }
.pay-option input { margin: 3px 0 0; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.pay-option strong { color: var(--ink); display: block; }
.pay-option .tag { font-size: .85rem; color: var(--muted); }
.pay-option:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }

/* ── Order tracking ──────────────────────────────────────────────────────── */
.track-steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .5rem; margin: 2rem 0; }
.track-steps .step { text-align: center; font-size: .82rem; color: var(--muted); }
.track-steps .dot { width: 100%; height: 6px; border-radius: 3px; background: var(--bg-sink); margin-bottom: .6rem; }
.track-steps .step.done .dot { background: var(--accent); }
.track-steps .step.done { color: var(--ink); font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 1.4rem 1.6rem; border-left: 2px solid var(--line); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); }
.timeline .when { font-size: .82rem; color: var(--muted); }

/* ── Admin shell ─────────────────────────────────────────────────────────── */
.admin { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.admin-side { background: var(--ink); color: #aeb9c6; padding: 1.4rem 1rem; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { color: #fff; margin-bottom: 1.6rem; padding-inline: .5rem; }
.admin-side nav { display: grid; gap: .15rem; }
.admin-side a { display: flex; align-items: center; gap: .6rem; padding: .6rem .75rem; border-radius: 8px; color: #aeb9c6; font-size: .93rem; font-weight: 500; }
.admin-side a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.admin-side a.active { background: var(--accent); color: #fff; }
.admin-side .group { margin-top: 1.3rem; padding: 0 .75rem .4rem; font: 600 .7rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #6b7889; }
.admin-main { background: var(--bg-soft); min-width: 0; }
.admin-top { background: #fff; border-bottom: 1px solid var(--line); padding: 1rem 2rem; display: flex; align-items: center; gap: 1rem; position: sticky; top: 0; z-index: 20; }
.admin-top h1 { font-size: 1.3rem; margin: 0; }
.admin-body { padding: 2rem; }
@media (max-width: 900px) {
  .admin { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-side nav { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); display: grid; }
  .admin-body { padding: 1.2rem; }
  .admin-top { padding: 1rem 1.2rem; }
}

/* ── Stat tiles and charts ───────────────────────────────────────────────── */
.tiles { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 1.2rem; }
.tile .k { font: 600 .76rem/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-size: 1.85rem; font-weight: 800; color: var(--ink); letter-spacing: -.03em; margin: .5rem 0 .2rem; line-height: 1.1; }
.delta { font-size: .84rem; font-weight: 600; }
.delta.up { color: var(--ok); } .delta.down { color: var(--bad); } .delta.flat { color: var(--muted); }

.chart { display: flex; align-items: flex-end; gap: 3px; height: 190px; padding-top: 1rem; }
.chart .bar { flex: 1; min-width: 3px; height: 100%; display: flex; align-items: flex-end; border-radius: 3px 3px 0 0; }
.chart .bar i { display: block; width: 100%; min-height: 2px; background: color-mix(in srgb, var(--accent) 75%, transparent); border-radius: 3px 3px 0 0; transition: background .15s; }
.chart .bar:hover i { background: var(--accent-dark); }
.chart-axis { display: flex; justify-content: space-between; font-size: .76rem; color: var(--muted); margin-top: .5rem; }
.bars { display: grid; gap: .7rem; }
.bars .b { display: grid; grid-template-columns: 1fr auto; gap: .5rem; align-items: center; font-size: .9rem; }
.bars .track { grid-column: 1 / -1; height: 7px; background: var(--bg-sink); border-radius: 4px; overflow: hidden; }
.bars .track i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.funnel { display: grid; gap: .6rem; }
.funnel .f { display: flex; justify-content: space-between; padding: .7rem .9rem; border-radius: var(--radius); background: var(--bg-soft); font-size: .92rem; }
.funnel .f b { color: var(--ink); }

/* ── Variant rows in the product form ────────────────────────────────────── */
.variant-row { display: grid; gap: .6rem; grid-template-columns: 2fr 1.4fr 1fr 1fr auto; align-items: end; padding: .9rem; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: .7rem; background: var(--bg-soft); }
.variant-row .field { margin: 0; }
@media (max-width: 800px) { .variant-row { grid-template-columns: 1fr 1fr; } }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; flex-wrap: wrap; }
.tabs a { padding: .65rem 1rem; color: var(--muted); font-weight: 600; font-size: .92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.active { color: var(--accent); border-bottom-color: var(--accent); }

.pagination { display: flex; gap: .3rem; list-style: none; padding: 0; margin: 1.5rem 0 0; flex-wrap: wrap; }
.pagination li { display: flex; }
.pagination a, .pagination span { padding: .45rem .8rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--body); font-size: .9rem; }
.pagination .active span { background: var(--accent); border-color: var(--accent); color: #fff; }
.pagination .disabled span { color: #c3ccd8; }

.empty { text-align: center; padding: 3.5rem 1.5rem; color: var(--muted); }
.empty h3 { color: var(--ink); }
.filters { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1.2rem; }
.filters .field { margin: 0; min-width: 150px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }

/* ── Error pages ─────────────────────────────────────────────────────────── */
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 3rem 0;
  background: radial-gradient(900px 400px at 50% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%); }
.error-code { font: 800 clamp(4rem, 14vw, 8rem)/1 var(--sans); letter-spacing: -.05em; margin: 0 0 .5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── Header on small screens ─────────────────────────────────────────────── */
/* The nav becomes its own row that scrolls sideways rather than wrapping into
   three cramped lines beside a squeezed logo. */
@media (max-width: 860px) {
  .site-header .bar { flex-direction: column; align-items: stretch; gap: .6rem; padding: .7rem 0 0; }
  .brand { justify-content: flex-start; }
  .site-nav { margin-left: 0; flex-wrap: nowrap; overflow-x: auto; gap: .1rem;
    padding-bottom: .55rem; scrollbar-width: none; -ms-overflow-style: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .site-nav a { white-space: nowrap; padding: .45rem .65rem; font-size: .92rem; }
  .cart-count { position: static; transform: none; display: inline-block; margin-left: .3rem; }
}

/* ── Focus, for anyone driving this from the keyboard ────────────────────── */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px;
}

/* On a phone the filter bar was a column of full-width fields that pushed the
   products most of a screen down. Two up, with the buttons sharing a row. */
@media (max-width: 700px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .7rem; align-items: end; }
  .filters .field { min-width: 0; }
  .filters .field:first-child { grid-column: 1 / -1; }
  .filters .field label { font-size: .82rem; }
  .filters .btn { width: 100%; }
}
/* A hint that the nav keeps going past the edge of a narrow screen. */
@media (max-width: 860px) {
  .site-header .bar { position: relative; }
  .site-nav { -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent);
              mask-image: linear-gradient(90deg, #000 88%, transparent); }
}

.crumbs { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; font-size: .88rem; color: var(--muted); margin-bottom: 1.5rem; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs [aria-current] { color: var(--ink); font-weight: 600; }

/* Grid and flex children default to min-width:auto, so a long word or a wide
   table can push a column past the screen instead of shrinking. */
.grid > *, .cart-layout > *, .row > *, .row-between > * { min-width: 0; }
code, .mono { overflow-wrap: anywhere; }

/* Several admin panels set their column ratio inline, which beats a stylesheet.
   Below this width there is only room for one column, so it wins with !important
   rather than by rewriting the ratio into every template. */
@media (max-width: 900px) {
  .grid[style*="grid-template-columns"],
  .cart-layout[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
  .summary { position: static; }
}

/* File inputs have a wide intrinsic size and will not shrink on their own. */
input[type=file] { width: 100%; max-width: 100%; min-width: 0; font-size: .9rem; }
@media (max-width: 520px) {
  .variant-row { grid-template-columns: 1fr; }
}

/* ── The page block editor ───────────────────────────────────────────────── */
.block-edit { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; background: #fff; overflow: hidden; scroll-margin-top: 90px; }
.block-edit:target { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.block-bar { display: flex; align-items: center; gap: .5rem; padding: .55rem .8rem; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.block-kind { font-weight: 700; color: var(--ink); font-size: .9rem; }
.block-n { font: 600 .72rem/1 var(--mono); color: var(--muted); }
.block-body { padding: 1.1rem; }
.block-items-label { font: 600 .78rem/1.4 var(--sans); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1.2rem 0 .6rem; }
.item-row { margin-bottom: .1rem; }
.item-row .field { margin-bottom: .55rem; }
.icon-btn { width: 30px; height: 30px; display: grid; place-items: center; padding: 0; border: 1px solid var(--line); background: #fff; border-radius: 7px; cursor: pointer; color: var(--body); font-size: .95rem; line-height: 1; }
.icon-btn:hover { background: var(--bg-sink); color: var(--ink); }
.icon-btn[disabled] { opacity: .35; cursor: default; }
.icon-btn.danger:hover { background: #fdf3f2; border-color: var(--bad); color: var(--bad); }
.add-block { display: flex; gap: .7rem; align-items: end; padding: 1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.editor-thumb { max-height: 110px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: .5rem; }
@media (max-width: 620px) { .add-block { flex-direction: column; align-items: stretch; } .add-block .btn { width: 100%; } }

/* A text block with a picture beside it. */
.text-with-image { display: grid; gap: 2.5rem; grid-template-columns: 1.15fr .85fr; align-items: center; }
@media (max-width: 820px) { .text-with-image { grid-template-columns: 1fr; gap: 1.5rem; } }
.block-image { border-radius: var(--radius-lg); box-shadow: var(--shadow); width: 100%; }
.block-image.wide { max-height: 340px; object-fit: cover; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: .35rem; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }

.report-h { font-size: 1.05rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 2.2rem 0 .9rem; }
.report-h:first-child { margin-top: 0; }

/* Hidden from people, still reachable by a bot filling everything in. */
.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

tr.row-unread td { background: color-mix(in srgb, var(--accent) 5%, transparent); }
tr.row-unread td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.side-count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 999px; padding: 0 .45rem; font: 700 .7rem/1.5 var(--sans); }

/* ── Heatmap ─────────────────────────────────────────────────────────────── */
/* The page itself is scaled to fit the panel; the click layer is scaled with it,
   so a blob stays over the thing that was clicked. */
/* The page is drawn at its real width and scrolled inside the panel, rather
   than scaled, so what is measured is what is shown. */
.heat-wrap { overflow: auto; max-height: 720px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.heat-stage { position: relative; width: var(--frame); height: var(--page-height); }
.heat-frame { display: block; border: 0; width: 100%; height: 100%; pointer-events: none; }
.heat-layer { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: multiply; }
.heat-layer .blob { position: absolute; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,72,0,.5), rgba(255,170,0,.28) 45%, transparent 70%); }
.heat-layer .blob.rage { background: radial-gradient(circle, rgba(220,0,0,.75), rgba(220,0,60,.4) 45%, transparent 70%); }

tr.row-buyer td:first-child { box-shadow: inset 3px 0 0 var(--ok); }

.seo-done { margin: 0; padding-left: 1.1rem; color: var(--body); }
.seo-done li { margin-bottom: .4rem; }
.snippet { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; background: #fff; }
.snippet .s-url { color: #1a7f37; font-size: .82rem; word-break: break-all; }
.snippet .s-title { color: #1a0dab; font-size: 1.15rem; line-height: 1.3; margin: .2rem 0; }
.snippet .s-desc { color: #4d5156; font-size: .88rem; line-height: 1.5; }
.count-hint { font: 600 .72rem/1 var(--mono); color: var(--muted); }
.count-hint.over { color: var(--bad); }
