/* Bonus: deal overview. World: Veilingklok (Aalsmeer auction clock). */

@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("../fonts/barlow-condensed-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Barlow"; src: url("../fonts/barlow-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }

@property --p { syntax: "<number>"; inherits: false; initial-value: 0; }

:root {
  /* Hall: the auction-hall green that owns the shell */
  --hall: #0E3B2E;
  --hall-deep: #092A20;
  --hall-raise: #164B3B;
  --hall-line: #2A5E4E;
  --hall-ink: #FFFFFF;
  --hall-ink-2: #C7DBD1;
  --lamp-off-hall: #2F6454;
  /* Lamp: reserved for the lit arc and live state */
  --lamp: #E8341C;
  --lamp-ink: #C42A14;
  --lamp-off: #CBD6D0;
  /* Ground and ink */
  --ground: #F3F5F2;
  --surface: #FFFFFF;
  --ink: #10201A;
  --ink-2: #4A5B53;
  --ink-3: #5A6A62;
  --line: #DCE3DF;
  --line-strong: #C3CEC8;
  /* States */
  --amber-ink: #8A5200;
  --amber-bg: #FFF0D4;
  --amber-hall: #F2B233;

  --font-num: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-text: "Barlow", system-ui, sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --gutter: 16px;
  --bar-h: 68px;
  --radius: 12px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; color-scheme: light; scrollbar-color: var(--line-strong) var(--ground); }
body {
  min-height: 100dvh;
  background: var(--ground);
  color: var(--ink);
  font: 400 16px/1.4 var(--font-text);
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
::selection { background: var(--hall); color: #fff; }
a { color: inherit; text-underline-offset: 3px; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
svg.icon { width: 20px; height: 20px; flex: none; }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 4px; }
.hall :focus-visible, .controls :focus-visible { outline-color: #fff; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 50; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; }
.skip:focus { top: 8px; }

/* ---------- Hall header ---------- */
.hall { background: var(--hall); color: var(--hall-ink); }
.hall-in { padding: 14px var(--gutter) 0; max-width: 1040px; margin: 0 auto; }
.hall-bar { display: flex; align-items: baseline; gap: 12px; }
.hall-bar .week { margin-left: auto; }
.brand { font: 700 24px/1 var(--font-num); letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.week { font-size: 15px; color: var(--hall-ink-2); }
.week-no { font: 600 17px/1 var(--font-num); color: #fff; letter-spacing: .02em; margin-right: 4px; }

.lead { display: grid; grid-template-columns: 148px 1fr; gap: 16px; align-items: center; padding: 18px 0 16px; }
.clock { position: relative; width: 148px; aspect-ratio: 1; }
.clock-lamps { width: 100%; height: 100%; display: block; overflow: visible; }
.lamp { fill: var(--lamp-off-hall); }
.lamp.stop { r: 5.6px; }
.lamp.on { fill: var(--lamp); animation: lamp-on 180ms linear both; animation-delay: calc(var(--n) * 22ms + 120ms); }
@keyframes lamp-on { from { fill: var(--lamp-off-hall); } to { fill: var(--lamp); } }
.clock-face { position: absolute; inset: 22px; border-radius: 50%; background: var(--hall-deep); display: grid; place-content: center; text-align: center; box-shadow: inset 0 2px 6px rgb(0 0 0 / .35); }
.clock-pct { font: 700 50px/.9 var(--font-num); letter-spacing: -.01em; }
.clock-pct span { font-size: 26px; font-weight: 600; margin-left: 1px; }
.clock-pct.is-none { color: var(--hall-ink-2); }
.clock-cap { font: 500 13px/1.2 var(--font-text); color: var(--hall-ink-2); margin-top: 4px; letter-spacing: .02em; }

.lead-text { min-width: 0; }
.lead-name { font: 600 23px/1.05 var(--font-num); letter-spacing: .005em; text-wrap: balance; }
.lead-name .size { font-weight: 500; color: var(--hall-ink-2); white-space: nowrap; }
.lead-meta { font-size: 15px; color: var(--hall-ink-2); margin-top: 6px; }
.lead-meta .chain { color: #fff; font-weight: 600; }
.lead-price { margin-top: 8px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sample-pill { display: inline-block; padding: 3px 8px; border: 1px solid var(--hall-line); border-radius: 999px; font-size: 12px; font-weight: 500; color: var(--hall-ink-2); vertical-align: 3px; letter-spacing: .02em; }
.lead-price b { font-size: 32px; line-height: 1; font-weight: 700; }
.lead-price .each { font-size: 15px; color: var(--hall-ink-2); margin-left: -2px; }
.lead-price s { font-size: 17px; color: var(--hall-ink-2); }
.add-lead { margin-top: 12px; }
.btn-lead { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px 0 10px; border-radius: 999px; border: 1.5px solid var(--hall-ink-2); background: transparent; color: #fff; font-weight: 600; font-size: 15px; }
.btn-lead .icon { width: 18px; height: 18px; margin-right: 6px; }
.btn-lead span { display: inline-flex; align-items: center; }
.btn-lead[aria-pressed="true"] { background: #fff; color: var(--hall); border-color: #fff; }
.btn-lead:hover { border-color: #fff; }

.chainboard { display: none; }
.fresh { display: flex; align-items: center; gap: 10px; min-height: 48px; border-top: 1px solid var(--hall-line); font-size: 14px; color: var(--hall-ink-2); text-decoration: none; }
.fresh-dot { width: 9px; height: 9px; border-radius: 50%; background: #7FD1A8; flex: none; }
.fresh.has-issue .fresh-dot { background: var(--amber-hall); }
.fresh-text { flex: 1; }
.fresh-go { width: 18px; height: 18px; opacity: .8; }
.fresh:hover .fresh-text { color: #fff; }

/* ---------- Controls: bottom bar on phones, toolbar on desktop ---------- */
.controls { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--hall); color: #fff; padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid var(--hall-line); }
.controls-in { display: grid; grid-template-columns: repeat(5, 1fr); max-width: 1040px; margin: 0 auto; height: var(--bar-h); }
.ctl { display: grid; grid-template-columns: auto; justify-items: center; align-content: center; gap: 1px; text-decoration: none; padding: 6px 4px; position: relative; min-width: 0; }
.ctl .icon { width: 20px; height: 20px; color: var(--hall-ink-2); margin-bottom: 2px; }
.ctl-val { font: 600 15px/1.1 var(--font-num); letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.ctl-lab { font-size: 12px; line-height: 1.2; color: var(--hall-ink-2); }
.ctl.is-set .icon { color: #fff; }
.ctl.is-set .ctl-val { text-decoration: underline; text-decoration-color: var(--amber-hall); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ctl:active { background: var(--hall-raise); }
.list-count { display: inline-block; min-width: 1ch; }
.list-count.bump { animation: bump 420ms var(--ease-out); }
@keyframes bump { 30% { transform: scale(1.5); color: var(--amber-hall); } }

/* ---------- List ---------- */
.deals-wrap { max-width: 1040px; margin: 0 auto; outline: none; }
/* Sticks to the top while the list scrolls under it (below the toolbar on desktop). */
.finder { position: sticky; top: 0; z-index: 10; padding: 12px var(--gutter) 10px; background: var(--ground); }
.finder .search { margin-top: 0; background: var(--surface); }
.is-quiet .dial::before, .is-quiet .lamp.on { animation: none; }
.list-head { padding: 6px var(--gutter) 10px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 12px; }
.per-label { margin-left: auto; font-size: 13px; color: var(--ink-2); order: 2; }
.chips { order: 3; flex-basis: 100%; }
.list-title { font: 600 20px/1.2 var(--font-num); letter-spacing: .01em; }
.list-title .num { font-weight: 700; }
.list-title .of, .list-title .list-sort { font-weight: 500; color: var(--ink-2); }
.chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; padding: 0 8px 0 12px; border-radius: 999px; background: var(--hall); color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
.chip .icon { width: 16px; height: 16px; color: var(--hall-ink-2); }
.chip:hover .icon { color: #fff; }

.cols { display: none; }
.deals { list-style: none; padding: 0; background: var(--surface); border-block: 1px solid var(--line); }
.deal { position: relative; border-bottom: 1px solid var(--line); }
.deal:last-child { border-bottom: 0; }
.deal summary {
  list-style: none; cursor: pointer;
  display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center;
  padding: 10px calc(var(--gutter) + 50px) 10px var(--gutter);
  min-height: 68px; gap: 10px;
}
.deal summary::-webkit-details-marker { display: none; }
.deal summary:hover { background: #F8FAF8; }
.deal details[open] summary { background: #F8FAF8; }
.deal summary:focus-visible { outline-offset: -2px; border-radius: 0; }

.dial { --seg: repeating-conic-gradient(#000 0 15deg, transparent 15deg 18deg); --hole: radial-gradient(circle, transparent 17.5px, #000 18px); position: relative; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; }
.dial::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(var(--lamp) calc(var(--p) * 1%), var(--lamp-off) 0);
  -webkit-mask: var(--seg), var(--hole); -webkit-mask-composite: source-in;
  mask: var(--seg), var(--hole); mask-composite: intersect;
  --p: var(--v);
  animation: sweep 900ms var(--ease-out) both;
  animation-delay: calc(min(var(--i), 14) * 40ms + 80ms);
}
@keyframes sweep { from { --p: 0; } }
.dial b { position: relative; font: 700 19px/1 var(--font-num); letter-spacing: -.01em; }
.dial-sm { width: 36px; height: 36px; }
.dial-sm { --hole: radial-gradient(circle, transparent 12.5px, #000 13px); }
.dial-sm::before { animation: none; }
.dial-sm b { font-size: 14px; }

.deal-main { min-width: 0; display: grid; gap: 3px; }
.deal-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.size { font-weight: 400; color: var(--ink-2); white-space: nowrap; }
.deal-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; font-size: 14px; color: var(--ink-2); }
.deal-meta .chain { font-weight: 600; color: var(--ink); }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; line-height: 1; padding: 4px 7px; border-radius: 6px; }
.tag .icon { width: 13px; height: 13px; }
.tag-today { background: var(--amber-bg); color: var(--amber-ink); }
.tag-watch { color: var(--lamp-ink); padding-left: 0; }
.tag-watch::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lamp); margin-right: 1px; }
.deal-until, .deal-unit { display: none; }

.deal-price { display: grid; justify-items: end; text-align: right; gap: 1px; }
.deal-price b { font-size: 22px; font-weight: 700; line-height: 1; }
.deal-price s { font-size: 14px; color: var(--ink-3); }
.deal-price .each { font: 500 13px var(--font-text); color: var(--ink-2); }
.deal-price .per { font-size: 14px; color: var(--ink-2); }
.no-price { font: 500 13px/1.2 var(--font-text); color: var(--ink-3); }
.lead-price .no-price { font-size: 15px; color: var(--hall-ink-2); }

.deal-more { padding: 0 var(--gutter) 16px calc(var(--gutter) + 60px); background: #F8FAF8; }
.how { font-size: 15px; max-width: 60ch; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin-top: 12px; }
.facts dt { font-size: 13px; color: var(--ink-3); }
.facts dd { font-size: 15px; font-weight: 500; }
.facts dd.num { font-size: 17px; }
.facts s { color: var(--ink-3); font-weight: 400; }

.add { position: absolute; top: 12px; right: calc(var(--gutter) - 2px); }
.btn-add {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--hall);
  transition: background-color 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 160ms var(--ease-out);
}
.btn-add:hover { border-color: var(--hall); }
.btn-add:active { transform: scale(.92); }
.btn-add[aria-pressed="true"] { background: var(--hall); border-color: var(--hall); color: #fff; }
.if-on { display: none !important; }
[aria-pressed="true"] .if-on { display: inline-flex !important; }
[aria-pressed="true"] .if-off { display: none !important; }
.btn-add .if-off, .btn-add .if-on { display: grid; }
.btn-add.pop { animation: pop 380ms var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.12); box-shadow: 0 0 0 6px rgb(14 59 46 / .16); } }

.sample-note { padding: 16px var(--gutter) 28px; font-size: 13px; color: var(--ink-3); }

/* Loading: the list holds still while the clock's lamps run */
.is-loading .deals { opacity: .45; transition: opacity 160ms; }
.is-loading .lamp { animation: chase 1s linear infinite; animation-delay: calc(var(--n) * -25ms); fill: var(--lamp-off-hall); }
@keyframes chase { 0%, 88% { fill: var(--lamp-off-hall); } 92% { fill: var(--lamp); } 100% { fill: var(--lamp-off-hall); } }

/* States */
.state { margin: 8px var(--gutter) 0; padding: 28px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); text-align: center; display: grid; justify-items: center; gap: 10px; }
.state h2 { font: 600 22px/1.15 var(--font-num); }
.state p { color: var(--ink-2); max-width: 44ch; font-size: 15px; }
.state-icon { width: 28px; height: 28px; color: var(--amber-ink); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--hall); background: var(--surface); color: var(--hall); font-weight: 600; font-size: 16px; text-decoration: none; }
.btn .icon { width: 18px; height: 18px; }
.btn-primary { background: var(--hall); color: #fff; }
.btn-primary:hover { background: var(--hall-raise); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--ground); }
.btn-icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2); }
.btn-icon:hover { background: var(--ground); color: var(--ink); }

/* ---------- Sheets ---------- */
.sheet { padding: 0; border: 0; background: var(--surface); color: var(--ink); width: 100%; max-width: 100%; max-height: 88dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; box-shadow: 0 -8px 32px rgb(9 42 32 / .18); }
.sheet[open] { display: flex; }
.sheet::backdrop { background: rgb(9 42 32 / .55); }
.js .sheet[open] { animation: rise 320ms var(--ease-out); }
@keyframes rise { from { transform: translateY(24px); opacity: .4; } }
.sheet[open] { position: fixed; inset: auto 0 0 0; z-index: 40; }
.sheet-form { display: flex; flex-direction: column; width: 100%; max-height: 88dvh; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 20px; border-bottom: 1px solid var(--line); min-height: 60px; }
.sheet-head h2 { font: 600 22px/1 var(--font-num); letter-spacing: .01em; outline: none; }
.sheet-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.sheet-x:hover { background: var(--ground); color: var(--ink); }
.sheet-body { overflow-y: auto; padding: 8px 20px 20px; overscroll-behavior: contain; }
.sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet-foot .btn-quiet:first-child { margin-right: auto; }

.options, .group { border: 0; padding: 0; min-width: 0; }
.group { margin-top: 18px; }
.group legend { font: 600 17px/1.2 var(--font-num); letter-spacing: .02em; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.option, .check { display: grid; grid-template-columns: 24px 1fr; gap: 2px 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.option:last-of-type, .check:last-of-type { border-bottom: 0; }
.option span, .check b { font-weight: 600; font-size: 16px; }
.option small { grid-column: 2; font-size: 14px; color: var(--ink-2); }
.check span { display: grid; gap: 2px; }
.check small { font-size: 14px; color: var(--ink-2); }
input[type="radio"], input[type="checkbox"] { accent-color: var(--hall); width: 20px; height: 20px; margin: 2px 0 0; }
.status-bad { color: var(--amber-ink) !important; display: block; }
.chain-row.is-unavailable { cursor: default; }
.chain-row.is-unavailable b { color: var(--ink-2); }
.status-bad .icon { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; }

.search { display: flex; align-items: center; gap: 10px; margin-top: 10px; padding: 0 14px; min-height: 48px; border: 1.5px solid var(--line-strong); border-radius: 999px; color: var(--ink-2); }
.search:focus-within { border-color: var(--hall); }
.search input { flex: 1; border: 0; outline: 0; background: transparent; min-height: 44px; color: var(--ink); font-size: 16px; }
.search input::placeholder { color: var(--ink-3); }
.search input::-webkit-search-cancel-button { display: none; }
.search-x { width: 36px; height: 36px; margin-right: -8px; display: grid; place-items: center; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); }
.search-x:hover { background: var(--ground); color: var(--ink); }
.search-x .icon { width: 18px; height: 18px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); font-size: 15px; font-weight: 500; }
.pill input:checked + span { background: var(--hall); border-color: var(--hall); color: #fff; }
.pill input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; }

.check-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.check-row .check { border-bottom: 0; }
.btn-text { min-height: 44px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--hall); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 3px; }
.btn-text:hover { background: var(--ground); }
.state-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

.sheet-intro { margin-top: 8px; font-size: 15px; color: var(--ink-2); }
.watch-add { display: flex; gap: 8px; margin-top: 14px; }
.watch-add .search { flex: 1; min-width: 0; margin-top: 0; }
.watch-add .btn { min-height: 48px; }
.watch-note { margin-top: 10px; font-size: 14px; color: var(--ink-3); }
.watchlist { list-style: none; padding: 0; margin-top: 10px; }
.watchlist li { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.watchlist li:last-child { border-bottom: 0; }
.wl-main { display: grid; gap: 2px; min-width: 0; }
.wl-main b { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.wl-main small { font-size: 13px; color: var(--ink-2); }

.mylist { list-style: none; padding: 0; }
.mylist li { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 44px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.ml-main { display: grid; gap: 2px; min-width: 0; }
.ml-main b { font-weight: 600; font-size: 15px; line-height: 1.3; }
.ml-main small { font-size: 13px; color: var(--ink-2); }
.ml-price { font-size: 19px; font-weight: 700; }
.totals { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; padding: 14px 16px; background: var(--ground); border-radius: var(--radius); }
.totals dt { font-size: 13px; color: var(--ink-2); }
.totals dd { font-size: 28px; font-weight: 700; line-height: 1.05; }
.totals .saved dd { color: var(--hall); }
.totals-note { margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.mylist-empty { padding: 24px 0 8px; color: var(--ink-2); font-size: 15px; }
.icon.inline { width: 16px; height: 16px; vertical-align: -3px; }

/* Toast */
.toast { position: fixed; left: 12px; right: 12px; bottom: calc(var(--bar-h) + env(safe-area-inset-bottom) + 10px); z-index: 30; display: flex; align-items: center; gap: 12px; padding: 6px 6px 6px 16px; min-height: 52px; border-radius: 14px; background: var(--ink); color: #fff; font-size: 15px; box-shadow: 0 8px 24px rgb(9 42 32 / .28); max-width: 520px; margin: 0 auto; }
.toast[hidden] { display: none; }
.toast span { flex: 1; min-width: 0; }
.toast-undo { min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--amber-hall); font-weight: 600; }
.toast-undo:hover { background: rgb(255 255 255 / .08); }
.toast.show { animation: rise 260ms var(--ease-out); }

/* ---------- Wider screens ---------- */
@media (min-width: 600px) {
  :root { --gutter: 24px; }
  .lead { grid-template-columns: 168px 1fr; gap: 24px; }
  .clock { width: 168px; }
  .clock-face { inset: 24px; }
  .clock-pct { font-size: 58px; }
  .lead-name { font-size: 28px; }
  .deals { border: 1px solid var(--line); border-radius: var(--radius); margin: 0 var(--gutter); overflow: hidden; }
  .state { margin-inline: var(--gutter); }
  .sheet { max-width: 520px; margin: auto; border-radius: 18px; }
  .sheet[open] { inset: 0; }
  .js .sheet[open] { animation-name: settle; }
  @keyframes settle { from { transform: translateY(12px) scale(.98); opacity: 0; } }
}

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .hall-in { padding-top: 20px; }
  .lead { grid-template-columns: 196px minmax(0, 1fr) 300px; gap: 32px; padding: 24px 0 28px; }
  .fresh { display: none; }
  .chainboard { display: block; align-self: stretch; border-left: 1px solid var(--hall-line); padding-left: 28px; }
  .chainboard-title { font: 600 16px/1.2 var(--font-num); letter-spacing: .02em; color: var(--hall-ink-2); margin-bottom: 6px; }
  .chainboard ul { list-style: none; padding: 0; }
  .chainboard a { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; min-height: 30px; text-decoration: none; border-radius: 6px; }
  .chainboard a:hover .cb-name { text-decoration: underline; }
  .cb-dot { width: 8px; height: 8px; border-radius: 50%; background: #7FD1A8; }
  .is-stale .cb-dot, .is-failed .cb-dot { background: var(--amber-hall); }
  .is-unavailable .cb-dot { background: transparent; box-shadow: inset 0 0 0 1.5px var(--hall-ink-2); }
  .is-unavailable .cb-name { color: var(--hall-ink-2); }
  .cb-name { font-size: 15px; font-weight: 500; }
  .cb-when { font-size: 16px; color: var(--hall-ink-2); }
  .is-stale .cb-when, .is-failed .cb-when { color: var(--amber-hall); }
  .clock { width: 196px; }
  .clock-face { inset: 28px; }
  .clock-pct { font-size: 70px; }
  .clock-pct span { font-size: 34px; }
  .lead-name { font-size: 36px; max-width: 22ch; }
  .lead-price b { font-size: 40px; }

  .controls { position: sticky; top: 0; bottom: auto; border-top: 1px solid var(--hall-line); box-shadow: 0 6px 18px rgb(9 42 32 / .16); }
  .controls-in { display: flex; gap: 4px; height: 56px; padding: 0 var(--gutter); }
  .ctl { grid-template-columns: auto auto auto; grid-template-areas: "icon lab val"; align-items: center; gap: 8px; padding: 0 14px; border-radius: 8px; margin: 8px 0; }
  .ctl .icon { grid-area: icon; margin: 0; }
  .ctl-lab { grid-area: lab; font-size: 15px; }
  .ctl-val { grid-area: val; font-size: 17px; }
  .ctl:hover { background: var(--hall-raise); }
  .ctl-watch { margin-left: auto; } /* Watchlist and My list sit together on the right */

  .finder { top: 57px; padding-top: 16px; } /* the toolbar: 56px plus its 1px top border */
  .finder .search { max-width: 560px; }
  .list-head { padding-top: 10px; }
  .list-title { font-size: 24px; }
  .cols, .deal summary { grid-template-columns: 56px minmax(0, 1fr) 110px 110px 104px; }
  .per-label { display: none; }
  .cols { display: grid; gap: 16px; padding: 0 85px 8px 21px; font-size: 13px; color: var(--ink-2); font-weight: 500; margin: 0 var(--gutter); }
  .cols span:nth-child(n+3) { text-align: right; }
  .cols span:last-child { display: none; }
  .deal summary { gap: 16px; padding: 12px 84px 12px 20px; }
  .dial { width: 56px; height: 56px; }
  .dial { --hole: radial-gradient(circle, transparent 21px, #000 21.5px); }
  .dial b { font-size: 22px; }
  .deal-name { font-size: 17px; }
  .deal-until, .deal-unit { display: block; text-align: right; font-size: 18px; color: var(--ink-2); }
  .deal-unit span { font-size: 14px; }
  .deal-price .per { display: none; }
  .deal-price b { font-size: 24px; }
  .add { top: 16px; right: 20px; }
  .deal-more { padding: 0 84px 18px 92px; }
  .facts { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .toast { bottom: 24px; }
}

@media (hover: none) { .deal summary:hover { background: transparent; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .is-loading .lamp { animation: none; }
}
