/* BrokeBoyDeals — public site styles. Admin keeps assets/css/main.css. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --line: #e3e6eb;
  --text: #121821;
  --muted: #5d6675;
  --accent: #0f9f6e;
  --accent-ink: #ffffff;
  --accent-soft: #e3f6ee;
  --price: #0b8a5f;
  --warn: #a15c00;
  --warn-soft: #fff3df;
  --danger: #c4372b;
  --hot: #e5482f;
  --hot-soft: #ffe9e4;
  --great: #0f9f6e;
  --great-soft: #e3f6ee;
  --good: #2f6fd6;
  --good-soft: #e7efff;
  --fair: #6b7280;
  --fair-soft: #eef0f3;
  --img-bg: #ffffff;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14);
  --radius: 14px;
  --radius-sm: 9px;
  --max: 1320px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c1117; --surface: #141b24; --surface-2: #1b2430; --line: #263140; --text: #e8edf3;
    --muted: #97a3b4; --accent: #2fc48f; --accent-ink: #06261a; --accent-soft: #11342a; --price: #47d6a0;
    --warn: #f0b259; --warn-soft: #3a2a10; --danger: #ff7b6e; --hot: #ff7a5c; --hot-soft: #3b1d17;
    --great: #2fc48f; --great-soft: #11342a; --good: #7aa7ff; --good-soft: #17264a; --fair: #9aa4b2; --fair-soft: #222b37;
    --img-bg: #f4f5f7; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 34px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c1117; --surface: #141b24; --surface-2: #1b2430; --line: #263140; --text: #e8edf3;
  --muted: #97a3b4; --accent: #2fc48f; --accent-ink: #06261a; --accent-soft: #11342a; --price: #47d6a0;
  --warn: #f0b259; --warn-soft: #3a2a10; --danger: #ff7b6e; --hot: #ff7a5c; --hot-soft: #3b1d17;
  --great: #2fc48f; --great-soft: #11342a; --good: #7aa7ff; --good-soft: #17264a; --fair: #9aa4b2; --fair-soft: #222b37;
  --img-bg: #f4f5f7; --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 34px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.5 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.015em; margin: 0; }
button { font: inherit; color: inherit; }
.i { flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 100; background: var(--surface); padding: .5rem .8rem; border-radius: 8px; box-shadow: var(--shadow-lg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.only-dark { display: none; }
:root[data-theme="dark"] .only-dark { display: inline-flex; }
:root[data-theme="dark"] .only-light { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .only-dark { display: inline-flex; }
  :root:not([data-theme="light"]) .only-light { display: none; }
}

/* ── Header ─────────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 30; background: var(--surface); background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--line); }
.top-in { max-width: var(--max); margin: 0 auto; padding: .6rem 16px; display: flex; align-items: center; gap: .75rem; }
.logo { display: inline-flex; align-items: center; gap: .5rem; color: var(--text); font-weight: 800; letter-spacing: -.02em; flex: none; }
.logo:hover { text-decoration: none; }
.logo-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: .8rem; font-weight: 900; }
.logo-word { font-size: 1.05rem; }
.logo-word b { color: var(--accent); }
.search { flex: 1; display: flex; align-items: center; gap: .5rem; max-width: 620px; margin: 0 auto; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 .9rem; height: 40px; color: var(--muted); }
.search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; background: none; outline: none; color: var(--text); font-size: 16px; height: 100%; }
.search input::-webkit-search-cancel-button { display: none; }
.kbd { font: 600 .7rem ui-monospace, monospace; border: 1px solid var(--line); border-radius: 5px; padding: 0 .35rem; color: var(--muted); }
.top-actions { display: flex; gap: .25rem; flex: none; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 0; background: none; color: var(--text); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); text-decoration: none; }
.count { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--hot); color: #fff; font-size: .68rem; font-weight: 800; display: grid; place-items: center; }
.count[hidden] { display: none; }
.tabs { max-width: var(--max); margin: 0 auto; padding: 0 16px; display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { flex: none; padding: .5rem .75rem .6rem; color: var(--muted); font-weight: 600; font-size: .9rem; border-bottom: 2px solid transparent; }
.tabs a:hover { color: var(--text); text-decoration: none; }
.tabs a[aria-current="page"] { color: var(--text); border-color: var(--accent); }
@media (max-width: 720px) {
  .top-in { flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .kbd, .logo-word { display: none; }
  .logo { margin-right: auto; }
}
@media (max-width: 720px) and (min-width: 380px) { .logo-word { display: inline; } }

.aff-disclosure { max-width: var(--max); margin: 0 auto; padding: .45rem 16px; font-size: .76rem; color: var(--muted); }
.aff-disclosure p { margin: 0; }

/* ── Page frame ─────────────────────────────────────── */
.wrap { max-width: var(--max); margin: 0 auto; padding: 1rem 16px 3rem; }
.wrap.narrow { max-width: 780px; }
.page-head { margin: .5rem 0 1.25rem; }
.page-head h1 { font-size: clamp(1.5rem, 3vw, 2rem); }
.lede { color: var(--muted); font-size: 1.02rem; margin: .4rem 0 0; max-width: 70ch; }
.crumbs { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }

