/* ── Spirited Reviews ──────────────────────────────────────────────────────────
   Theme tokens first; everything below reads from them.                      */

:root {
  --bg: #121212;
  --bg-image: linear-gradient(135deg, #121212 0%, #1d1d1d 50%, #121212 100%);
  --surface: #181818;
  --surface-alt: #202020;
  --surface-hover: #2b2b2b;
  --text: #ece6dc;
  --muted: #b5ab98;
  --heading: #e9c46a;
  --accent: #c8862a;
  --accent-text: #e3aa4f;
  --gold: #b3953f;
  --line: rgba(233, 196, 106, 0.22);
  --field: rgba(255, 255, 255, 0.05);
  --focus: #e9c46a;
  --chart-grid: #2a2a2a;
  --chart-muted: #4a4a4a;
  --font-body: "Source Sans 3", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --radius-sm: 4px;
  --radius: 8px;
  --page-max: 1400px;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #faf6ef;
  --bg-image: none;
  --surface: #ffffff;
  --surface-alt: #f4eee4;
  --surface-hover: #fbecd3;
  --text: #2b1a0c;
  --muted: #7a4f2a;
  --heading: #5a2d00;
  --accent: #a24f05;
  --accent-text: #9a4a04;
  --gold: #8a6d1f;
  --line: rgba(122, 62, 0, 0.22);
  --field: #ffffff;
  --focus: #a24f05;
  --chart-grid: #eadfcf;
  --chart-muted: #cdbfae;
  color-scheme: light;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg) var(--bg-image) fixed;
  color: var(--text);
  font: 400 1rem/1.5 var(--font-body);
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--heading);
  line-height: 1.15;
  margin: 0;
}
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: 1.4rem; }

a { color: var(--accent-text); }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  padding: 0.5rem 1rem;
  background: var(--accent); color: #fff;
  border-radius: var(--radius-sm);
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

main {
  flex: 1;
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem) 3rem;
}

