:root {
  font-family:Inter,"Segoe UI",Arial,sans-serif;
  color:#243c34;
  background:#f5f6f2;
  font-synthesis:none;
  font-size:15px;
  --green:#173d32;
  --muted:#59695f;
  --border:#dce3da;
  --accent:#ac532f;
}

* {
  box-sizing:border-box;
}

body {
  margin:0;
}

html {
  --nav-clearance: 64px;
  scrollbar-gutter: stable;
  scroll-padding-top: var(--nav-clearance);
}
main { overflow-anchor: none; }

/* Keep native scrolling, with understated thumbs that match the archive. */
@media (forced-colors: none) {
  :root { --scrollbar-thumb: #879c90; --scrollbar-hover: #526f5e; }
  .app-header { --scrollbar-thumb: #9eb6aa; --scrollbar-hover: #d5e0d9; }
  .meeting-browser { --scrollbar-thumb: #b6c3b9; --scrollbar-hover: #748a7b; }
  * { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }
  @supports selector(::-webkit-scrollbar) {
    * { scrollbar-width: auto; scrollbar-color: auto; }
    ::-webkit-scrollbar { width: 10px; height: 10px; }
    .meeting-browser::-webkit-scrollbar { width: 8px; }
    ::-webkit-scrollbar-track, ::-webkit-scrollbar-corner { background: transparent; }
    ::-webkit-scrollbar-thumb {
      background: var(--scrollbar-thumb);
      border: 2px solid transparent;
      background-clip: padding-box;
      border-radius: 10px;
      min-height: 28px;
      min-width: 28px;
    }
    ::-webkit-scrollbar-thumb:hover { background-color: var(--scrollbar-hover); }
    ::-webkit-scrollbar-button { display: none; }
  }
}

a {
  color:inherit;
  text-decoration:none;
}

button,input,select {
  font:inherit;
}

button,a,input,select {
  -webkit-tap-highlight-color:transparent;
}

button,select {
  cursor:pointer;
}

button {
  border:0;
}

svg {
  flex-shrink:0;
  vertical-align:middle;
}

button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,[tabindex="0"]:focus-visible {
  outline:3px solid #b15d36;
  outline-offset:4px;
}

h1:focus {
  outline:none;
}

.skip {
  position:fixed;
  top:-100px;
  left:20px;
  padding:12px;
  background:white;
  z-index:100;
}

.skip:focus {
  top:10px;
}

.brand {
  display:flex;
  gap:11px;
  align-items:center;
  font-size:17px;
  font-weight:650;
  letter-spacing:-.4px;
}

.brand-mark {
  width:40px;
  height:44px;
  border:1px solid #789084;
  border-radius:12px;
  display:grid;
  place-items:center;
  color:#e9e6c4;
}

.brand-mark svg {
  width:29px;
  height:29px;
}

.nav-link {
  display:flex;
  gap:12px;
  align-items:center;
  min-height:48px;
  padding:12px;
  border-radius:8px;
  font-size:14px;
  color:#c7d7cd;
}

.nav-link:hover {
  background:#234b3e;
}

.nav-link.active {
  background:#e2eadf;
  color:#173d32;
  font-weight:600;
}

.status-dot,.coverage-dot {
  display:inline-block;
  width:7px;
  height:7px;
  border-radius:50%;
  background:#92bca2;
  margin-right:8px;
}

main {
  max-width:1312px;
  margin:auto;
  padding:42px 46px 50px;
  min-height:calc(100vh - 150px);
}

.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:31px;
}

h1 {
  font-size:36px;
  letter-spacing:-1.4px;
  font-weight:600;
  line-height:1.15;
  margin:0 0 12px;
}

h2 {
  font-size:21px;
  letter-spacing:-.5px;
  font-weight:600;
  margin:0;
}

h3 {
  font-weight:600;
  letter-spacing:-.35px;
}

.page-heading p {
  margin:0;
  color:var(--muted);
  line-height:1.6;
  font-size:14px;
}

.eyebrow {
  font-size:11px;
  letter-spacing:1.1px;
  text-transform:uppercase;
  color:var(--muted);
  line-height:1.6;
  margin-bottom:10px;
}

.eyebrow span {
  margin:0 8px;
}

.overview-panel {
  border:1px solid var(--border);
  background:#eef2e8;
  border-radius:12px;
  padding:23px 28px;
  margin-bottom:38px;
}

.stats {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  padding-top:20px;
}

.stat {
  display:flex;
  gap:13px;
  align-items:baseline;
  padding:0 25px;
  border-left:1px solid #ced8c8;
}

.stat:first-child {
  padding-left:0;
  border:0;
}

.stat strong {
  font-size:36px;
  font-weight:500;
  letter-spacing:-1.5px;
  font-variant-numeric:tabular-nums;
}

.stat span {
  font-size:13px;
  color:#526858;
}

.freshness {
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:11px;
  color:var(--muted);
  white-space:nowrap;
}

.freshness svg {
  width:14px;
  height:14px;
}

.section-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  margin:0 0 20px;
}

.segmented {
  background:#e9ede5;
  padding:4px;
  border-radius:8px;
  display:flex;
  gap:4px;
}

.segmented a {
  padding:8px 13px;
  border-radius:5px;
  font-size:12px;
  color:var(--muted);
}

.segmented .selected {
  background:#fff;
  color:var(--green);
  box-shadow:0 1px 3px #243c3412;
  font-weight:600;
}

.filters {
  display:flex;
  align-items:end;
  gap:14px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:18px 20px;
}

.filters label{
  display:flex;
  flex-direction:column;
  gap:8px;
  font-size:11px;
  color:#56695d;
  font-weight:600;
}

.filters input,.filters select{
  border:1px solid #d7dfd2;
  background:#fcfdfb;
  color:#294334;
  border-radius:6px;
  height:41px;
  padding:8px 11px;
  min-width:0;
}

.filters input {
  width:156px;
}

.filters .track-filter {
  flex:1;
}

.track-filter select {
  width:100%;
}

.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius:6px;
  min-height:41px;
  padding:10px 18px;
  font-weight:550;
  font-size:12px;
  background:#fff;
  color:var(--green);
  border:1px solid #cbd6c7;
}

.button:hover {
  background:#edf2e9;
}

.button.primary {
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}

.button.primary:hover {
  background:#285641;
}

.button svg {
  width:16px;
  height:16px;
}

.coverage {
  display:flex;
  align-items:center;
  gap:5px;
  flex-wrap:wrap;
  margin:17px 2px 24px;
  font-size:11px;
  color:var(--muted);
}

.coverage-dot {
  width:5px;
  height:5px;
  margin-right:2px;
  background:#688d65;
}

.queue {
  margin-left:auto;
  color:var(--accent);
}

