:root {
  --ink: #122019;
  --muted: #66736c;
  --paper: #f4f2e9;
  --panel: #fffef8;
  --line: #d9d9cb;
  --green: #174f35;
  --acid: #d7f84a;
  --orange: #ed6b43;
  --shadow: 0 18px 44px rgba(25, 44, 34, 0.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% 3%, rgba(215, 248, 74, .25), transparent 24rem),
    var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input, select { font: inherit; }
button, select { cursor: pointer; }
a { color: inherit; }

.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;
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 64px);
  border-bottom: 1px solid rgba(23, 79, 53, .16);
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 11px;
  color: var(--acid);
  background: var(--green);
  font-weight: 900;
}

.brand-mark strong, .brand-mark small { display: block; }
.brand-mark strong { font-size: 14px; letter-spacing: .04em; }
.brand-mark small { margin-top: 2px; color: var(--muted); font-size: 11px; }

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42a86c;
  box-shadow: 0 0 0 4px rgba(66, 168, 108, .12);
}

main { padding: 0 clamp(18px, 4vw, 64px) 72px; }

.hero {
  max-width: 1440px;
  min-height: 390px;
  margin: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr);
  align-items: end;
  gap: 60px;
  padding: 74px 0 58px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
}

h1 {
  margin: 0;
  max-width: 880px;
  font-family: Georgia, "Songti SC", serif;
  font-size: clamp(42px, 6.3vw, 88px);
  font-weight: 500;
  line-height: .98;
  letter-spacing: -.045em;
}

h1 em { color: var(--green); font-style: normal; }

.hero-copy {
  max-width: 680px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stats div {
  padding: 22px 10px;
  border-right: 1px solid var(--line);
}

.hero-stats div:last-child { border-right: 0; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-family: Georgia, serif; font-size: 34px; font-weight: 500; }
.hero-stats span { margin-top: 6px; color: var(--muted); font-size: 11px; }

.workspace {
  max-width: 1440px;
  margin: auto;
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.filters, .results {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.filters {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  border-radius: 18px;
}

.filter-heading, .result-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.filter-heading {
  padding: 22px;
  border-bottom: 1px solid var(--line);
}

.filter-heading > div, .result-toolbar > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.filter-heading h2, .result-toolbar h2 { margin: 0; font-size: 15px; }
.result-toolbar h2 strong { font-family: Georgia, serif; font-size: 30px; font-weight: 500; }
.section-index { color: var(--orange); font: 700 10px/1 ui-monospace, monospace; }

#reset-filters {
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 12px;
}

.search-box {
  display: block;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.search-box span, .field label, .select-field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 11px;
}

input[type="search"], input[type="number"], select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #faf9f2;
  outline: none;
}

input[type="search"], input[type="number"] { padding: 0 11px; }
select { padding: 0 32px 0 11px; }
input:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(23, 79, 53, .08); }

.gate-card {
  margin: 16px;
  padding: 15px;
  border-radius: 13px;
  color: #eef7ef;
  background: var(--green);
}

.gate-card > p {
  margin: 0 0 12px;
  color: #a7c4b3;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .1em;
}

.forced-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  font-size: 12px;
}

.forced-pill::before {
  content: "✓";
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: var(--acid);
  font-size: 10px;
  font-weight: 900;
}

.filter-group { border-top: 1px solid var(--line); }
.filter-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  list-style: none;
  font-size: 12px;
  font-weight: 700;
}
.filter-group summary::-webkit-details-marker { display: none; }
.filter-group summary::after { content: "+"; color: var(--muted); font-size: 17px; font-weight: 400; }
.filter-group[open] summary::after { content: "−"; }
.group-body { padding: 0 22px 18px; }
.field + .field, .select-field + .select-field { margin-top: 13px; }

.range-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.check-row {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 12px;
}

.check-row input { width: 17px; height: 17px; accent-color: var(--green); }
.filter-toggle { display: none; }

.results {
  min-width: 0;
  border-radius: 18px;
  overflow: hidden;
}

.result-toolbar {
  min-height: 76px;
  padding: 15px 22px;
  border-bottom: 1px solid var(--line);
}