/* ── Header ───────────────────────────────────────────────────────────────── */
.site-header {
  display: flex;
  align-items: center;
  gap: 1rem 2rem;
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: #b3953f;                 /* logo gold, the same in both themes */
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
}
.brand { flex: none; }
.brand img { width: 56px; height: auto; }
.theme-toggle { flex: none; }
.more-menu .menu-panel { left: auto; right: 0; }

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1;
  min-width: 0;
}
.nav-items {
  display: flex;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0.3rem 0.2rem;       /* room for the focus ring */
  min-width: 0;
  overflow: hidden;              /* links that don't fit move into "More" */
}
.nav-items li { flex: none; }
.nav-items a,
.menu > summary {
  display: block;
  padding: 0.4rem 0.65rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.nav-items a:hover,
.menu > summary:hover { background: var(--surface-hover); }
.nav-items a[aria-current="page"],
.menu > summary.is-current {
  color: var(--heading);
  box-shadow: inset 0 -2px 0 var(--accent);
}
.more-menu { flex: none; }

/* Patreon and YouTube buttons */
.social-links { display: flex; gap: 0.4rem; flex: none; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
}
.social-btn:hover { filter: brightness(0.92); }
.social-icon { height: 1.05em; width: auto; display: block; }
.social-logo { height: 1.15em; width: auto; display: block; }
.social-patreon { background: #ffffff; color: #000000; }             /* Patreon: monochrome */
:root[data-theme="light"] .social-patreon { box-shadow: inset 0 0 0 1px #d8cfc2; }
.social-youtube { background: #ff0000; color: #ffffff; }             /* YouTube red */
.social-discord { background: #ffffff; color: #5865f2; }             /* white, so the Blurple logo shows */
:root[data-theme="light"] .social-discord { box-shadow: inset 0 0 0 1px #d8cfc2; }

/* Light-mode logo (only used if content/images/srlogo-light.* exists) */
.logo-for-light { display: none !important; }
:root[data-theme="light"] .logo-for-light { display: block !important; }
:root[data-theme="light"] .logo-for-dark { display: none !important; }


.menu { position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary::after { content: " ▾"; font-size: 0.8em; color: var(--muted); }
.menu[open] > summary::after { content: " ▴"; }
.menu-panel {
  list-style: none;
  margin: 0;
  position: absolute;
  top: calc(100% + 0.4rem);
  left: 0;
  z-index: 20;
  min-width: 12rem;
  padding: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}
.menu-panel a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.menu-panel a:hover { background: var(--surface-hover); }
.menu-panel a[aria-current="page"] { color: var(--heading); background: var(--surface-alt); }


.theme-toggle {
  font: 600 0.9rem var(--font-body);
  padding: 0.4rem 0.8rem;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle-light { display: none; }
:root[data-theme="light"] .theme-toggle-dark { display: none; }
:root[data-theme="light"] .theme-toggle-light { display: inline; }

/* ── Page intro ───────────────────────────────────────────────────────────── */
.page-intro { padding: 2.25rem 0 1.25rem; }
.page-intro p { margin: 0.5rem 0 0; color: var(--muted); font-size: 1.1rem; max-width: 62ch; }

/* ── Verdict pills: the scoring scale, shared across the site ─────────────── */
.pill {
  display: inline-block;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}
.tier-0 { background: #4a2a22; color: #f0d2c2; }
.tier-1 { background: #5c3a1c; color: #f6dcb8; }
.tier-2 { background: #744610; color: #fde6c4; }
.tier-3 { background: #8e520b; color: #fff3e0; }
.tier-4 { background: #b35607; color: #ffffff; }
.tier-5 { background: #eb9a30; color: #2a1200; }
.tier-6 { background: #ffd699; color: #2a1200; box-shadow: inset 0 0 0 1px #b3953f; }

.scoring-key { margin-bottom: 1.5rem; }
.tier-scale {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
}
.tier-scale .pill { padding: 0.3rem 0.75rem; }
.tier-range { font-weight: 400; opacity: 0.8; margin-right: 0.3rem; }

.scoring-sheet { margin-top: 0.75rem; }
.scoring-sheet summary { cursor: pointer; color: var(--accent-text); font-weight: 600; width: fit-content; }
.scoring-sheet img { display: block; margin-top: 0.75rem; max-width: 640px; width: 100%; border-radius: var(--radius); }

/* ── Form controls ────────────────────────────────────────────────────────── */
.table-controls,
.stats-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 1rem 1.25rem;
  margin-bottom: 1rem;
}

.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field > span,
.segmented legend {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}
.field input,
.field select {
  font: 1rem var(--font-body);
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  min-width: 13rem;
}
.field select option { background: var(--surface); color: var(--text); }
.field input:focus, .field select:focus { border-color: var(--accent); }

.result-count { margin: 0 0 0.5rem auto; color: var(--muted); font-size: 0.9rem; }

.segmented { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; }
.segmented legend { padding: 0; margin-bottom: 0.3rem; }
.segmented label { position: relative; }
.segmented input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.segmented span {
  display: block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--line);
  margin-left: -1px;
  background: var(--field);
  font-weight: 600;
  cursor: pointer;
}
.segmented label:first-of-type span { border-radius: var(--radius-sm) 0 0 var(--radius-sm); margin-left: 0; }
.segmented label:last-of-type span { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.segmented input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.segmented input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; position: relative; }

/* ── Reviews table ────────────────────────────────────────────────────────── */
.table-wrap {
  position: relative; /* keeps screen-reader-only text inside the scroll box */
  overflow: auto;
  max-height: 78vh;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.data-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 0.95rem; }

.data-table th,
.data-table td {
  padding: 0.55rem 0.8rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
}
.data-table tbody tr:nth-child(even of :not([hidden])) > * { background: var(--surface-alt); }
.data-table tbody tr > * { background: var(--surface); }
.data-table tbody tr:hover > *,
.data-table tbody tr:nth-child(even of :not([hidden])):hover > * { background: var(--surface-hover); }

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface-alt);
  padding: 0;
  border-bottom: 2px solid var(--accent);
  white-space: nowrap;
}
.data-table thead th button,
.data-table thead .th-label {
  display: block;
  width: 100%;
  padding: 0.65rem 0.8rem;
  font: 600 0.85rem var(--font-body);
  color: var(--muted);
  text-align: inherit;
  background: none;
  border: 0;
}
.data-table thead th button { cursor: pointer; }
.data-table thead th button:hover { color: var(--heading); }
.data-table thead th[aria-sort] button { color: var(--heading); }
.data-table thead th[aria-sort="ascending"] button::after { content: " ▲"; font-size: 0.75em; }
.data-table thead th[aria-sort="descending"] button::after { content: " ▼"; font-size: 0.75em; }

/* Pin the whiskey column while scrolling sideways */
.data-table .col-name {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 14rem;
  max-width: 22rem;
  box-shadow: 1px 0 0 var(--line);
}
.data-table thead .col-name { z-index: 3; }
.data-table tbody th { font-weight: 400; }
.whiskey-brand { display: block; font-size: 0.8rem; color: var(--muted); }
.whiskey-name { display: block; font-weight: 600; color: var(--text); }
a.whiskey-link {
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 0.2em;
}
a.whiskey-link:hover { color: var(--heading); text-decoration-color: currentColor; }

.num { text-align: right !important; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.score-avg { font-weight: 700; color: var(--heading); }

.watch { font-weight: 600; white-space: nowrap; }
.watch::before { content: "▶ "; font-size: 0.75em; }

.empty-state { padding: 2rem 1rem; text-align: center; color: var(--muted); margin: 0; }

/* ── Stats page ───────────────────────────────────────────────────────────── */
.summary { margin: 1.5rem 0 2.5rem; }
.summary-heading {
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.75rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 1rem 1rem 1.1rem; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt { font-size: 0.85rem; color: var(--muted); font-weight: 600; }
.stat dd {
  margin: 0.2rem 0 0;
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--text);
  font-variant-numeric: tabular-nums lining-nums;
}
.stat-lead dd { font-size: 2.4rem; color: var(--heading); }
.stat-row + .empty-state { text-align: left; padding: 1rem 0 0; }

.chart-section h2 { margin-bottom: 0.25rem; }
.chart-note { margin: 0 0 1rem; color: var(--muted); max-width: 70ch; }
.chart {
  width: 100%;
  min-height: 460px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

/* ── Shared page structure ────────────────────────────────────────────────── */
.page-section { margin: 2.5rem 0; }
.page-section > h2 { margin-bottom: 1rem; }
.section-lede { margin: -0.5rem 0 1.5rem; color: var(--muted); max-width: 65ch; }
h3 { font-family: var(--font-display); color: var(--heading); font-size: 1.2rem; margin: 0 0 0.5rem; }
h4 { font-size: 1rem; color: var(--heading); margin: 1.25rem 0 0.5rem; }

.jump-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; margin-top: 1rem; }
.jump-links a { font-weight: 600; }

.button,
.button-quiet,
.link-button,
.chip {
  font: 600 0.95rem var(--font-body);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.button {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: var(--accent);
  color: #fff;
  border: 0;
  text-decoration: none;
}
.button:hover { filter: brightness(1.1); }
.button-quiet {
  padding: 0.5rem 0.9rem;
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--line);
}
.button-quiet:hover { background: var(--surface-hover); }
.link-button { background: none; border: 0; padding: 0.2rem 0; color: var(--accent-text); text-decoration: underline; width: fit-content; }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.remove {
  font: 600 0.85rem var(--font-body);
  color: var(--muted);
  background: none;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  cursor: pointer;
}
.remove:hover:not(:disabled) { color: var(--heading); border-color: var(--line); }

.notice {
  margin: 0.75rem 0;
  padding: 0.6rem 0.9rem;
  border-left: 3px solid var(--accent);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.photo-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 4;
  width: 100%;
  background: var(--surface-alt);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── More form controls ───────────────────────────────────────────────────── */
.field small { color: var(--muted); font-size: 0.8rem; }
.field-narrow input, .field-narrow select { min-width: 8rem; }
.field-inline { flex-direction: row; align-items: center; gap: 0.5rem; }
.field-label { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin: 0 0 0.4rem; }

.checks { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; }
.checks legend { font-size: 0.85rem; font-weight: 600; color: var(--muted); padding: 0; margin-bottom: 0.45rem; }
.checks label, .check { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 600; cursor: pointer; }
.check { margin-top: 1rem; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; }

.segmented-wrap { row-gap: 0.4rem; }
.segmented-wrap span { margin-bottom: 0; }

.result-count-left { margin: -0.5rem 0 0.75rem; }
.legacy-note { color: var(--muted); font-size: 0.9rem; margin: -0.25rem 0 0; max-width: 80ch; }

/* ── Tabs ─────────────────────────────────────────────────────────────────── */
.tab-list {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 1.75rem;
  overflow-x: auto;
}
.tab-list [role="tab"] {
  font: 600 1rem var(--font-body);
  color: var(--muted);
  background: none;
  border: 0;
  border-bottom: 3px solid transparent;
  padding: 0.7rem 1rem;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
}
.tab-list [role="tab"]:hover { color: var(--text); }
.tab-list [role="tab"][aria-selected="true"] { color: var(--heading); border-bottom-color: var(--accent); }
.tab-count {
  display: inline-block;
  min-width: 1.5rem;
  padding: 0 0.4rem;
  margin-left: 0.3rem;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 0.8rem;
  text-align: center;
}

/* ── Charts ───────────────────────────────────────────────────────────────── */
.chart-tall { min-height: 560px; }
.chart-short { min-height: 220px; }
.chart-heading-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 0.25rem; }
.custom-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.25rem; margin: 0 0 1.5rem; }
.visuals .segmented-wrap { margin-bottom: 1.25rem; }
.visuals .chart-section { margin-top: 1rem; }
.visuals .chart-section h2 { margin-bottom: 0.25rem; }

/* ── Compact tables (results, tools) ──────────────────────────────────────── */
.table-wrap-auto { max-height: none; width: fit-content; max-width: 100%; }
.data-table.compact { width: auto; min-width: 22rem; }
.data-table.compact th, .data-table.compact td { padding: 0.5rem 0.9rem; }
.data-table.compact thead th {
  padding: 0.55rem 0.9rem;
  font-size: 0.85rem;
  color: var(--muted);
  position: static;
}
.data-table.compact tbody th { font-weight: 600; }
.data-table tr.is-match > * { background: var(--surface-hover) !important; }
.data-table tr.is-match > th:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* ── Find your reviewer ───────────────────────────────────────────────────── */
.matcher-steps {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}
.matcher-step h2, .matcher-results > h2 { font-size: 1.35rem; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.6rem; }
.step-num {
  display: inline-grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font: 700 1rem var(--font-body);
  flex: none;
}
.matcher-step .field input { width: 100%; }
.pick-count { color: var(--muted); font-size: 0.9rem; margin: 0.75rem 0 0.5rem; }
.pick-list {
  max-height: 32rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pick-items { list-style: none; margin: 0; padding: 0; }
.pick-items li + li { border-top: 1px solid var(--line); }
.pick-items label {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.75rem;
  align-items: center;
  padding: 0.5rem 0.8rem;
  cursor: pointer;
}
.pick-items label:hover { background: var(--surface-hover); }
.pick-items input:disabled + .pick-text { opacity: 0.5; }
.pick-items .pick-meta { color: var(--muted); font-size: 0.85rem; text-align: right; }

.rate-list { display: flex; flex-direction: column; gap: 0.35rem; }
.rate-row {
  padding: 0.6rem 0.8rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.rate-head { display: flex; align-items: center; gap: 0.75rem; }
.rate-label { flex: 1; min-width: 0; }
.rate-value {
  font: 700 1.35rem var(--font-display);
  color: var(--heading);
  min-width: 2.6rem;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.matcher-step .empty-state { text-align: left; padding: 0 0 1rem; }
.matcher-step > .button-quiet { margin-top: 0.75rem; }

input[type="range"] {
  width: 100%;
  margin: 0.5rem 0 0;
  accent-color: var(--accent);
  height: 1.5rem;
}

.matcher-results { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.matcher-results h3 { margin-top: 2rem; }
.match-callout {
  font-size: 1.25rem;
  max-width: 60ch;
  margin: 0 0 1.25rem;
}
.match-callout strong { font-family: var(--font-display); color: var(--heading); font-size: 1.6rem; }
.corr-block .chart { margin-top: 0.5rem; }
.corr-legend { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; color: var(--muted); font-size: 0.9rem; }
.corr-legend .swatch { display: inline-block; width: 0.85rem; height: 0.85rem; border-radius: 2px; margin-right: 0.4rem; vertical-align: -1px; }
.matcher-results .table-wrap + .chart { margin-top: 1.25rem; }

/* ── Barrel picks ─────────────────────────────────────────────────────────── */
.pick-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr);
  gap: 2rem;
  padding: 2rem 0;
  border-bottom: 1px solid var(--line);
}
.tab-panel > .pick-card:first-child { padding-top: 0.5rem; }
.pick-photo img { width: 100%; border-radius: var(--radius); display: block; }
.pick-head h3 { font-size: 1.6rem; margin: 0; }
.pick-subtitle { font-family: var(--font-display); font-size: 1.15rem; color: var(--accent-text); margin: 0.2rem 0 0; }
.pick-head .pick-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1rem; margin: 0.75rem 0 0; color: var(--muted); }
.status {
  display: inline-block;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid currentColor;
}
.status-picked { color: #6fbf73; }
.status-pending { color: #f2c14e; }
.status-done { color: var(--muted); }
:root[data-theme="light"] .status-picked { color: #2e7d32; }
:root[data-theme="light"] .status-pending { color: #9a6b00; }

.facts { display: flex; flex-wrap: wrap; gap: 0.75rem 2rem; margin: 1.25rem 0 0; }
.facts dt, .notes dt { font-size: 0.8rem; font-weight: 600; color: var(--muted); }
.facts dd { margin: 0.1rem 0 0; font-weight: 600; }
.pick-details { margin-top: 1.25rem; max-width: 70ch; }
.pick-details p { margin: 0 0 0.5rem; }
.pick-team { margin: 0.75rem 0 0; }
.notes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; margin: 0; }
.notes dd { margin: 0.2rem 0 0; line-height: 1.55; }

.pick-fold { border-bottom: 1px solid var(--line); }
.pick-fold > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 1rem;
  padding: 1rem 0;
  cursor: pointer;
  list-style: none;
}
.pick-fold > summary::-webkit-details-marker { display: none; }
.pick-fold > summary::before { content: "▸"; color: var(--accent-text); width: 1rem; }
.pick-fold[open] > summary::before { content: "▾"; }
.pick-fold-title { font: 700 1.25rem var(--font-display); color: var(--heading); }
.pick-fold-sub { color: var(--accent-text); }
.pick-fold .pick-card { border-bottom: 0; padding-top: 0.5rem; }

/* ── Merch ────────────────────────────────────────────────────────────────── */
.merch-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 2rem 1.5rem;
}
.merch-card { display: flex; flex-direction: column; scroll-margin-top: 1.5rem; }
.merch-card:target .merch-photo { box-shadow: 0 0 0 3px var(--accent); }
.merch-photo {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 0.9rem;
}
.merch-photo { position: relative; }
.merch-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 0.75rem; }
.merch-photo .photo-placeholder { aspect-ratio: auto; height: 100%; border: 0; }
.merch-card h3 { font-size: 1.15rem; margin: 0; }
.merch-meta { color: var(--muted); margin: 0.2rem 0 0.5rem; font-size: 0.9rem; }
.merch-price { color: var(--heading); font-weight: 600; font-size: 1rem; }
.merch-desc { margin: 0 0 1rem; flex: 1; }
.merch-desc p { margin: 0 0 0.5rem; }
.merch-card .button { align-self: flex-start; margin-top: auto; }
.merch-soon { color: var(--muted); font-style: italic; margin: auto 0 0; }

/* Featured (pinned) merch */
.featured-merch { margin-top: 1rem; display: flex; flex-direction: column; gap: 1.25rem; }
.featured-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 2rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: inset 4px 0 0 var(--accent);
  scroll-margin-top: 1.5rem;
}
.featured-photo {
  justify-self: center;                /* the white box hugs the logo, whatever its shape */
  display: flex;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.6rem;
  max-width: 100%;
}
.featured-photo img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 260px;                   /* whole logo always visible, never cropped */
  object-fit: contain;
  border-radius: calc(var(--radius) - 4px);
}
.featured-photo:has(.photo-placeholder) { justify-self: stretch; aspect-ratio: 16 / 10; padding: 0; }
.featured-photo .photo-placeholder { aspect-ratio: auto; height: 100%; border: 0; }
.featured-label {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.featured-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 0 0 0.5rem; }
.featured-desc { font-size: 1.15rem; max-width: 50ch; }
.featured-desc p { margin: 0 0 0.75rem; }
.featured-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 0.5rem; }
.code-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  font: 600 0.95rem var(--font-body);
  color: var(--text);
  background: var(--field);
  border: 1px dashed var(--accent);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.code-chip:hover { background: var(--surface-hover); }
.code-label { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.code-value { font-weight: 700; letter-spacing: 0.06em; color: var(--heading); }
.code-hint { color: var(--accent-text); font-size: 0.85rem; }
@media (max-width: 700px) {
  .featured-card { grid-template-columns: 1fr; gap: 1.25rem; }
}

/* ── About ────────────────────────────────────────────────────────────────── */
.crew-grid {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 2.5rem 2rem;
}
.crew-photo img { width: 100%; max-width: 20rem; aspect-ratio: 15 / 14; object-fit: cover; object-position: top; display: block; border-radius: var(--radius); }
.crew-card h2 { margin: 1rem 0 0.5rem; }
.crew-handle { display: block; font: 600 0.95rem var(--font-body); color: var(--muted); margin-top: 0.2rem; }
.crew-card p { margin: 0 0 0.75rem; max-width: 60ch; }
.crew-card h3 { font-size: 1.05rem; margin-top: 1.25rem; }
.top5 { margin: 0; padding-left: 1.4rem; }
.top5 li { margin: 0.3rem 0; }
.top5-name { font-weight: 600; }
.top5-brand { color: var(--muted); }
.top5-score { font-weight: 700; color: var(--heading); font-variant-numeric: tabular-nums; }
.crew-fav { margin-top: 1rem !important; }

/* ── Tools ────────────────────────────────────────────────────────────────── */
.tool-lede { max-width: 70ch; margin: 0 0 1.5rem; color: var(--muted); }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.5rem; }
.tool-panel {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 1.25rem;
  background: var(--surface);
}
.tool-panel legend { font: 700 1.1rem var(--font-display); color: var(--heading); padding: 0 0.4rem; }
.bottle-head, .bottle-row {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.2fr) auto;
  gap: 0.5rem;
  align-items: center;
}
.bottle-head { font-size: 0.85rem; font-weight: 600; color: var(--muted); margin-bottom: 0.35rem; }
.bottle-row { margin-bottom: 0.5rem; }
.bottle-row input,
.mash-table input {
  font: 1rem var(--font-body);
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.6rem;
  width: 100%;
  min-width: 0;
}
.mash-table input[type="number"] { width: 6rem; text-align: right; }
.mash-table input[type="text"] { width: 9rem; }
.mash-table tfoot th, .mash-table tfoot td { font-weight: 700; color: var(--heading); border-top: 2px solid var(--accent); }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.option-grid .field input, .option-grid .field select { min-width: 0; width: 100%; }
.option-grid-2 { max-width: 34rem; }

.tool-results { margin-top: 2rem; }
.tool-results h2 { margin-bottom: 1rem; }
.spots-row { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: flex-start; margin-bottom: 1.25rem; }
.whole-dollar { flex: 1; min-width: 16rem; }
.chip-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  padding: 0.3rem 0.7rem;
  background: var(--field);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.85rem;
}
.chip:hover { background: var(--surface-hover); }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.result-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.result { padding: 1rem 1.25rem 1rem 0; }
.result + .result { padding-left: 1.25rem; border-left: 1px solid var(--line); }
.result dt { font-size: 0.85rem; font-weight: 600; color: var(--muted); }
.result dd { margin: 0.2rem 0 0; font: 700 1.9rem var(--font-display); color: var(--text); font-variant-numeric: tabular-nums lining-nums; }
.result-highlight dd { color: var(--heading); }
.result dd.result-sub { font: 400 0.9rem var(--font-body); color: var(--muted); }
.breakdown { margin-top: 1.25rem; }
.breakdown summary { cursor: pointer; color: var(--accent-text); font-weight: 600; width: fit-content; margin-bottom: 0.75rem; }
.button-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 1rem 1.5rem; margin-top: 1rem; }
.add-grain { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.add-grain input { min-width: 11rem; }
.reference { margin-top: 2rem; color: var(--muted); font-size: 0.9rem; max-width: 75ch; }

/* ── Landing page ─────────────────────────────────────────────────────────── */
.landing {
  max-width: 50rem;
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(2rem, 5vw, 4rem);
  text-align: center;
}
.landing-logo { width: clamp(150px, 22vw, 220px); height: auto; display: block; margin: 0 auto 1.75rem; }
.landing-title { font-size: clamp(2.4rem, 6vw, 4.25rem); line-height: 1.05; }
.landing-tagline {
  margin: 0.9rem 0 0;
  font: 600 clamp(0.95rem, 1.6vw, 1.15rem) var(--font-body);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
}
.landing-lead {
  margin: clamp(2rem, 5vw, 3rem) auto 0;
  font: 400 clamp(1.35rem, 2.6vw, 1.85rem)/1.45 var(--font-display);
  color: var(--text);
  text-wrap: balance;
}
.landing-more {
  margin: 1.75rem auto 0;
  max-width: 42rem;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.7;
  color: var(--muted);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}
.landing a { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
.landing-lead a { color: var(--heading); font-weight: 700; text-decoration-color: var(--accent); }
.landing-more a { color: var(--accent-text); font-weight: 600; }
.landing a:hover { text-decoration-thickness: 2px; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
.site-footer {
  max-width: var(--page-max);
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem clamp(1rem, 3vw, 2rem) 2.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.footer-contact { white-space: nowrap; }

/* ── Small screens ────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .site-header { gap: 1rem; }
  .brand span { display: none; }
}

@media (max-width: 780px) {
  .site-header { flex-wrap: wrap; row-gap: 0.4rem; }
  .theme-toggle { margin-left: auto; }
  .site-nav { order: 3; flex-basis: 100%; margin: 0 -0.2rem; }
}

@media (max-width: 900px) {
  .matcher-steps, .tool-grid { grid-template-columns: 1fr; }
  .pick-card { grid-template-columns: 1fr; gap: 1.25rem; }
  .pick-photo img { max-width: 22rem; }
  .notes { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat, .stat:first-child { border-left: 0; padding-left: 0; border-bottom: 1px solid var(--line); }
  .stat:nth-child(odd) { padding-right: 1rem; }
  .stat:nth-child(even) { padding-left: 1rem; border-left: 1px solid var(--line); }
  .stat:last-child { border-bottom: 0; }
}

@media (max-width: 640px) {
  .site-header { gap: 0.75rem 1rem; }
  .brand span { display: none; }
  .brand img { width: 48px; }
  .site-header { gap: 0.5rem; }
  .theme-toggle { padding: 0.4rem 0.7rem; }
  .theme-word { display: none; }
  .nav-items a, .menu > summary { padding: 0.4rem 0.5rem; }
  .option-grid { grid-template-columns: 1fr; }
  .result + .result { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .pick-items label { grid-template-columns: auto 1fr; }
  .pick-items .pick-meta { grid-column: 2; text-align: left; }
  .field, .field input, .field select { width: 100%; min-width: 0; }
  .result-count { margin-left: 0; }
  .data-table .col-name { min-width: 10rem; max-width: 12rem; }
  .chart { min-height: 380px; }
}

/* Phones: logo + theme on top, the Patreon/YouTube/Discord buttons on their own row, then the menu */
@media (max-width: 560px) {
  .brand { order: 1; }
  .theme-toggle { order: 2; margin-left: auto; }
  .social-links { order: 3; flex-basis: 100%; flex-wrap: wrap; gap: 0.4rem; }
  .site-nav { order: 4; }
  .social-btn { padding: 0.35rem 0.7rem; font-size: 0.85rem; }
}

@media (max-width: 360px) {
  .nav-items a, .menu > summary { padding: 0.4rem 0.4rem; font-size: 0.95rem; }
  .social-btn { padding: 0.35rem 0.65rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