.badge {
  display:inline-flex;
  align-items:center;
  border-radius:4px;
  font-size:10px;
  font-weight:600;
  background:#eff1eb;
  color:#61705c;
  padding:5px 8px;
  line-height:1.3;
}

.badge.accent {
  background:#f8e9df;
  color:#96451e;
}

.badge.success {
  background:#e7f0e3;
  color:#446540;
}

.badge.warning {
  background:#fbecdd;
  color:#8b401b;
}

.text-link {
  font-size:12px;
  font-weight:600;
  display:inline-flex;
  gap:12px;
  align-items:center;
  color:var(--green);
}

.text-link svg {
  width:17px;
  height:17px;
}

.text-link:hover {
  text-decoration:underline;
}

.footnote {
  font-size:11px;
  color:var(--muted);
  margin:22px 2px;
  line-height:1.7;
}

.back-link {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  color:var(--muted);
  margin-bottom:26px;
}

.back-link:hover {
  color:var(--green);
}

.back-link svg {
  width:16px;
  height:16px;
}

.source-link {
  display:flex;
  align-items:center;
  gap:8px;
  font-size:12px;
  white-space:nowrap;
  border-bottom:1px solid #b7c6b1;
  padding:7px 0;
}

.source-link svg {
  width:14px;
  height:14px;
}

.detail-toolbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:15px;
  padding:0 0 25px;
  margin:0 0 26px;
  border-bottom:1px solid var(--border);
  font-size:12px;
  color:var(--muted);
}

.section-intro {
  color:var(--muted);
  font-size:13px;
  margin:-8px 0 24px;
  line-height:1.6;
}

.race-grid {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}

.race-tile {
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:21px;
  display:flex;
  flex-direction:column;
  transition:border-color .15s;
}

.race-tile:hover {
  border-color:#6c8b62;
}

