:root {
  --bg: #f6f7f2;
  --surface: #ffffff;
  --surface-muted: #eff1ea;
  --ink: #1c221d;
  --muted: #667068;
  --line: #dfe3dc;
  --accent: #176a46;
  --accent-strong: #0c4b30;
  --good-bg: #dff3e8;
  --good: #145c3d;
  --warn-bg: #fff0c7;
  --warn: #7b5200;
  --danger-bg: #fde3df;
  --danger: #8a2d24;
  --radius: 16px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at top right, #e0eee4 0, transparent 34rem), var(--bg); }
a { color: var(--accent-strong); text-underline-offset: 0.18em; }
.shell { width: min(1440px, calc(100% - 2rem)); margin-inline: auto; }
.site-header { border-bottom: 1px solid var(--line); background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); }
.header-inner { min-height: 64px; display: flex; align-items: center; gap: 1rem; }
.brand { font-weight: 800; letter-spacing: -0.02em; text-decoration: none; font-size: 1.1rem; }
.tagline { color: var(--muted); font-size: 0.9rem; }
.hero { display: flex; justify-content: space-between; gap: 2rem; align-items: end; padding: 3.5rem 0 2rem; }
h1 { margin: 0.1rem 0 0.6rem; font-size: clamp(2rem, 5vw, 3.6rem); letter-spacing: -0.05em; line-height: 1.04; }
h2 { letter-spacing: -0.025em; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: 0.12em; font-weight: 750; color: var(--accent); font-size: 0.75rem; }
.lead { color: var(--muted); margin: 0; font-size: 1.04rem; }
.source-status { min-width: 230px; padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 0.5rem; }
.status-line, .subtle { color: var(--muted); font-size: 0.84rem; display: block; }
.notice { margin: 0 0 1rem; padding: 0.85rem 1rem; border: 1px solid #d7c278; border-radius: 12px; background: var(--warn-bg); color: var(--warn); }
.notice.danger { border-color: #e6aaa1; background: var(--danger-bg); color: var(--danger); }
.filters { display: grid; grid-template-columns: repeat(6, minmax(130px, 1fr)); gap: 0.8rem; padding: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 1rem; box-shadow: 0 12px 30px rgba(31, 48, 36, 0.04); }
.filters label { display: grid; gap: 0.35rem; color: var(--muted); font-size: 0.78rem; font-weight: 650; }
.filters .wide { grid-column: span 2; }
input, select, button, .button-secondary { min-height: 42px; border-radius: 9px; border: 1px solid var(--line); padding: 0.55rem 0.7rem; background: var(--surface); color: var(--ink); font: inherit; }
input:focus, select:focus, button:focus, a:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent); outline-offset: 1px; }
.checkbox-label { display: flex !important; flex-direction: row; align-items: center; align-self: end; min-height: 42px; }
.checkbox-label input { min-height: auto; width: 1rem; height: 1rem; }
.filter-actions { display: flex; align-items: end; gap: 0.45rem; }
button, .primary-link { cursor: pointer; border-color: var(--accent); background: var(--accent); color: white; font-weight: 700; text-decoration: none; }
.button-secondary { display: inline-grid; place-items: center; text-decoration: none; }
.table-card, .detail-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 15px 38px rgba(31, 48, 36, 0.05); overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; color: var(--muted); background: var(--surface-muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.07em; }
th, td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: color-mix(in srgb, var(--surface-muted) 55%, transparent); }
.offer-title { display: block; min-width: 14rem; font-weight: 720; text-decoration: none; }
.price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge, .tag { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; padding: 0.18rem 0.48rem; font-size: 0.73rem; line-height: 1.25; white-space: nowrap; }
.tags { max-width: 12rem; }
.tag { margin: 0 0.2rem 0.2rem 0; background: #e9e8f6; color: #49407f; }
.badge-good, .stock-in_stock, .proxy-provided { background: var(--good-bg); color: var(--good); }
.badge-danger, .stock-out_of_stock, .proxy-not_provided { background: var(--danger-bg); color: var(--danger); }
.badge-muted, .stock-unknown, .proxy-unknown { background: var(--surface-muted); color: var(--muted); }
.stock-limited { background: var(--warn-bg); color: var(--warn); }
.external-link { white-space: nowrap; }
.empty-state { padding: 3rem; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--ink); }
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; padding: 1.5rem; }
.breadcrumbs { margin: 2rem 0 1rem; color: var(--muted); }
.detail-card { padding: clamp(1rem, 4vw, 2.5rem); }
.detail-heading { display: flex; justify-content: space-between; align-items: start; gap: 2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.primary-link { padding: 0.75rem 1rem; border-radius: 10px; white-space: nowrap; }
.facts, .evidence-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin: 2rem 0; }
.facts div, .evidence-list div { background: var(--surface); padding: 1rem; }
dt { color: var(--muted); font-size: 0.77rem; font-weight: 700; margin-bottom: 0.35rem; }
dd { margin: 0; }
.evidence-list { grid-template-columns: 1fr; }
.compact-list { display: grid; margin-top: 1.5rem; }
.compact-offer { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.compact-offer small { display: block; color: var(--muted); margin-top: 0.2rem; }
.site-footer { padding: 2.5rem 0; color: var(--muted); font-size: 0.82rem; }
.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; }

@media (max-width: 1050px) {
  .filters { grid-template-columns: repeat(3, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .shell { width: min(100% - 1rem, 1440px); }
  .tagline { display: none; }
  .hero, .detail-heading { align-items: stretch; flex-direction: column; padding-top: 2rem; }
  .source-status { min-width: 0; }
  .filters { grid-template-columns: 1fr 1fr; }
  .filters .wide { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tr { padding: 0.8rem; border-bottom: 1px solid var(--line); }
  td { display: grid; grid-template-columns: 7rem minmax(0, 1fr); padding: 0.35rem; border: 0; }
  td::before { content: attr(data-label); color: var(--muted); font-size: 0.76rem; font-weight: 700; }
  .compact-offer { grid-template-columns: 1fr auto; }
  .compact-offer .badge { grid-column: 1 / -1; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111512;
    --surface: #191f1b;
    --surface-muted: #222923;
    --ink: #ecf1ed;
    --muted: #a8b3ab;
    --line: #303a32;
    --accent: #5cc894;
    --accent-strong: #8be0b4;
    --good-bg: #183d2b;
    --good: #8be0b4;
    --warn-bg: #493b17;
    --warn: #f2d174;
    --danger-bg: #48231f;
    --danger: #f3a69c;
  }
  .tag { background: #302d4d; color: #c7c1f2; }
}