.hero { margin: .5rem 0 1.75rem; }
.hero h1 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); max-width: 22ch; font-weight: 800; }
.hero h1 span { color: var(--muted); font-weight: 700; }
.rail-head { display: flex; align-items: baseline; justify-content: space-between; margin: 1.5rem 0 .75rem; }
.rail-head h2 { font-size: 1.15rem; display: flex; align-items: center; gap: .4rem; }
.rail-head h2 .i { color: var(--hot); }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: .5rem; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.rail > .card { scroll-snap-align: start; }
@media (min-width: 1200px) { .rail { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; } }

/* ── Listing: filters + results ─────────────────────── */
.listing { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 24px; align-items: start; }
.filters { position: sticky; top: 112px; max-height: calc(100vh - 124px); overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; scrollbar-width: thin; }
.filters-head { display: none; }
.filters h2 { font-size: 1.1rem; }
.filter-form fieldset { border: 0; margin: 0 0 1rem; padding: 0; }
.filter-form legend, .facet h3 { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: .45rem; padding: 0; }
.filter-form select { width: 100%; height: 38px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 .6rem; font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: .3rem; font-size: .82rem; font-weight: 600; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span, a.chip { padding: .3rem .65rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); }
.chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.toggles { display: grid; gap: .5rem; }
.switch { display: flex; align-items: center; gap: .6rem; font-size: .9rem; cursor: pointer; }
.switch input { appearance: none; width: 34px; height: 20px; border-radius: 999px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background .15s; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(14px); }
.facet { border-top: 1px solid var(--line); padding-top: .9rem; margin-top: .9rem; }
.facet ul { list-style: none; margin: 0; padding: 0; }
.facet li a { display: flex; justify-content: space-between; gap: .5rem; padding: .32rem .45rem; margin: 0 -.45rem; border-radius: 7px; color: var(--text); font-size: .9rem; }
.facet li a:hover { background: var(--surface-2); text-decoration: none; }
.facet li a[aria-current] { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.facet .n { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .82rem; }
.more-link { display: inline-block; margin-top: .4rem; font-size: .85rem; font-weight: 600; }

.results-bar { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.results-bar .count { margin: 0; color: var(--muted); }
.results-bar .count strong { color: var(--text); }
.rss-link { margin-left: auto; color: var(--muted); display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; }
.rss-link:hover { background: var(--surface-2); color: var(--warn); }
.results-bar .filters-open { display: none; }
.badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-size: .72rem; font-weight: 800; padding: 0 5px; }
.active-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: .9rem; }
a.chip.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); font-size: .82rem; font-weight: 700; display: inline-flex; align-items: center; gap: .3rem; }
a.chip.on:hover { text-decoration: none; filter: brightness(.97); }
.clear { font-size: .82rem; font-weight: 600; margin-left: .25rem; }
.listing.loading .results { opacity: .55; transition: opacity .15s; pointer-events: none; }

@media (max-width: 900px) {
  .listing { grid-template-columns: minmax(0, 1fr); }
  .results-bar .filters-open { display: inline-flex; }
  .filters { position: fixed; inset: auto 0 0 0; top: auto; max-height: 82vh; z-index: 50; border-radius: 18px 18px 0 0; padding: 1rem 16px calc(1.25rem + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  body.filters-shown .filters { transform: none; }
  body.filters-shown::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 40; }
  .filters-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .75rem; }
}

