/*
 * RACE CONTROL · Neandertallauf interface system
 * Author: Nassi
 * The editorial yellow is deliberately reserved for action and wayfinding.
 * All neutral surfaces, status colors and typography have separate dark variants.
 */
:root {
  --accent: #f4c542;
  --accent-ink: #171d28;
  --brand: #f4c542;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f4f6f9;
  --ink: #1c2638;
  --ink-2: #505d70;
  --ink-3: #758093;
  --line: #e7eaf0;
  --line-strong: #cdd3df;
  --muted-bg: #edf0f5;
  --link: #806015;
  --focus: #bb8c14;
  --info: #315da1;
  --info-bg: #eaf1fb;
  --ok: #257350;
  --ok-bg: #e4f3eb;
  --warn: #89550d;
  --warn-bg: #fff2d9;
  --wait: #795a9c;
  --wait-bg: #f1eaf8;
  --danger: #b14043;
  --danger-bg: #fff0ef;
  --sidebar-bg: #171d29;
  --sidebar-ink: #f4f6fb;
  --sidebar-muted: #929cac;
  --sidebar-line: rgba(255,255,255,.10);
  --shadow: 0 10px 36px rgba(23,34,53,.045), 0 2px 8px rgba(23,34,53,.035);
  --shadow-lift: 0 15px 35px rgba(23,34,53,.10);
  --radius-s: 9px;
  --radius-m: 15px;
  --sidebar-w: 272px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-display: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #10151e;
  --surface: #1b222e;
  --surface-2: #242d3c;
  --ink: #f1f4f9;
  --ink-2: #b9c4d2;
  --ink-3: #8d9bab;
  --line: #303a4a;
  --line-strong: #485569;
  --muted-bg: #2a3443;
  --link: #f7d57b;
  --focus: #ffda67;
  --info: #a4c6f7;
  --info-bg: #223651;
  --ok: #92d8b3;
  --ok-bg: #203d34;
  --warn: #f4c775;
  --warn-bg: #483921;
  --wait: #d0baf0;
  --wait-bg: #3a2f4d;
  --danger: #ff9a9b;
  --danger-bg: #472a33;
  --sidebar-bg: #111720;
  --sidebar-line: rgba(255,255,255,.095);
  --shadow: 0 10px 38px rgba(0,0,0,.11);
  --shadow-lift: 0 15px 35px rgba(0,0,0,.23);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    --bg: #10151e; --surface: #1b222e; --surface-2: #242d3c;
    --ink: #f1f4f9; --ink-2: #b9c4d2; --ink-3: #8d9bab;
    --line: #303a4a; --line-strong: #485569; --muted-bg: #2a3443;
    --link: #f7d57b; --focus: #ffda67;
    --info: #a4c6f7; --info-bg: #223651;
    --ok: #92d8b3; --ok-bg: #203d34;
    --warn: #f4c775; --warn-bg: #483921;
    --wait: #d0baf0; --wait-bg: #3a2f4d;
    --danger: #ff9a9b; --danger-bg: #472a33;
    --sidebar-bg: #111720; --sidebar-line: rgba(255,255,255,.095);
    --shadow: 0 10px 38px rgba(0,0,0,.11);
    --shadow-lift: 0 15px 35px rgba(0,0,0,.23);
    color-scheme: dark;
  }
}
html { font-size: 15px; scroll-behavior: smooth; }
body { font-family: var(--font); font-size: .94rem; font-weight: 400; line-height: 1.55; letter-spacing: -.008em; }
h1,h2,h3 { font-family: var(--font-display); letter-spacing: -.035em; line-height: 1.24; font-weight: 750; }
h1 { font-size: clamp(1.65rem,2.1vw,2.15rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.04rem; }
small { line-height: 1.35; }
a, :root[data-theme="dark"] a, :root[data-theme="system"] a { color: var(--link); }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
::selection { background: #f4c54288; color: var(--ink); }
.skip-link { position: fixed; z-index: 200; top: -80px; left: 12px; background: var(--brand); color: #111720; padding: 10px 18px; border-radius: 10px; font-weight: 750; }
.skip-link:focus { top: 10px; }
.muted { color: var(--ink-3); }
.icon { width: 18px; height: 18px; stroke-width: 1.85; }
.kv { display:flex; align-items:baseline; justify-content:space-between; gap:12px; padding: 6px 0; }
.kv + .kv { border-top: 1px solid var(--line); }
/* Navigation and app chrome */
.shell { grid-template-columns: var(--sidebar-w) minmax(0,1fr); }
.sidebar {
  padding: 0; overflow: visible; background: var(--sidebar-bg); color: var(--sidebar-ink);
  border-right: 0; z-index: 40; justify-content: space-between;
}
.sidebar-upper { min-height: 0; display:flex; flex-direction:column; overflow-y:auto; overflow-x: visible; scrollbar-width: thin; scrollbar-color: #434b58 transparent; }
.sidebar-lower { padding: 0 15px 17px; flex: none; background: var(--sidebar-bg); }
.brand { display:flex; align-items:center; padding: 30px 23px 25px; gap: 12px; color: var(--sidebar-ink) !important; min-height:105px; }
.brand:hover { color: var(--sidebar-ink); }
.brand-symbol { width:43px; height:43px; border-radius:12px; display:grid; place-items:center; background:var(--brand); box-shadow: 0 5px 15px #0003; flex:none; }
.brand-symbol img { width:37px; height:37px; object-fit:contain; }
.brand-name { font-weight:850; font-size: 1.09rem; line-height: 1; letter-spacing: -.045em; white-space:nowrap; }
.brand-name > span { color: var(--brand); }
.brand-name small { display:block; font-size: .61rem; margin-top:7px; font-weight:700; letter-spacing: .155em; color: var(--sidebar-muted); }
.bib { margin: 4px 15px 26px; isolation:isolate; }
.bib > summary { border: 1px solid #48505d; border-radius:12px; background:#283140; color:var(--sidebar-ink); padding: 12px 15px 14px; transition: border-color .18s,background .18s; }
.bib > summary:hover { background:#313d4e; border-color: #657081; }
.bib > summary::before,.bib > summary::after { display:none; }
.bib > summary .bib-caption { display:block; font-weight:800; letter-spacing: .14em; color: #aab4c6; font-size:.63rem; margin-bottom:8px; }
.bib-main { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.bib-year { font:800 1.47rem/1.18 var(--font-display); letter-spacing:-.05em; }
.bib-chevron { font-size:1.5rem; line-height:1; color:var(--brand); }
.bib-title { color:#b9c3d2; margin-top:2px; font-size:.81rem; opacity: 1; }
.bib[open] { z-index:42; }
.bib[open] > summary { border-radius:12px 12px 0 0; border-color:var(--brand); }
.bib-menu { background:#252e3c; border:1px solid #4b5668; border-top:0; border-radius:0 0 12px 12px; box-shadow:0 18px 35px #0006; max-height:45vh; }
.bib-menu h4 { color:#a5afc1; margin:11px 13px 5px; letter-spacing:.085em; font-size:.68rem; }
.bib-menu a, :root[data-theme="dark"] .bib-menu a, :root[data-theme="system"] .bib-menu a { color:#edf1f8; padding:10px 13px; gap:10px; font-size:.86rem; }
.bib-menu a .muted { color:#b3bdcc; }
.bib-menu a:hover,.bib-menu a[aria-current="true"] { background:#3a4657; }
.bib-menu details summary { padding:10px 13px; color:#ccd3de; }
.bib-menu-footer { border-top:1px solid #4b5668; }
.bib-menu-footer a { align-items:center; font-weight:700; }
.bib-menu-footer .icon { width:15px; }
.nav-group { padding:0 14px; margin: 0 0 19px; }
.nav-label { display:block; padding:0 13px 9px; color:#8995a7; font-size:.655rem; letter-spacing:.16em; font-weight:850; }
.sidebar .nav { gap:2px; }
.sidebar .nav a, .sidebar .nav-disabled, :root[data-theme="dark"] .sidebar .nav a, :root[data-theme="system"] .sidebar .nav a {
  display:flex; align-items:center; gap:13px; min-height:42px; border-radius:9px; padding:10px 13px;
  color:#abb6c6; font-size:.89rem; font-weight:570; transition: background .16s, color .16s;
}
.sidebar .nav a .icon,.sidebar .nav-disabled .icon { opacity:.82; width:19px; height:19px; }
.sidebar .nav a > span:nth-child(2),.sidebar .nav-disabled > span:nth-child(2) { min-width:0; flex:1; }
.sidebar .nav a:hover { color:#fff; background:#293344; }
.sidebar .nav a[aria-current="page"] { background:#323b49; color:#fff; box-shadow:none; }
.sidebar .nav a[aria-current="page"]::before { content:""; width:3px; height:19px; border-radius:3px; background:var(--brand); position:absolute; margin-left:-13px; }
.sidebar .nav a[aria-current="page"] .icon { color:var(--brand); opacity:1; }
.sidebar .nav-disabled { opacity:.42; cursor:not-allowed; }
.sidebar .nav kbd { font-size:.72rem; background:#344052; color:#afb9c7; padding:3px 6px; border:0; border-radius:5px; }
.sidebar .badge { color:#1e2531; background:var(--brand); }
.sidebar-divider { height:1px; background:var(--sidebar-line); margin: 2px 3px 13px; }
.sidebar-account { border:1px solid var(--sidebar-line); background:#202837; border-radius:12px; margin-top:13px; padding:9px 11px 8px; }
.sidebar-account .account-link { display:flex; align-items:center; gap:10px; color:#e6eaf2 !important; text-decoration:none; }
.account-avatar { display:grid; place-items:center; border-radius:10px; width:35px; height:35px; font-weight:850; color:#1e2531; background:var(--brand); }
.account-text { flex:1; min-width:0; }
.account-text strong { display:block; font-size:.84rem; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.account-text small { display:block; font-size:.72rem; color:#a7b4c5; }
.sidebar-account .account-link > .icon { color:#8e9cae; width:15px; }
.logout-link { appearance:none; padding:8px 0 0 45px; border:0; background:none; color:#b4bfce; font:inherit; font-size:.72rem; cursor:pointer; }
.logout-link:hover { color:var(--brand); }
.main { min-width:0; }
.topbar { min-height:76px; padding:14px clamp(20px,3.2vw,51px); border-bottom:1px solid var(--line); background:var(--surface); gap:21px; }
.topbar-context { display:flex; align-items:center; gap:10px; white-space:nowrap; font-size:.82rem; font-weight:660; color:var(--ink-2); }
.topbar-context-label { color:var(--ink); font-weight:850; letter-spacing:-.02em; }
.topbar-context-divider { color:var(--ink-3); font-size:1.1rem; }
.topbar .search { margin-left:auto; flex:0 1 370px; max-width:370px; min-width:140px; position:relative; }
.topbar .search .search-icon { position:absolute; top:50%; transform:translateY(-50%); left:14px; color:var(--ink-3); display:flex; }
.topbar .search input[type="search"] { border:1px solid var(--line); border-radius:10px; background:var(--surface-2); height:41px; padding:9px 57px 9px 41px; color:var(--ink); }
.topbar .search input[type="search"]:focus { background:var(--surface); border-color:var(--focus); }
.topbar .search kbd { position:absolute; right:9px; top:50%; transform:translateY(-50%); border:1px solid var(--line-strong); border-radius:5px; color:var(--ink-3); background:var(--surface); font-size:.67rem; padding:5px 6px; pointer-events:none; }
.topbar-tools { display:flex; align-items:center; gap:7px; }
.icon-button { width:40px; height:40px; border:1px solid var(--line); border-radius:10px; background:var(--surface); display:grid; place-items:center; cursor:pointer; color:var(--ink-2) !important; position:relative; text-decoration:none; }
.icon-button:hover { background:var(--surface-2); color:var(--ink) !important; }
.theme-glyph { font-size:1.4rem; font-weight:600; line-height:1; }
.notice-dot { position:absolute; top:6px; right:7px; height:7px; width:7px; background:#d05b65; border-radius:100%; box-shadow:0 0 0 2px var(--surface); }
.quick-menu { position:relative; }
.quick-menu > summary { list-style:none; }
.quick-menu > summary::-webkit-details-marker { display:none; }
.topbar-create { background:var(--accent); color:var(--accent-ink); border:1px solid var(--accent); padding:10px 16px; border-radius:10px; height:41px; font-weight:800; }
.topbar-create:hover { background:var(--brand); color:#111720; filter:brightness(1.04); }
.quick-menu-panel { position:absolute; top:calc(100% + 9px); right:0; width:210px; border:1px solid var(--line); border-radius:12px; background:var(--surface); box-shadow:var(--shadow-lift); padding:7px; z-index:44; }
.quick-menu-heading { color:var(--ink-3); font-weight:850; font-size:.64rem; letter-spacing:.13em; padding:8px 10px; }
.quick-menu-panel a { display:flex; gap:10px; align-items:center; padding:10px; border-radius:8px; color:var(--ink) !important; font-weight:650; font-size:.87rem; }
.quick-menu-panel a:hover { background:var(--surface-2); }
.quick-menu-panel .icon { color:var(--link); }
.mobile-backdrop { display:none; }
/* Main reading rhythm */
.page { max-width:1670px; padding:33px clamp(20px,3.2vw,51px) 28px; }
.page-head { align-items:center; gap:20px; margin-bottom:27px; }
.page-head .titles { flex:1; min-width:180px; }
.page-head h1 { font-weight:820; }
.page-head .actions { gap:8px; align-items:center; }
.breadcrumb { min-height:20px; font-size:.78rem; margin-bottom:9px; color:var(--ink-3); display:flex; gap:9px; align-items:center; flex-wrap:wrap; }
.breadcrumb span + span::before { color:var(--ink-3); margin:0 5px 0 0; }
.breadcrumb a { color:var(--ink-3) !important; }
.breadcrumb .chip { font-size:.68rem; }
.page-footer { margin:52px 0 0; padding-top:19px; display:flex; justify-content:space-between; gap:15px; border-top:1px solid var(--line); font-size:.66rem; font-weight:650; letter-spacing:.095em; color:var(--ink-3); }
/* Controls used throughout all modules */
.btn { border-color:var(--line-strong); border-radius:9px; min-height:38px; padding:8px 14px; gap:8px; font-size:.85rem; font-weight:730; color:var(--ink) !important; transition:background .15s,border-color .15s,transform .15s; }
.btn:hover { background:var(--surface-2); border-color:var(--ink-3); }
.btn:active { transform:translateY(1px); }
.btn.primary { background:var(--accent); border-color:var(--accent); color:var(--accent-ink) !important; }
.btn.primary:hover { filter:brightness(1.05); }
.btn.ghost { color:var(--ink-2) !important; }
.btn.ghost:hover { color:var(--ink) !important; background:var(--surface-2); border-color:var(--line); }
.btn.sm { min-height:30px; padding:5px 10px; font-size:.77rem; }
.btn.danger { color:var(--danger) !important; border-color:var(--danger); }
.btn.danger.solid { color:#fff !important; }
.btn-row { gap:8px; }
label { font-size:.82rem; font-weight:720; margin-bottom:7px; color:var(--ink-2); }
.field { margin-bottom:17px; min-width:0; }
input[type="text"],input[type="email"],input[type="password"],input[type="date"],input[type="time"],input[type="number"],input[type="search"],input[type="url"],input[type="datetime-local"],select,textarea {
  border:1px solid var(--line-strong); border-radius:9px; min-height:40px; padding:9px 12px; background:var(--surface); color:var(--ink); font-size:.89rem;
}
input[type="checkbox"],input[type="radio"] { accent-color:var(--accent); }
textarea { line-height:1.6; }
.field .hint,.field .error { margin-top:6px; }
fieldset { padding:18px 20px 11px; border-radius:12px; }
legend { font-weight:800; }
.form-actions { padding-top:18px; margin-top:16px; }
.filters { border-radius:12px; background:var(--surface); border:1px solid var(--line); padding:13px 15px; gap:10px; margin-bottom:14px; align-items:flex-end; }
.filters .field { margin-bottom:0; }
.segmented { background:var(--surface-2); border:1px solid var(--line); border-radius:10px; padding:4px; gap:3px; }
.segmented a { color:var(--ink-2) !important; border-radius:7px; padding:8px 12px; font-weight:650; font-size:.83rem; }
.segmented a[aria-current="true"] { color:var(--ink) !important; background:var(--surface); box-shadow:0 2px 7px #0001; }
.segmented a:hover { color:var(--ink) !important; }
.panel { border-color:var(--line); border-radius:14px; box-shadow:var(--shadow); overflow:hidden; }
.panel-head { padding:17px 21px; gap:12px; }
.panel-head h2,.panel-head h3 { font-size:1.03rem; font-weight:780; }
.panel-body { padding:20px 21px; }
.panel-body.flush { padding:0; }
.panel.note { border-left:3px solid var(--brand); }
.kpis { gap:13px; }
.kpi { padding:18px; border-radius:12px; border-color:var(--line); }
.kpi .v { font-size:1.7rem; font-weight:800; }
.kpi .l { font-size:.83rem; }
.dash { gap:15px; }
.tile { padding:21px; border:1px solid var(--line); border-radius:13px; box-shadow:var(--shadow); }
.tile h3 { font-weight:800; font-size:1.02rem; margin-bottom:13px; }
a.tile { color:var(--ink) !important; transition:transform .18s,box-shadow .18s; }
a.tile:hover { transform:translateY(-2px); box-shadow:var(--shadow-lift); border-color:var(--line-strong); }
.tile .kv { padding:8px 0; }
.tile .kv + .kv { border-top:1px solid var(--line); }
.stat { font-size:2.45rem; font-weight:850; }
.chip { padding:3px 10px; border-radius:7px; gap:6px; font-size:.72rem; font-weight:740; }
.chip::before { width:6px; height:6px; }
.badge { font-weight:850; }
.callout { padding:14px 17px; border-left:3px solid var(--info); border-radius:10px; line-height:1.55; }
.callout.warn { border-left-color:var(--warn); }
.callout.danger { border-left-color:var(--danger); }
.empty { padding:45px 22px; }
.empty .btn { margin-top:9px; }
.list li { padding:13px 17px; }
.list .meta, .meta { color:var(--ink-3); font-size:.76rem; margin-top:4px; line-height:1.4; }
.table-wrap { scrollbar-width:thin; scrollbar-color:var(--line-strong) transparent; }
table.data { font-size:.85rem; }
table.data th { background:var(--surface-2); color:var(--ink-3); font-size:.715rem; font-weight:800; letter-spacing:.02em; padding:12px 15px; }
table.data td { padding:13px 15px; vertical-align:middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background:var(--surface-2); }
table.data td.title-cell a { font-weight:750; color:var(--ink) !important; }
table.data td a:not(.btn):hover { color:var(--link) !important; }
table.data .small { font-size:.75rem; }
.doc-card { border-radius:12px; }
.doc-card .title { font-weight:760; }
.cal-grid { border-radius:12px; }
.cal-grid .day { min-height:110px; padding:9px; }
.cal-grid .dow { padding:10px; }
.cal-grid .day.today { box-shadow:inset 0 0 0 2px var(--brand); }
.cal-grid .day a { color:var(--ink); font-weight:600; }
.preview { border-radius:12px; }
.drawer { width:min(660px,100vw); box-shadow:-20px 0 60px #0003; }
.drawer-head { padding:21px 25px; }
.drawer-head h2 { font-size:1.18rem; font-weight:820; }
.drawer-body { padding:24px 26px; }
.drawer-backdrop { background:#101720a8; backdrop-filter:blur(2px); }
.toast { border-radius:11px; padding:14px 17px; }
/* Shared section headings */
.eyebrow { display:inline-flex; align-items:center; gap:9px; color:var(--ink-3); letter-spacing:.14em; font-size:.67rem; font-weight:850; }
.section-heading { display:flex; align-items:end; justify-content:space-between; gap:14px; margin-bottom:19px; }
.section-heading h2 { font-size:clamp(1.24rem,1.65vw,1.48rem); font-weight:830; margin-top:7px; }
.section-heading p { color:var(--ink-3); margin:5px 0 0; font-size:.86rem; }
.text-link { display:inline-flex; align-items:center; gap:8px; color:var(--link) !important; font-weight:790; font-size:.8rem; white-space:nowrap; }
.text-link .icon { width:15px; height:15px; }
.text-link:hover { gap:11px; }
/* Dashboard: one deliberate story instead of a wall of tiles */
.race-hero { background:#202a39; color:#fff; display:flex; align-items:stretch; justify-content:space-between; gap:30px; border-radius:17px; position:relative; overflow:hidden; isolation:isolate; margin-bottom:33px; min-height:235px; box-shadow:0 11px 30px rgba(18,28,43,.105); }
.race-hero:before { content:""; position:absolute; z-index:-1; width:470px; height:470px; right:13%; top:-215px; border:1px solid #fff1; border-radius:50%; box-shadow:0 0 0 35px #ffffff05,0 0 0 80px #ffffff05,0 0 0 128px #ffffff04; }
.race-hero:after { content:""; position:absolute; width:5px; left:0; top:0; bottom:0; background:var(--brand); }
.race-hero-copy { padding:33px 43px 30px; flex:1; min-width:0; }
.race-hero .eyebrow { color:#f7d979; }
.pulse-dot { width:7px; height:7px; border-radius:50%; background:var(--brand); box-shadow:0 0 0 4px #f4c54228; }
.race-hero h2 { color:#fff; font-size:clamp(1.8rem,2.8vw,2.7rem); letter-spacing:-.055em; margin:12px 0 9px; }
.race-hero p { color:#b8c4d6; max-width:610px; line-height:1.65; font-size:.91rem; }
.race-hero-links { display:flex; gap:19px; align-items:center; flex-wrap:wrap; padding-top:14px; }
.race-hero-links a { display:inline-flex; align-items:center; gap:8px; font-weight:750; font-size:.84rem; color:#f5d56e !important; }
.race-hero-links a:hover { color:#ffe7a2 !important; }
.race-hero-links .icon { width:15px; height:15px; }
.race-date-badge { flex:0 0 250px; margin:25px 26px 25px 0; padding:22px; display:flex; flex-direction:column; justify-content:center; background:#344153a6; border:1px solid #596677; border-radius:13px; position:relative; overflow:hidden; }
.race-date-badge > span:first-child { font-size:.68rem; letter-spacing:.16em; color:#c1cad8; font-weight:850; }
.race-date-badge strong { font-size:1.3rem; font-weight:840; letter-spacing:-.045em; margin:11px 0 3px; white-space:nowrap; }
.race-date-badge > span:nth-of-type(2) { font-size:.79rem; color:#aebccc; }
.race-track { position:absolute; display:flex; transform:rotate(-23deg); gap:10px; right:-28px; bottom:-30px; opacity:.18; }
.race-track i { display:block; width:11px; height:122px; border:2px solid #fff; border-radius:60px; }
.focus-block { margin-bottom:34px; }
.focus-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.focus-row { border:1px solid var(--line); border-radius:12px; background:var(--surface); padding:14px 15px; display:flex; align-items:center; gap:13px; min-height:76px; }
.focus-indicator { flex:none; display:grid; place-items:center; width:38px; height:38px; border-radius:10px; background:var(--warn-bg); color:var(--warn); }
.focus-description { min-width:0; flex:1; }
.focus-description a { font-size:.88rem; color:var(--ink) !important; font-weight:750; display:block; }
.focus-description a:hover { color:var(--link) !important; }
.focus-description .meta { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.focus-arrow { color:var(--ink-3); align-self:center; font-weight:750; }
.focus-empty { display:flex; align-items:center; gap:13px; background:var(--surface); border:1px solid var(--line); border-radius:13px; padding:18px 21px; }
.focus-empty strong { display:block; font-size:.91rem; }
.focus-empty span:not(.focus-check) { display:block; color:var(--ink-3); font-size:.82rem; margin-top:3px; }
.focus-empty > a { margin-left:auto; white-space:nowrap; font-weight:750; font-size:.79rem; }
.focus-check { flex:none; display:grid; place-items:center; width:40px; height:40px; border-radius:50%; color:var(--ok); background:var(--ok-bg); font-size:1.3rem; font-weight:900; }
.metrics-heading { margin-bottom:15px; }
.race-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:29px; }
.metric-card { min-width:0; background:var(--surface); border:1px solid var(--line); border-radius:13px; padding:17px 19px 14px; display:flex; flex-direction:column; justify-content:space-between; min-height:148px; color:var(--ink) !important; text-decoration:none; box-shadow:var(--shadow); transition:transform .18s,box-shadow .18s; }
.metric-card:hover { transform:translateY(-3px); box-shadow:var(--shadow-lift); }
.metric-top { display:flex; align-items:center; justify-content:space-between; gap:8px; color:var(--ink-2); font-weight:720; font-size:.79rem; }
.metric-symbol { display:grid; place-items:center; background:var(--surface-2); color:var(--ink-2); width:33px; height:33px; border-radius:9px; }
.metric-symbol .icon { width:16px; height:16px; }
.metric-value { font-size:clamp(2rem,3vw,2.6rem); letter-spacing:-.075em; font-weight:850; line-height:1.1; margin:7px 0 10px; }
.metric-bottom { display:flex; align-items:center; gap:5px; justify-content:space-between; font-size:.73rem; }
.metric-bottom em { font-style:normal; color:var(--ink-3); overflow:hidden; text-overflow:ellipsis; }
.metric-bottom em.metric-attention { color:var(--danger); font-weight:800; }
.metric-bottom > span { color:var(--link); font-weight:850; font-size:1rem; }
.dashboard-columns { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(310px,1fr); gap:19px; align-items:start; }
.dashboard-primary,.dashboard-secondary { min-width:0; }
.glance-panel { margin-bottom:19px; }
.glance-panel .panel-head { padding:20px 22px 18px; }
.glance-panel .panel-head h2 { margin-top:5px; font-size:1.04rem; }
.glance-panel .panel-head .eyebrow { font-size:.6rem; }
.upcoming-row { padding:15px 22px; display:flex; align-items:center; gap:15px; border-bottom:1px solid var(--line); }
.upcoming-row:last-child { border-bottom:none; }
.upcoming-date { border:1px solid var(--line); background:var(--surface-2); border-radius:9px; width:105px; padding:10px 8px; text-align:center; flex:none; font-size:.76rem; font-weight:780; }
.upcoming-content { min-width:0; flex:1; }
.upcoming-content strong { display:block; font-weight:730; font-size:.84rem; }
.upcoming-content small { display:block; color:var(--ink-3); margin-top:4px; }
.upcoming-row > a { font-weight:800; font-size:1.1rem; }
.empty-state { padding:32px 20px; display:flex; flex-direction:column; align-items:center; text-align:center; }
.empty-state strong { margin-top:10px; font-size:.97rem; }
.empty-state p { font-size:.82rem; margin-top:7px; max-width:310px; color:var(--ink-3); }
.empty-symbol { display:grid; place-items:center; height:47px; width:47px; color:var(--link); border-radius:13px; background:var(--warn-bg); }
.empty-state.compact { padding:24px; color:var(--ink-3); font-size:.83rem; }
.activity-list { list-style:none; padding:4px 22px 10px; margin:0; }
.activity-list li { display:flex; align-items:flex-start; gap:13px; padding:15px 0; border-bottom:1px solid var(--line); font-size:.83rem; line-height:1.45; }
.activity-list li:last-child { border-bottom:none; }
.activity-list li strong { color:var(--ink); }
.activity-dot { height:10px; width:10px; flex:none; border-radius:50%; margin-top:5px; background:var(--brand); box-shadow:0 0 0 4px var(--warn-bg); }
.progress-summary { display:flex; align-items:center; gap:13px; padding:18px 22px 9px; }
.progress-summary > strong { color:var(--ink); font-size:2.6rem; font-weight:850; letter-spacing:-.09em; line-height:1; }
.progress-summary > strong span { font-size:1.3rem; letter-spacing:-.03em; }
.progress-summary > div > span { display:block; font-weight:800; font-size:.84rem; }
.progress-summary small { display:block; font-size:.76rem; margin-top:3px; color:var(--ink-3); }
.progress-line { margin:11px 22px 20px; background:var(--surface-2); border-radius:20px; height:9px; overflow:hidden; }
.progress-line > span { display:block; background:var(--brand); height:100%; border-radius:20px; transition:width .4s; }
.progress-categories { margin:0 22px 16px; border-top:1px solid var(--line); }
.progress-categories > div { display:flex; justify-content:space-between; align-items:center; gap:12px; border-bottom:1px solid var(--line); padding:9px 0; font-size:.82rem; color:var(--ink-2); }
.progress-categories > div:last-child { border-bottom:none; }
.progress-categories strong { color:var(--ink); font-size:.88rem; }
.quick-links-list { padding:7px 17px 12px; }
.quick-links-list a { display:flex; align-items:center; gap:11px; color:var(--ink) !important; padding:12px 4px; border-bottom:1px solid var(--line); font-size:.82rem; font-weight:690; }
.quick-links-list a:hover { color:var(--link) !important; }
.quick-links-list a:last-of-type { border-bottom:none; }
.quick-links-list .icon { color:var(--link); height:16px; width:16px; }
.quick-links-list a > span { flex:1; min-width:0; }
.quick-links-list a > b { color:var(--ink-3); }
.finance-stats { padding:10px 21px 17px; }
.finance-stats > div { display:flex; justify-content:space-between; gap:15px; padding:12px 0; align-items:baseline; border-bottom:1px solid var(--line); font-size:.82rem; }
.finance-stats > div:last-child { border-bottom:none; }
.finance-stats strong { white-space:nowrap; font-size:.93rem; color:var(--ink); }
.finance-stats span { color:var(--ink-3); }
.dashboard-bottom-actions { text-align:right; font-size:.8rem; padding-top:15px; }
.dashboard-bottom-actions a { color:var(--ink-3) !important; }
.dashboard-bottom-actions .icon { width:14px; vertical-align:-3px; }
/* More readable list and module pages */
.page-intro { color:var(--ink-3); font-size:.88rem; margin:-9px 0 25px; max-width:740px; }
.event-landing { margin-bottom:18px; }
.event-table .data th { padding-top:15px; padding-bottom:15px; }
.event-table .data td { padding-top:16px; padding-bottom:16px; }
.event-table .title-cell a { display:block; font-size:.96rem; }
.event-table .title-cell .small { margin-top:5px; }
.event-table .panel-head { background:var(--surface); }
.panel-subheading { color:var(--ink-3); font-size:.76rem; font-weight:500; }
/* Authentication */
.auth-wrap { background:var(--bg); padding:25px; min-height:100vh; position:relative; overflow:hidden; }
.auth-wrap:before { content:""; position:absolute; top:-230px; right:-200px; width:570px; height:570px; border:1px solid var(--line); border-radius:50%; box-shadow:0 0 0 70px color-mix(in srgb,var(--brand) 8%,transparent),0 0 0 160px color-mix(in srgb,var(--brand) 4%,transparent); pointer-events:none; }
.auth-card { padding:39px; border-radius:19px; width:min(470px,100%); box-shadow:0 23px 85px #17253b14; position:relative; }
.auth-card.wide { width:min(700px,100%); }
.auth-card .brand { padding:0 0 28px; min-height:auto; color:var(--ink) !important; }
.auth-card .brand-name { color:var(--ink); }
.auth-card .brand-name small { color:var(--ink-3); }
.auth-card h1 { margin-bottom:7px; }
.auth-card p.muted { margin-bottom:27px; }
.auth-card .field { margin-bottom:19px; }
.auth-card .btn.primary { width:100%; min-height:44px; justify-content:center; }
/* Responsive breakpoints */
@media (max-width:1300px) {
  .topbar-context { display:none; }
  .topbar .search { max-width:none; flex:1; }
  .race-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:1050px) {
  .dashboard-columns { grid-template-columns:1fr; }
  .focus-list { grid-template-columns:1fr; }
  .race-date-badge { flex-basis:215px; }
  .sidebar { width:var(--sidebar-w); }
}
@media (max-width:860px) {
  .shell { display:block; }
  .sidebar { z-index:72; width:min(290px,88vw); box-shadow:5px 0 25px #0003; transform:translateX(-105%); }
  .sidebar.open { transform:none; }
  .mobile-backdrop.open { display:block; position:fixed; inset:0; background:#080d16ab; z-index:70; }
  .topbar { padding:10px 18px; min-height:66px; }
  .topbar .menu-toggle { display:inline-flex; }
  .topbar .search { flex:1; }
  .page { padding:23px 18px 25px; }
  .race-hero { flex-direction:column; gap:0; }
  .race-hero-copy { padding:28px 29px 17px; }
  .race-date-badge { margin:0 29px 29px; flex: auto; padding:18px; }
  .sidebar-upper { overflow-y:auto; }
}
@media (max-width:600px) {
  .page-head { align-items:flex-start; gap:14px; }
  .page-head .actions { width:100%; }
  .page-head .actions .btn { flex:0 1 auto; }
  .race-metrics { gap:9px; }
  .metric-card { padding:14px; min-height:142px; }
  .metric-top { font-size:.72rem; }
  .metric-value { font-size:2.05rem; }
  .focus-empty { flex-wrap:wrap; }
  .focus-empty > a { margin-left:53px; }
  .section-heading { flex-wrap:wrap; }
  .glance-panel .panel-head { align-items:flex-start; flex-wrap:wrap; }
  .topbar { gap:7px; padding:10px 12px; }
  .topbar .search kbd { display:none; }
  .topbar .search input[type="search"] { padding-right:8px; font-size:.76rem; }
  .icon-button { width:35px; height:38px; }
  .topbar-create { padding:8px 10px; }
  .topbar-create span { display:none; }
  .topbar-tools { gap:4px; }
  .race-hero h2 { font-size:1.7rem; }
  .race-hero p { font-size:.83rem; }
  .race-date-badge strong { white-space:normal; }
  .page-footer { flex-direction:column; gap:5px; }
  .grid-2,.grid-3,.grid-4 { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .metric-card,a.tile,.sidebar .nav a,.text-link,.progress-line > span { transition:none; }
}
@media print {
  .sidebar,.topbar,.mobile-backdrop,.page-footer,.dashboard-bottom-actions { display:none !important; }
  .race-hero { color:#111; background:#fff; border:1px solid #888; }
  .race-hero h2 { color:#111; }
  .race-metrics { grid-template-columns:repeat(4,1fr); }
}
/* Annual overview, with actions separate from the clickable event area. */
.event-landing { margin-bottom:36px; }
.count-pill { border-radius:8px; padding:5px 11px; font-size:.72rem; font-weight:800; background:var(--surface); border:1px solid var(--line); color:var(--ink-2); white-space:nowrap; }
.event-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(320px,100%),1fr)); gap:16px; }
.event-card { min-width:0; background:var(--surface); border:1px solid var(--line); border-radius:15px; box-shadow:var(--shadow); display:flex; flex-direction:column; transition:box-shadow .17s,transform .17s; }
.event-card:hover { transform:translateY(-2px); box-shadow:var(--shadow-lift); }
.event-card-main { padding:22px 24px 20px; color:var(--ink) !important; display:block; flex:1; }
.event-card-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.event-card-year { display:inline-block; background:var(--warn-bg); padding:5px 12px; color:var(--warn); border-radius:8px; font-size:.86rem; font-weight:850; }
.event-card h3 { font-size:1.38rem; margin:18px 0 4px; line-height:1.24; }
.event-card-edition { display:block; color:var(--ink-3); font-size:.81rem; }
.event-card-numbers { margin-top:23px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
.event-card-numbers > div { padding:10px; background:var(--surface-2); border-radius:9px; }
.event-card-numbers strong { display:block; font-size:1.48rem; font-weight:830; line-height:1.2; }
.event-card-numbers strong.attention { color:var(--danger); }
.event-card-numbers span { display:block; color:var(--ink-3); font-size:.69rem; margin-top:4px; }
.event-card-go { display:flex; justify-content:space-between; color:var(--link); font-size:.84rem; font-weight:810; margin-top:23px; align-items:center; }
.event-card-go span { font-size:1.09rem; }
.event-card-tools { display:flex; align-items:center; padding:7px 12px; gap:6px; border-top:1px solid var(--line); }
.event-card-tools > a { display:inline-flex; align-items:center; gap:6px; padding:8px 10px; font-size:.75rem; font-weight:720; color:var(--ink-2) !important; border-radius:8px; }
.event-card-tools > a:hover { background:var(--surface-2); }
.event-card-tools .icon { width:14px; height:14px; }
.event-card-menu { margin-left:auto; position:relative; }
.event-card-menu > summary { list-style:none; cursor:pointer; display:grid; place-items:center; width:35px; height:35px; border-radius:8px; color:var(--ink-2); letter-spacing:1px; }
.event-card-menu > summary::-webkit-details-marker { display:none; }
.event-card-menu > summary:hover,.event-card-menu[open] > summary { background:var(--surface-2); }
.event-card-menu-popover { position:absolute; bottom:calc(100% + 4px); right:0; z-index:8; width:170px; padding:5px; background:var(--surface); box-shadow:var(--shadow-lift); border-radius:9px; border:1px solid var(--line); }
.event-card-menu-popover a,.event-card-menu-popover button { color:var(--ink) !important; width:100%; display:block; padding:10px; border:0; border-radius:7px; background:none; cursor:pointer; text-align:left; font:inherit; font-size:.78rem; }
.event-card-menu-popover :is(a,button):hover { background:var(--surface-2); }
.archive-accordion { margin:28px 0; }
.archive-accordion > summary { list-style:none; display:flex; justify-content:space-between; gap:12px; cursor:pointer; padding:21px 23px; align-items:center; }
.archive-accordion > summary::-webkit-details-marker { display:none; }
.archive-accordion > summary h2 { margin-top:6px; display:flex; align-items:center; gap:14px; }
.archive-toggle { font-size:.82rem; color:var(--link); font-weight:730; }
.archive-card-area { border-top:1px solid var(--line); padding:20px 23px; background:var(--surface-2); }
.archive-card-area .event-card { box-shadow:none; }
/* Thematic documents belong after the topics, not in the way of the daily work. */
.topic-documents { margin-top:23px; box-shadow:none; }
.topic-documents > summary { list-style:none; display:flex; align-items:center; justify-content:space-between; gap:15px; cursor:pointer; padding:16px 19px; }
.topic-documents > summary::-webkit-details-marker { display:none; }
.topic-documents .topic-doc-summary { display:inline-flex; align-items:center; gap:10px; }
.topic-documents .topic-doc-summary strong { font-size:.91rem; }
.topic-documents .topic-doc-summary .icon { color:var(--link); }
.topic-doc-inner { border-top:1px solid var(--line); padding:14px 19px; }
.topic-doc-content .panel-head { padding:7px 0 14px; }
.topic-doc-content .panel-body { padding:10px 0; }

/* Navigation-style links should not compete with body copy through underlining. */
:is(.text-link,.race-hero-links a,.focus-description a,.quick-links-list a,.event-card-main,.event-card-tools a,.dashboard-bottom-actions a,.upcoming-row a) { text-decoration:none; }
:is(.text-link,.race-hero-links a,.focus-description a,.quick-links-list a,.dashboard-bottom-actions a):hover { text-decoration:underline; }
.auth-card .brand-name > span { color:var(--link); }
@media (max-width:860px) { body.mobile-nav-open { overflow:hidden; } }

/* Actionable worklist replaces the dense eight-column task table. */
.filter-details { margin-bottom:17px; border:1px solid var(--line); background:var(--surface); border-radius:12px; overflow:hidden; }
.filter-details > summary { list-style:none; cursor:pointer; display:flex; align-items:center; gap:10px; padding:12px 16px; color:var(--ink-2); font-weight:730; font-size:.84rem; }
.filter-details > summary::-webkit-details-marker { display:none; }
.filter-details > summary::after { content:'⌄'; font-size:1rem; margin-left:auto; }
.filter-details[open] > summary::after { transform:rotate(180deg); }
.filter-details > summary:hover { background:var(--surface-2); }
.filter-details > summary .icon { width:18px; color:var(--link); }
.filter-details > .filters { margin:0; border:0; border-top:1px solid var(--line); border-radius:0; box-shadow:none; }
.filter-active { background:var(--warn-bg); color:var(--warn); border-radius:5px; padding:3px 7px; font-weight:800; font-size:.67rem; }
.task-work-panel { margin-bottom:20px; }
.work-item { display:flex; gap:15px; padding:17px 20px; align-items:center; min-width:0; border-bottom:1px solid var(--line); background:var(--surface); }
.work-item:last-child { border-bottom:0; }
.work-item:hover { background:var(--surface-2); }
.work-done { flex:none; width:28px; align-self:flex-start; padding-top:2px; }
.work-done button,.work-done > span,.work-check-readonly { box-sizing:border-box; display:grid; place-items:center; width:25px; height:25px; border:2px solid var(--line-strong); border-radius:7px; color:transparent; background:var(--surface); font-weight:900; cursor:pointer; }
.work-done button:hover { border-color:var(--brand); color:var(--ink); background:var(--brand); }
.work-done > span:not(.work-check-readonly) { background:var(--muted-bg); color:var(--ink-3); border-color:var(--line); }
.work-content { flex:1; min-width:160px; }
.work-title { display:flex; gap:8px; align-items:center; font-size:.93rem; font-weight:780; line-height:1.4; }
.work-title a { color:var(--ink) !important; text-decoration:none; }
.work-title a:hover { color:var(--link) !important; }
.work-title > span { color:var(--ink-3); }
.work-meta { display:flex; flex-wrap:wrap; gap:7px 15px; margin-top:7px; color:var(--ink-3); font-size:.75rem; }
.work-meta > :is(a,span) { display:inline-flex; align-items:center; gap:5px; color:var(--ink-3); text-decoration:none; }
.work-meta a:hover { color:var(--link) !important; }
.work-meta .icon { width:13px; height:13px; }
.work-meta .work-blocked { color:var(--danger); }
.work-properties { display:flex; gap:6px; flex-wrap:wrap; flex:0 1 185px; justify-content:flex-end; }
.work-properties .chip { white-space:nowrap; }
.work-due { min-width:145px; flex:0 0 auto; display:flex; align-items:center; justify-content:flex-end; gap:9px; font-size:.78rem; font-weight:650; color:var(--ink-2); }
.work-due > a { border-radius:6px; color:var(--ink-3); padding:5px; line-height:0; }
.work-due > a:hover { background:var(--muted-bg); color:var(--link); }
.work-due > a .icon { width:16px; height:16px; }
.work-item.is-late { box-shadow:inset 3px 0 var(--danger); }
.work-item.is-complete .work-title a { color:var(--ink-3) !important; text-decoration:line-through; }
@media (max-width:1050px) {
  .work-item { flex-wrap:wrap; gap:11px; }
  .work-content { flex:1 1 calc(100% - 50px); }
  .work-properties { flex:1 1 auto; justify-content:flex-start; margin-left:43px; }
  .work-due { margin-left:auto; min-width:0; }
}
@media (max-width:600px) {
  .work-item { padding:15px 12px; }
  .work-title { font-size:.86rem; }
  .work-properties { margin-left:38px; }
  .work-due { margin-right:4px; }
}

/* Financial overview: important figures above detailed bookkeeping. */
.finance-summary { margin:15px 0 18px; grid-template-columns:repeat(3,minmax(0,1fr)); }
.finance-summary .kpi { min-height:120px; border-top:3px solid var(--brand); }
.finance-summary .kpi .v { font-size:clamp(1.15rem,2vw,1.8rem); }
.finance-details { margin:0 0 26px; }
.finance-expanded { padding:16px; margin:0; grid-template-columns:repeat(3,minmax(0,1fr)); background:var(--surface-2); border-top:1px solid var(--line); }
.finance-expanded .kpi { box-shadow:none; }
@media (max-width:1100px) { .finance-summary,.finance-expanded { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:600px) { .finance-summary,.finance-expanded { grid-template-columns:1fr; } }
