/* Odds & Gallop — Race Smart. Back Value. */
:root {
  --bg: #0a0a0b;
  --bg-elevated: #141416;
  --bg-card: #1a1a1e;
  --bg-card-hover: #222228;
  --border: #2a2a32;
  --border-gold: #c9a227;
  --text: #f5f5f0;
  --text-muted: #9a9a92;
  --text-dim: #6b6b66;
  --gold: #d4af37;
  --gold-soft: #c9a227;
  --gold-dim: rgba(212, 175, 55, 0.15);
  --accent: #e8d48b;
  --success: #5cb85c;
  --danger: #c45c5c;
  --pending: #8a8a80;
  --radius: 12px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "SF Mono", "Cascadia Code", "Consolas", ui-monospace, monospace;
  --max: 960px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--accent); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* Header */
.site-header {
  background: linear-gradient(180deg, #121214 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
}

.brand-name:hover { color: var(--gold); text-decoration: none; }

.brand-tagline {
  font-size: 0.75rem;
  color: var(--gold-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.nav a {
  color: var(--text-muted);
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--bg-card);
  text-decoration: none;
}

.nav a.active {
  color: var(--bg);
  background: var(--gold);
}

.nav a.active:hover { color: var(--bg); }

/* Main */
main {
  flex: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
  width: 100%;
}

.page-intro {
  margin-bottom: 1.75rem;
}

.page-intro h1 {
  font-size: clamp(1.5rem, 4vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.35rem;
}

.page-date {
  color: var(--gold-soft);
  font-size: 0.95rem;
  font-weight: 500;
}

.page-lede {
  color: var(--text-muted);
  margin-top: 0.65rem;
  max-width: 42rem;
  font-size: 0.95rem;
}

/* Selection cards */
.selections-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sel-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
  transition: border-color 0.15s;
}

.sel-card:hover { border-color: #3a3a44; }

.sel-card.nap {
  border-left: 3px solid var(--gold);
  background: linear-gradient(135deg, var(--bg-card) 0%, #1e1c14 100%);
}

.sel-card.double {
  border-left: 3px solid #8b7a3a;
}

.sel-card.value {
  border-left: 3px solid #5a5a50;
}

.sel-label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.65rem;
}

.sel-horse {
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 0.25rem;
}

.sel-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
}

.sel-meta strong { color: var(--text); font-weight: 600; }

.sel-odds {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.odds-pill {
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
}

.stake-pill {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
}

.sel-reasons {
  list-style: none;
  margin: 0.5rem 0 0;
}

.sel-reasons li {
  position: relative;
  padding-left: 1.1rem;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.sel-reasons li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold-soft);
}

.sel-note {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Double legs */
.legs {
  display: grid;
  gap: 0.85rem;
  margin: 0.75rem 0;
}

@media (min-width: 560px) {
  .legs { grid-template-columns: 1fr auto 1fr; align-items: stretch; }
}

.leg {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

.leg-num {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-soft);
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.leg-horse { font-weight: 700; font-size: 1.05rem; }
.leg-detail { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.2rem; }

.leg-plus {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-weight: 700;
  font-size: 1.25rem;
}

/* Value trio */
.value-list {
  display: grid;
  gap: 1rem;
  margin-top: 0.5rem;
}

@media (min-width: 640px) {
  .value-list { grid-template-columns: repeat(3, 1fr); }
}

.value-item {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
}

.value-item .sel-horse { font-size: 1.15rem; }
.value-item .sel-meta { font-size: 0.85rem; margin-bottom: 0.5rem; }
.value-item .sel-reasons li { font-size: 0.85rem; }
.value-tag {
  font-size: 0.7rem;
  color: var(--gold-soft);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 0.35rem;
}

/* Race card */
.meetings-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.5rem;
}

.meetings-nav a {
  font-size: 0.8rem;
  padding: 0.35rem 0.7rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  text-decoration: none;
}

.meetings-nav a:hover {
  border-color: var(--gold-soft);
  color: var(--gold);
  text-decoration: none;
}

.meeting {
  margin-bottom: 2.5rem;
  scroll-margin-top: 5rem;
}

.meeting-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid var(--border);
}

.meeting-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
}

.meeting-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.race {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}

.race.priority {
  border-color: rgba(212, 175, 55, 0.4);
  background: linear-gradient(135deg, var(--bg-card) 0%, #1c1a12 100%);
}

.race-time {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--gold);
  font-size: 1rem;
  margin-right: 0.5rem;
}

.race-title {
  font-weight: 600;
  font-size: 0.95rem;
}

.race-details {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin: 0.35rem 0 0.65rem;
}

.candidates {
  list-style: none;
}

.candidates li {
  font-size: 0.88rem;
  color: var(--text-muted);
  padding: 0.3rem 0;
  border-top: 1px solid rgba(42, 42, 50, 0.6);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.candidates li:first-child { border-top: none; }

.cand-horse {
  color: var(--text);
  font-weight: 600;
}

.cand-note { color: var(--text-dim); font-size: 0.82rem; }

.badge-pick {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--gold-dim);
  color: var(--gold);
  border: 1px solid rgba(212, 175, 55, 0.35);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  vertical-align: middle;
}

/* Results */
.results-status {
  background: var(--bg-card);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  margin-bottom: 1.5rem;
}

.results-status h2 {
  font-size: 1.1rem;
  color: var(--pending);
  margin-bottom: 0.4rem;
}

.results-status p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.results-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

table.results {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  background: var(--bg-card);
}

table.results th {
  text-align: left;
  padding: 0.75rem 1rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

table.results td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.results tr:last-child td { border-bottom: none; }

table.results tr:hover td { background: var(--bg-card-hover); }

.status-pending {
  color: var(--pending);
  font-weight: 600;
  font-size: 0.85rem;
}

.status-won { color: var(--success); font-weight: 600; }
.status-lost { color: var(--danger); font-weight: 600; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: #0d0d0f;
  padding: 1.5rem 1.25rem;
  margin-top: auto;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  text-align: center;
}

.footer-brand {
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.footer-tagline {
  color: var(--gold-soft);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.footer-responsible {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-responsible a {
  color: var(--gold);
  font-weight: 500;
}

.footer-note {
  margin-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-dim);
}

/* Utility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

@media (max-width: 559px) {
  .leg-plus { padding: 0.15rem 0; transform: rotate(90deg); }
  .header-inner { flex-direction: column; align-items: flex-start; }
}
