/* Golf Ball Index — single stylesheet. No inline styles anywhere (strict CSP). */

:root {
  --green: #1a5c3a;
  --green-dark: #124228;
  --accent: #2e8b57;
  --bg: #f6f7f4;
  --surface: #ffffff;
  --text: #1c2420;
  --muted: #5b6861;
  --line: #dde3dd;
  --chip-bg: #eef2ec;
  --link: #176142;
  --danger: #a33;
  --shadow: 0 1px 3px rgba(20, 40, 30, 0.08);
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --green: #2e8b57;
    --green-dark: #1a5c3a;
    --accent: #3fa36b;
    --bg: #141a16;
    --surface: #1d2520;
    --text: #e8ece8;
    --muted: #9fb0a5;
    --line: #2e3a32;
    --chip-bg: #263029;
    --link: #6fc296;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  font-size: 16px;
}

.wrap { max-width: 1060px; margin: 0 auto; padding: 0 16px; }

a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }

h1 { font-size: 1.65rem; line-height: 1.2; margin: 0.4em 0; }
h2 { font-size: 1.25rem; line-height: 1.25; }

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

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--surface); color: var(--text);
  padding: 8px 14px; z-index: 50;
}
.skip-link:focus { left: 8px; }

.hidden { display: none !important; }

/* Header */
.site-header {
  background: var(--green-dark);
  color: #fff;
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 8px;
  padding-top: 10px; padding-bottom: 10px;
}
.brand {
  display: flex; align-items: center; gap: 9px;
  color: #fff; text-decoration: none;
  font-weight: 700; font-size: 1.12rem; letter-spacing: 0.2px;
}
.mark-ball { fill: #fff; }
.mark-dot { fill: var(--green-dark); opacity: 0.85; }
.site-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  color: #e4efe8; text-decoration: none;
  padding: 6px 10px; border-radius: 6px; font-size: 0.95rem;
}
.site-nav a:hover { background: rgba(255, 255, 255, 0.12); }
.site-nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.18); color: #fff; }

main { padding: 18px 16px 40px; }

.hero .lede, .lede { color: var(--muted); max-width: 64ch; }

/* Ad placeholders — clearly marked, no scripts */
.ad-slot {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 18px 10px;
  margin: 18px 0;
}
.ad-slot-side { margin-top: 16px; min-height: 180px; display: flex; align-items: center; justify-content: center; }

/* Filters */
.filters, .finder-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin: 14px 0;
  box-shadow: var(--shadow);
}
.filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
.filter-grid label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
}
.filter-grid input, .filter-grid select {
  font: inherit; font-weight: 400;
  color: var(--text); background: var(--bg);
  border: 1px solid var(--line); border-radius: 7px;
  padding: 8px 9px; min-width: 0;
}
.filter-actions {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-top: 12px; flex-wrap: wrap;
}
.result-count { font-weight: 700; font-size: 0.95rem; }

.js-note { color: var(--muted); font-size: 0.85rem; }
.js-enabled .js-note { display: none; }

/* Buttons */
.btn {
  display: inline-block;
  background: var(--surface);
  color: var(--link);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit; font-weight: 600; font-size: 0.92rem;
  text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-small { padding: 5px 10px; font-size: 0.85rem; }
.btn-wide { display: block; text-align: center; margin-bottom: 10px; }

/* Ball cards */
.ball-grid {
  list-style: none; margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr; gap: 12px;
}
.ball-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 8px;
}
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.card-title { font-size: 1.05rem; margin: 0; }
.card-title a { text-decoration: none; color: var(--text); }
.card-title a:hover { color: var(--link); text-decoration: underline; }
.card-year { color: var(--muted); font-size: 0.85rem; flex-shrink: 0; }