.race-tile-top {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.race-number {
  display:grid;
  place-items:center;
  width:33px;
  height:33px;
  background:#eff2e9;
  color:#536a4c;
  border-radius:6px;
  font-size:14px;
  font-weight:600;
}

.race-tile h3 {
  font-size:20px;
  margin:22px 0 8px;
}

.race-tile p {
  color:var(--muted);
  font-size:12px;
  line-height:1.6;
  margin:0 0 24px;
}

.race-tile-bottom {
  margin-top:auto;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  font-size:11px;
  color:var(--muted);
}

.race-tile-bottom svg {
  width:16px;
  height:16px;
  color:var(--green);
}

.race-tabs {
  display:flex;
  gap:5px;
  overflow-x:auto;
  padding:5px 3px 15px;
  margin:0 -3px 18px;
}

.race-tabs a {
  white-space:nowrap;
  font-size:12px;
  padding:10px 14px;
  border:1px solid var(--border);
  background:#fff;
  border-radius:6px;
}

.race-tabs a.selected {
  background:var(--green);
  color:#fff;
  border-color:var(--green);
}

.race-detail {
  background:white;
  border:1px solid var(--border);
  border-radius:10px;
  overflow:hidden;
}

.race-heading {
  padding:27px 26px 22px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:20px;
}

.race-heading h2 {
  font-size:28px;
  letter-spacing:-1px;
}

.race-heading p {
  font-size:13px;
  color:var(--muted);
  line-height:1.6;
  margin:8px 0 0;
}

.race-heading .eyebrow {
  margin-bottom:8px;
}

.table-scroll {
  overflow-x:auto;
  max-width:100%;
}

table {
  border-collapse:collapse;
  width:100%;
  text-align:left;
  white-space:nowrap;
  font-size:12px;
}

th {
  padding:14px 16px;
  background:#f1f4ed;
  color:#5c6f56;
  font-size:10px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.6px;
}

td {
  padding:16px;
  border-bottom:1px solid #edf0e9;
  color:#455848;
}

th:first-child,td:first-child {
  padding-left:26px;
}

th:last-child,td:last-child {
  padding-right:26px;
}

tbody tr:last-child td {
  border-bottom:0;
}

tbody tr:hover {
  background:#f8faf5;
}

td small {
  display:block;
  color:var(--muted);
  font-size:10px;
  margin-top:5px;
  font-weight:400;
}

.horse-name {
  display:inline-block;
  font-weight:600;
  color:var(--green);
  font-size:13px;
}

.horse-name:hover {
  text-decoration:underline;
}

.numeric {
  font-variant-numeric:tabular-nums;
}

.program-number {
  display:grid;
  place-items:center;
  width:26px;
  height:26px;
  background:#f1f3ed;
  border-radius:4px;
  font-size:11px;
}

.place {
  font-variant-numeric:tabular-nums;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:26px;
  min-height:26px;
}

.place.first {
  background:#e1edd9;
  color:#305527;
  border-radius:50%;
  font-weight:700;
}

.place[data-podium]:not([data-podium=""]) {
  min-width:30px;
  min-height:28px;
  padding:2px 6px;
  border:1px solid;
  border-radius:6px;
  font-weight:750;
}
.place[data-podium="1"] { background:#f4d779; color:#614600; border-color:#c8a245; }
.place[data-podium="2"] { background:#dce4e9; color:#354651; border-color:#a5b3bf; }
.place[data-podium="3"] { background:#ebc5a4; color:#673d20; border-color:#bf8c61; }

.scratched td {
  color:#7a8178;
}

.scratched .horse-name {
  text-decoration:line-through;
  color:#66725e;
}

.table-footer {
  display:flex;
  justify-content:space-between;
  gap:20px;
  padding:17px 26px;
  background:#fafbf7;
  border-top:1px solid var(--border);
  font-size:10px;
  color:var(--muted);
  line-height:1.6;
}

.table-footer>span:first-child {
  max-width:420px;
}

.pagination {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-top:25px;
  font-size:12px;
  color:var(--muted);
}

.empty {
  text-align:center;
  background:#fff;
  border:1px dashed #cad6c4;
  padding:48px 25px;
  border-radius:10px;
  margin:10px 0;
}

.empty>svg {
  color:#7c9870;
  width:29px;
  height:29px;
  margin-bottom:16px;
}

.empty h2 {
  font-size:21px;
  margin-bottom:13px;
}

.empty p {
  color:var(--muted);
  font-size:13px;
  line-height:1.7;
  max-width:470px;
  margin:0 auto 20px;
}

.empty .button {
  margin:4px;
}

.loading {
  padding:80px 20px;
  text-align:center;
  color:var(--muted);
}


@media(min-width:1600px) {
  main {
    padding-top:55px;
  }
}

@media(max-width:1150px) {
  main {
    padding:32px 26px;
  }
  .stat {
    flex-direction:column;
    gap:3px;
  }
  .race-grid {
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .filters {
    flex-wrap:wrap;
    gap:12px;
  }
  .filters .track-filter {
    min-width:180px;
  }
  .filters input {
    width:150px;
  }
}

@media(max-width:760px) {
  .brand {
    font-size:16px;
  }
  .brand-mark {
    width:34px;
    height:37px;
  }
  .nav-link {
    border-radius:7px 7px 0 0;
    min-height:44px;
    font-size:12px;
    padding:11px 14px;
  }
  .nav-link.active {
    background:#f5f6f2;
  }
  .nav-link svg {
    width:17px;
    height:17px;
  }
  main {
    padding:27px 22px 38px;
    min-height:60vh;
  }
  h1 {
    font-size:30px;
    letter-spacing:-1px;
  }
  .page-heading {
    margin-bottom:24px;
    align-items:flex-start;
  }
  .page-heading p {
    font-size:13px;
  }
  .overview-panel {
    padding:18px;
    margin-bottom:27px;
  }
  .eyebrow {
    font-size:10px;
  }
  .stats {
    padding-top:19px;
    gap:0;
  }
  .stat {
    padding:0 15px;
  }
  .stat strong {
    font-size:29px;
  }
  .stat span {
    font-size:10px;
    line-height:1.5;
  }
  h2 {
    font-size:19px;
  }
  .section-heading {
    gap:12px;
    align-items:center;
  }
  .segmented a {
    padding:7px 8px;
    font-size:10px;
  }
  .filters {
    padding:16px;
    gap:14px 12px;
    display:grid;
    grid-template-columns:1fr 1fr;
  }
  .filters input {
    width:100%;
    max-width:100%;
    font-size:12px;
  }
  .filters label {
    min-width:0;
  }
  .filters .track-filter {
    min-width:0;
  }
  .track-filter select {
    font-size:12px;
  }
  .filters .button {
    width:100%;
  }
  .coverage {
    font-size:10px;
    line-height:1.7;
    margin-bottom:17px;
  }
  .queue {
    margin-left:0;
  }
  .badge {
    font-size:9px;
    padding:4px 6px;
  }
  .text-link {
    font-size:11px;
  }
  .footnote {
    font-size:10px;
  }
  .race-grid {
    gap:11px;
  }
  .race-tile {
    padding:16px;
  }
  .race-tile h3 {
    font-size:19px;
    margin-top:18px;
  }
  .race-tile p {
    font-size:11px;
    margin-bottom:17px;
  }
  .race-tile-top {
    align-items:flex-start;
    gap:6px;
    flex-direction:column;
  }
  .race-tile-bottom {
    font-size:10px;
    line-height:1.6;
  }
  .source-link {
    font-size:10px;
    gap:5px;
  }
  .race-heading {
    padding:22px 18px;
  }
  .table-footer {
    padding:16px 18px;
    flex-direction:column;
    gap:10px;
  }
  .table-scroll table {
    min-width:710px;
  }
  .race-tabs a {
    font-size:11px;
    padding:10px 12px;
  }
  .detail-toolbar {
    flex-wrap:wrap;
    gap:12px;
    font-size:11px;
  }
  .empty {
    padding:37px 18px;
  }
  .empty h2 {
    font-size:19px;
  }
  .freshness {
    font-size:10px;
  }
  .back-link {
    margin-bottom:22px;
  }
}

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

/* Data-first navigation and calendar workspace. */
.app-header {
  position:sticky;
  top:0;
  z-index:10;
  display:flex;
  align-items:center;
  gap:24px;
  min-height:64px;
  padding:10px 24px;
  background:var(--green);
  color:white;
}

.brand {
  gap:9px;
  font-size:17px;
  white-space:nowrap;
}

.brand-mark {
  width:30px;
  height:34px;
  border:0;
}

.brand-mark svg {
  width:28px;
  height:28px;
}

.app-header nav {
  display:flex;
  gap:5px;
  align-items:center;
}

.app-header .utility-nav {
  margin-inline-start:auto;
  gap:2px;
}

.utility-nav .nav-link {
  font-size:12px;
  padding-inline:9px;
}

.nav-link {
  min-height:40px;
  padding:9px 13px;
  font-size:13px;
  gap:8px;
}




main {
  max-width:2000px;
  padding:24px;
  min-height:calc(100vh - 120px);
}

h1 {
  font-size:28px;
  letter-spacing:-.8px;
  margin-bottom:7px;
}

.page-heading {
  margin-bottom:20px;
}

.page-heading p {
  font-size:13px;
}



.filters {
  padding:12px 15px;
  gap:12px;
  flex-wrap:wrap;
}

.filters .segmented {
  align-self:center;
  margin-right:auto;
}

.filters label {
  font-size:10px;
  gap:5px;
}

.filters input {
  width:145px;
  height:35px;
  font-size:12px;
}

.filters select {
  height:35px;
  font-size:12px;
}

.filters .track-filter {
  flex:0 1 200px;
  min-width:150px;
}

.filters .button {
  min-height:35px;
  padding:8px 15px;
}

.coverage {
  margin:12px 1px 17px;
}

.calendar-workspace {
  display:grid;
  grid-template-columns:290px minmax(0,1fr);
  gap:24px;
  align-items:start;
}

.meeting-browser {
  padding-right:4px;
}

.meeting-browser-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}

.meeting-browser-heading h2 {
  font-size:17px;
}

.meeting-browser-heading>div {
  display:flex;
  gap:6px;
}

.week-arrow {
  display:grid;
  place-items:center;
  width:30px;
  height:30px;
  border:1px solid var(--border);
  border-radius:5px;
  background:#fff;
}

.week-arrow:hover {
  background:#e9efe2;
}

.week-arrow svg {
  width:15px;
  height:15px;
}

.meeting-list {
  display:flex;
  flex-direction:column;
  gap:10px;
}

.meeting-browser .pagination {
  position:sticky;
  top:0;
  z-index:1;
  margin:0 0 12px;
  padding:6px 0;
  gap:6px;
  background:#f5f6f2;
}

.meeting-browser .pagination .button {
  padding:8px;
}

.runner-form {
  display:flex;
  gap:8px;
  padding:0;
  margin:0;
  list-style:none;
  font-variant-numeric:tabular-nums;
}

.runner-form li {
  display:grid;
  justify-items:center;
  gap:3px;
  min-width:36px;
}

.runner-form strong {
  font-size:14px;
  font-weight:600;
}

.runner-form span,.runner-form small {
  font-size:11px;
  color:var(--muted);
}

.runner-form .form-win {
  color:var(--green);
  font-weight:700;
}

.form-cell {
  min-width:170px;
}


.meeting-card {
  background:#fff;
  border:1px solid var(--border);
  border-radius:8px;
}

.meeting-card.selected {
  border-color:#537b49;
  box-shadow:inset 3px 0 0 #537b49;
  background:#f7faf2;
}

.meeting-card:has(.meeting-select:is(:hover, :focus-visible)) {
  background:#eef3e9;
}

.meeting-card:not(.selected):has(.meeting-select:is(:hover, :focus-visible)) {
  border-color:#a3b59a;
}

.meeting-select {
  display:block;
  padding:14px 14px 9px;
  border-radius:8px;
}

.meeting-meta {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:11px;
}

.meeting-meta strong {
  font-weight:600;
  color:#53634d;
}

.meeting-card h3 {
  font-size:17px;
  margin:9px 0 5px;
}

.meeting-name {
  font-size:12px;
  color:var(--muted);
  margin:0 0 11px;
  line-height:1.5;
}

.meeting-date { display:flex; align-items:center; flex-wrap:wrap; gap:6px; }
.meeting-meta > span:last-child { white-space:nowrap; }
.meeting-date .badge { padding:3px 5px; font-size:10px; }

.quick-races {
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  padding:0 14px 12px;
}

.quick-races a {
  display:grid;
  place-items:center;
  min-width:28px;
  min-height:28px;
  padding:3px;
  border:1px solid #dfe6d9;
  border-radius:4px;
  background:#fff;
  font-size:11px;
  font-variant-numeric:tabular-nums;
}

.quick-races a:is(:hover, :focus-visible) {
  color:var(--green);
  background:#dce8d4;
  border-color:#78936b;
}

.quick-races a[aria-current] {
  color:white;
  background:var(--green);
  border-color:var(--green);
}

.selected-race {
  min-width:0;
  scroll-margin-top:16px;
}

.selected-race:focus {
  outline:none;
}

.selected-heading {
  display:flex;
  align-items:start;
  justify-content:space-between;
  gap:15px;
  margin:0 0 14px;
}

.selected-heading h2 {
  font-size:23px;
  letter-spacing:-.6px;
}

.selected-heading p {
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
  margin:6px 0 0;
}

.standalone-link {
  display:grid;
  place-items:center;
  min-width:32px;
  min-height:32px;
  border:1px solid var(--border);
  border-radius:5px;
  background:white;
}

.standalone-link svg {
  width:15px;
  height:15px;
}

.race-tabs {
  gap:4px;
  padding-bottom:10px;
  margin-bottom:8px;
}

.race-tabs a {
  padding:8px 10px;
  font-size:11px;
}

.race-heading {
  padding:17px 18px;
}

.race-heading h2 {
  font-size:23px;
}

.race-heading h2>span {
  margin-left:10px;
  font-size:12px;
  letter-spacing:0;
  font-weight:400;
  color:var(--muted);
}

.race-heading p {
  margin-top:6px;
  font-size:12px;
}

th {
  padding:11px 12px;
}

td {
  padding:11px 12px;
}

th:first-child, td:first-child {
  padding-left:18px;
}

th:last-child, td:last-child {
  padding-right:18px;
}

.table-footer {
  padding:12px 18px;
}

.expand-mark {
  display:inline-block;
  margin-left:8px;
  color:#778e68;
  font-size:14px;
}

[data-preview][aria-expanded="true"] .expand-mark {
  transform:rotate(45deg);
}

.horse-preview>td {
  background:#edf3e7;
  padding:16px 20px;
  white-space:normal;
  border-top:1px solid #ccd9c3;
  border-bottom:1px solid #ccd9c3;
}

.horse-preview p {
  font-size:11px;
  color:#607453;
  margin:8px 0 14px;
}

.preview-table {
  min-width:0!important;
  background:#fff;
  font-size:11px;
}

.preview-table th {
  background:#e4ecd9;
}

.preview-table th, .preview-table td {
  padding:9px 12px;
  white-space:normal;
}

.preview-table a {
  color:var(--green);
  font-weight:700;
}

.preview-footer {
  margin-top:15px;
}

.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  white-space:nowrap;
}


@media (min-width:1600px) {
  .calendar-workspace {
    grid-template-columns:330px minmax(0,1fr);
    gap:30px;
  }
}

@media (max-width:1000px) {
  .app-header {
    gap:14px;
    padding:10px 18px;
    flex-wrap:wrap;
  }
  main {
    padding:20px 18px;
  }
  .calendar-workspace {
    grid-template-columns:minmax(0,1fr);
    gap:20px;
  }
  .meeting-browser {
    padding:0;
  }
  .meeting-list {
    flex-direction:row;
    overflow-x:auto;
    gap:10px;
    padding:3px 3px 12px;
    scroll-snap-type:x proximity;
  }
  .meeting-card {
    flex:0 0 260px;
    scroll-snap-align:start;
  }
  .meeting-browser .footnote {
    margin:6px 0 0;
  }
  .filters .segmented {
    flex:0 0 auto;
  }
}

@media (max-width:600px) {
  .app-header {
    gap:9px;
    padding:12px 16px 0;
  }
  .brand {
    font-size:16px;
  }
  .nav-link {
    border-radius:6px 6px 0 0;
    min-height:42px;
  }
  .nav-link.active {
    background:#f5f6f2;
  }
  main {
    padding:20px 16px;
  }
  .page-heading {
    flex-direction:column;
    gap:12px;
    margin-bottom:15px;
  }
  h1 {
    font-size:26px;
  }
  .filters {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    padding:12px;
  }
  .filters .segmented {
    grid-column:1/-1;
    margin-right:0;
    justify-content:space-between;
  }
  .segmented a {
    font-size:11px;
    padding:8px;
  }
  .filters input {
    width:100%;
    font-size:12px;
  }
  .filters .track-filter {
    min-width:0;
  }
  .filters .button {
    min-height:35px;
  }
  .quick-races a {
    min-width:32px;
    min-height:32px;
  }
  .selected-heading h2 {
    font-size:21px;
  }
  .race-tabs a {
    min-height:38px;
    padding:10px 12px;
  }
  .race-heading {
    padding:15px;
  }
  .race-heading h2 {
    font-size:22px;
  }
  .race-heading h2>span {
    font-size:11px;
  }
  .preview-footer {
    align-items:flex-start;
  }
}

.profile-follow, .follow-actions { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.follow-actions { justify-content:center; }
.watch-list { display:grid; gap:16px; }
.watch-card { min-width:0; background:white; border:1px solid var(--border); border-radius:9px; }
.watch-card > header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; border-bottom:1px solid var(--border); }
.watch-card > header > div { display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; }
.watch-card > header span, .watch-empty { color:var(--muted); font-size:12px; }
.watch-card h2 { margin:0; font-size:19px; }
.watch-card .button { min-height:32px; padding:5px 10px; }
.watch-periods { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.watch-periods > section { min-width:0; }
.watch-periods > section + section { border-inline-start:1px solid var(--border); }
.watch-periods h3 { margin:0; padding:10px 14px; font-size:14px; }
.watch-periods h3 span { color:var(--muted); font-size:12px; font-weight:normal; }
.watch-periods details summary { cursor:pointer; padding:8px 14px; font-size:12px; }
.watch-empty { margin:0; padding:0 14px 14px; }
.watch-table table { white-space:normal; }
.watch-table table :is(th,td) { padding:6px 10px; }
.watch-table time, .watch-table td:last-child { font-variant-numeric:tabular-nums; }
.watch-table time, .watch-table td:last-child > span { white-space:nowrap; }
.watch-table small { margin-top:2px; }
@media (max-width:950px) {
  .watch-periods { grid-template-columns:minmax(0,1fr); }
  .watch-periods > section + section { border-inline-start:0; border-top:1px solid var(--border); }
}
@media (max-width:600px) {
  .watch-table table :is(th,td) { padding:5px; overflow-wrap:anywhere; }
}
.horse-background { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(0, 2fr); gap: 28px; margin: 24px 0 32px; padding: 20px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.horse-background h2 { margin: 0 0 12px; }
.profile-facts dl { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 12px 16px; }
.profile-facts dt { color: var(--muted); }
.profile-facts dd { margin: 0; overflow-wrap: anywhere; }
.profile-facts small { display: block; color: var(--muted); }
.pedigree-branches { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; list-style: none; padding: 0; margin: 12px 0 0; }
.pedigree-branches li { border-left: 2px solid var(--border); padding: 6px 0 6px 12px; min-width: 0; overflow-wrap: anywhere; }
.pedigree-branches .pedigree-branches { grid-template-columns: repeat(2,minmax(0,1fr)); }
.pedigree-branches .pedigree-branches .pedigree-branches { grid-template-columns: 1fr; }
.pedigree-role, .pedigree-branches small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 4px; }
.offspring-section { margin: 32px 0; }
@media (max-width:900px) { .horse-background { grid-template-columns: 1fr; } }
@media (max-width:600px) {
  .horse-background { padding: 16px; }
  .profile-facts dl, .pedigree-section > .pedigree-branches { grid-template-columns: 1fr; }
  .pedigree-branches .pedigree-branches { grid-template-columns: 1fr; }
  .profile-facts dl { gap: 5px; }
  .profile-facts dd { margin-bottom: 12px; }
}
.person-link { display: inline-block; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width:600px) {
}
.muted { color: var(--muted); }
#save-feedback:not(:empty) { margin: 12px 0; padding: 12px 16px; border: 1px solid #ccd9c3; background: #eef3e8; }
.collection-status { margin: 20px 0; padding: 16px; background: #eef3e8; border: 1px solid #ccd9c3; line-height: 1.6; }
/* Keep navigation steady; race content grows with its rows and disclosures. */
.selected-heading { margin-bottom: 8px; }
.selected-heading > div { min-width: 0; }
.selected-heading h2, .selected-heading p { overflow-wrap: anywhere; }
.race-tabs { flex-wrap: nowrap; }
.race-tabs a { flex-shrink: 0; }
.data-note { color: var(--muted); font-size: 12px; margin: 8px 0 16px; }
.data-note summary { cursor: pointer; width: fit-content; }
.data-note p { max-width: 75ch; line-height: 1.6; }
.table-footer .data-note { margin: 0; }
.table-footer .data-note[open] { grid-column: 1 / -1; }
.table-footer .data-note[open] p { margin-bottom: 0; }
.selected-race > .empty { margin: 0; }
@media (max-width: 1000px) {
  html { --nav-clearance: 104px; }
  .meeting-list { align-items: stretch; }
  .app-header { display:grid; grid-template-columns:auto minmax(0,1fr); gap:4px 8px; }
  .main-nav { grid-column:1 / -1; grid-row:2; overflow-x:auto; }
  .utility-nav { grid-column:2; grid-row:1; }
  .main-nav .nav-link { flex-shrink:0; }
}
@media (max-width:600px) {
  .app-header { padding:6px 8px 0; }
  .app-header .main-nav { gap:2px; }
  .main-nav .nav-link { flex:1 0 auto; flex-direction:column; gap:3px; padding:5px 4px; font-size:11px; }
  .utility-nav .nav-link { padding:4px; font-size:11px; text-align:center; }
  .table-footer { font-size: 11px; }
}

.odds-cell { min-width: 96px; }
.odds-cell strong { font-variant-numeric: tabular-nums; font-weight: 650; }
.equipment { color: var(--muted); font-size: 11px; white-space: normal; }
.scratch-note { color: #8c3c25; }
.odds-history { padding: 12px 0; }
.odds-history h3 { margin: 0 0 8px; font-size: 14px; }
.odds-history ul { padding: 0; margin: 0; list-style: none; }
.odds-history li { margin: 8px 0; white-space: normal; }
.odds-history strong { display: inline-block; min-width: 56px; font-variant-numeric: tabular-nums; }
.odds-history small { display: block; }
.toto-coverage { margin: 20px 0; }

/* Data workspace: compact controls, natural page flow, explicit row actions. */
main { padding-top: 16px; min-height: var(--preserved-height, calc(100vh - 120px)); }
.calendar-workspace { margin: 0; gap: 8px; grid-template-columns: 280px minmax(0,1fr); }
.meeting-browser { align-self: stretch; min-width: 0; }
.meeting-controls { position: sticky; top: 0; z-index: 3; background: #f5f6f2; padding: 0 0 8px; }
.meeting-browser-heading { margin-bottom: 6px; gap: 6px; }
.meeting-browser-heading h2, .meeting-browser-heading > div { flex-shrink: 0; }
.meeting-range { min-width: 0; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#calendar-filter { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px; padding: 0; margin: 0; border: 0; background: transparent; }
#calendar-filter .segmented { grid-column: 1/-1; display: flex; gap: 2px; margin: 0; }
#calendar-filter .segmented a { padding: 7px 6px; font-size: 11px; flex: 1; text-align: center; white-space: nowrap; }
.custom-dates { grid-column: 1/-1; grid-row: 2; min-width: 0; font-size: 11px; }
.custom-dates summary { cursor: pointer; margin-left: calc(50% + 3px); height: 32px; padding: 7px 6px; white-space: nowrap; }
.date-fields { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto; gap: 4px; margin: 6px 0 0; align-items: end; }
.date-fields label { min-width: 0; }
#calendar-filter .date-fields input { height: 32px; padding: 4px; font-size: 11px; }
#calendar-filter .date-fields .button { min-width: 64px; min-height: 32px; height: 32px; padding: 4px 12px; font-size: 11px; }
#calendar-filter input { width: 100%; min-width: 0; }
#calendar-filter .track-filter { grid-column: 1; grid-row: 2; align-self: start; position: relative; z-index: 1; min-width: 0; }
#calendar-filter select { width: 100%; height: 32px; }
#calendar-filter .button { align-self: end; }
.meeting-browser .pagination { position: static; }
.selected-heading { margin: 6px 0 10px; }
.selected-heading h2 { font-size: 24px; }
.race-tabs { margin-bottom: 8px; padding-bottom: 4px; }
.race-detail { display: block; }
.race-heading { padding: 12px 14px; }
.race-heading > div { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; }
.race-heading h2 { font-size: 21px; }
.race-heading p { margin: 0; }
.race-status { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 12px; }
.race-status .freshness { font-size: 11px; white-space: nowrap; }
@media (min-width:1001px) {
  html:has(.calendar-workspace) { scrollbar-gutter: auto; }
  #app:has(.calendar-workspace) { display: flex; flex-direction: column; height: 100dvh; }
  #app:has(.calendar-workspace) > main { flex: 1; width: 100%; max-width: none; min-height: 0; margin-block: 0; overflow: hidden; padding: 16px 0 0 8px; }
  .calendar-workspace { height: 100%; min-height: 0; }
  .calendar-workspace > .meeting-browser,
  .calendar-workspace > .selected-race { height: 100%; min-height: 0; overflow-y: auto; overscroll-behavior-y: contain; scrollbar-gutter: stable; }
}

.meeting-select { padding: 10px 12px 7px; }
.meeting-card h3 { margin-top: 5px; }
.meeting-name { margin-bottom: 6px; }
.table-scroll { border: 1px solid var(--border); border-radius: 6px; background: #fff; }
.race-detail > #race-table > .table-scroll { border-left: 0; border-right: 0; border-radius: 0; }
table { font-size: 13px; }
th { font-size: 11px; letter-spacing: .2px; text-transform: none; }
th,td,th:first-child,td:first-child,th:last-child,td:last-child { padding: 10px 12px; }
th:has([data-sort]) { padding: 0; }
th [data-sort] { width: 100%; display: flex; align-items: center; gap: 8px; padding: 12px; background: transparent; color: inherit; font-size: inherit; font-weight: 600; text-align: left; white-space: nowrap; }
th [data-sort] span { color: var(--muted); }
th [aria-label]:hover { background: #e3ebdd; }
th[aria-sort=ascending],th[aria-sort=descending] { color: var(--green); background: #e3ebdd; }
th button:focus-visible { outline-offset: -3px; }
td small { font-size: 11px; line-height: 1.45; margin-top: 4px; }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.identity-cell,.number-cell { display: flex; align-items: center; gap: 7px; }
.identity-cell .horse-name { white-space: normal; min-width: 130px; }
tr.expandable { cursor: pointer; }
tr.expandable:hover,tr.expandable:focus-within { background: #eef4e8; }
tr.expanded { background: #e8f0e1; }
.horse-preview > td { padding: 16px; white-space: normal; background: #e1ebd7; border-bottom: 2px solid #bacdad; }
.runner-preview-layout { display: grid; grid-template-columns: minmax(0,2fr) repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.runner-preview-layout > *, .horse-activity-layout > * { min-width: 0; }
.runner-preview-layout h3 { font-size: 14px; margin: 0 0 12px; }
.runner-preview-layout .table-scroll { max-width: 100%; margin-bottom: 12px; }
.runner-preview-layout table { font-size: 12px; }
.runner-preview-layout dl,.horse-facts dl { margin: 0 0 16px; }
.runner-preview-layout dt,.horse-facts dt { color: var(--muted); font-size: 12px; margin: 12px 0 4px; }
.runner-preview-layout dd,.horse-facts dd { margin: 0; line-height: 1.5; overflow-wrap: anywhere; }
.preview-summary { font-size: 12px; color: var(--muted); margin: 8px 0; }
.directory-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 14px; }
.directory-heading .page-heading { margin: 0; }
.directory-heading h1 { margin: 0; }
.directory-heading > span { color: var(--muted); font-size: 13px; }
.directory-toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 10px; margin: 0 0 16px; }
.directory-toolbar label,.activity-filter label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--muted); }
.directory-toolbar input,.directory-toolbar select,.activity-filter select { height: 36px; padding: 7px 10px; border: 1px solid #cbd6c7; border-radius: 5px; background: #fff; color: var(--green); font: inherit; font-size: 13px; }
.directory-toolbar .compact-search { flex: 1 1 240px; max-width: 360px; }
.directory-toolbar input[type=number] { width: 100px; }
.directory-toolbar .check-filter { flex-direction: row; align-items: center; min-height: 36px; }
.directory-toolbar input[type=checkbox] { width: 17px; height: 17px; }
.directory-toolbar .text-link { padding: 9px 0; font-size: 12px; }
.directory-toolbar .button,.activity-filter .button { min-height: 36px; padding: 8px 14px; }
.directory-table th:first-child { width: 26%; }
.directory-table td { height: 50px; }
.directory-table td:nth-child(2) { white-space: normal; }
.page-heading { margin-bottom: 14px; }
.back-link { margin-bottom: 12px; }
.summary-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; padding: 12px 0; margin: 0 0 12px; border-bottom: 1px solid var(--border); }
.summary-strip > span { color: var(--muted); font-size: 12px; }
.summary-strip .stats { display: flex; flex-wrap: wrap; gap: 12px 24px; padding: 0; }
.summary-strip .stat { padding: 0; border: 0; display: flex; align-items: baseline; gap: 6px; }
.summary-strip .stat strong { font-size: 20px; }
.summary-strip .stat span { font-size: 12px; }
.activity-controls { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; align-items: end; margin-bottom: 12px; }
.activity-filter { display: flex; align-items: end; gap: 8px; }
.activity-table .horse-name { white-space: normal; min-width: 120px; }
.activity-table td { vertical-align: top; }
.profile-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.profile-tabs a { padding: 10px 0; border-bottom: 2px solid transparent; font-weight: 600; font-size: 14px; }
.profile-tabs a.selected { border-color: var(--green); }
.horse-activity-layout { display: grid; grid-template-columns: minmax(0,1fr) 250px; gap: 24px; }
.horse-facts { padding: 14px 18px; border-left: 1px solid var(--border); }
.horse-facts h3 { margin: 0 0 14px; font-size: 16px; }
.horse-background { margin: 12px 0 24px; }
.pagination { margin: 14px 0; }
@media (min-width:1600px) { .calendar-workspace { grid-template-columns:300px minmax(0,1fr); } }
@media (max-width:1100px) {
  .horse-activity-layout { grid-template-columns:minmax(0,1fr); }
  .horse-facts { border-left:0; border-top:1px solid var(--border); }
  .horse-facts dl { display:grid; grid-template-columns: auto 1fr; gap:10px 20px; }
  .horse-facts dt { margin:0; }
  .runner-preview-layout { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:1000px) {
  .calendar-workspace { grid-template-columns:minmax(0,1fr); gap:16px; }
  .meeting-controls { position:static; }
  #calendar-filter .segmented { justify-content:start; }
  #calendar-filter .segmented a { flex:0 1 auto; padding:8px 12px; }
}
@media (max-width:600px) {
  main { padding:12px; }
  .directory-toolbar { gap:8px; }
  .directory-toolbar .compact-search { flex-basis:100%; max-width:none; }
  .directory-toolbar label:not(.compact-search) { flex:1 1 auto; }
  .directory-toolbar input,.directory-toolbar select { min-width:0; max-width:100%; }
  .directory-toolbar input[type=number] { width:100%; }
  .directory-toolbar label:has(input[type=number]) { width:44%; }
  .summary-strip { gap:8px; }
  .summary-strip .stats { gap:8px 16px; }
  .summary-strip > span { flex-basis:100%; }
  th [data-sort] { min-height:44px; }
  .horse-preview > td { padding:12px; }
  .race-heading { flex-direction:column; align-items:stretch; gap:8px; }
  .race-status { justify-content:space-between; }
  .race-heading > div { display:block; }
  .race-heading p { margin-top:5px; }
  .activity-controls .segmented { overflow-x:auto; max-width:100%; }
  .activity-controls .segmented a { flex-shrink:0; }
  .page-heading { flex-direction:row; align-items:center; }
  .page-heading h1 { font-size:24px; }
}

.preview-content { width: var(--preview-width); max-width: 100%; position: sticky; left: 16px; }

/* Venue profiles share the archive's typography and local-only navigation. */
.analytics-view { max-width:1440px; margin-inline:auto; }
.analytics-view .page-heading { margin-bottom:12px; }
.analytics-filters { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; }
.analytics-leaders { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:12px 0; }
.analytics-leader { display:grid; gap:2px; padding:10px 14px; background:white; border:1px solid var(--border); border-radius:8px; color:var(--green); }
.analytics-leader:is(:hover,:focus-visible) { background:#f4f7ef; border-color:var(--accent); }
.analytics-leader span { font-size:13px; overflow-wrap:anywhere; }
.analytics-leader span:first-child,.analytics-caption { font-size:12px; color:var(--muted); }
.analytics-leader strong { font-size:clamp(18px,2vw,26px); font-variant-numeric:tabular-nums; }
.analytics-caption { margin:8px 0; }
.leaderboard .numeric { text-align:right; white-space:nowrap; }
.leaderboard th,.leaderboard td { padding:8px 12px; }
.leaderboard tbody th { color:inherit; background:transparent; font-size:inherit; text-transform:none; letter-spacing:normal; border-bottom:1px solid var(--border); }
.leaderboard .ranked,.leaderboard [aria-sort] { color:var(--green); background:#eef3e9; font-weight:650; }
.leaderboard thead a { display:block; text-decoration:underline; text-decoration-color:#b0bcae; text-underline-offset:3px; }
@media(max-width:650px) {
  .analytics-leaders { gap:4px; }
  .analytics-leader { padding:8px; }
  .analytics-leader span { font-size:11px; }
  .analytics-view .table-scroll table { min-width:540px; }
  .leaderboard td,.leaderboard th { padding:8px; }
}

.tracks-workspace { display:grid; grid-template-columns:minmax(340px,0.82fr) minmax(0,1.18fr); gap:16px; align-items:start; }
.track-results { min-width:0; }
.track-directory { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,310px),1fr)); gap:10px; align-items:start; }
.track-map-panel { position:sticky; top:calc(var(--nav-clearance) + 20px); border:1px solid var(--border); border-radius:10px; padding:20px; background:#edf1e9; }
.track-map-heading { display:flex; flex-wrap:wrap; gap:8px 16px; align-items:baseline; justify-content:space-between; }
.track-map-heading h1 { font-size:24px; margin:0; }
.track-map-heading span { font-size:12px; color:var(--muted); }
.finland-map { display:block; width:100%; max-height:calc(100vh - 200px); min-height:420px; margin:10px auto; overflow:visible; }
.finland-outline { fill:#fcfdf9; stroke:#a3b19d; stroke-width:1.5; stroke-linejoin:round; }
.track-map-marker { outline:none; }
.track-map-hit { fill:transparent; }
.track-map-leader { stroke:#91a596; stroke-width:1.2; pointer-events:none; }
.track-map-marker:is(:hover,:focus-visible) .track-map-leader { stroke:var(--accent); stroke-width:2; }
.track-map-dot { fill:var(--green); stroke:#fcfdf9; stroke-width:1.5; }
.track-map-marker text { fill:var(--green); font-family:inherit; font-size:13px; font-weight:550; paint-order:stroke; stroke:#f5f7f2; stroke-width:2px; stroke-linejoin:round; }
.track-map-marker:hover .track-map-dot,.track-map-marker:focus-visible .track-map-dot { fill:var(--accent); r:7; }
.track-map-marker:hover text,.track-map-marker:focus-visible text { fill:var(--accent); text-decoration:underline; }
.track-map-marker:focus-visible .track-map-hit { stroke:var(--accent); stroke-width:2; }
.track-card { display:flex; min-height:44px; overflow:hidden; border:1px solid var(--border); border-radius:8px; background:white; }
.track-card:is(:hover,:focus-visible) { background:#f5f8f1; border-color:var(--accent); }
.track-card-photo { width:35%; min-height:112px; max-height:145px; align-self:stretch; object-fit:cover; }
.track-card-body { flex:1; min-width:0; display:grid; align-content:center; gap:3px; padding:10px 12px; }
.track-card-heading { display:flex; align-items:baseline; gap:6px; }
.track-card-heading h2 { margin:0; font-size:16px; line-height:1.35; }
.track-card-body > span,.track-card-body small { color:var(--muted); font-size:12px; }
.track-card-heading b { margin-inline-start:auto; padding:1px 5px; background:#edf1e9; color:var(--green); font-size:11px; border-radius:4px; }
.track-card-next { display:flex; align-items:center; gap:5px; margin-top:3px; }
.track-card-next svg { width:14px; height:14px; }
.track-photo { margin:0; min-width:0; }
.track-photo img { display:block; width:100%; height:auto; }
.track-photo figcaption { padding:10px 14px; color:var(--muted); font-size:11px; line-height:1.6; background:#f0f3eb; overflow-wrap:anywhere; }
.track-photo figcaption svg { width:12px; height:12px; }
.track-photo figcaption span { display:block; }
.track-photo figcaption a,.track-links a,.track-sources a { text-decoration:underline; text-underline-offset:3px; }
.track-profile { display:grid; grid-template-columns:minmax(260px,1fr) minmax(0,1.4fr); gap:32px; align-items:start; margin-bottom:32px; }
.track-profile h2 { margin-top:0; }
.track-facts dl { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.2fr); gap:12px 20px; font-size:14px; }
.track-facts dt { color:var(--muted); }
.track-facts dd { margin:0; overflow-wrap:anywhere; }
.track-links { display:flex; flex-wrap:wrap; gap:16px; margin:22px 0; font-size:13px; }
.track-no-photo { background:#e9eee4; border-radius:10px; min-height:200px; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:28px; color:var(--muted); text-align:center; }
.track-no-photo svg { width:36px; height:36px; }
.track-races { display:flex; flex-wrap:wrap; gap:10px 14px; max-width:520px; }
.track-races a { white-space:nowrap; }
.track-sources { margin-top:28px; font-size:13px; }
.track-sources h2 { font-size:18px; }
.track-sources ul { padding-left:20px; line-height:2; }
.selected-heading > .button { flex-shrink:0; }
@media (max-width:760px) {
  .tracks-workspace { grid-template-columns:minmax(0,1fr); gap:16px; }
  .track-map-panel { position:static; padding:16px; }
  .finland-map { min-height:0; max-height:none; max-width:560px; }
}
@media (max-width:650px) {
  .track-directory,.track-profile { grid-template-columns:minmax(0,1fr); }
  .track-profile { gap:20px; }
  .track-facts dl { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .selected-heading { flex-wrap:wrap; gap:12px; }
}

/* Whole-row disclosures keep the data edge clear and previews in normal flow. */
.chevron-cell { width: 30px; min-width: 30px; padding: 8px !important; text-align: center; position: sticky; right: 0; background: #fff; }
th.chevron-cell { background: #f0f3eb; }
.row-chevron { display: inline-block; color: var(--green); font-size: 19px; line-height: 1; }
tr[aria-expanded=true] .row-chevron { transform: rotate(180deg); }
tr.expandable:hover .chevron-cell,tr.expandable:focus-within .chevron-cell { background: #eef4e8; }
tr.expanded .chevron-cell { background: #e8f0e1; }
tr.expandable:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.compact-horse { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 16px; margin-bottom: 12px; font-size: 12px; }
.compact-horse strong { font-size: 14px; }
.compact-horse a { text-decoration: underline; text-underline-offset: 2px; }
.runner-preview-layout.without-history { grid-template-columns: minmax(0,1fr) repeat(2,minmax(0,1.3fr)); }
.runner-preview-layout h4 { font-size: 13px; margin: 0 0 6px; }
.runner-preview-layout h5 { font-size: 11px; font-weight: 600; color: var(--muted); margin: 10px 0 4px; }
.runner-preview-layout p { font-size: 12px; margin: 4px 0 8px; }
.runner-preview-layout .table-scroll { margin-bottom: 0; }
.runner-preview-layout td,.runner-preview-layout th { padding: 7px 8px; }
.compact-person { border-left: 1px solid #bacdad; padding-left: 16px; min-width: 0; }
.compact-person h4 a { text-decoration: underline; text-underline-offset: 2px; }
.compact-starts { list-style: none; padding: 0; margin: 0; font-size: 12px; }
.compact-starts li { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; gap: 3px 7px; padding: 6px 0; border-top: 1px solid #c6d6bc; }
.compact-starts li > a { overflow-wrap: anywhere; font-weight: 600; }
.compact-starts li > span:nth-of-type(2) { grid-column: 2; font-size: 11px; color: var(--muted); }
.compact-starts li > strong { grid-column: 3; grid-row: 1 / 3; align-self: center; font-variant-numeric: tabular-nums; }
.horse-recent .odds-history { padding: 0; margin-top: 12px; }
.horse-recent .odds-history h3 { margin-bottom: 4px; font-size: 12px; }
.horse-recent .odds-history li { margin: 4px 0; font-size: 12px; }
.horse-recent .odds-history strong { min-width: 0; margin-right: 8px; }
@media (max-width:1200px) {
  .runner-preview-layout,.runner-preview-layout.without-history { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .horse-recent { grid-column:1 / -1; }
  .compact-person { border-left:0; border-top:1px solid #bacdad; padding:10px 0 0; }
}
@media (max-width:600px) {
  .runner-preview-layout,.runner-preview-layout.without-history { grid-template-columns:minmax(0,1fr); gap:10px; }
  .compact-horse { margin-bottom:10px; }
}

/* Profile photos keep their original framing and carry their own attribution. */
.profile-identity { display:flex; align-items:center; gap:24px; margin:12px 0 20px; }
.profile-identity .page-heading { flex:1; min-width:0; margin:0; flex-wrap:wrap; }
.profile-identity h1 { overflow-wrap:anywhere; }
.profile-photo { margin:0; width:170px; max-width:100%; flex-shrink:0; }
.photo-frame { display:flex; align-items:center; justify-content:center; height:160px; background:#edf1e8; border-radius:8px; overflow:hidden; }
.photo-frame img { display:block; width:100%; height:100%; object-fit:contain; }
.photo-frame img[hidden],.photo-error[hidden] { display:none; }
.photo-error,.photo-placeholder { color:var(--muted); font-size:12px; text-align:center; padding:12px; }
.photo-placeholder { width:88px; min-height:72px; display:grid; place-content:center; border:1px dashed var(--border); border-radius:8px; flex-shrink:0; }
.profile-photo figcaption { font-size:11px; line-height:1.5; color:var(--muted); padding-top:5px; overflow-wrap:anywhere; white-space:normal; }
.profile-photo figcaption a { text-decoration:underline; text-underline-offset:2px; }
.profile-photo details { margin-top:3px; }
.profile-photo details summary { cursor:pointer; }
.profile-photo details p { margin:5px 0; font-size:11px; }
.compact-photo { width:130px; margin:0 0 10px; }
.compact-photo .photo-frame { height:110px; }
.compact-horse .compact-photo { align-self:flex-start; }
@media (max-width:600px) {
  .profile-identity { align-items:flex-start; gap:12px; flex-wrap:wrap; }
  .profile-identity .profile-photo { width:120px; }
  .profile-identity .photo-frame { height:120px; }
  .profile-identity .page-heading { flex-basis:140px; gap:8px; }
}

/* Predictions use the existing table flow; no nested scrolling or reserved height. */
.prediction-note { margin: 0; padding: .5rem 1rem; font-size: .8rem; color: var(--muted, #53655e); border-bottom: 1px solid #e7ebe3; }
.prediction-note summary { cursor: pointer; }
.prediction-note p { margin: .5rem 0; }
.prediction-results-table a { display: inline-block; }
.prediction-cell { font-variant-numeric: tabular-nums; white-space: nowrap; }
