:root {
    --bg:#f3f6fa;
    --card:#fff;
    --ink:#121d30;
    --muted:#60718b;
    --line:#e7edf5;
    --accent:#ff693b;
    --accent-button:#c94a24;
    --accent-soft:#fff0e8;
    --blue:#2580d7;
    --blue-soft:#eaf3ff;
    --slate:#647d96;
    --slate-soft:#edf1f6;
    --radius:14px;
    --shadow:0 12px 50px #29436909;
    --font:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    --pr-bg:#f0e7ff;
    --pr-ink:#6734a5;
    --sb-bg:#e4f6e9;
    --sb-ink:#176a43;
}

:root[data-theme=dark] {
    --bg:#111827;
    --card:#182235;
    --ink:#edf3ff;
    --muted:#aab9cf;
    --line:#2d3b52;
    --accent:#ff7a50;
    --accent-button:#e26037;
    --accent-soft:#482820;
    --blue:#70b6ff;
    --blue-soft:#183c65;
    --slate:#a9bdd4;
    --slate-soft:#273449;
    --shadow:0 12px 50px #0000004a;
    --pr-bg:#3c2859;
    --pr-ink:#e0c2ff;
    --sb-bg:#1d4a38;
    --sb-ink:#9be6bb;
    color-scheme:dark;
}

* {
    box-sizing:border-box;
}

html {
    color-scheme:light;
    background-color:var(--bg);
    min-height:100%;
    scroll-padding-top:24px;
}

