:root {
  --ink: #0b0b0c;
  --paper: #f6f6f4;
  --card: #ffffff;
  --text: #16171a;
  --muted: #5d6068;
  --line: #e3e3df;
  --blue: #1f5bff;
  --blue-soft: #e8eeff;
  --radius: 14px;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 140px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-text-size-adjust: 100%;
}
a { color: var(--blue); }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }

/* Header */
.top { background: var(--ink); color: #fff; }
.top-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 20px; padding-top: 14px; padding-bottom: 14px; }
.wordmark { color: #fff; text-decoration: none; font-weight: 700; font-size: 30px; letter-spacing: -0.02em; line-height: 1; }
.wordmark .i { position: relative; display: inline-block; }
.wordmark .i::before {
  content: ""; position: absolute; left: 50%; top: 0.01em;
  width: 0.22em; height: 0.22em; margin-left: -0.11em;
  border-radius: 50%; background: var(--blue);
}
.top nav { display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 14px; }
.top nav a { color: #d7d9de; text-decoration: none; }
.top nav a:hover { color: #fff; }

/* Hero */
.hero { background: var(--ink); color: #fff; padding: 12px 0 28px; }
.hero h1 { font-size: 28px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -0.01em; }
.hero p { margin: 0; color: #c4c7ce; max-width: 560px; }

/* Filters */
.filters { position: sticky; top: 0; z-index: 5; background: rgba(246, 246, 244, 0.96); backdrop-filter: blur(6px); border-bottom: 1px solid var(--line); padding: 10px 0; }
.frow { display: flex; align-items: flex-start; gap: 10px; }
.frow + .frow { margin-top: 6px; }
.flabel { flex: 0 0 52px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding-top: 6px; }
.frow { align-items: center; }
.flabel { padding-top: 0; }
.fbtns { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 2px 0; }
.fbtns::-webkit-scrollbar { display: none; }
.fbtns button { flex: 0 0 auto; }
@media (min-width: 640px) { .fbtns { flex-wrap: wrap; overflow: visible; } }
.fbtns button {
  font: 500 13px/1 var(--font); color: var(--text); background: var(--card);
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; cursor: pointer;
}
.fbtns button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.fnote { margin: 8px 0 0; font-size: 13px; color: var(--muted); }

/* Sections */
.section { padding: 28px 0 8px; }
.section h2 { font-size: 22px; margin: 0 0 2px; }
.blurb { margin: 0 0 14px; color: var(--muted); }
.grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
.empty { color: var(--muted); }

/* Cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.card.is-best { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.card h3 { font-size: 17px; margin: 0; line-height: 1.3; }
.card p { margin: 0; }
.card b { font-weight: 700; }
.media img, .ph { width: 100%; aspect-ratio: 16 / 10; object-fit: contain; border-radius: 10px; background: #f0f0ed; display: block; }
.ph { display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; color: #9a9ca3; font-size: 13px; border: 1px dashed #d6d6d1; }
.buy {
  display: block; text-align: center; text-decoration: none; font-weight: 700;
  background: var(--blue); color: #fff; border-radius: 10px; padding: 12px 14px;
}
.buy:hover { filter: brightness(1.08); }
.buy-off { background: #e6e7ea; color: #7a7d85; font-weight: 500; cursor: not-allowed; }
.draft { display: inline-block; vertical-align: middle; font-size: 11px; font-weight: 500; color: #8a5a00; background: #fff3d6; border-radius: 6px; padding: 1px 6px; margin-left: 4px; }

.tags { display: grid; grid-template-columns: 92px 1fr; gap: 6px 8px; margin: 0; font-size: 13px; }
.tags dt { color: var(--muted); padding-top: 2px; }
.tags dd { margin: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.chip { display: inline-block; background: #f0f0ed; border-radius: 6px; padding: 2px 7px; font-size: 12px; }
.chip-best { background: var(--blue-soft); color: #1440b8; font-weight: 700; }
.none { color: #a0a2a8; font-size: 12px; padding-top: 2px; }
.pairs a { white-space: nowrap; }

/* Setups */
.setup .label { margin-bottom: -4px; }
.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.items li { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); padding-top: 8px; }
.items .buy { padding: 8px 12px; font-size: 13px; flex: 0 0 auto; }
.total { font-weight: 700; }

/* Prose page */
.prose .wrap { max-width: 680px; }
.prose h1 { font-size: 28px; margin: 0 0 8px; }
.prose h2 { font-size: 19px; margin: 24px 0 4px; }

/* Footer */
.foot { margin-top: 40px; background: var(--ink); color: #c4c7ce; padding: 24px 0; font-size: 13px; }
.foot a { color: #fff; }
.foot .small { color: #8b8f98; }

[hidden] { display: none !important; }

@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 36px; }
}
@media (min-width: 960px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
  #setups .grid { grid-template-columns: repeat(2, 1fr); }
}
