:root {
  --bg: #f2f5f7;
  --surface: #ffffff;
  --ink: #14232e;
  --muted: #5a6b78;
  --line: #dbe2e8;
  --hero: #0e2a3a;
  --hero-ink: #ffffff;
  --hero-muted: #b4c7d3;
  --accent: #0e6f68;
  --accent-ink: #ffffff;
  --chip: #e7eef2;
  --hot: #1f8a5b;
  --hot-tint: rgba(31, 138, 91, 0.09);
  --te: #c98a1b;
  --te-tint: rgba(201, 138, 27, 0.10);
  --ny: #b5452f;
  --radius: 10px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1419;
    --surface: #152028;
    --ink: #e7edf1;
    --muted: #94a5b1;
    --line: #26343e;
    --hero: #0a1f2b;
    --hero-muted: #8fa6b5;
    --accent: #4fc3b8;
    --accent-ink: #06201d;
    --chip: #1d2c36;
    --hot: #3fbf86;
    --hot-tint: rgba(63, 191, 134, 0.12);
    --te: #e0a93f;
    --te-tint: rgba(224, 169, 63, 0.12);
    --ny: #ef8b73;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--font); }
.wrap { max-width: 1240px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }

.hero { background: var(--hero); color: var(--hero-ink); padding-block: 36px 40px; }
.eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--hero-muted); }
.hero h1 { margin: 0 0 8px; font-size: clamp(32px, 5vw, 46px); line-height: 1.1; font-weight: 700; }
.hero-sub { margin: 0; color: var(--hero-muted); font-size: 16px; max-width: 70ch; }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 28px; padding-block: 28px 56px; align-items: start; }
@media (max-width: 900px) { .layout { grid-template-columns: minmax(0, 1fr); } }

.filters-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 16px; }
@media (max-width: 900px) { .filters-box { position: static; } }
.filters-box > summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; }
.filters-box > summary::-webkit-details-marker { display: none; }
.filters-box[open] > summary { margin-bottom: 14px; }
.field { border: 0; padding: 0; margin: 0 0 18px; min-width: 0; }
.field > label, .field > legend { display: block; padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
input[type="search"], select { width: 100%; font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
input[type="search"]:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible, input[type="checkbox"]:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.checks { display: flex; flex-direction: column; gap: 8px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; }
.check input { margin-top: 3px; accent-color: var(--accent); }
.check small { display: block; color: var(--muted); font-size: 12px; }
.count { font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.count::before { content: "("; } .count::after { content: ")"; }
.count:empty { display: none; }

.btn { font: inherit; font-weight: 600; font-size: 14px; border-radius: 8px; padding: 9px 16px; cursor: pointer; text-decoration: none; display: inline-block; border: 1px solid transparent; }
.btn-primary { background: var(--hero); color: #fff; }
.btn-primary:hover { filter: brightness(1.25); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--chip); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { background: var(--accent); color: var(--accent-ink); } }

.legend { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.legend p { margin: 0 0 6px; display: flex; gap: 8px; align-items: center; }
.swatch { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.swatch-hot { background: var(--hot-tint); border-left: 4px solid var(--hot); }
.swatch-te { background: var(--te-tint); border-left: 4px solid var(--te); }

.results-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.results-head h2 { margin: 0; font-size: 22px; }
.results-head h2 span { font-size: 14px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.sort { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.sort select { width: auto; }

.list { display: flex; flex-direction: column; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: var(--radius); padding: 20px 22px; min-width: 0; }
.card.is-te { background: linear-gradient(var(--te-tint), var(--te-tint)), var(--surface); border-left-color: var(--te); }
.card.is-hot { background: linear-gradient(var(--hot-tint), var(--hot-tint)), var(--surface); border-left-color: var(--hot); }
.card h3 { margin: 0 0 6px; font-size: 20px; line-height: 1.3; text-wrap: balance; overflow-wrap: anywhere; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.badge { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); background: var(--chip); white-space: nowrap; }
.badge-hot { border-color: var(--hot); }
.badge-te { border-color: var(--te); }
.badge-ny { background: var(--ny); border-color: var(--ny); color: #fff; }

.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; margin: 0 0 14px; }
@media (max-width: 720px) { .facts { grid-template-columns: minmax(0, 1fr); } }
.fact { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.fact dt { color: var(--muted); font-weight: 600; margin: 0; }
.fact dd { margin: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.soon { color: var(--ny); font-weight: 600; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

.desc { margin: 0 0 6px; color: var(--ink); max-width: 90ch; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 14px; }
.desc.open { display: block; -webkit-line-clamp: unset; overflow: visible; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 14px; }

.empty { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 32px; color: var(--muted); text-align: center; }
.foot { margin-top: 24px; font-size: 13px; color: var(--muted); max-width: 80ch; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .92em; }
