:root {
  --ink: #1c1915;
  --muted: #5e584e;
  --paper: #f3efe6;
  --card: #fffdf8;
  --line: #ddd4c4;
  --accent: #8d3b2c;
  --accent-dark: #6d2b1f;
  --pine: #1f4d3a;
  --warn: #8a5a12;
  --warn-bg: #f8ecd4;
  color-scheme: light;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Segoe UI", "Source Sans 3", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.45;
}
a { color: var(--accent-dark); }
header.site {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  padding: 0.9rem 1.4rem;
  background: #241c16;
  color: #f6f1e7;
}
header.site a { color: #f6f1e7; text-decoration: none; }
header.site .brand { font-family: Georgia, "Palatino Linotype", serif; font-size: 1.25rem; }
header.site nav { display: flex; gap: 1rem; align-items: center; font-size: 0.95rem; }
header.site .count {
  background: var(--accent);
  border-radius: 999px;
  padding: 0.1rem 0.55rem;
}
main { max-width: 1180px; margin: 0 auto; padding: 1.2rem; }
h1, h2, h3 { font-family: Georgia, "Palatino Linotype", serif; font-weight: 600; }
.lede { color: var(--muted); max-width: 70ch; }
.groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 0.4rem;
}
.group-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.15rem 1.25rem 1.25rem;
  text-decoration: none;
  color: inherit;
  display: block;
}
.group-card:hover { border-color: var(--pine); }
.group-card h2 { margin: 0 0 0.8rem; font-size: 1.45rem; }
.group-card.fifth { grid-column: 1 / -1; }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem 1rem; }
.stats b { display: block; font-size: 1.55rem; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.88rem; }
.cats { display: flex; flex-wrap: wrap; gap: 0.45rem; margin: 1rem 0; }
.cats a, button, .button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}
.cats a.active, button.primary, .button.primary {
  background: var(--pine);
  color: white;
  border-color: var(--pine);
}
.search { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.search input[type="search"], input[type="text"], input[type="number"], textarea, select {
  font: inherit;
  padding: 0.45rem 0.55rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.9rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.card img, .hero img { width: 100%; height: 180px; object-fit: contain; background: white; }
.card .body, .panel { padding: 0.8rem 0.9rem 1rem; }
.card h2 { font-size: 1.05rem; margin: 0.2rem 0; }
.code { color: var(--muted); font-size: 0.85rem; }
.price { font-variant-numeric: tabular-nums; font-weight: 650; }
.flags { margin: 0.6rem 0 0; padding-left: 1.1rem; color: var(--warn); }
.notice, .banner {
  background: var(--warn-bg);
  border: 1px solid #e3d0a4;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  margin: 0.8rem 0;
}
.layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.2rem; }
.hero img { height: 320px; border: 1px solid var(--line); border-radius: 14px; }
table { width: 100%; border-collapse: collapse; background: var(--card); }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 0.55rem; vertical-align: top; }
th { font-size: 0.82rem; letter-spacing: 0.02em; text-transform: uppercase; color: var(--muted); }
.actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.check { display: flex; gap: 0.4rem; align-items: center; font-size: 0.9rem; }
.quote-head { display: flex; justify-content: space-between; gap: 1rem; }
.small { color: var(--muted); font-size: 0.88rem; }
footer.note { margin-top: 2rem; color: var(--muted); font-size: 0.85rem; }
@media (max-width: 800px) {
  .layout, .groups { grid-template-columns: 1fr; }
  .group-card.fifth { grid-column: auto; }
  header.site { flex-direction: column; align-items: flex-start; }
}
@media print {
  header.site, .no-print, footer.note { display: none !important; }
  body, main { background: white; margin: 0; padding: 0; max-width: none; }
  .card, table { break-inside: avoid; }
  a { color: black; text-decoration: none; }
}