/* ── Cards ──────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(208px, 1fr)); gap: 12px; }
@media (max-width: 480px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; } }
.card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .12s ease; min-width: 0; }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.card.is-ended { opacity: .7; }
.card-img { position: relative; display: grid; place-items: center; aspect-ratio: 1 / 1; background: var(--img-bg); overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.ph { font-size: 2.6rem; opacity: .8; }
.ph.big { font-size: 5rem; }
.pct { position: absolute; top: 8px; left: 8px; background: var(--hot); color: #fff; font-weight: 800; font-size: .78rem; padding: .15rem .45rem; border-radius: 7px; }
.card-body { padding: .7rem .8rem .2rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; min-width: 0; }
.meta { display: flex; align-items: center; gap: .3rem; font-size: .76rem; color: var(--muted); min-width: 0; white-space: nowrap; }
.meta > * { flex: none; }
.meta .store { font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; flex: 0 1 auto; min-width: 0; }
.meta .sep { opacity: .6; }
.score { margin-left: auto; display: inline-flex; align-items: center; gap: 2px; font-weight: 800; font-size: .76rem; padding: .1rem .42rem; border-radius: 7px; font-variant-numeric: tabular-nums; }
.s-hot { background: var(--hot-soft); color: var(--hot); }
.s-great { background: var(--great-soft); color: var(--great); }
.s-good { background: var(--good-soft); color: var(--good); }
.s-fair { background: var(--fair-soft); color: var(--fair); }
.title { font-size: .92rem; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.title a { color: var(--text); }
.prices { display: flex; align-items: baseline; flex-wrap: wrap; gap: .1rem .45rem; margin-top: auto; }
.price { font-size: 1.2rem; font-weight: 800; color: var(--price); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price.free { color: var(--hot); }
.price.unknown { font-size: .95rem; color: var(--muted); }
.was { color: var(--muted); font-size: .85rem; }
.save { font-size: .76rem; font-weight: 700; color: var(--price); background: var(--accent-soft); padding: .05rem .4rem; border-radius: 6px; }
.flags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.flag { font-size: .7rem; font-weight: 700; padding: .12rem .4rem; border-radius: 6px; background: var(--surface-2); color: var(--muted); display: inline-flex; align-items: center; gap: 3px; }
.flag.low { background: var(--great-soft); color: var(--great); }
.flag.warn { background: var(--warn-soft); color: var(--warn); }
.flag.urgent { background: var(--hot-soft); color: var(--hot); }
.flag.ended { background: var(--fair-soft); color: var(--fair); }
.code { display: inline-flex; align-items: center; gap: 4px; border: 1px dashed var(--accent); background: var(--accent-soft); color: var(--accent); border-radius: 6px; font: 700 .72rem ui-monospace, SFMono-Regular, Menlo, monospace; padding: .1rem .4rem; cursor: pointer; }
.code.copied { border-style: solid; }
.card-actions { display: flex; gap: 6px; padding: .55rem .8rem .8rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; height: 38px; padding: 0 1rem; border-radius: 10px; border: 1px solid transparent; font-weight: 700; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { text-decoration: none; }
.btn-go { background: var(--accent); color: var(--accent-ink); flex: 1; }
.btn-go:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-lg { height: 48px; font-size: 1rem; padding: 0 1.4rem; }
.card-actions .btn { height: 36px; }
.save-btn { border: 1px solid var(--line); width: 36px; height: 36px; }
.save-btn[aria-pressed="true"] { color: var(--hot); border-color: var(--hot); background: var(--hot-soft); }
.save-btn[aria-pressed="true"] svg path { fill: currentColor; }
.save-btn.wide { width: auto; height: 48px; padding: 0 1.1rem; }
.more { text-align: center; margin: 1.5rem 0 .5rem; }
.pager { display: flex; justify-content: center; gap: 1rem; align-items: center; color: var(--muted); font-size: .88rem; margin-top: 1rem; }
.js .pager { display: none; }
.empty { text-align: center; padding: 3rem 1rem; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }
.empty h1, .empty h2 { font-size: 1.3rem; margin-bottom: .4rem; }
.empty p { color: var(--muted); }
.alert-cta { margin-top: 1.25rem; padding: .8rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: .92rem; }

/* ── Deal page ──────────────────────────────────────── */
.deal { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
@media (max-width: 820px) { .deal { grid-template-columns: minmax(0, 1fr); padding: 14px; } }
.deal-media { background: var(--img-bg); border-radius: 12px; display: grid; place-items: center; aspect-ratio: 1 / 1; overflow: hidden; }
.deal-media img { width: 100%; height: 100%; object-fit: contain; padding: 18px; }
.deal-info h1 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); margin: .35rem 0 .8rem; }
.deal-info .meta { font-size: .85rem; }
.deal-info .meta .store { max-width: none; }
.deal-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .5rem .75rem; margin-bottom: .9rem; }
.deal-price .price { font-size: 2.2rem; }
.deal-price .was { font-size: 1.05rem; }
.pct-pill { background: var(--hot); color: #fff; font-weight: 800; border-radius: 8px; padding: .1rem .5rem; }
.code.big { font-size: .95rem; padding: .5rem .8rem; border-radius: 10px; margin-bottom: 1rem; }
.code.big span { font-family: ui-sans-serif, system-ui; font-weight: 600; opacity: .8; }
.deal-cta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: .6rem; }
.deal-cta .btn-go { flex: 1 1 260px; }
.deal-cta .btn-ghost { height: 48px; }
.fine { font-size: .8rem; color: var(--muted); }
.fine .i { vertical-align: -2px; }
.notice { background: var(--warn-soft); color: var(--warn); border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 600; }
.scorecard { display: flex; gap: 1rem; margin-top: 1.25rem; padding: 1rem; border-radius: 12px; background: var(--surface-2); }
.scorecard h2 { font-size: 1.05rem; margin-bottom: .4rem; }
.score-big { flex: none; width: 76px; height: 76px; border-radius: 18px; display: grid; place-items: center; align-content: center; background: var(--fair-soft); color: var(--fair); }
.scorecard.s-hot .score-big { background: var(--hot-soft); color: var(--hot); }
.scorecard.s-great .score-big { background: var(--great-soft); color: var(--great); }
.scorecard.s-good .score-big { background: var(--good-soft); color: var(--good); }
.scorecard { background: var(--surface-2); color: var(--text); }
.score-big span { font-size: 1.9rem; font-weight: 900; line-height: 1; }
.score-big small { font-size: .7rem; font-weight: 700; opacity: .8; }
.reasons { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: .87rem; }
.reasons li { display: flex; justify-content: space-between; gap: 1rem; }
.reasons b { font-variant-numeric: tabular-nums; }
.reasons .pos b { color: var(--price); }
.reasons .neg b { color: var(--danger); }
.panel { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; }
.panel h2, .panel-flat h2 { font-size: 1.1rem; margin-bottom: .4rem; }
.panel-flat { margin-top: 18px; }
.ok { color: var(--price); }
.chart { margin: .6rem 0 0; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .grid { stroke: var(--line); stroke-dasharray: 3 4; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .axis.low { fill: var(--price); font-weight: 700; }
.chart .dot-low { fill: var(--price); }
.alts { width: 100%; border-collapse: collapse; font-size: .92rem; }
.alts th, .alts td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); }
.alts th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.alts tr.ended td { color: var(--muted); }