.swatches { list-style: none; display: flex; gap: 6px; margin: 0; padding: 0; }
.swatch {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.25);
}
.swatches-lg .swatch { width: 24px; height: 24px; }
.sw-white  { background: #fdfdfb; }
.sw-yellow { background: #f2e233; }
.sw-orange { background: #f28c28; }
.sw-red    { background: #d8432e; }
.sw-pink   { background: #ef7fae; }
.sw-green  { background: #5fd04a; }
.sw-blue   { background: #3f8fde; }
.sw-grey   { background: #9aa39d; }
.sw-multi  { background: conic-gradient(#f2e233, #f28c28, #ef7fae, #3f8fde, #5fd04a, #f2e233); }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.chip {
  background: var(--chip-bg); color: var(--text);
  border-radius: 999px; padding: 2px 10px; font-size: 0.78rem;
}
.card-meta { margin: 0; }
.price { font-size: 1.02rem; }
.rrp { color: var(--muted); font-size: 0.82rem; }
.card-speed { margin: 0; color: var(--muted); font-size: 0.85rem; }
.card-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: auto; padding-top: 6px; gap: 8px;
}
.cmp-label { font-size: 0.85rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.no-results { text-align: center; color: var(--muted); padding: 30px 0; }

/* Sticky compare bar */
.compare-bar {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  background: var(--green-dark); color: #fff;
  border-radius: 999px; padding: 9px 11px 9px 18px;
  display: flex; align-items: center; gap: 12px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
  z-index: 40; max-width: calc(100vw - 24px);
}
.compare-bar .btn { background: #fff; color: var(--green-dark); border-color: #fff; }

/* Ball detail page */
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-top: 4px; }
.ball-year { color: var(--muted); font-weight: 400; font-size: 0.8em; }
.ball-cols { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 10px; }
.spec-table {
  width: 100%; border-collapse: collapse;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
  font-size: 0.93rem;
}
.spec-table th, .spec-table td {
  text-align: left; padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th { width: 44%; color: var(--muted); font-weight: 600; }
.spec-note { color: var(--muted); font-size: 0.9rem; max-width: 70ch; }
.spec-note.small, .foot-small { font-size: 0.8rem; }
.similar { margin-top: 26px; }
.similar-list { padding-left: 18px; }
.similar-list li { margin: 5px 0; }

/* Compare page */
.compare-pickers {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 14px 0;
}
.compare-pickers label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.82rem; font-weight: 600; color: var(--muted);
}
.compare-pickers select {
  font: inherit; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 7px; padding: 8px 9px; min-width: 0;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.compare-table {
  border-collapse: collapse; width: 100%; min-width: 560px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 0.9rem;
}
.compare-table th, .compare-table td {
  border: 1px solid var(--line); padding: 8px 10px;
  text-align: left; vertical-align: top;
}
.compare-table thead th { background: var(--chip-bg); }
.compare-table tbody th { color: var(--muted); font-weight: 600; white-space: nowrap; }

/* Prose + footer */
.prose { max-width: 70ch; }
.prose h2 { margin-top: 1.6em; }

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  margin-top: 30px;
  padding: 18px 0 26px;
  color: var(--muted);
}
.foot-legal { font-weight: 600; color: var(--text); }
.site-footer .foot-small { max-width: 90ch; }

/* Larger screens */
@media (min-width: 640px) {
  h1 { font-size: 2rem; }
  .ball-grid { grid-template-columns: repeat(2, 1fr); }
  .filter-grid { grid-template-columns: repeat(4, 1fr); }
  .compare-pickers { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 920px) {
  .ball-grid { grid-template-columns: repeat(3, 1fr); }
  .ball-cols { grid-template-columns: 2fr 1fr; }
}

/* ---- Simplified homepage / listing / finder (2026-10-30 redesign) ---- */

.home-hero { text-align: center; padding: 18px 0 4px; }
.home-hero h1 { font-size: 1.8rem; margin-bottom: 0.3em; }
.home-q { color: var(--muted); margin: 0 0 14px; }

.speed-btns {
  display: grid; grid-template-columns: 1fr; gap: 10px;
  max-width: 560px; margin: 0 auto;
}
.speed-btn {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--green); color: #fff; text-decoration: none;
  border-radius: 12px; padding: 16px 12px;
  box-shadow: var(--shadow);
}
.speed-btn:hover { background: var(--green-dark); }
.speed-btn strong { font-size: 1.15rem; }
.speed-btn span { font-size: 0.82rem; opacity: 0.85; }

.home-hint { color: var(--muted); font-size: 0.88rem; margin: 12px 0 0; }

.home-search {
  display: flex; gap: 8px; max-width: 560px; margin: 16px auto 0;
}
.home-search input {
  flex: 1; min-width: 0; font: inherit;
  color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}

.home-list { margin-top: 26px; }
.home-list h2 { margin-bottom: 8px; }
.home-list h2 a { color: var(--text); text-decoration: none; }
.home-list h2 a:hover { color: var(--link); text-decoration: underline; }
.see-more { font-size: 0.9rem; }

.ball-grid-simple .ball-card { gap: 6px; padding: 12px 14px; }
.home-foot-links { margin-top: 26px; text-align: center; color: var(--muted); }

/* Finder question cards + big tap targets */
.q-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px; margin: 0 0 14px;
  box-shadow: var(--shadow);
}
.q-card legend { font-weight: 700; padding: 0 4px; }
.q-hint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }
.finder-form { background: none; border: 0; padding: 0; box-shadow: none; }

.tap-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tap { position: relative; display: block; }
.tap input {
  position: absolute; opacity: 0; width: 100%; height: 100%;
  margin: 0; cursor: pointer;
}
.tap-face {
  display: block; text-align: center;
  border: 2px solid var(--line); border-radius: 10px;
  background: var(--bg); padding: 12px 8px;
  font-size: 0.95rem; font-weight: 600;
}
.tap input:checked + .tap-face {
  border-color: var(--green); background: var(--green); color: #fff;
}
.tap input:focus-visible + .tap-face { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-big { padding: 14px 26px; font-size: 1.05rem; }

/* Ball page: intro, CTA, key facts, collapsed specs */
.ball-intro { max-width: 68ch; font-size: 1.02rem; }
.ball-cta { display: grid; grid-template-columns: 1fr; gap: 8px; max-width: 480px; margin: 14px 0; }
.ball-cta .btn-wide { margin-bottom: 0; }
.btn-disabled { opacity: 0.6; cursor: not-allowed; pointer-events: none; }

.key-facts dl {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0;
}
.key-facts dl > div {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 10px 12px;
}
.key-facts dt { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.key-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 1.02rem; }
.kf-sub { font-weight: 400; color: var(--muted); font-size: 0.8rem; }

.spec-details {
  margin: 18px 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 0 14px;
}
.spec-details summary {
  cursor: pointer; font-weight: 700; padding: 12px 0;
  color: var(--link);
}
.spec-details[open] summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; }
.spec-details .spec-table { border: 0; }
.spec-details > p:last-child { padding-bottom: 12px; }

@media (min-width: 640px) {
  .speed-btns { grid-template-columns: repeat(3, 1fr); }
  .tap-grid { grid-template-columns: repeat(3, 1fr); }
  .tap-grid-4 { grid-template-columns: repeat(4, 1fr); }
  .ball-cta { grid-template-columns: 1fr 1fr; max-width: 560px; }
  .key-facts dl { grid-template-columns: repeat(4, 1fr); }
}
