:root {
  --mint: #05dc8e;
  --green: #00ad69;
  --emerald: #087c4d;
  --forest: #073f31;
  --teal: #073f31;
  --canvas: #eef8f5;
  --line: #d8e7e2;
  --ink: #073f31;
  --muted: #35685b;
}

body {
  background: linear-gradient(180deg, #fff 0 82px, #edf8f5 82px, #e7f4f0 100%);
  color: var(--forest);
  font-family: Roboto, Arial, Helvetica, sans-serif;
}

.topbar {
  position: relative;
  height: 82px;
  padding: 0 28px;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #edf3f1;
  box-shadow: none;
  backdrop-filter: blur(12px);
}

.brand { display: block; }
.brand img {
  display: block;
  width: 220px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 34px;
}

.main-nav a {
  color: var(--forest);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  text-decoration: none;
}

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

.hero {
  max-width: none;
  margin: 0;
  padding: 54px max(28px, calc((100vw - 1240px) / 2)) 58px;
  background: linear-gradient(135deg, #f8fdfb 0%, #e8f7f2 100%);
  border-bottom: 1px solid var(--line);
}

.hero-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.hero-meta .eyebrow { margin: 0; }
.feed-status { flex: 0 0 auto; }

.hero-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: clamp(48px, 8vw, 110px);
  align-items: center;
}

h1 {
  max-width: 850px;
  font-size: clamp(54px, 6.8vw, 96px);
  line-height: .88;
  letter-spacing: -.065em;
}

.intro {
  max-width: 720px;
  margin-top: 32px;
  color: var(--muted);
  font-size: 18px;
}

.intent-note {
  max-width: 720px;
  color: var(--forest);
  border-color: var(--mint);
}

.route-card {
  min-height: 270px;
  padding: 28px;
  border: 1px solid #b9d5cc;
  border-radius: 0;
  background: rgba(255, 255, 255, .74);
  box-shadow: none;
}

.route-distance { font-size: 72px; }
.route-line { background: var(--green); }

.board {
  max-width: 1240px;
  padding: 58px 0 64px;
}

.board-heading {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 26px;
  margin-bottom: 26px;
}

.board-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
}

.page-title {
  max-width: none;
  margin: 0;
  color: var(--forest);
  font-size: clamp(48px, 6vw, 82px);
  line-height: .92;
  letter-spacing: -.06em;
}

.page-description {
  max-width: 760px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}

.board-title-row .intent-note {
  max-width: 760px;
}

.board-heading .controls {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
}
h2 {
  font-size: clamp(38px, 4.4vw, 62px);
  color: var(--forest);
}

.eyebrow.amber { color: var(--green); }

.segmented,
.course-filter {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.segmented button {
  min-width: 104px;
  padding: 11px 18px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: #f5faf8;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.segmented button + button { border-left: 0; }
.segmented button.active {
  color: #fff;
  background: var(--forest);
  border-color: var(--forest);
  box-shadow: none;
}

.course-filter {
  gap: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.course-filter span { padding: 0 12px; }
.course-filter select {
  min-width: 166px;
  padding: 11px 34px 11px 12px;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #f5faf8;
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  background: rgba(255, 255, 255, .78);
}

.table-head {
  padding: 16px 24px;
  background: var(--forest);
  color: #b9d5cc;
}

.runner { padding: 24px; }
.runner:nth-child(even) { background: #f5faf8; }
.runner-name {
  display: grid;
  grid-template-columns: 34px 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}
.silk {
  display: block;
  width: 50px;
  height: 58px;
}
.silk img {
  display: block;
  width: 50px;
  height: 58px;
  object-fit: contain;
}
.silk-placeholder {
  border: 1px solid var(--line);
  background: #f5faf8;
}
.horse-link {
  color: inherit;
  text-decoration: none;
}
.horse-link h3 { display: inline; }
.horse-link:hover h3,
.horse-link:focus-visible h3 { color: var(--green); }
.horse-link:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; }
.rank { border-radius: 0; }
.odds strong,
.movement strong { border-radius: 0; }

.note-grid { gap: 12px; }
.note {
  border-radius: 0;
  background: rgba(255, 255, 255, .76);
}
.note > b { border-radius: 0; }

footer {
  background: var(--forest);
  border: 0;
  color: #b9d5cc;
}

.spark-height-5 { height: 5px; }
.spark-height-6 { height: 6px; }
.spark-height-7 { height: 7px; }
.spark-height-8 { height: 8px; }
.spark-height-9 { height: 9px; }
.spark-height-10 { height: 10px; }
.spark-height-11 { height: 11px; }
.spark-height-12 { height: 12px; }
.spark-height-13 { height: 13px; }
.spark-height-14 { height: 14px; }
.spark-height-15 { height: 15px; }
.spark-height-16 { height: 16px; }
.spark-height-17 { height: 17px; }
.spark-height-18 { height: 18px; }
.spark-height-19 { height: 19px; }
.spark-height-20 { height: 20px; }
.spark-height-21 { height: 21px; }
.spark-height-22 { height: 22px; }
.spark-height-23 { height: 23px; }
.spark-height-24 { height: 24px; }

@media (max-width: 1288px) {
  .board { margin-inline: 24px; }
}

@media (max-width: 900px) {
  .topbar { height: auto; min-height: 82px; padding-block: 18px; gap: 18px; }
  .brand img { width: 190px; }
  .main-nav { gap: 18px; }
  .main-nav a { font-size: 12px; }
  .hero { padding-top: 42px; }
  .board-heading { align-items: stretch; }
  .board-heading .controls { flex-wrap: wrap; }
}

@media (max-width: 640px) {
  .topbar { align-items: flex-start; flex-direction: column; padding: 18px 20px; }
  .main-nav { width: 100%; justify-content: space-between; gap: 12px; }
  .main-nav a { font-size: 11px; }
  .hero { padding-inline: 20px; }
  .hero-meta { align-items: flex-start; flex-direction: column; }
  .board-title-row { flex-direction: column; }
  .board { margin-inline: 20px; }
  .controls { flex-direction: column; }
  .course-filter, .segmented { width: 100%; }
  .course-filter select, .segmented button { flex: 1; }
}