/* ── Stores, alerts, prose ──────────────────────────── */
.store-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.store-grid a { display: grid; gap: 2px; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: var(--text); }
.store-grid a:hover { border-color: var(--accent); text-decoration: none; }
.store-grid span { color: var(--price); font-weight: 700; font-size: .88rem; }
.store-grid small { color: var(--muted); font-size: .78rem; }
.alert-form { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 10px; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.alert-form label { display: grid; gap: 4px; font-size: .82rem; font-weight: 700; color: var(--muted); }
.alert-form input, .alert-form select { height: 40px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); padding: 0 .7rem; font-size: 16px; }
.alert-form .btn { height: 40px; }
@media (max-width: 640px) { .alert-form { grid-template-columns: 1fr 1fr; } .alert-form label:first-child, .alert-form .btn { grid-column: 1 / -1; } }
.alert-list { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 8px; }
.alert-list li { display: flex; align-items: center; gap: .75rem; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; }
.alert-list .q { font-weight: 700; }
.alert-list .hits { margin-left: auto; font-size: .85rem; }
.link { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font-weight: 600; }
.prose h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: .5rem; }
.prose h2 { font-size: 1.15rem; margin: 1.8rem 0 .4rem; }
.prose p, .prose li { color: var(--muted); line-height: 1.7; }
.prose li { margin: .3rem 0; }
.prose b, .prose strong { color: var(--text); }
.note { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1.1rem; margin: 1.5rem 0; }
.note p { margin: 0; }

/* ── Footer, toasts ─────────────────────────────────── */
.foot { border-top: 1px solid var(--line); background: var(--surface); margin-top: 2rem; }
.foot-in { max-width: var(--max); margin: 0 auto; padding: 2rem 16px 1rem; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 2rem; }
@media (max-width: 760px) { .foot-in { grid-template-columns: 1fr; } }
.foot p { max-width: 62ch; }
.foot-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1rem; align-content: start; font-size: .9rem; }
.foot-links a { color: var(--muted); display: inline-flex; align-items: center; gap: .3rem; }
.foot-links a:hover { color: var(--text); }
.foot-copy { text-align: center; color: var(--muted); font-size: .8rem; margin: 0; padding: 0 16px 1.5rem; }
.toasts { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: .7rem 1rem; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: .9rem; pointer-events: auto; animation: rise .2s ease; }
.toast a { color: inherit; text-decoration: underline; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

@media (max-width: 480px) { .card .meta .age { display: none; } }
