
  * { box-sizing: border-box }
  :root { color-scheme: light; font: 16px/1.6 system-ui, sans-serif; color: #172c25; background: #f1f4ee }
  body { margin: 0 }
  header { background: #16382b; color: white; padding: 2rem max(1rem, calc((100% - 48rem)/2)) }
  h1 { margin: 0; font: 700 clamp(2rem, 7vw, 3.5rem)/1.1 Georgia, serif }
  header p { margin: .5rem 0 0; color: #c6ddcb }
  main { max-width: 50rem; margin: 2rem auto; padding: 0 1rem }
  section { background: white; border: 1px solid #d5dfd5; border-radius: 1rem; margin-bottom: 1rem; padding: clamp(1rem, 4vw, 1.75rem) }
  h2 { margin: 0 0 1rem; font-size: 1.35rem }
  label { display: block; margin-bottom: 1rem; font-weight: 600 }
  input, select, textarea { display: block; width: 100%; margin-top: .25rem; border: 1px solid #80968a; border-radius: .5rem; padding: .65rem; font: inherit }
  textarea { min-height: 5rem; resize: vertical }
  .horse-link { background: transparent; color: #20523c; padding: .25rem 0; text-decoration: underline; text-align: left }
  .record { white-space: pre-wrap }
  .record-edit { margin-inline-start: .75rem }
  .list-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem .85rem; margin-top: 1rem }
  .list-controls label { margin: 0 }
  .list-search { grid-column: 1 / -1 }
  .horse-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding-block: .35rem }
  .horse-row .horse-link { min-height: 44px; min-width: 0; overflow-wrap: anywhere }
  .horse-score { flex-shrink: 0; max-width: 45%; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums }
  .horse-score.unrated { color: #51665b; font-weight: 400 }
  button { font: inherit; font-weight: 600; color: white; background: #20523c; border: 0; border-radius: .5rem; padding: .65rem 1rem; cursor: pointer }
  button:disabled { opacity: .6; cursor: wait }
  :focus-visible { outline: 3px solid #a75919; outline-offset: 3px }
  .bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem }
  .bar h2 { margin: 0 }
  .secondary { background: #e8eee7; color: #16382b }
  #status { margin: 0 0 1rem }
  #status:empty { display: none }
  #status[data-error] { color: #962c21 }
  ul { padding: 0; list-style: none; margin-bottom: 0 }
  li { border-top: 1px solid #e0e7df; padding: .65rem 0; overflow-wrap: anywhere }