.toolbar-actions { display: flex; align-items: center; gap: 10px; }
.toolbar-actions select { min-width: 150px; background-color: #fff; }

.view-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f4f2e9;
}

.view-switch button {
  padding: 8px 10px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  font-size: 11px;
}

.view-switch button.is-active { color: #fff; background: var(--green); }

.status { padding: 42px; text-align: center; color: var(--muted); }
.status[hidden] { display: none; }
.table-shell { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 890px; }

th {
  padding: 13px 16px;
  color: var(--muted);
  background: #f8f7f0;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
}

td {
  padding: 18px 16px;
  border-top: 1px solid var(--line);
  vertical-align: top;
  font-size: 12px;
  line-height: 1.55;
}

tbody tr:hover { background: #fbfaef; }
tbody tr.multi-source { box-shadow: inset 3px 0 var(--acid); }

.model-name {
  display: block;
  max-width: 260px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
}
.model-name:hover { color: var(--green); text-decoration: underline; }
.subtle { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.price { color: var(--green); font: 500 19px/1.2 Georgia, serif; white-space: nowrap; }

.tag-row { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.tag {
  padding: 3px 6px;
  border-radius: 4px;
  color: var(--muted);
  background: #eeeee5;
  font-size: 9px;
}
.tag.performance { color: #fff; background: var(--green); }
.tag.dedicated { color: #8a321d; background: #fee1d8; }

.source-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.source-badge {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 99px;
  font-size: 9px;
  font-weight: 800;
}
.source-badges.multi .source-badge { border-color: #b5cf35; background: var(--acid); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.laptop-card {
  min-width: 0;
  padding: 22px;
  background: var(--panel);
}
.laptop-card.multi-source { box-shadow: inset 0 3px var(--acid); }
.card-top { display: flex; justify-content: space-between; gap: 18px; }
.card-top .model-name { font-size: 15px; }
.card-specs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.card-specs div { padding-top: 10px; border-top: 1px solid var(--line); }
.card-specs span { display: block; color: var(--muted); font-size: 9px; }
.card-specs strong { display: block; margin-top: 4px; font-size: 11px; font-weight: 650; }
.card-footer { display: flex; align-items: center; justify-content: space-between; }

.empty-state { padding: 80px 24px; text-align: center; }
.empty-state span { color: var(--orange); font: 700 10px ui-monospace, monospace; }
.empty-state h3 { margin: 10px 0 5px; font: 500 28px Georgia, serif; }
.empty-state p { margin: 0; color: var(--muted); font-size: 12px; }

footer {
  display: flex;
  justify-content: space-between;
  max-width: 1440px;
  margin: auto;
  padding: 26px clamp(18px, 4vw, 64px);
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 1050px) {
  .hero { grid-template-columns: 1fr; gap: 36px; }
  .workspace { grid-template-columns: 250px minmax(0, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
}

@media (max-width: 780px) {
  .topbar { height: 66px; }
  .topbar-meta #freshness { display: none; }
  main { padding-bottom: 36px; }
  .hero { min-height: 0; padding: 52px 0 38px; }
  .hero-copy { font-size: 14px; }
  .hero-stats strong { font-size: 26px; }
  .workspace { display: block; }
  .filter-toggle {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 13px 16px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: var(--green);
    font-weight: 700;
  }
  .filter-toggle span {
    display: grid;
    min-width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 99px;
    color: var(--green);
    background: var(--acid);
    font-size: 10px;
  }
  .filters {
    display: none;
    position: static;
    max-height: none;
    margin-bottom: 14px;
  }
  .filters.is-open { display: block; }
  .result-toolbar { align-items: flex-start; gap: 16px; }
  .toolbar-actions { align-items: stretch; }
  .toolbar-actions select { min-width: 0; }
  .view-switch button[data-view="table"] { display: none; }
  .result-toolbar h2 { font-size: 12px; }
  .result-toolbar h2 strong { font-size: 24px; }
  .card-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (max-width: 480px) {
  h1 { font-size: 42px; }
  .hero-stats div { padding: 16px 6px; }
  .hero-stats span { font-size: 9px; }
  .result-toolbar { display: block; }
  .toolbar-actions { margin-top: 12px; }
  .toolbar-actions label { flex: 1; }
}

