/* RESTOCKD — clean, quiet, one column. Ink on white, a single green for "available". */
:root {
  --bg: #ffffff;
  --ink: #1d1d1b;
  --ink-2: #5f5f5b;
  --ink-3: #8c8c86;
  --rule: #e6e6e1;
  --panel: #f5f5f2;
  --on: #16a34a;
  --off: #e4e4df;
  --stale: #c9c9c2;
  --bar: #1d1d1b;
  --accent: #1d1d1b;
  --accent-ink: #ffffff;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121211;
    --ink: #ececea;
    --ink-2: #a8a8a2;
    --ink-3: #7c7c76;
    --rule: #2a2a28;
    --panel: #1b1b1a;
    --on: #22c55e;
    --off: #2e2e2b;
    --stale: #4a4a46;
    --bar: #ececea;
    --accent: #ececea;
    --accent-ink: #121211;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.page {
  max-width: 720px;
  margin: 0 auto;
  padding: max(40px, env(safe-area-inset-top, 0px)) max(20px, env(safe-area-inset-right, 0px)) 56px max(20px, env(safe-area-inset-left, 0px));
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--ink-3); font-weight: 400; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* intro */
.intro { padding-bottom: 20px; }
h1 { font-size: clamp(36px, 7vw, 54px); line-height: 1.08; font-weight: 600; letter-spacing: -0.025em; margin: 0 0 10px; }
.lede { font-size: clamp(18px, 2.6vw, 22px); line-height: 1.4; color: var(--ink-2); margin: 0 0 18px; max-width: 30ch; }
.status { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 6px 12px; background: var(--panel); border-radius: 6px; font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); flex: none; }
.dot.live { background: var(--on); }
.dot.stale { background: #d97706; }

/* blocks */
.block { border-top: 1px solid var(--rule); padding: 22px 0; }
h2 { font-size: 16px; font-weight: 600; margin: 0 0 12px; letter-spacing: -0.005em; }
.stats p { margin: 0; color: var(--ink-2); line-height: 1.75; font-variant-numeric: tabular-nums; }
.stats b { color: var(--ink); font-weight: 600; }

.callout { background: var(--panel); border-top: 0; border-radius: 8px; padding: 18px 20px; margin: 4px 0 22px; }
.callout h2 { margin-bottom: 6px; }
.callout p { margin: 0 0 12px; color: var(--ink-2); max-width: 60ch; }
.callout .actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.button { display: inline-block; background: var(--accent); color: var(--accent-ink); text-decoration: none; font-weight: 500; font-size: 14px; padding: 9px 14px; border-radius: 6px; }
.button:hover { opacity: 0.88; }
.channels { font-size: 14px; color: var(--ink-2); }
.channels a { color: var(--ink); }

/* availability */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.section-head h2 { margin: 0; }
.search input { font: inherit; font-size: 14px; color: var(--ink); background: var(--bg); border: 1px solid var(--rule); border-radius: 6px; padding: 6px 10px; width: 180px; max-width: 100%; }
.legend { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 7px; }

.sq { display: inline-block; width: 13px; height: 13px; border-radius: 2px; background: var(--off); vertical-align: middle; }
.sq.on { background: var(--on); }
.sq.stale { background: transparent; border: 1px dashed var(--stale); }
.sq.new { box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--on); }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.grid { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
.grid th, .grid td { padding: 7px 4px; text-align: center; white-space: nowrap; }
.grid th { font-weight: 600; }
.grid thead tr.sizes th { font-weight: 400; font-size: 11px; color: var(--ink-3); padding-top: 0; border-bottom: 1px solid var(--rule); }
.grid thead tr.colours th.c { border-bottom: 1px solid var(--rule); }
.grid th.store, .grid td.store { text-align: left; padding-left: 8px; width: 34%; }
.grid th.since, .grid td.since { text-align: right; padding-right: 8px; color: var(--ink-2); }
.grid td.since { color: var(--ink-3); font-size: 13px; }
.grid tbody tr { border-bottom: 1px solid var(--rule); }
.grid tbody tr.has td.store { font-weight: 600; }
.grid tbody tr.has td.since { color: var(--on); font-weight: 500; }
.grid td.gap, .grid th.gap { width: 10px; padding: 0; }
.buy { margin: 14px 0 0; font-size: 14px; }
.buy a { font-weight: 500; }

/* recent */
.recent { list-style: none; margin: 0; padding: 0; }
.recent li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); font-size: 14px; }
.recent li:last-child { border-bottom: 0; }
.recent time { color: var(--ink-3); font-variant-numeric: tabular-nums; }
.recent .nil { display: block; color: var(--ink-3); border: 0; }

/* hour chart */
.hours { display: grid; grid-template-columns: repeat(24, minmax(0, 1fr)); gap: 3px; align-items: end; height: 110px; }
.hours span { background: var(--bar); border-radius: 2px 2px 0 0; min-height: 1px; opacity: 0.85; }
.hours span.zero { background: var(--rule); opacity: 1; }
.hours-axis { display: grid; grid-template-columns: repeat(4, 1fr) 0; font-size: 11px; color: var(--ink-3); margin-top: 6px; font-variant-numeric: tabular-nums; }

/* by store */
.bars { list-style: none; margin: 0; padding: 0; }
.bars li { display: grid; grid-template-columns: minmax(110px, 34%) minmax(0, 1fr) 36px; align-items: center; gap: 10px; padding: 3px 0; font-size: 14px; }
.bars .track { height: 8px; background: var(--off); border-radius: 4px; overflow: hidden; }
.bars .fill { display: block; height: 100%; background: var(--bar); border-radius: 4px; }
.bars .n { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.bars .nil { display: block; color: var(--ink-3); }

.notes p { color: var(--ink-2); margin: 0 0 10px; max-width: 64ch; }
.foot { border-top: 1px solid var(--rule); padding-top: 18px; font-size: 13px; color: var(--ink-3); }

@media (max-width: 520px) {
  .page { padding-top: max(28px, env(safe-area-inset-top, 0px)); }
  .grid { font-size: 13px; }
  .grid th.store, .grid td.store { width: auto; padding-left: 4px; }
  .grid th, .grid td { padding: 6px 2px; }
  .sq { width: 12px; height: 12px; }
  .grid th.since, .grid td.since { display: none; }
  .grid thead tr.sizes th { font-size: 10px; }
  .table-wrap { margin: 0; }
  .search input { width: 100%; }
  .search { flex: 1 1 100%; }
  .bars li { grid-template-columns: minmax(90px, 40%) minmax(0, 1fr) 30px; }
}