body {
    margin:0;
    background-color:var(--bg);
    background-image:radial-gradient(ellipse at 80% 0,#e9eff7,transparent 55%);
    color:var(--ink);
    font:14px/1.55 var(--font);
    -webkit-font-smoothing:antialiased;
}

:root[data-theme=dark] body {
    background-color:var(--bg);
    background-image:radial-gradient(ellipse at 80% 0,#1d3658,transparent 55%);
}

button,input,select,textarea {
    font:inherit;
}

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

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

button,a,summary,select {
    touch-action:manipulation;
}

button {
    cursor:pointer;
}

a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible {
    outline:3px solid #2485dc;
    outline-offset:4px;
}

h1,h2,h3,p {
    margin:0;
}

h1 {
    font-size:26px;
    letter-spacing:-.8px;
    line-height:1.25;
}

h2 {
    font-size:19px;
    letter-spacing:-.45px;
    line-height:1.35;
    font-weight:700;
}

h3 {
    font-size:14px;
}

small {
    font-size:11px;
    color:var(--muted);
}

.icon {
    height:20px;
    width:20px;
    flex-shrink:0;
    vertical-align:middle;
}

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

.skip-link {
    position:fixed;
    top:10px;
    left:10px;
    transform:translateY(-160%);
    background:var(--ink);
    color:white;
    padding:12px 20px;
    border-radius:8px;
    z-index:5;
}

.skip-link:focus {
    transform:none;
}

.site-shell {
    max-width:1180px;
    margin:40px auto;
    padding:0 24px 22px;
    background:linear-gradient(120deg,#ffffff,#f9fbfe);
    border:1px solid #ffffffd9;
    border-radius:22px;
    box-shadow:0 14px 60px #23395412;
}

:root[data-theme=dark] .site-shell {
    background:linear-gradient(120deg,#172236,#111a2a);
    border-color:#2d3b52;
    box-shadow:0 14px 60px #00000052;
}

.site-header {
    --header-photo-visible-width:384px;
    --header-photo-fade:180px;
    position:relative;
    display:flex;
    flex-direction:column;
    justify-content:flex-start;
    padding:20px 18px 12px;
    isolation:isolate;
}

.site-header:before {
    content:"";
    position:absolute;
    z-index:-1;
    inset:0 -24px;
    bottom:auto;
    height:100%;
    min-height:140px;
    background-image:linear-gradient(90deg,#ffffff calc(100% - var(--header-photo-visible-width)),#ffffff00 calc(100% - var(--header-photo-visible-width) + var(--header-photo-fade))),linear-gradient(0deg,#f9fbfe 0%,#f9fbfe00 55%),url('/bryant.jpg');
    background-position:center,center,right -36px top -40px;
    background-size:auto,auto,420px auto;
    background-repeat:no-repeat;
    border-radius:22px 22px 0 0;
    pointer-events:none;
}

:root[data-theme=dark] .site-header:before {
    background-image:linear-gradient(90deg,#172236 calc(100% - var(--header-photo-visible-width)),#17223600 calc(100% - var(--header-photo-visible-width) + var(--header-photo-fade))),linear-gradient(0deg,#111a2a 0%,#111a2a00 65%),url('/bryant.jpg');
}

.site-header.site-header-compact {
    padding-top:20px;
}

.site-header.site-header-compact:before {
    display:block;
}

.site-title {
    display:inline-block;
    font-size:36px;
    line-height:1.2;
    font-weight:800;
    letter-spacing:-1.4px;
}

.header-copy>p {
    color:var(--muted);
    font-size:16px;
    margin:8px 0 24px;
}

.header-controls {
    display:flex;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
}

.primary-nav {
    display:flex;
    align-items:center;
    gap:6px;
    flex-wrap:wrap;
    border-bottom:1px solid var(--line);
    background:#ffffffd9;
    border-radius:10px;
    padding:4px;
}

.primary-nav>a {
    font-weight:550;
    color:#5d6e88;
    padding:9px 11px;
    border-radius:8px;
    min-height:40px;
    display:flex;
    align-items:center;
    gap:6px;
}

.primary-nav>a:hover {
    background:#ffffffb3;
}

.primary-nav>a[aria-current=page] {
    color:var(--ink);
    background:#fff;
    box-shadow:0 1px 8px #10264409;
}

.theme-toggle {
    flex-shrink:0;
    font-size:13px;
    color:#5d6e88;
    background:#ffffffd9;
    border:0;
    border-radius:8px;
    min-height:44px;
    min-width:44px;
    padding:9px 13px;
    display:flex;
    align-items:center;
    gap:6px;
}

.theme-toggle:hover { background:#ffffffb3; }
.theme-toggle .icon { height:15px; width:15px; }

:root[data-theme=dark] .primary-nav>a { color:var(--muted); }
:root[data-theme=dark] .primary-nav { background:#172236d9; }
:root[data-theme=dark] .primary-nav>a:hover,:root[data-theme=dark] .theme-toggle:hover { background:#ffffff12; }
:root[data-theme=dark] .primary-nav>a[aria-current=page] { background:#263650; color:var(--ink); box-shadow:none; }
:root[data-theme=dark] .theme-toggle { color:var(--muted); background:#172236d9; }
:root[data-theme=dark] .distance-tabs>a { color:var(--muted); background:#253248; }
:root[data-theme=dark] .distance-tabs>a:hover { background:#30415b; }
:root[data-theme=dark] .select-wrap,:root[data-theme=dark] select,:root[data-theme=dark] .button-secondary { background:#1b2940; color:var(--ink); }
:root[data-theme=dark] .button-secondary:hover,:root[data-theme=dark] .text-button:hover { background:#263852; }
:root[data-theme=dark] .button:hover,:root[data-theme=dark] button:hover { background:#e26037; }
:root[data-theme=dark] .record-card:hover { border-color:#52647d; box-shadow:none; }
:root[data-theme=dark] .result-column-head { background:#202e44; }
:root[data-theme=dark] .result-row>summary:hover,:root[data-theme=dark] .result-row[open]>summary { background:#1c2a40; }
:root[data-theme=dark] .result-details { background:#131f31; }
:root[data-theme=dark] .detail-panel { border-color:var(--line); background:#162338; }
:root[data-theme=dark] .detail-panel-heading,:root[data-theme=dark] .detail-time-card dd { color:var(--ink); }
:root[data-theme=dark] .detail-time-card { border-color:var(--line); background:#1d2b42; }
:root[data-theme=dark] .metadata-list+ .metadata-list { border-color:var(--line); }
:root[data-theme=dark] .field input,:root[data-theme=dark] .field textarea { background:#1b2940; border-color:#3a4d69; }
:root[data-theme=dark] .field input:hover,:root[data-theme=dark] .field textarea:hover { border-color:#5d7393; }
:root[data-theme=dark] .text-button { color:var(--muted); }

.primary-nav .icon {
    height:15px;
    width:15px;
}

#content {
    position:relative;
    outline:none;
}

.dashboard-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:16px 0 18px;
}

.distance-tabs {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:10px;
    min-width:320px;
}

.distance-tabs>a {
    padding:10px 27px;
    border-radius:9px;
    font-weight:650;
    text-align:center;
    color:#556b87;
    background:#edf2f8;
    min-height:44px;
}

.distance-tabs>a:hover {
    background:#e4ebf4;
}

.distance-tabs>a.is-selected {
    background:var(--accent);
    color:var(--ink);
    box-shadow:0 4px 12px #ff693b1a;
}

.filter-form {
    display:flex;
    align-items:center;
    gap:8px;
}

.select-wrap {
    display:flex;
    align-items:center;
    gap:10px;
    background:#fff;
    border:1px solid var(--line);
    border-radius:9px;
    padding-left:12px;
    min-width:190px;
}

.select-wrap>.icon {
    width:18px;
    height:18px;
    color:#6c7f98;
}

select {
    min-height:42px;
    border:1px solid var(--line);
    background:#fff;
    color:var(--ink);
    border-radius:8px;
    padding:8px 30px 8px 12px;
    max-width:100%;
}

.select-wrap>select {
    border:0;
    background:transparent;
    flex:1;
    width:100%;
    min-width:0;
}

.button,button {
    display:inline-flex;
    justify-content:center;
    align-items:center;
    gap:8px;
    min-height:44px;
    padding:10px 17px;
    border-radius:8px;
    background:var(--accent-button);
    color:#fff;
    font-weight:600;
    border:1px solid transparent;
    text-decoration:none;
    line-height:1.3;
}

.button:hover,button:hover {
    background:#b83e1a;
}

.button-secondary {
    background:#fff;
    color:#526680;
    border:1px solid var(--line);
}

.button-secondary:hover {
    background:#f2f6fb;
}

.filter-submit {
    font-size:12px;
    padding:8px 11px;
    min-height:42px;
}

.card {
    background:var(--card);
    border:1px solid var(--line);
    border-radius:var(--radius);
    padding:21px 20px;
    margin-bottom:16px;
    box-shadow:0 2px 4px #24374e01;
    min-width:0;
}

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

.eyebrow {
    font-size:11px;
    font-weight:600;
    color:var(--muted);
    letter-spacing:.25px;
}

.section-note {
    color:var(--muted);
    font-size:12px;
    margin-top:-7px;
    margin-bottom:16px;
}

.meta-dot {
    padding:0 7px;
    color:#8e9bb0;
}

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

.record-card {
    display:flex;
    align-items:flex-start;
    position:relative;
    gap:16px;
    padding:19px 15px;
    border:1px solid var(--line);
    border-radius:10px;
    min-width:0;
}

.record-card:hover {
    border-color:#cfdcea;
    box-shadow:0 4px 16px #26374f06;
}

.record-icon {
    height:48px;
    width:48px;
    flex-shrink:0;
    display:grid;
    place-items:center;
    border-radius:12px;
    background:var(--accent-soft);
    color:var(--accent);
}

.record-icon>.icon {
    width:29px;
    height:29px;
}

.record-card .record-icon {
    background:transparent;
    color:#111;
}

:root[data-theme=dark] .record-card .record-icon {
    color:#fff;
}

.record-content {
    min-width:0;
}

.record-content>h3 {
    font-weight:550;
    font-size:13px;
}

.record-time {
    display:block;
    font-size:29px;
    line-height:1.3;
    letter-spacing:-.7px;
    font-weight:800;
    font-variant-numeric:tabular-nums;
    margin:3px 0 5px;
}

.record-meta {
    font-size:12px;
    line-height:1.6;
    color:var(--muted);
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:0;
    overflow-wrap:anywhere;
}

.record-meta .meta-dot {
    padding:0 7px;
}

.card-arrow {
    display:none;
}

.insights-grid {
    display:grid;
    grid-template-columns:minmax(0,1.8fr) minmax(0,1fr);
    gap:16px;
    align-items:stretch;
}

.home-records { margin:16px 0; }
.home-records .records-section {
    padding:14px;
    margin-bottom:0;
    background:transparent;
    box-shadow:none;
}
.home-records .section-heading { margin-bottom:10px; }
.home-records .record-grid { gap:7px; }
.home-records .record-card { gap:10px; padding:10px 9px; background:var(--card); }
.home-records .record-icon { height:36px; width:36px; border-radius:9px; }
.home-records .record-icon>.icon { height:22px; width:22px; }
.home-records .record-content>h3 { font-size:12px; }
.home-records .record-time { font-size:22px; margin:0 0 1px; }
.home-records .record-meta { font-size:10px; }

.chart-wrap {
    position:relative;
    height:266px;
    width:100%;
    min-width:0;
}

.chart-wrap-large {
    height:440px;
}

.chart-wrap canvas {
    max-width:100%;
}

.development-card .section-heading {
    flex-wrap:wrap;
    align-items:flex-start;
}

.development-card .section-heading h2 {
    font-size:17px;
}

.season-row {
    display:flex;
    gap:14px;
    align-items:flex-start;
    justify-content:space-between;
    padding:9px 10px;
    border-bottom:1px solid var(--line);
    font-variant-numeric:tabular-nums;
    border-radius:5px;
    line-height:1.4;
}

.season-row:last-child {
    border-bottom:0;
}

.season-row:hover {
    background:#f6f8fc;
}

:root[data-theme=dark] .season-row:hover { background:#223149; }

.season-row>div {
    min-width:0;
}

.season-name {
    font-size:13px;
}

.season-meta {
    display:block;
    color:var(--muted);
    font-size:10px;
    overflow-wrap:anywhere;
    margin-top:3px;
}

.season-meta .meta-dot {
    padding:0 3px;
}

.season-row>strong {
    font-size:13px;
    white-space:nowrap;
    font-weight:650;
}

.season-list {
    max-height:340px;
    overflow-y:auto;
    padding-right:3px;
    scrollbar-width:thin;
    scrollbar-color:#d3dce9 transparent;
}

.season-records-grid {
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
    align-items:start;
}

.season-records-grid .season-card { margin-bottom:0; }

.result-column-head,.result-row>summary {
    display:grid;
    grid-template-columns:1.15fr .8fr .85fr 1.1fr .85fr .8fr 1.3fr 20px;
    gap:16px;
    align-items:center;
}

.result-list--single-distance .result-column-head,.result-list--single-distance .result-row>summary {
    grid-template-columns:1.15fr .85fr 1.1fr .85fr .8fr 1.3fr 20px;
}

.result-pressure { white-space:nowrap; color:var(--muted); }

.result-column-head {
    background:#f3f6fa;
    border-radius:8px;
    padding:12px 14px;
    color:var(--muted);
    font-size:11px;
}

.result-sort-link {
    display:inline-flex;
    align-items:center;
    gap:4px;
    min-height:24px;
    color:inherit;
}

.result-sort-link:hover,.result-sort-link.is-active {
    color:var(--ink);
}

.result-sort-link span { color:var(--slate); font-size:12px; }

.result-season-divider {
    display:flex;
    align-items:center;
    gap:12px;
    margin:18px 0 6px;
    color:var(--muted);
    font-size:12px;
    font-weight:700;
}

.result-season-divider:before,.result-season-divider:after {
    content:"";
    border-top:3px solid var(--line);
}

.result-season-divider:before { width:24px; flex-shrink:0; }
.result-season-divider:after { flex:1; }
.result-season-divider>span { white-space:nowrap; }

.result-row {
    border-bottom:1px solid var(--line);
}

.result-row:last-child {
    border-bottom:0;
}

.result-row>summary {
    list-style:none;
    padding:15px 14px;
    cursor:pointer;
    font-size:13px;
    min-height:60px;
    font-variant-numeric:tabular-nums;
    position:relative;
}

.result-row>summary::-webkit-details-marker {
    display:none;
}

.result-row>summary:hover {
    background:#fafbfd;
}

.result-date {
    white-space:nowrap;
}

.result-distance {
    justify-self:start;
    color:inherit;
}

.result-opening>small {
    display:block;
    font-size:10px;
}

.result-laps {
    display:flex;
    gap:5px;
    flex-wrap:wrap;
    font-size:12px;
    color:#53647e;
}

.result-laps>span+span:before {
    content:"/";
    padding-right:5px;
    color:#a1aec0;
}

.result-track {
    display:flex;
    align-items:center;
    gap:6px;
    font-size:12px;
    color:#546780;
    overflow-wrap:anywhere;
    min-width:0;
}

.result-finish {
    font-size:14px;
    font-weight:700;
}

.personal-best,.season-best {
    display:inline-block;
    width:max-content;
    border-radius:5px;
    padding:3px 6px;
}

.personal-best { background:var(--pr-bg); color:var(--pr-ink); }
.season-best { background:var(--sb-bg); color:var(--sb-ink); }

.home-records .record-time .personal-best {
    background:transparent;
    padding:0;
    color:#111;
}

:root[data-theme=dark] .home-records .record-time .personal-best { color:#fff; }

.result-chevron {
    color:#8c9bb1;
    display:flex;
    justify-content:end;
}

.result-chevron>.icon {
    width:15px;
    height:15px;
}

.external-verified {
    color:#17824c;
}

.external-verified-sources {
    display:inline-flex;
    align-items:center;
    gap:5px;
}

.external-badge-schaatsen { color:#1672c9; }
.external-verified-sources .external-badge-schaatsen { color:#1672c9; }

.external-verified .icon {
    width:16px;
    height:16px;
}

.external-warning { color:#a45512; }

.external-card { margin-top:16px; }

.external-source {
    color:#17824c;
    background:#e4f7eb;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
    padding:4px 9px;
}

.external-stats {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:10px;
    margin:18px 0 12px;
}
.external-stats-schaatsen { grid-template-columns:repeat(5,minmax(0,1fr)); }

.external-stats>div {
    border:1px solid var(--line);
    border-radius:10px;
    padding:12px;
}

.external-stats strong,.external-stats span { display:block; }
.external-stats strong { font-size:22px; }
.external-stats span { color:var(--muted); font-size:12px; }

.external-result-list {
    display:grid;
    gap:8px;
    margin-top:16px;
}

.external-result {
    align-items:center;
    border:1px solid var(--line);
    border-radius:10px;
    display:grid;
    gap:12px;
    grid-template-columns:auto 1fr auto;
    padding:11px 13px;
}

.external-result span { display:grid; gap:2px; }
.external-result a { color:var(--blue); font-weight:700; }

.result-row[open] .result-chevron {
    transform:rotate(90deg);
}

.result-row[open]>summary {
    background:#f8fafc;
    border-radius:8px;
}

.result-details {
    padding:18px 20px 24px;
    background:#fafbfd;
    border-top:1px solid var(--line);
}

.detail-actions {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    justify-content:flex-end;
    gap:8px;
}

.detail-actions form { margin:0; }

.detail-actions-bottom {
    justify-content:flex-start;
    margin-top:10px;
}

.detail-actions .button,.detail-actions .button-danger {
    display:inline-flex;
    align-items:center;
    gap:10px;
    min-height:40px;
}

.detail-actions .icon {
    width:18px;
    height:18px;
}

.button-danger {
    min-height:40px;
    padding:0 15px;
    border:1px solid #d9473d;
    border-radius:8px;
    background:#fff0ee;
    color:#a52b23;
    font:inherit;
    font-size:12px;
    font-weight:700;
    cursor:pointer;
}

.button-danger:hover { background:#ffe2de; }

.delete-result-form { border-top:1px solid var(--line); }

.detail-grid {
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:18px;
    margin:0;
}

.detail-grid>div {
    min-width:0;
}

.detail-grid dt {
    font-size:11px;
    color:var(--muted);
    margin-bottom:4px;
}

.detail-grid dd {
    margin:0;
    overflow-wrap:anywhere;
    font-size:13px;
}

.result-detail-layout {
    display:grid;
    grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);
    gap:16px;
    align-items:stretch;
}

.detail-panel {
    min-width:0;
    padding:16px 18px;
    border:1px solid #e5ebf3;
    border-radius:10px;
    background:#f6f9fd;
}

.detail-panel-heading {
    display:flex;
    align-items:center;
    gap:12px;
    margin:0 0 14px;
    color:#0d1e40;
    font-size:14px;
}

.detail-panel-heading .icon {
    flex:0 0 auto;
    width:25px;
    height:25px;
    color:var(--blue);
}

.detail-performance .detail-panel-heading .icon {
    color:var(--accent);
}

.detail-panel-heading .competition-title {
    flex:1;
    min-width:0;
    overflow-wrap:anywhere;
}

.detail-panel-heading .external-verified-sources {
    flex:0 0 auto;
    margin-left:auto;
}

.detail-panel-heading .external-verified-sources .icon {
    width:18px;
    height:18px;
    color:inherit;
}

.detail-times {
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:12px;
}

.detail-time-card {
    min-width:0;
    padding:14px 18px;
    border:1px solid #e1e9f3;
    border-radius:9px;
    background:#fff;
}

.detail-time-card dt {
    font-size:12px;
}

.detail-time-card dd {
    color:#09193a;
    font-size:18px;
    font-weight:700;
}

.metadata-columns {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    gap:26px;
}

.metadata-list {
    display:grid;
    gap:10px;
    margin:0;
    min-width:0;
}

.metadata-list+ .metadata-list {
    padding-left:26px;
    border-left:1px solid #e1e8f1;
}

.metadata-list>div {
    display:grid;
    grid-template-columns:108px minmax(0,1fr);
    gap:10px;
    min-width:0;
}

.metadata-list dt {
    margin:0;
    font-size:11px;
    color:var(--muted);
}

.metadata-list dd {
    font-size:12px;
}

.metadata-list .external-verified {
    font-size:11px;
    overflow-wrap:anywhere;
}

.metadata-list .external-verified .icon {
    width:15px;
    height:15px;
    vertical-align:-3px;
}

.start-color-badge {
    --start-color:#a1aec0;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    text-align:center;
    line-height:1.2;
    min-height:32px;
    min-width:70px;
    padding:5px 13px;
    border:2px solid #000;
    border-radius:999px;
    background:var(--start-color);
    color:#000;
    font-size:12px;
    font-weight:650;
    white-space:nowrap;
}

.start-color-indicator {
    flex:0 0 10px;
    width:10px;
    height:10px;
    border:1px solid #000;
    border-radius:50%;
    background:var(--start-color);
}

:is(.start-color-badge,.start-color-indicator).is-yellow { --start-color:#ffcf00; }
:is(.start-color-badge,.start-color-indicator).is-blue { --start-color:#2587df; }
:is(.start-color-badge,.start-color-indicator).is-red { --start-color:#e34d43; }
:is(.start-color-badge,.start-color-indicator).is-green { --start-color:#2baf67; }
:is(.start-color-badge,.start-color-indicator).is-white { --start-color:#fff; }
:is(.start-color-badge,.start-color-indicator).is-black { --start-color:#243043; color:#fff; }
:is(.start-color-badge,.start-color-indicator).is-orange { --start-color:#f28c28; }
:is(.start-color-badge,.start-color-indicator).is-purple { --start-color:#8959ca; color:#fff; }

.record-label {
    display:block;
    font-size:10px;
    color:var(--muted);
    margin-top:3px;
}

.section-link {
    display:inline-flex;
    align-items:center;
    gap:8px;
    color:var(--muted);
    font-size:12px;
    padding:16px 0 0;
    min-height:44px;
}

.section-link:hover {
    color:var(--accent);
}

.section-link .icon {
    width:13px;
    height:13px;
}

.empty-state {
    text-align:center;
    padding:30px 15px;
    color:var(--muted);
    font-size:13px;
}

.page-toolbar {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    padding:28px 10px 23px;
}

.page-toolbar h1 {
    margin:5px 0 13px;
}

.page-toolbar .section-note {
    margin-bottom:0;
}

.actions-toolbar {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:9px;
    margin-bottom:20px;
}

.actions-toolbar .button {
    font-size:12px;
}

.sort-form {
    display:flex;
    align-items:center;
    gap:6px;
    margin-left:auto;
}

.sort-form select {
    font-size:12px;
}

.back-link {
    display:inline-block;
    color:var(--muted);
    font-size:12px;
    margin-bottom:10px;
    min-height:30px;
}

.site-footer {
    display:flex;
    align-items:center;
    justify-content:flex-end;
    gap:15px;
    color:var(--muted);
    font-size:11px;
    padding:15px 5px 0;
}

.footer-links {
    display:flex;
    align-items:center;
    flex-wrap:wrap;
    gap:20px;
}

.footer-links>a {
    display:flex;
    align-items:center;
    gap:6px;
    min-height:40px;
}

.footer-links .icon {
    width:14px;
    height:14px;
}

.footer-links form {
    margin:0;
}

.text-button {
    background:none;
    border:0;
    color:var(--muted);
    font-size:11px;
    padding:8px;
    min-height:40px;
}

.text-button:hover {
    background:#edf2f8;
    color:var(--ink);
}

.footer-dot {
    padding:0 5px;
}

.form-card {
    max-width:760px;
    margin:30px auto;
}

.form-card>h1 {
    margin:8px 0 9px;
}

.form-card .intro {
    color:var(--muted);
    font-size:13px;
    margin-bottom:24px;
}

.form-grid {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:18px;
}

.field {
    display:flex;
    flex-direction:column;
    gap:7px;
    font-size:13px;
    font-weight:550;
    min-width:0;
}

.field input,.field textarea {
    width:100%;
    min-width:0;
    min-height:44px;
    color:var(--ink);
    background:#fff;
    border:1px solid #dae3ef;
    border-radius:8px;
    padding:10px 12px;
    font-weight:400;
}

.field textarea {
    resize:vertical;
}

.field input:hover,.field textarea:hover {
    border-color:#bacadc;
}

.field small {
    font-weight:400;
}

.form-section {
    padding:20px 0;
    margin:0;
    border:0;
    border-top:1px solid var(--line);
    min-width:0;
}

.form-section legend {
    font-size:14px;
    font-weight:650;
    padding:0 12px 0 0;
}

.form-actions {
    display:flex;
    gap:10px;
    align-items:center;
    flex-wrap:wrap;
    padding-top:22px;
}

.external-actions {
    display:flex;
    flex-wrap:wrap;
    gap:12px;
    margin-top:22px;
}

.external-actions form { margin:0; }
.external-actions + .section-note { margin-top:14px; }

.external-manual-form {
    display:grid;
    grid-template-columns:minmax(260px,1fr) minmax(220px,.75fr) auto;
    align-items:end;
    gap:12px;
    margin-top:18px;
}

.external-manual-form label { display:grid; gap:6px; color:var(--muted); font-size:13px; font-weight:700; }
.external-manual-form input,.external-manual-form select { min-height:40px; padding:8px 10px; }

.full-width {
    grid-column:1/-1;
}

.error,.success {
    padding:13px 16px;
    border-radius:8px;
    font-size:13px;
    margin:16px 0;
    overflow-wrap:anywhere;
}

.error {
    background:#fff0ee;
    color:#ae362a;
    border:1px solid #f7d7d1;
}

.success {
    background:#ecf8f0;
    color:#226740;
    border:1px solid #d2edda;
}

.login-card {
    max-width:460px;
}

.login-card .record-icon {
    margin-bottom:16px;
}

.login-card .field+.field {
    margin-top:18px;
}

.login-card .form-actions>button {
    width:100%;
}

.lookup-card {
    max-width:none;
}

.lookup-card .lookup-form {
    max-width:680px;
}

.lookup-table {
    width:100%;
    border-collapse:collapse;
    font-size:12px;
    margin-top:24px;
}

.lookup-table th {
    text-align:left;
    color:var(--muted);
    font-size:11px;
    font-weight:500;
    background:#f4f7fb;
    padding:12px 8px;
}

.lookup-table td {
    padding:14px 8px;
    border-bottom:1px solid var(--line);
    overflow-wrap:anywhere;
}

.lookup-table td:first-child {
    font-weight:650;
    color:var(--blue);
}

.lookup-table a:hover {
    text-decoration:underline;
}

.lookup-table tbody:empty:after {
    content:"Zoek een schaatser om records te bekijken.";
    display:block;
    padding:24px 8px;
    color:var(--muted);
    font-size:12px;
}

@media(min-width:900px) {
    .site-shell {
        margin:44px auto;
    }
    .season-card .section-heading {
        margin-bottom:12px;
    }
}

@media(max-width:1200px) {
    .site-shell {
        margin:24px;
    }
    .record-card {
        gap:12px;
        padding:17px 12px;
    }
    .record-icon {
        height:42px;
        width:42px;
    }
    .record-time {
        font-size:27px;
    }
    .record-meta {
        font-size:11px;
    }
}

@media(max-width:900px) {
    .site-shell {
        padding:0 18px 18px;
    }
    .site-header {
        padding:30px 8px 0;
    }
    .site-header.site-header-compact {
        padding-top:18px;
    }
    .site-header:before {
        left:-18px;
        right:-18px;
    }
    .dashboard-toolbar {
        padding:20px 8px;
    }
    .record-card {
        gap:10px;
    }
    .record-icon {
        height:36px;
        width:36px;
    }
    .record-icon>.icon {
        height:24px;
        width:24px;
    }
    .record-time {
        font-size:25px;
    }
    .record-meta .meta-dot {
        display:none;
    }
    .record-meta>span,.record-meta>time {
        display:block;
        width:100%;
    }
    .insights-grid {
        grid-template-columns:minmax(0,1.55fr) minmax(0,1fr);
    }
    .season-records-grid {
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
    .card {
        padding:18px 16px;
    }
    .detail-grid {
        grid-template-columns:repeat(3,minmax(0,1fr));
    }
    .result-column-head,.result-row>summary {
        gap:10px;
        grid-template-columns:1.2fr .75fr .8fr 1fr .9fr .8fr 1.1fr 14px;
    }
    .result-list--single-distance .result-column-head,.result-list--single-distance .result-row>summary {
        grid-template-columns:1.2fr .8fr 1fr .9fr .8fr 1.1fr 14px;
    }
    .section-heading h2 {
        font-size:17px;
    }
    .recent-card .eyebrow {
        font-size:10px;
    }
}

@media(max-width:700px) {
    body {
        background:var(--bg);
        font-size:13px;
    }
    :root[data-theme=dark] body {
        background-color:var(--bg);
        background-image:none;
    }
    .site-shell {
        margin:0;
        padding:0 14px 20px;
        border:0;
        border-radius:0;
        box-shadow:none;
        background:transparent;
    }
    .site-header {
        --header-photo-visible-width:265px;
        --header-photo-fade:120px;
        padding:14px 3px 8px;
    }
    .site-header.site-header-compact {
        padding-top:14px;
    }
    .site-header:before {
        display:block;
        inset:0 -14px;
        bottom:auto;
        min-height:110px;
        border-radius:0;
        background-position:center,center,right -35px top -26px;
        background-size:auto,auto,300px auto;
    }
    .site-title {
        font-size:29px;
        letter-spacing:-1px;
    }
    .header-copy>p {
        font-size:13px;
        margin:6px 0 16px;
    }
    .primary-nav {
        gap:3px;
        flex-wrap:nowrap;
    }
    .primary-nav>a {
        padding:8px 7px;
        font-size:11px;
        min-height:40px;
        white-space:nowrap;
    }
    .theme-toggle {
        padding:9px;
    }
    .dashboard-toolbar {
        display:grid;
        grid-template-columns:1fr;
        gap:12px;
        padding:16px 0;
    }
    .distance-tabs {
        min-width:0;
        width:100%;
        gap:8px;
    }
    .distance-tabs>a {
        padding:10px 12px;
        min-height:44px;
        font-size:13px;
    }
    .filter-form {
        width:100%;
        gap:8px;
    }
    .select-wrap {
        flex:1;
        min-width:0;
    }
    .filter-submit {
        min-height:44px;
    }
    .season-records-grid {
        grid-template-columns:1fr;
        gap:13px;
    }
    .card {
        margin-bottom:13px;
        padding:17px 15px;
        border-radius:12px;
    }
    .section-heading {
        margin-bottom:13px;
        gap:8px;
    }
    .section-heading h2 {
        font-size:16px;
        letter-spacing:-.3px;
    }
    .records-section {
        padding:16px 15px;
    }
    .records-section .eyebrow {
        display:none;
    }
    .records-section .section-heading h2 {
        font-size:14px;
    }
    .record-grid {
        display:block;
    }
    .record-card {
        display:none;
        border:0;
        padding:0;
        gap:14px;
        align-items:center;
    }
    .record-card.selected-record {
        display:flex;
    }
    .record-card:hover {
        box-shadow:none;
    }
    .record-icon {
        width:48px;
        height:48px;
        border-radius:12px;
    }
    .record-icon>.icon {
        width:28px;
        height:28px;
    }
    .record-content>h3 {
        font-size:12px;
        color:var(--muted);
    }
    .record-time {
        font-size:30px;
        margin:0 0 4px;
    }
    .record-meta {
        font-size:11px;
        gap:0;
    }
    .record-meta>span,.record-meta>time {
        display:inline;
        width:auto;
    }
    .record-meta .meta-dot {
        display:inline;
        padding:0 6px;
    }
    .record-content {
        flex:1;
    }
    .card-arrow {
        display:block;
        color:var(--muted);
        align-self:center;
    }
    .card-arrow .icon {
        width:15px;
        height:15px;
    }
    .insights-grid {
        display:block;
    }
    .development-card .section-heading h2 {
        font-size:16px;
    }
    .chart-wrap {
        height:215px;
    }
    .chart-wrap-large {
        height:340px;
    }
    .section-note {
        font-size:11px;
        line-height:1.6;
        margin-bottom:12px;
    }
    .season-list {
        max-height:360px;
    }
    .season-row {
        padding:8px 9px;
    }
    .season-name,.season-row>strong {
        font-size:13px;
    }
    .season-meta {
        font-size:10px;
    }
    .season-meta .meta-dot {
        padding:0 3px;
    }
    .result-column-head {
        display:none;
    }
    .result-pressure { display:none; }
    .result-row>summary {
        padding:13px 0;
        grid-template-columns:1fr .68fr 1fr 14px;
        gap:4px 10px;
        min-height:71px;
    }
    .result-date {
        font-size:12px;
        grid-column:1;
        grid-row:1;
    }
    .result-row .result-distance {
        font-size:11px;
        grid-column:2;
        grid-row:1;
    }
    .result-list--single-distance .result-row>summary {
        grid-template-columns:minmax(0,1fr) minmax(0,1fr) 14px;
        grid-template-rows:auto auto auto;
        gap:5px 10px;
        min-height:96px;
    }
    .result-list--single-distance .result-date { grid-column:1; }
    .result-list--single-distance .result-finish { grid-column:2; }
    .result-list--single-distance .result-opening {
        display:block;
        grid-column:1;
        grid-row:2;
        font-size:12px;
    }
    .result-list--single-distance .result-opening>small { display:block; }
    .result-list--single-distance .result-laps {
        display:flex;
        align-items:baseline;
        grid-column:2;
        grid-row:2;
        font-size:11px;
        gap:3px;
        justify-content:flex-end;
        min-width:0;
    }
    .result-list--single-distance .result-laps:before {
        content:attr(data-label);
        color:var(--muted);
        font-size:9px;
        flex:0 1 auto;
    }
    .result-list--single-distance .result-laps>span { white-space:nowrap; }
    .result-list--single-distance .result-track {
        grid-column:1;
        grid-row:3;
        padding-right:0;
        text-align:left;
        justify-content:flex-start;
    }
    .result-list--single-distance .result-chevron { grid-column:3; grid-row:1/4; }
    .result-finish {
        grid-column:3;
        grid-row:1;
        text-align:right;
        font-size:14px;
    }
    .result-track {
        grid-column:1/4;
        grid-row:2;
        text-align:right;
        justify-content:flex-end;
        font-size:10px;
    }
    .result-chevron {
        grid-column:4;
        grid-row:1/3;
    }
    .external-manual-form { grid-template-columns:1fr; align-items:stretch; }
    .result-track { padding-right:0; }
    .result-opening,.result-laps {
        display:none;
    }
    .result-list:not(.result-list--single-distance) .result-row>summary {
        grid-template-rows:auto auto auto;
        min-height:100px;
    }
    .result-list:not(.result-list--single-distance) .result-opening {
        display:block;
        grid-column:1;
        grid-row:2;
        font-size:12px;
    }
    .result-list:not(.result-list--single-distance) .result-laps {
        display:flex;
        grid-column:2/4;
        grid-row:2;
        align-items:baseline;
        justify-content:flex-end;
        gap:3px;
        min-width:0;
        font-size:11px;
    }
    .result-list:not(.result-list--single-distance) .result-laps:before {
        content:attr(data-label);
        color:var(--muted);
        font-size:9px;
    }
    .result-list:not(.result-list--single-distance) .result-track { grid-row:3; }
    .result-list:not(.result-list--single-distance) .result-chevron { grid-row:1/4; }
    .result-row>summary:hover {
        background:transparent;
    }
    .result-row[open]>summary {
        padding:13px 8px;
    }
    .result-details {
        padding:17px 12px;
    }
    .detail-grid {
        grid-template-columns:1fr 1fr;
        gap:15px 12px;
    }
    .result-detail-layout {
        grid-template-columns:1fr;
        gap:12px;
    }
    .detail-metadata {
        padding:16px 14px;
    }
    .detail-times {
        grid-template-columns:1fr 1fr;
    }
    .metadata-columns {
        grid-template-columns:1fr;
        gap:14px;
    }
    .metadata-list+.metadata-list {
        padding:14px 0 0;
        border-top:1px solid #e1e8f1;
        border-left:0;
    }
    .metadata-list>div {
        grid-template-columns:100px minmax(0,1fr);
    }
    .external-stats { grid-template-columns:1fr 1fr; }
    .external-result { grid-template-columns:auto 1fr; }
    .external-result>a { grid-column:2; }
    .detail-grid dd {
        font-size:12px;
    }
    .detail-grid dt {
        font-size:10px;
    }
    .recent-card .section-heading {
        flex-wrap:wrap;
    }
    .recent-card .eyebrow {
        font-size:10px;
    }
    .section-link {
        font-size:11px;
        padding-top:12px;
    }
    .page-toolbar {
        padding:22px 2px 16px;
        display:grid;
        gap:12px;
    }
    .page-toolbar h1 {
        font-size:24px;
        margin:4px 0 11px;
    }
    .actions-toolbar {
        gap:8px;
    }
    .actions-toolbar .button {
        flex:1;
        font-size:11px;
        padding:10px;
        white-space:normal;
        min-height:44px;
    }
    .actions-toolbar .button .icon {
        height:16px;
        width:16px;
    }
    .sort-form {
        width:100%;
        margin:3px 0 0;
    }
    .sort-form select {
        flex:1;
        min-width:0;
    }
    .site-footer {
        padding:10px 0 0;
        flex-direction:column;
        gap:0;
        align-items:flex-start;
        font-size:10px;
    }
    .footer-links {
        width:100%;
        justify-content:space-between;
        gap:10px;
    }
    .footer-links a,.text-button {
        font-size:11px;
    }
    .form-card {
        margin:20px 0;
        padding:20px 16px;
    }
    .form-card h1 {
        font-size:24px;
    }
    .form-grid {
        grid-template-columns:1fr;
        gap:16px;
    }
    .full-width {
        grid-column:auto;
    }
    .form-card .intro {
        font-size:12px;
    }
    .login-card {
        max-width:460px;
        margin:22px auto;
    }
    .lookup-table thead {
        display:none;
    }
    .lookup-table tbody,.lookup-table tr {
        display:block;
        width:100%;
    }
    .lookup-table tr {
        padding:13px 0;
        border-bottom:1px solid var(--line);
    }
    .lookup-table td {
        display:grid;
        grid-template-columns:minmax(95px,1fr) minmax(0,1fr);
        gap:10px;
        border:0;
        padding:5px 0;
        text-align:right;
        font-size:12px;
    }
    .lookup-table td:before {
        content:attr(data-label);
        text-align:left;
        color:var(--muted);
        font-size:11px;
    }
    .lookup-table td:first-child {
        display:block;
        text-align:left;
        font-size:14px;
        padding:0 0 8px;
    }
    .lookup-table td:first-child:before {
        display:none;
    }
    .lookup-table td:empty {
        display:none;
    }
    .lookup-table tbody:empty:after {
        padding:8px 0;
    }
    .form-actions .button,.form-actions>button {
        flex:1;
    }
    .home-records { margin:13px 0; }
    .home-records .record-grid { display:block; }
    .home-records .record-card { display:flex; }
    .home-records .record-card+.record-card {
        border-top:1px solid var(--line);
        border-radius:0;
        margin-top:8px;
        padding-top:12px;
    }
    .home-records .record-icon { width:38px; height:38px; }
    .home-records .record-icon>.icon { width:22px; height:22px; }
    .home-records .record-time { font-size:22px; }
}

@media(max-width:360px) {
    .site-shell {
        padding:0 10px 16px;
    }
    .site-header:before {
        left:-10px;
        right:-10px;
    }
    .site-title {
        font-size:26px;
    }
    .header-copy>p {
        font-size:12px;
    }
    .card {
        padding:15px 12px;
    }
    .record-time {
        font-size:28px;
    }
    .record-meta {
        font-size:10px;
    }
    .development-card .section-heading {
        gap:8px;
    }
    .development-card .section-heading h2 {
        font-size:15px;
    }
    .result-row>summary {
        gap:4px 6px;
        grid-template-columns:1fr .65fr .85fr 12px;
    }
    .result-date {
        font-size:11px;
    }
    .result-finish {
        font-size:13px;
    }
    .primary-nav {
        gap:1px;
    }
    .primary-nav>a {
        font-size:10px;
        padding:8px 5px;
    }
    .theme-toggle {
        padding:7px;
    }
    .primary-nav .icon {
        height:12px;
        width:12px;
    }
    .site-footer>span {
        font-size:9px;
    }
    .detail-grid {
        gap:14px 10px;
    }
}

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