/* Neutral controls and quiet surfaces keep the course and racing signals in focus. */
:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #f2f2f3;
  background: #050607;
  --surface: #0c0e10;
  --line: #303337;
  --muted: #a0a5ac;
}
body { background: #050607; }
.trainer { border: 1px solid #292c30; border-radius: 20px; box-shadow: 0 20px 70px #0004; }
header { min-height: 86px; padding: 20px 26px; gap: 24px; background: #080a0c; }
header > div { min-width: 0; }
h1 { margin: 0; font-size: clamp(18px, 2.2vw, 30px); font-weight: 750; line-height: 1.2; letter-spacing: -.045em; white-space: nowrap; }
nav { gap: 10px; }
nav button, nav .start {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 44px; padding: 11px 18px; border: 1px solid transparent;
  border-radius: 999px; background: #eff1f3; color: #0c0e10;
  font-size: 14px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em;
  box-shadow: none; transition: background .15s, opacity .15s;
}
nav button svg { width: 18px; height: 18px; flex: none; }
nav button:hover:not(:disabled) { background: #dce0e3; }
nav button:active:not(:disabled) { background: #c9cdd2; }
nav button:disabled { opacity: .38; }
button:focus-visible, input:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.status { padding: 8px 11px; border: 1px solid #ffffff29; border-radius: 999px; background: #090b0df2; font-size: 11px; letter-spacing: .04em; font-weight: 650; }
.status i { background: #e5e7eb; width: 5px; height: 5px; }
.results, .setting, .target, .mobile-boat-summary, .mobile-countdown {
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 5px 16px #0002;
}
.results { overflow: hidden; }
.results .panel { background: transparent; min-height: 0; padding: 12px; gap: 8px; }
.results .panel + .panel { border-color: var(--line); }
.results .panel > span, .setting label, .target > span { color: #b4b8be; font-weight: 550; letter-spacing: .015em; }
.results .panel > span { font-size: clamp(12px, 1.05cqw, 15px); }
.results .panel output { font-family: inherit; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.05em; margin: 0; }
.panel small, .target small, .input-wrap span { color: var(--muted); }
.input-wrap { border: 1px solid #363a40; border-radius: 10px; background: #171a1e; }
.input-wrap:focus-within { border-color: #d5d8dc; }
.input-wrap input { font-family: inherit; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.target strong { color: #f2f2f3; font-family: inherit; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.05em; }
#go { border: 3px solid #ff726a; background: #ec2923; box-shadow: 0 0 0 5px #101214, 0 6px 16px #0006; text-shadow: none; }
#go strong { font-weight: 800; letter-spacing: -.035em; }
#go span { letter-spacing: .08em; font-weight: 650; }
#go:disabled { filter: none; background: #c52b27; border-color: #dd5f59; }
#go:hover:not(:disabled) { background: #fa342c; }
#go:active:not(:disabled) { background: #d9211c; }
footer, .mobile-controls { background: #080a0c; }
footer { padding: 24px 26px; border-top: 1px solid #23262a; }
footer .run-message { color: #e8e9ec; font-size: 15px; font-weight: 500; line-height: 1.5; }
footer p { color: #a6abb2; font-size: 14px; line-height: 1.65; }
footer p span { color: #858c95; }
kbd { border-color: #3b4047; background: #181b20; border-radius: 5px; color: #bec3ca; }
@media (max-width: 900px) {
  body { background: #080a0c; }
  .trainer { border: 0; border-radius: 0; }
  header { padding: 19px 16px 17px; gap: 17px; min-height: 0; }
  header > div { flex-basis: 100%; min-width: 0; }
  h1 { font-size: clamp(17px, 4.7vw, 27px); line-height: 1.2; letter-spacing: -.04em; }
  nav { width: 100%; gap: 10px; }
  nav button, nav .start { min-height: 44px; padding: 11px 17px; font-size: 14px; }
  nav .start { flex: 1; }
  nav #reset span { display: inline; }
  .status { max-width: 59%; padding: 4px 7px; font-size: 10px; letter-spacing: 0; }
  .target, .mobile-boat-summary { border-radius: 7px; }
  .target > span:after { content: 'Leave'; font-size: 11px; color: #aeb3bb; }
  .target strong { font-size: clamp(18px, 5.6cqw, 27px); }
  .mobile-boat-summary { gap: 1px; }
  .mobile-boat-summary span { color: #aeb3bb; font-size: 10px; }
  .mobile-boat-summary strong { font-family: inherit; font-weight: 700; letter-spacing: -.04em; font-size: clamp(17px, 5cqw, 24px); }
  .mobile-countdown { border-radius: 10px; }
  .mobile-countdown span { color: #aeb3bb; letter-spacing: .025em; }
  .mobile-countdown strong { font-family: inherit; font-weight: 650; letter-spacing: -.05em; }
  #go { box-shadow: 0 0 0 3px #121416, 0 4px 12px #0005; }
  .mobile-controls { gap: 12px; padding: 16px 16px 0; }
  .mobile-controls .results, .mobile-controls .setting { border: 1px solid var(--line); border-radius: 16px; background: #0f1114; box-shadow: none; }
  .mobile-controls .results .panel { padding: 17px 18px; min-height: 84px; gap: 7px 12px; }
  .mobile-controls .results .panel + .panel { border-color: var(--line); }
  .mobile-controls .results .panel > span { font-size: 14px; font-weight: 550; letter-spacing: -.01em; }
  .mobile-controls .results .panel output { font-size: 30px; }
  .mobile-controls .results .panel small { font-size: 12px; color: #969da6; }
  .mobile-controls .setting { padding: 17px 18px; }
  .mobile-controls .setting label { font-size: 14px; margin-bottom: 12px; letter-spacing: -.01em; }
  .mobile-controls .input-wrap { min-height: 52px; border-radius: 10px; }
  .mobile-controls .input-wrap input { font-size: 27px; padding: 10px 13px; }
  .mobile-controls .input-wrap span { font-size: 14px; }
  footer { padding: 20px 18px 26px; gap: 10px; border: 0; }
  footer .run-message { font-size: 14px; }
  footer p { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) { nav button { transition: none; } }

/* Keep both the time and its rating colored, including in the mobile result rows. */
.trainer .results .panel:is(.good, .great) :is(output, small) { color: #94ff88; }
.trainer .results .panel.late :is(output, small) { color: #ffd664; }
.trainer .results .panel.early :is(output, small) { color: #ff716b; }
