:root { --bg:#f8fafc; --card:#fff; --text:#0f172a; --muted:#64748b; --line:#e2e8f0;
  --accent:#dc2626; --ok:#16a34a; --warn:#b45309; --radius:12px; color-scheme: light dark; }
@media (prefers-color-scheme: dark) {
  :root { --bg:#0b1120; --card:#111827; --text:#e5e7eb; --muted:#94a3b8; --line:#1f2937; --warn:#fbbf24; }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin:0; font:16px/1.45 system-ui, -apple-system, sans-serif; background:var(--bg); color:var(--text);
  padding-bottom: calc(64px + env(safe-area-inset-bottom)); }
.top { display:flex; justify-content:space-between; align-items:center; padding:12px 16px;
  padding-top: calc(12px + env(safe-area-inset-top)); background:#0f172a; color:#fff; }
.top select { width:auto; background:transparent; color:#fff; border:1px solid #334155; border-radius:8px; padding:4px 6px; }
main { max-width:760px; margin:0 auto; padding:16px; }
h1 { font-size:1.4rem; margin:.5rem 0 1rem; }
.card, .list li { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px; margin-bottom:12px; }
.list { list-style:none; padding:0; margin:0 0 12px; }
.list li { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; flex-wrap:wrap; }
.list li.col { flex-direction:column; }
.list a { color:inherit; text-decoration:none; display:flex; flex-direction:column; flex:1; }
.row { display:flex; justify-content:space-between; width:100%; gap:8px; }
small { color:var(--muted); display:block; }
small.warn { color:var(--warn); }
label { display:block; margin-bottom:10px; }
label span { display:block; font-size:.85rem; color:var(--muted); margin-bottom:4px; }
input, select, textarea { width:100%; font:inherit; padding:10px; border:1px solid var(--line); border-radius:8px;
  background:var(--bg); color:var(--text); }
button { font:inherit; border:0; border-radius:8px; padding:10px 14px; background:var(--accent); color:#fff; cursor:pointer; }
button.secondary { background:#475569; } button.danger { background:#7f1d1d; }
form.inline { display:flex; flex-wrap:wrap; gap:8px; width:100%; margin-top:8px; }
form.inline input { flex:1 1 160px; width:auto; }
summary { cursor:pointer; font-weight:600; padding:4px 0; }
details form { margin-top:10px; }
.badge { font-size:.75rem; padding:3px 8px; border-radius:999px; background:var(--line); white-space:nowrap; }
.s-approved, .s-completed, .s-verified { background:#dcfce7; color:#166534; }
.s-rejected, .s-expired { background:#fee2e2; color:#991b1b; }
.s-submitted, .s-under_review, .s-info_requested { background:#fef3c7; color:#92400e; }
.back { color:var(--muted); text-decoration:none; }
#tabs { position:fixed; bottom:0; left:0; right:0; display:flex; background:var(--card); border-top:1px solid var(--line);
  padding-bottom:env(safe-area-inset-bottom); }
#tabs a { flex:1; text-align:center; padding:14px 4px; color:var(--text); text-decoration:none; font-weight:600; }
#toast { position:fixed; left:16px; right:16px; bottom:80px; max-width:520px; margin:0 auto; background:#0f172a; color:#fff;
  padding:12px 16px; border-radius:10px; z-index:2000; box-shadow:0 8px 24px rgba(0,0,0,.35); }
#toast.error { background:#991b1b; }

/* ---------- Header: NES logo, powered by SYNETCO, transparent bar ---------- */
.top { background:transparent; color:var(--text); border-bottom:1px solid var(--line); gap:1rem; }
.top select { color:var(--text); border-color:var(--line); }
.top .brand { display:flex; align-items:center; gap:.6rem; color:inherit; text-decoration:none; }
.brand-logo { height:108px; width:auto; display:block; border-radius:4px; }
.top .powered { display:flex; align-items:center; gap:.4rem; margin-right:auto; font-size:.75rem; color:var(--muted); }
.top .powered img { height:14px; width:auto; display:block; }
@media (max-width: 600px) {
  .brand-logo { height:56px !important; }
  .top { flex-wrap:wrap; }
  .top .brand strong { font-size:.95rem; }
}

/* ---------- Tabs: current page highlighted ---------- */
#tabs a.active { color:var(--accent); }

/* ---------- Administration ---------- */
.subnav { display:flex; gap:6px; flex-wrap:wrap; margin-bottom:14px; }
.subnav a { padding:6px 12px; border:1px solid var(--line); border-radius:999px; color:var(--text);
  text-decoration:none; font-size:.9rem; background:var(--card); }
.subnav a.active { background:var(--accent); border-color:var(--accent); color:#fff; }
.hint { color:var(--muted); font-size:.9rem; margin:0 0 12px; }
.notice { border-color:var(--ok); }
.notice .pw { display:flex; gap:8px; align-items:center; margin:8px 0; flex-wrap:wrap; }
.notice code { font-size:1.15rem; padding:6px 10px; background:var(--bg); border:1px solid var(--line);
  border-radius:8px; user-select:all; }
.list li > .row > div { flex:1; min-width:0; }
.actions { display:flex; gap:8px; margin-top:8px; }
details > form { margin-top:10px; }
.row { align-items:flex-start; }
.row > .badge, .row > button { align-self:flex-start; flex-shrink:0; }
@media (max-width: 600px) {
  #tabs a { font-size:.78rem; padding:12px 2px; }
}

/* ---------- generic ---------- */
a.button { display:inline-block; background:var(--accent); color:#fff; border-radius:8px; padding:10px 14px; text-decoration:none; font-weight:600; }
form.grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(170px, 1fr)); gap:0 12px; align-items:end; margin-top:10px; }
form.grid .actions { display:flex; gap:8px; margin-bottom:10px; }
label.check { display:flex; gap:8px; align-items:center; }
label.check input { width:auto; }
.chips { list-style:none; display:flex; flex-wrap:wrap; gap:8px; padding:0; margin:10px 0; }
.chip { border-left:6px solid var(--c); background:var(--bg); border-radius:6px; padding:4px 10px; font-weight:600; }
.warn { color:var(--warn); }

/* ---------- race director report ---------- */
main:has(.session) { max-width:1280px; }
.row.head { align-items:flex-start; flex-wrap:wrap; margin-bottom:8px; }
.head-actions { display:flex; gap:10px; align-items:center; }
.live { font-size:.8rem; color:var(--ok); font-weight:600; white-space:nowrap; }
.live::before { content:''; display:inline-block; width:8px; height:8px; border-radius:50%; background:currentColor; margin-right:6px; animation:pulse 2s infinite; }
.live.off { color:var(--accent); }
.live.off::before { animation:none; }
@keyframes pulse { 50% { opacity:.25; } }
.class-tabs { display:flex; gap:8px; overflow-x:auto; margin:2px 0 10px; padding:5px; }
.class-tabs button { background:var(--card); color:var(--text); border:2px solid var(--c); white-space:nowrap; }
.class-tabs button.on { background:var(--c); border-color:var(--c); color:var(--fg, #fff); font-weight:700;
  box-shadow:0 0 0 2px var(--bg), 0 0 0 4px var(--c); }
h2.day { font-size:1rem; text-transform:capitalize; color:var(--muted); margin:18px 0 8px; }
.session { padding:0; overflow:hidden; }
.session > header { background:var(--c); color:var(--fg, #fff); padding:10px 14px; display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; }
.session > header small { color:var(--fg, #fff); opacity:.9; }
.session > details, .session > form { padding:0 14px 12px; }
.records { display:grid; grid-template-columns:auto 1fr; gap:2px 12px; margin:10px 14px; font-size:.85rem; }
.records dt { color:var(--muted); }
.records dd { margin:0; font-variant-numeric:tabular-nums; }
.table-wrap { overflow-x:auto; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
table.report { width:100%; border-collapse:collapse; font-size:.85rem; min-width:860px; }
table.report th { text-align:left; background:var(--bg); padding:6px 8px; font-size:.75rem; text-transform:uppercase; color:var(--muted); }
table.report td { padding:6px 8px; border-top:1px solid var(--line); vertical-align:top; }
table.report td.mono { font-variant-numeric:tabular-nums; white-space:nowrap; }
table.report td.car { text-align:center; font-weight:700; width:48px; }
table.report td.decision { font-weight:700; color:var(--accent); }
table.report td.empty { color:var(--muted); text-align:center; }
table.report tr.flash td, .session > header.flash { animation:flash 2.5s ease-out; }
@keyframes flash { 0% { background:#fde68a; color:#0f172a; } 100% { } }
.row-actions { white-space:nowrap; width:70px; }
button.icon { padding:4px 8px; background:transparent; color:var(--text); border:1px solid var(--line); }
button.icon.danger { color:var(--accent); background:transparent; }
.entry-form { display:flex; flex-wrap:wrap; gap:6px; padding-top:12px !important; }
.entry-form input { width:auto; min-width:0; padding:8px; }
.entry-form .w-time { flex:0 0 96px; font-variant-numeric:tabular-nums; }
.entry-form .w-caller { flex:0 1 110px; }
.entry-form .w-car { flex:0 0 64px; text-align:center; }
.entry-form .w-text { flex:1 1 180px; }
tr.editing td { background:var(--bg); }
tr.editing .entry-form { padding:0 !important; }

/* Phone: each report line becomes a compact stacked card instead of a wide table */
@media (max-width: 700px) {
  table.report { min-width: 0; }
  table.report thead { display: none; }
  table.report tr { display: grid; grid-template-columns: 74px 34px 34px 34px 1fr auto; gap: 2px 6px;
    padding: 8px 12px; border-top: 1px solid var(--line); align-items: start; }
  table.report td { border: 0; padding: 0; }
  table.report td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 600; }
  table.report td:nth-child(2) { grid-column: 5; grid-row: 1; color: var(--muted); text-align: right; font-size: .8rem; }
  table.report td:nth-child(3), table.report td:nth-child(4), table.report td:nth-child(5) { grid-row: 1; width: auto; }
  table.report td:nth-child(6) { grid-column: 1 / -1; font-weight: 600; }
  table.report td:nth-child(7) { grid-column: 1 / -1; color: var(--muted); }
  table.report td:nth-child(8) { grid-column: 1 / -1; }
  table.report td:nth-child(9) { grid-column: 1 / 3; }
  table.report td:nth-child(10) { grid-column: 5 / -1; justify-self: end; }
  table.report td:nth-child(11) { grid-column: 3 / 5; }
  table.report td:nth-child(12) { grid-column: 6; grid-row: 1; }
  table.report td.empty, tr.editing td { grid-column: 1 / -1; }
  tr.editing { display: block !important; }
  .entry-form .w-text { flex-basis: 100%; }
}

/* ---------- reports list ---------- */
.filters { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.filters input { flex:1 1 220px; width:auto; }
.filters select { flex:0 1 240px; width:auto; }
.report-list { display:grid; grid-template-columns:repeat(auto-fill, minmax(300px, 1fr)); gap:12px; margin-bottom:14px; }
.report-card { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px;
  display:flex; flex-direction:column; gap:10px; }
.report-card .report-main { color:inherit; text-decoration:none; display:flex; flex-direction:column; gap:6px; }
.report-card .chips { margin:2px 0; }
.report-figures { display:flex; gap:14px; font-size:.9rem; color:var(--muted); }
.report-figures b { color:var(--text); font-size:1.05rem; }
.report-card .button { align-self:flex-start; }
a.button.secondary { background:#475569; }
.st-upcoming { background:#e0f2fe; color:#075985; }
.st-in_progress { background:#dcfce7; color:#166534; }
.st-completed { background:var(--line); color:var(--muted); }

/* time stamped automatically when Post/Caller is filled in */
.entry-form .w-time.stamped { animation: stamp 1.6s ease-out; }
@keyframes stamp { 0% { background:#fde68a; color:#0f172a; } 100% { } }

/* ---------- NOTES column ---------- */
table.report td.notes { min-width:220px; font-size:.8rem; }
table.report td.notes .note { background:var(--bg); border-left:3px solid #0ea5e9; border-radius:4px; padding:3px 6px; margin-bottom:4px; }
table.report td.notes .note b { color:#0369a1; }
@media (prefers-color-scheme: dark) { table.report td.notes .note b { color:#7dd3fc; } }
button.icon.tiny { padding:0 5px; font-size:.7rem; margin-left:4px; border:0; color:var(--muted); }
.note-form { display:flex; gap:4px; }
.note-form input { padding:4px 6px; font-size:.8rem; min-width:0; flex:1; }
.note-form button.icon { padding:2px 8px; }

/* ---------- TO CAR#, TK switch, notes button and window ---------- */
table.report td.car.target { background:#fee2e2; color:#991b1b; border-radius:6px; }
.tocar-badge { display:inline-block; background:#991b1b; color:#fff; font-weight:700; border-radius:6px; padding:2px 8px; }
.entry-form .w-tocar { flex:0 0 120px; width:auto; padding:8px; }
table.report td.tk { white-space:nowrap; }
.switch { display:inline-flex; align-items:center; gap:6px; background:#cbd5e1; color:#334155; border-radius:999px;
  padding:3px 10px 3px 3px; font-size:.75rem; font-weight:700; }
.switch .knob { width:18px; height:18px; border-radius:50%; background:#fff; box-shadow:0 1px 2px rgba(0,0,0,.3); }
.switch.on { background:var(--ok); color:#fff; flex-direction:row-reverse; padding:3px 3px 3px 10px; }
.switch:disabled { opacity:.85; cursor:default; }
table.report td.notes { min-width:0; }
.note-btn { background:#fff; color:#0f172a; border:1px solid var(--line); font-size:.8rem; padding:6px 10px; white-space:nowrap; }
.note-btn.has-notes { background:#dc2626; color:#fff; border-color:#dc2626; font-weight:700; }
dialog.notes-dialog { border:0; border-radius:14px; padding:16px; width:min(560px, calc(100vw - 32px)); max-height:80vh;
  background:var(--card); color:var(--text); box-shadow:0 20px 50px rgba(0,0,0,.35); }
dialog.notes-dialog::backdrop { background:rgba(15,23,42,.55); }
.dlg-head { display:flex; flex-direction:column; gap:2px; margin-bottom:10px; }
.dlg-list { max-height:45vh; overflow:auto; display:flex; flex-direction:column; gap:8px; margin-bottom:10px; }
.dlg-note { background:var(--bg); border-radius:8px; padding:8px 10px; position:relative; }
.dlg-note .author { display:inline-block; background:#0f172a; color:#fff; font-weight:700; font-size:.75rem;
  border-radius:4px; padding:1px 7px; margin-right:6px; }
.dlg-note .when { font-size:.75rem; color:var(--muted); }
.dlg-note .body { margin-top:4px; white-space:pre-wrap; }
.dlg-note button.icon.tiny { position:absolute; top:6px; right:6px; }
.dlg-form textarea { width:100%; }

.entry-form [name=comment], .entry-form [name=action], .entry-form [name=decision] { text-transform:uppercase; }

/* championship entries (car list, car page) and drivers */
.chips.entries { margin:6px 0 0; gap:6px; }
.chips.entries .chip { font-size:.85rem; display:flex; flex-direction:column; }
.chips.entries .chip small { font-weight:400; color:var(--muted); }
.nat { color:var(--muted); font-weight:400; }
.card > h1 { margin-top:0; }
.card h2 { font-size:1.05rem; margin:16px 0 6px; }
.readonly { display:flex; flex-direction:column; margin:0 0 12px; }
.readonly small { color:var(--muted); }
input[type=search] { width:100%; margin:0 0 12px; }

/* live report: who is online (bar above the bottom tabs) */
.online-bar { position:fixed; left:0; right:0; bottom:calc(52px + env(safe-area-inset-bottom)); z-index:5;
  background:var(--card); border-top:1px solid var(--line); font-size:.85rem; }
.online-bar summary { display:flex; align-items:center; gap:8px; padding:6px 16px; cursor:pointer; list-style:none; }
.online-bar summary::-webkit-details-marker { display:none; }
.online-bar .dot { width:8px; height:8px; border-radius:50%; background:var(--ok, #16a34a); flex-shrink:0; }
.online-bar .names { color:var(--muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; min-width:0; }
.online-bar ul { list-style:none; margin:0; padding:4px 16px 10px; display:flex; flex-wrap:wrap; gap:6px 16px; max-height:40vh; overflow:auto; }
.online-bar li { display:flex; flex-direction:column; }
.online-bar li.me strong::after { content:' ✓'; color:var(--ok, #16a34a); }
.online-bar li small { color:var(--muted); }
body:has(.online-bar) { padding-bottom:calc(100px + env(safe-area-inset-bottom)); }
body:has(.online-bar) #toast { bottom:120px; }
/* phrase translations */
.phrases input { width:100%; }
.phrases input.ok { border-color:var(--ok, #16a34a); }
.filters .check { display:flex; align-items:center; gap:6px; flex-direction:row; }

/* penalties report */
.card-actions { display:flex; gap:8px; flex-wrap:wrap; }
table.penalties { width:100%; border-collapse:collapse; font-size:.85rem; min-width:820px; }
table.penalties th { text-align:left; background:var(--bg); padding:6px 8px; font-size:.75rem; text-transform:uppercase; color:var(--muted); }
table.penalties td { padding:6px 8px; border-top:1px solid var(--line); vertical-align:top; }
table.penalties td.mono { font-variant-numeric:tabular-nums; white-space:nowrap; }
table.penalties td.car { font-weight:700; white-space:nowrap; }
table.penalties td.decision { font-weight:700; color:var(--accent); }
table.penalties td.empty { color:var(--muted); text-align:center; }
table.penalties td.pnotes { font-size:.8rem; color:var(--muted); max-width:240px; }
table.penalties td.row-actions { white-space:nowrap; }
.badge.src-rd { background:#e0f2fe; color:#075985; }
.badge.src-edited { background:#fef3c7; color:#92400e; }
.badge.src-added { background:#ede9fe; color:#5b21b6; }
form.pen-form { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:8px 0; }
form.pen-form .w-time { width:100px; } form.pen-form .w-car { width:70px; } form.pen-form .w-text { flex:1 1 180px; min-width:0; }
.session > details { padding:0 14px 12px; }
@media (max-width: 700px) {
  table.penalties { min-width:0; }
  table.penalties thead { display:none; }
  table.penalties tr { display:grid; grid-template-columns:74px 52px 1fr auto; gap:2px 6px; padding:8px 10px; border-top:1px solid var(--line); }
  table.penalties td { border:0; padding:0; }
  table.penalties td:nth-child(3) { grid-column:3; color:var(--muted); }
  table.penalties td:nth-child(4), table.penalties td:nth-child(5), table.penalties td:nth-child(7) { grid-column:1 / -1; }
  table.penalties td:nth-child(6) { grid-column:4; grid-row:1; }
  table.penalties td:nth-child(8) { grid-column:1 / 3; }
  table.penalties td:nth-child(9) { grid-column:3 / -1; justify-self:end; }
  table.penalties td.empty, table.penalties tr.editing td { grid-column:1 / -1; }
}

/* classes per event, new season editor */
.class-checks { border:1px solid var(--line); border-radius:var(--radius); padding:8px 10px; margin:8px 0; display:flex; flex-wrap:wrap; gap:8px; }
.class-checks legend { font-size:.85rem; color:var(--muted); padding:0 4px; }
label.check.chip { display:flex; flex-direction:row; align-items:center; gap:6px; cursor:pointer; }
label.check.chip input { width:auto; margin:0; }
.ed-rows { display:flex; flex-direction:column; gap:8px; margin:6px 0 10px; }
.ed-row { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.ed-row input:not([type=color]) { flex:1 1 160px; min-width:0; }
.ed-row input[type=color] { width:48px; padding:2px; }
.ed-event { padding:10px; display:flex; flex-direction:column; gap:6px; margin:0; }
.ed-checks { display:flex; flex-wrap:wrap; gap:8px; }
.event-edit { margin-top:6px; }

/* users online: count in the header, list in a drop-down */
.online { position:relative; margin-left:auto; margin-right:10px; }
.online-btn { display:flex; align-items:center; gap:6px; background:var(--card); color:var(--text); border:1px solid var(--line);
  border-radius:999px; padding:5px 12px; font-size:.9rem; cursor:pointer; }
.online-btn .dot { width:9px; height:9px; border-radius:50%; background:var(--ok); }
.online-btn .lbl { color:var(--muted); }
.online-menu { position:absolute; right:0; top:calc(100% + 6px); z-index:20; width:min(320px, calc(100vw - 32px)); max-height:60vh; overflow:auto;
  background:var(--card); border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 10px 30px rgba(0,0,0,.15); padding:10px 12px; }
.online-menu ul { list-style:none; margin:8px 0 0; padding:0; }
.online-menu li { display:flex; flex-direction:column; padding:6px 0; border-top:1px solid var(--line); }
.online-menu li .who { font-weight:600; }
.online-menu li.me .who::after { content:' ✓'; color:var(--ok); }
.online-menu li small { color:var(--muted); }
.online-menu li small.page { color:var(--accent); }
@media (max-width: 600px) { .online-btn .lbl { display:none; } .online { margin-right:6px; } }

/* documents area (folders like Sportity) */
.folders { display:flex; flex-direction:column; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; background:var(--card); }
.folder > summary { display:flex; align-items:center; gap:14px; padding:16px; cursor:pointer; list-style:none; border-top:1px solid var(--line); }
.folders > .folder:first-child > summary { border-top:0; }
.folder > summary::-webkit-details-marker { display:none; }
.folder > summary::after { content:'⌄'; margin-left:auto; color:var(--muted); font-size:1.3rem; line-height:1; transition:transform .15s; }
.folder[open] > summary::after { transform:rotate(180deg); }
.folder.depth-0 > summary .folder-name { font-weight:600; letter-spacing:.02em; font-size:1.02rem; }
.folder.depth-1 > summary { padding:12px 16px 12px 28px; }
.folder.depth-2 > summary { padding:10px 16px 10px 44px; }
.folder-icon { position:relative; width:34px; height:26px; background:var(--muted); border-radius:3px 6px 6px 6px; flex-shrink:0; }
.folder-icon::before { content:''; position:absolute; left:0; top:-5px; width:14px; height:7px; background:var(--muted); border-radius:3px 3px 0 0; }
.folder-count { position:absolute; right:-8px; top:-10px; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:var(--muted);
  color:#fff; font-size:.7rem; display:flex; align-items:center; justify-content:center; border:2px solid var(--card); }
.folder-body { padding:0 12px 12px; background:var(--bg); }
.folder.depth-0 > .folder-body { border-top:1px solid var(--line); }
ul.docs { list-style:none; margin:8px 0; padding:0; display:flex; flex-direction:column; gap:6px; }
li.doc { display:flex; align-items:flex-start; gap:8px; background:var(--card); border:1px solid var(--line); border-radius:10px; padding:8px 10px; }
li.doc > a { display:flex; align-items:center; gap:10px; flex:1; color:inherit; text-decoration:none; min-width:0; }
li.doc.unread { border-left:4px solid var(--accent); }
.doc-icon { width:40px; height:40px; border-radius:8px; background:#fee2e2; color:#b91c1c; font-size:.7rem; font-weight:700;
  display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.doc-main { display:flex; flex-direction:column; min-width:0; }
.doc-main small { color:var(--muted); }
.badge.doc-new { background:var(--accent); color:#fff; }
.doc-edit > summary { list-style:none; cursor:pointer; padding:4px 8px; border:1px solid var(--line); border-radius:8px; }
.doc-edit[open] { flex-basis:100%; }
.doc-tool { margin-top:8px; }
.doc-tool > summary { cursor:pointer; color:var(--accent); font-weight:600; }
.doc-upload { display:flex; flex-direction:column; gap:8px; margin-top:8px; }
li.doc:has(.doc-edit[open]) { flex-wrap:wrap; }
.folder.year > summary .folder-name { font-size:1.25rem; font-weight:800; }
.folder.year > summary .folder-icon { background:var(--accent); }
.folder.year > summary .folder-icon::before { background:var(--accent); }
.folder.year > .folder-body { padding:0 0 8px; }
.folder.year > .folder-body > .folder > summary { padding-left:28px; }
.folder.year > .folder-body > .folder .folder.depth-2 > summary { padding-left:44px; }
.folder.year > .folder-body > .folder > summary .folder-name { font-weight:600; letter-spacing:.02em; }
.folder.year > .folder-body > .doc-tool, .folder.year > .folder-body > ul.docs, .folder.year > .folder-body > .hint { margin-left:16px; margin-right:16px; }

/* forgotten password */
.forgot-link { display:block; margin-top:12px; color:var(--muted); font-size:.9rem; }
.notice-ok { background:#dcfce7; color:#166534; border-radius:10px; padding:10px 12px; margin:10px 0 0; }

/* drivers' safety equipment */
details.equipment { margin-top:6px; }
details.equipment > summary { cursor:pointer; color:var(--accent); font-weight:600; }
.eq-body { margin-top:6px; }
.eq-head { display:flex; justify-content:space-between; gap:8px; flex-wrap:wrap; align-items:baseline; margin-bottom:6px; }
.eq-head small { color:var(--muted); }
table.eq { width:100%; border-collapse:collapse; font-size:.85rem; min-width:560px; }
table.eq th, table.eq td { padding:5px 6px; border-top:1px solid var(--line); text-align:left; vertical-align:middle; }
table.eq thead th { font-size:.72rem; text-transform:uppercase; color:var(--muted); background:var(--bg); }
table.eq tbody th { white-space:nowrap; font-weight:600; }
table.eq td.missing { color:var(--accent); }
table.eq td.na { background:var(--bg); }
table.eq input { width:100%; min-width:0; padding:5px 7px; font-size:.85rem; }
table.eq .eq-flag { white-space:nowrap; text-align:right; }
table.eq .ok { color:var(--ok); font-weight:700; }
table.eq tr.incomplete th { color:var(--accent); }

/* parts: seal numbers */
.seals { display:flex; flex-wrap:wrap; align-items:center; gap:6px; margin:6px 0 4px; }
.seals-lbl { font-size:.72rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); font-weight:600; }
.seal { display:inline-block; background:#facc15; color:#000; font:700 .95rem/1.2 ui-monospace, SFMono-Regular, Menlo, monospace;
  padding:3px 9px; border-radius:6px; border:1px solid #ca8a04; letter-spacing:.03em; }
.list li > span + .seals { flex-basis:100%; margin:2px 0 0; }

/* search under the header */
.search { position:sticky; top:0; z-index:15; background:var(--bg); border-bottom:1px solid var(--line); padding:8px 16px; }
.search-wrap { position:relative; max-width:760px; margin:0 auto; }
.search-ico { position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:.9rem; opacity:.6; pointer-events:none; }
.search input { padding:9px 12px 9px 36px; border-radius:999px; background:var(--card); }
.search-menu { position:absolute; left:0; right:0; top:calc(100% + 6px); list-style:none; margin:0; padding:6px 0; background:var(--card);
  border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 12px 32px rgba(0,0,0,.18); max-height:70vh; overflow:auto; }
.search-menu li.grp { padding:8px 14px 4px; font-size:.72rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; }
.search-menu li.res a { display:block; padding:7px 14px; color:inherit; text-decoration:none; }
.search-menu li.res a:hover, .search-menu li.res.sel a { background:var(--bg); }
.search-menu li.res .ttl { font-weight:600; }
.search-menu li.res.removed .ttl { color:var(--muted); font-weight:500; }
.search-menu li.res em { font-style:normal; font-size:.8rem; }
.search-menu li.none { padding:10px 14px; color:var(--muted); }

/* Race Director Reports: active / next / ended sessions */
.session > header .sess-title { display:flex; flex-direction:column; }
.session > header .sess-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.sess-badge { font-size:.72rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em; padding:2px 8px; border-radius:999px;
  background:rgba(255,255,255,.85); color:#0f172a; }
.sess-badge.live { background:#16a34a; color:#fff; animation:pulse 2s ease-in-out infinite; }
.sess-badge.done { background:rgba(0,0,0,.35); color:#fff; }
@keyframes pulse { 50% { opacity:.65; } }
.sess-btn { font-size:.8rem; padding:4px 10px; border-radius:8px; border:1px solid currentColor; background:transparent; color:inherit; cursor:pointer; width:auto; }
.sess-count { opacity:.9; }
.session.active { border:3px solid var(--c); box-shadow:0 0 0 4px color-mix(in srgb, var(--c) 25%, transparent), 0 10px 28px rgba(0,0,0,.12); }
.session.active > header { padding:14px 16px; font-size:1.08rem; }
details.session.ended { opacity:.92; }
details.session.ended > summary { list-style:none; cursor:pointer; }
details.session.ended > summary::-webkit-details-marker { display:none; }
details.session.ended > summary > header { background:color-mix(in srgb, var(--c) 55%, #64748b); padding:8px 14px; display:flex;
  justify-content:space-between; gap:8px; flex-wrap:wrap; color:var(--fg, #fff); }
details.session.ended > summary > header small { color:inherit; opacity:.9; }
details.session.ended > summary > header .sess-title strong::before { content:'▸ '; }
details.session.ended[open] > summary > header .sess-title strong::before { content:'▾ '; }
details.session.ended > details, details.session.ended > form { padding:0 14px 12px; }
h2.day.sess-group { text-transform:none; }

/* QR codes */
.search { display:flex; gap:8px; align-items:center; justify-content:center; }
.search .search-wrap { flex:1; }
.scan-btn { display:flex; align-items:center; gap:6px; padding:8px 14px; border-radius:999px; background:var(--accent); color:#fff;
  text-decoration:none; font-weight:700; white-space:nowrap; flex-shrink:0; }
@media (max-width: 600px) { .scan-btn .lbl { display:none; } .scan-btn { padding:8px 12px; } }
.qr-bar { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 12px; }
.qr-bar .button, .head-actions .button { width:auto; }
.qr-car h2 { display:flex; flex-direction:column; margin:0 0 10px; font-size:1.1rem; }
.qr-car h2 small { font-weight:400; }
.qr-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:12px; }
.qr-label { margin:0; display:flex; flex-direction:column; align-items:center; gap:6px; }
.qr-label canvas { width:100%; height:auto; border:1px solid var(--line); border-radius:8px; background:#fff; }
.qr-label button { width:auto; font-size:.8rem; padding:4px 10px; }
.scan-box { position:relative; max-width:480px; margin:0 auto 12px; border-radius:16px; overflow:hidden; background:#000; aspect-ratio:1; }
.scan-video { width:100%; height:100%; object-fit:cover; display:block; }
.scan-frame { position:absolute; inset:15%; border:3px solid rgba(255,255,255,.9); border-radius:18px; box-shadow:0 0 0 999px rgba(0,0,0,.35); }
.scan-manual { display:flex; gap:8px; max-width:480px; margin:0 auto 12px; }
.scan-manual button { width:auto; }
/* check page */
.chk { max-width:760px; margin:0 auto; }
.chk-kind { font-size:.75rem; text-transform:uppercase; letter-spacing:.08em; color:var(--muted); font-weight:700; }
.chk-title { font-size:1.7rem; margin:.1rem 0 .2rem; }
.chk-sub { color:var(--muted); margin:0 0 8px; }
.chk-banner { display:flex; flex-direction:column; gap:2px; padding:16px 18px; border-radius:var(--radius); margin:12px 0 16px; color:#fff; }
.chk-banner strong { font-size:1.35rem; }
.chk-banner.lv-ok { background:#16a34a; } .chk-banner.lv-warn { background:#d97706; } .chk-banner.lv-bad { background:#dc2626; }
.chk-section { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:12px 14px; margin-bottom:14px; }
.chk-section h2 { font-size:1.05rem; margin:0 0 8px; }
.chk-list { display:flex; flex-direction:column; }
.chk-row { display:grid; grid-template-columns:minmax(110px, 34%) 1fr auto; gap:10px; align-items:center; padding:9px 0 9px 10px;
  border-top:1px solid var(--line); border-left:4px solid transparent; }
.chk-row.lv-ok { border-left-color:#16a34a; } .chk-row.lv-warn { border-left-color:#d97706; } .chk-row.lv-bad { border-left-color:#dc2626; background:color-mix(in srgb, #dc2626 8%, transparent); }
.chk-name { font-weight:600; }
.chk-val { min-width:0; overflow-wrap:anywhere; }
.chk-val .seals { margin:4px 0 2px; }
.chk-val small.exp { color:var(--text); font-weight:600; }
.chk-val a { font-size:.85rem; }
.chk-pill { font-size:.78rem; font-weight:700; padding:3px 9px; border-radius:999px; white-space:nowrap; color:#fff; }
.chk-pill.lv-ok { background:#16a34a; } .chk-pill.lv-warn { background:#d97706; } .chk-pill.lv-bad { background:#dc2626; }
.chk-note { color:var(--warn); font-weight:600; }
.chk-driver { border-top:1px solid var(--line); padding:6px 0; }
.chk-driver > summary { cursor:pointer; display:flex; align-items:center; gap:8px; padding:4px 0; }
.chk-driver > summary .chk-pill { margin-left:auto; }
.chk-actions { display:flex; gap:8px; flex-wrap:wrap; margin:8px 0 24px; }
.chk-actions .button { width:auto; }
.mono { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:600; }
@media (max-width: 600px) { .chk-row { grid-template-columns:1fr auto; } .chk-row .chk-val { grid-column:1 / -1; grid-row:2; } }
@media print {
  body { background:#fff; padding:0; }
  .top, #search, #tabs, #toast, .no-print, .online, details.equipment { display:none !important; }
  main { max-width:none; padding:0; }
  .qr-car { border:none; padding:0; margin:0; break-inside:avoid; }
  .qr-car h2 { display:none; }
  .qr-sheet .qr-grid, .qr-sheet { display:block; }
  .qr-label { display:inline-block; width:62mm; margin:0 4mm 6mm 0; break-inside:avoid; vertical-align:top; }
  .qr-label canvas { border:1px dashed #999; border-radius:0; }
}

/* ---------- Header: logo, title / powered by on two lines, menu next to them (wide screens) ---------- */
.top .brand-text { display:flex; flex-direction:column; gap:3px; min-width:0; }
.top .brand-text strong { font-size:1.05rem; line-height:1.15; white-space:nowrap; }
.top .brand-text .powered { margin:0; }
.top .online { margin-left:0; }
@media (min-width: 900px) {
  .top { flex-wrap:nowrap; }
  #tabs { position:static; flex:1; display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center; gap:4px 2px;
    background:transparent; border:0; padding:0; margin:0 4px; min-width:0; }
  #tabs[hidden] { display:none !important; }
  #tabs a { flex:0 0 auto; padding:8px 12px; border-radius:999px; font-size:.95rem; white-space:nowrap; }
  #tabs a:hover { background:var(--card); }
  #tabs a.active { background:var(--card); box-shadow:inset 0 0 0 1px var(--line); }
  body { padding-bottom:16px; }
  #toast { bottom:24px; }
  .brand-logo { height:84px; }
}
@media (max-width: 899px) {
  .top .brand-text { margin-right:auto; }
}
@media (min-width: 900px) and (max-width: 1300px) {
  #tabs a { padding:6px 9px; font-size:.86rem; }
  .top .brand-text strong { font-size:.95rem; }
}
@media (max-width: 899px) {
  .top { flex-wrap:nowrap !important; gap:.5rem; }
  .top .brand-text strong { white-space:normal; font-size:.9rem; }
  .top .brand-text .powered { font-size:.68rem; flex-wrap:wrap; }
  .top select { padding:4px 2px; }
}

/* ---------- Season ---------- */
.season-list { display:flex; flex-direction:column; gap:12px; }
.season-event { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px; }
.season-event .ev-name { font-size:1.1rem; display:block; }
.season-event.st-completed { opacity:.8; }
.season-event.current { border:2px solid var(--accent); box-shadow:0 8px 24px rgba(0,0,0,.08); }
.season-actions { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px, 1fr)); gap:8px; margin-top:10px; }
.season-actions .button { display:flex; flex-direction:column; align-items:flex-start; gap:2px; width:auto; text-align:left; }
.season-actions .button small { color:inherit; opacity:.85; font-weight:400; }
/* ---------- Tyres ---------- */
.tyre-filter { margin-bottom:12px; }
.tyre-car > summary { cursor:pointer; display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.tyre-car > summary .chk-pill { margin-left:auto; }
.tyre-class { border-top:1px solid var(--line); margin-top:12px; padding-top:10px; }
.tyre-class-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.tyre-class-head .chk-pill { margin-left:auto; }
.tyre-class-head .chip { margin:0; }
.tyre-group { margin-bottom:8px; }
.tyre-lbl { font-size:.75rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; margin-bottom:4px; }
.tyre-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(130px, 1fr)); gap:6px; }
.tyre-slot { display:flex; align-items:center; gap:4px; margin:0; }
.tyre-slot > span { font-size:.75rem; color:var(--muted); width:22px; text-align:right; flex-shrink:0; margin:0; }
.tyre-slot input { padding:7px 8px; font-family:ui-monospace, SFMono-Regular, Menlo, monospace; text-transform:uppercase; }
.tyre-slot input.warn-in { border-color:#d97706; background:color-mix(in srgb, #d97706 10%, var(--bg)); }
.tyre-code { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; font-weight:600; padding:6px 8px; border:1px solid var(--line); border-radius:8px; }
.tyre-code.empty { color:var(--muted); }
.tyre-notes small { display:block; }
.tyre-class button[type=submit] { width:auto; margin-top:6px; }
.tyre-rule { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; margin-bottom:8px; }
.tyre-rule label { width:110px; margin:0; }

details.season-event.compact { padding:10px 14px; }
details.season-event.compact > summary { list-style:none; cursor:pointer; }
details.season-event.compact > summary::-webkit-details-marker { display:none; }
details.season-event.compact > summary .ev-name { font-size:1rem; }
details.season-event.compact > summary .ev-name::before { content:'▸ '; color:var(--muted); }
details.season-event.compact[open] > summary .ev-name::before { content:'▾ '; }
details.season-event.compact[open] { opacity:1; }
details.season-event.compact > .chips { margin-top:8px; }

/* ---------- Login: logos fading in at the centre ---------- */
body.is-login .top .brand, body.is-login .top .brand-text { visibility:hidden; }
body.is-login .top { border-bottom-color:transparent; }
.login-page { min-height:calc(100vh - 160px); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:28px; }
.login-intro { display:flex; flex-direction:column; align-items:center; gap:18px; animation:introIn 3s ease-out both; }
.login-intro .intro-nes { height:150px; width:auto; border-radius:8px; }
.login-intro .intro-powered { display:flex; align-items:center; gap:10px; color:var(--muted); font-size:.95rem; }
.login-intro .intro-powered img { height:30px; width:auto; }
.login-page .login-form { width:100%; max-width:420px; animation:formIn .8s ease-out 2.4s both; }
@keyframes introIn { from { opacity:0; transform:scale(.94); filter:blur(6px); } to { opacity:1; transform:none; filter:none; } }
@keyframes formIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) { .login-intro, .login-page .login-form { animation:none; } }
@media (max-width: 600px) { .login-intro .intro-nes { height:110px; } .login-intro .intro-powered img { height:24px; } }

.entry-form .trash { width:auto; padding:6px 10px; font-size:1.05rem; line-height:1; }

/* ---------- Scanner modes, tyre result ---------- */
.seg-bar { display:flex; gap:0; max-width:480px; margin:0 auto 12px; border:1px solid var(--line); border-radius:999px; overflow:hidden; background:var(--card); }
.seg-bar .seg { flex:1; border:0; border-radius:0; background:transparent; color:var(--text); padding:10px 8px; font-weight:700; width:auto; }
.seg-bar .seg.on { background:var(--accent); color:#fff; }
.scan-box.wide { aspect-ratio:4/3; }
.scan-box.wide .scan-frame { inset:22% 4%; border-color:#facc15; }
.tyre-result { max-width:480px; margin:0 auto 12px; border-radius:18px; padding:22px 18px; text-align:center; color:#fff;
  display:flex; flex-direction:column; align-items:center; gap:8px; }
.tyre-result.lv-ok { background:#16a34a; } .tyre-result.lv-warn { background:#d97706; } .tyre-result.lv-bad { background:#fff; color:#dc2626; border:3px solid #dc2626; }
.tyre-result .tr-car { font-size:5.5rem; font-weight:900; line-height:1; letter-spacing:-.02em; }
.tyre-result .tr-class { font-size:1.6rem; font-weight:800; padding:6px 18px; border-radius:999px; background:var(--c); color:var(--fg); border:2px solid #fff; }
.tyre-result .tr-sub { font-size:1rem; opacity:.95; }
.tyre-result .tr-meta { font-size:.95rem; opacity:.95; }
.tyre-result .tr-msg { font-weight:700; font-size:1.1rem; }
.tyre-result .tr-code { font:700 1.3rem ui-monospace, Menlo, monospace; color:var(--text); }
.tyre-result .big-x { font-size:9rem; font-weight:900; line-height:.9; color:#dc2626; }
.tyre-result .tr-more { font-size:.9rem; text-align:left; }
.tyre-result .tr-more ul { margin:4px 0 0; padding-left:18px; }
.tyre-result .scan-again { margin-top:10px; width:100%; font-size:1.15rem; padding:14px; background:#0f172a; color:#fff; border:0; border-radius:12px; }

/* ---------- Replacement requests: the car first ---------- */
.req-car { display:flex; align-items:center; gap:12px; width:100%; }
.req-car .req-num { font-size:1.7rem; font-weight:900; line-height:1; padding:8px 12px; border-radius:10px; background:#0f172a; color:#fff;
  text-decoration:none; min-width:64px; text-align:center; }
.req-car .req-car-txt { flex:1; min-width:0; display:flex; flex-direction:column; }
.req-car .req-car-txt strong { font-size:1.05rem; }
.req-part { margin:8px 0 2px; }
.req-part .seals { margin:4px 0; }
.req-answer { margin-top:6px; padding:8px 10px; border-radius:8px; border-left:4px solid var(--line); background:var(--bg); }
.req-answer.st-approved, .req-answer.st-completed { border-left-color:#16a34a; }
.req-answer.st-rejected { border-left-color:#dc2626; } .req-answer.st-info_requested { border-left-color:#d97706; }
.req-item.hl { border:2px solid var(--accent); }
.list .req-car a.req-num { flex:0 0 auto; display:block; }

/* ---------- Login: bigger NES logo, three stripes rising ---------- */
.login-intro .intro-nes { height:300px; max-width:90vw; object-fit:contain; }
@media (max-width: 600px) { .login-intro .intro-nes { height:200px; } }
.login-stripes { position:fixed; top:0; bottom:0; left:clamp(10px, 4vw, 48px); display:flex; gap:clamp(6px, 1vw, 12px); pointer-events:none; z-index:0; }
.login-stripes span { width:clamp(10px, 1.6vw, 22px); height:100%; transform-origin:bottom; transform:scaleY(0); animation:stripeUp 3s cubic-bezier(.2,.7,.2,1) forwards; }
.login-stripes .st-y { background:#facc15; animation-delay:0s; }
.login-stripes .st-r { background:#dc2626; animation-delay:.25s; }
.login-stripes .st-b { background:#1d4ed8; animation-delay:.5s; }
@keyframes stripeUp { to { transform:scaleY(1); } }
.login-page { position:relative; z-index:1; }
.login-page .login-intro, .login-page .login-form { position:relative; z-index:1; }
@media (prefers-reduced-motion: reduce) { .login-stripes span { animation:none; transform:none; } }

/* ---------- Phones: drop-down menu from the top ---------- */
.menu-btn { display:none; }
@media (max-width: 899px) {
  .menu-btn { display:flex; flex-direction:column; justify-content:center; gap:4px; width:42px; height:38px; padding:8px; flex-shrink:0;
    background:var(--card); border:1px solid var(--line); border-radius:10px; }
  .menu-btn span { display:block; height:2px; background:var(--text); border-radius:2px; transition:transform .2s, opacity .2s; }
  body.menu-open .menu-btn span:nth-child(1) { transform:translateY(6px) rotate(45deg); }
  body.menu-open .menu-btn span:nth-child(2) { opacity:0; }
  body.menu-open .menu-btn span:nth-child(3) { transform:translateY(-6px) rotate(-45deg); }
  body:has(#tabs[hidden]) .menu-btn { display:none; }
  #tabs { position:fixed; top:0; bottom:auto; left:0; right:0; z-index:40; flex-direction:column; padding:6px 0;
    background:var(--card); border:0; border-bottom:1px solid var(--line); box-shadow:0 18px 40px rgba(0,0,0,.18);
    max-height:calc(100vh - 80px); overflow:auto; transform:translateY(-120%); visibility:hidden; transition:transform .25s ease, visibility .25s; }
  body.menu-open #tabs { transform:none; visibility:visible; }
  #tabs a { flex:none; text-align:left; padding:14px 20px; font-size:1.05rem; border-top:1px solid var(--line); }
  #tabs a:first-child { border-top:0; }
  #tabs a.active { background:var(--bg); box-shadow:inset 4px 0 0 var(--accent); }
  body { padding-bottom:16px; }
  #toast { bottom:24px; }
}
@media (max-width: 899px) {
  .top .brand-text { flex:1 1 auto; min-width:0; margin-right:0; }
  .top .brand-text strong { font-size:.85rem; line-height:1.15; }
  .top .online { margin:0; }
  .top .online-btn { padding:4px 8px; }
}
@media (max-width: 600px) {
  .login-page { padding-left:56px; }
  .login-intro .intro-nes { height:auto; width:100%; max-width:calc(100vw - 96px); }
  .login-stripes { left:10px; gap:5px; }
  .login-stripes span { width:9px; }
}

.login-intro .intro-team { height:56px; width:auto; max-width:70vw; margin-bottom:-4px; }
@media (max-width: 600px) { .login-intro .intro-team { height:40px; } }
.intro-powered a, .synetco-link { display:inline-flex; line-height:0; }
.intro-powered a:hover img, .synetco-link:hover img { opacity:.8; }

/* ---------- NASCAR Recruitment Tests ---------- */
.nrt-slot { width:100%; max-width:520px; }
.nrt-banner { display:flex; flex-direction:column; gap:2px; padding:12px 16px; border-radius:14px; text-decoration:none; color:#fff;
  background:linear-gradient(100deg, #0f172a 0%, #0f172a 55%, #1d4ed8 100%); border-left:6px solid #facc15; box-shadow:0 8px 24px rgba(0,0,0,.15);
  animation:formIn .8s ease-out 2.4s both; }
.nrt-banner strong { font-size:1.05rem; letter-spacing:.02em; }
.nrt-banner span { font-size:.88rem; opacity:.9; }
.nrt-banner .go { color:#facc15; font-weight:700; opacity:1; margin-top:2px; }
.nrt-modal { position:fixed; inset:0; z-index:100; background:rgba(15,23,42,.6); display:flex; align-items:center; justify-content:center; padding:16px;
  animation:fadeIn .3s ease-out; }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }
.nrt-box { position:relative; width:min(480px, 100%); max-height:92vh; overflow:auto; background:var(--card); color:var(--text); border-radius:18px;
  padding:24px 22px 20px; text-align:center; border-top:8px solid #dc2626; box-shadow:0 24px 60px rgba(0,0,0,.35); animation:formIn .4s ease-out; }
.nrt-box .nrt-x { position:absolute; top:10px; right:10px; width:auto; background:transparent; color:var(--muted); border:0; font-size:1.2rem; padding:4px 8px; }
.nrt-box .nrt-logo { height:84px; width:auto; }
.nrt-kicker { font-size:.8rem; font-weight:800; letter-spacing:.12em; color:#dc2626; text-transform:uppercase; }
.nrt-box h2 { margin:4px 0 8px; font-size:1.5rem; }
.nrt-packs { list-style:none; padding:0; margin:12px 0; display:flex; flex-direction:column; gap:6px; text-align:left; }
.nrt-packs li { display:grid; grid-template-columns:1fr auto; gap:0 8px; padding:8px 12px; border:1px solid var(--line); border-radius:10px; }
.nrt-packs li span { grid-column:1; font-size:.85rem; color:var(--muted); }
.nrt-packs li b { grid-column:2; grid-row:1 / span 2; align-self:center; white-space:nowrap; }
.nrt-actions { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; margin-top:12px; }
.nrt-actions .button, .nrt-actions button { width:auto; }
.nrt-head { display:flex; align-items:center; gap:16px; margin:8px 0 16px; flex-wrap:wrap; }
.nrt-head img { height:90px; width:auto; }
.nrt-head h1 { margin:2px 0 4px; }
.nrt-head p { margin:0; color:var(--muted); }
.nrt-form h2 { font-size:1.1rem; margin:0 0 10px; }
.nrt-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:0 14px; }
.nrt-form fieldset { border:1px solid var(--line); border-radius:10px; padding:8px 12px 10px; margin:0 0 12px; }
.nrt-form legend { font-weight:700; padding:0 6px; }
.nrt-opt { display:flex; align-items:center; gap:8px; margin:6px 0; cursor:pointer; }
.nrt-opt input { width:auto; margin:0; }
.nrt-opt span { display:inline; margin:0; color:var(--text); font-size:1rem; }
.nrt-paynote pre { white-space:pre-wrap; font:600 .9rem ui-monospace, Menlo, monospace; background:var(--bg); padding:8px 10px; border-radius:8px; margin:6px 0 0; }
.nrt-circuit small, .nrt-circuit a { display:block; }
table.nrt-career { width:100%; border-collapse:collapse; min-width:560px; margin-bottom:8px; }
table.nrt-career th { font-size:.75rem; text-transform:uppercase; color:var(--muted); text-align:left; padding:4px; }
table.nrt-career td { padding:3px; }
table.nrt-career input { padding:7px 8px; }
.nrt-form .hp { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.nrt-submit { font-size:1.1rem; padding:14px 22px; width:auto; }
.nrt-done { text-align:center; }
.nrt-done .big-ok { font-size:4rem; color:#16a34a; font-weight:900; line-height:1; }
.badge.nrt-badge { background:#0f172a; color:#facc15; margin-left:6px; font-weight:800; }
.nrt-st-new { background:#dbeafe; color:#1e3a8a; } .nrt-st-confirmed { background:#fef3c7; color:#92400e; }
.nrt-st-paid { background:#dcfce7; color:#166534; } .nrt-st-cancelled { background:#fee2e2; color:#991b1b; }
.nrt-dl { display:grid; grid-template-columns:minmax(120px, 30%) 1fr; gap:4px 12px; margin:8px 0; }
.nrt-dl dt { color:var(--muted); font-size:.85rem; } .nrt-dl dd { margin:0; white-space:pre-wrap; }

.nrt-box .nrt-lang { position:absolute; top:12px; left:12px; width:auto; padding:4px 6px; font-size:.85rem; border-radius:8px; }

/* ---------- Public documents ---------- */
.public-docs-link { display:flex; align-items:center; gap:12px; width:100%; max-width:420px; padding:12px 14px; border-radius:12px; text-decoration:none;
  color:var(--text); background:var(--card); border:1px solid var(--line); animation:formIn .8s ease-out 2.6s both; }
.public-docs-link .pd-ico { font-size:1.6rem; flex:0 0 auto; }
.public-docs-link > span:nth-child(2) { display:flex; flex-direction:column; flex:1; min-width:0; }
.public-docs-link small { color:var(--muted); }
.public-docs-link .go { flex:0; color:var(--accent); font-weight:800; font-size:1.2rem; }
.public-docs-link:hover { border-color:var(--accent); }
.badge.pdoc-badge { background:#dcfce7; color:#166534; margin-left:6px; }
.pdoc-year { width:auto; margin:0 0 12px; }

/* ---------- Login: two columns ---------- */
.login-left, .login-right { display:flex; flex-direction:column; align-items:center; gap:18px; width:100%; }
.login-right { max-width:420px; }
.login-page .login-form { margin:0; }
@media (min-width: 900px) {
  .login-page { flex-direction:row; align-items:center; justify-content:center; gap:clamp(32px, 6vw, 96px);
    min-height:calc(100vh - 140px); padding:12px 24px 12px 120px; }
  .login-left { flex:0 1 620px; }
  .login-right { flex:0 0 400px; }
  .login-intro .intro-nes { height:auto; width:100%; max-width:560px; max-height:calc(100vh - 360px); }
}
@media (max-width: 899px) {
  .login-page { gap:16px; min-height:0; padding-top:4px; }
  .login-intro { gap:10px; }
  .login-intro .intro-team { height:34px; }
  .login-intro .intro-nes { max-height:170px; }
  .login-intro .intro-powered img { height:22px; }
}
.login-left .login-intro { width:100%; }
.login-intro .intro-powered { white-space:nowrap; }
@media (min-width: 900px) {
  .login-page { min-height:calc(100vh - 170px); }
  .login-intro .intro-nes { width:auto; max-width:100%; height:min(300px, calc(100vh - 420px)); max-height:none; }
}
@media (max-width: 899px) {
  body.is-login .top { padding-top:6px; padding-bottom:0; }
  .login-intro .intro-nes { max-height:130px; }
  .login-intro .intro-team { height:28px; }
  .nrt-banner { padding:8px 12px; }
  .nrt-banner span { font-size:.8rem; }
  .login-page .login-form { padding:12px 14px; }
  .login-page .login-form h1 { margin:0 0 6px; font-size:1.2rem; }
  .login-page .login-form label { margin-bottom:6px; }
  .login-page .login-form input { padding:8px 10px; }
  .public-docs-link { padding:8px 12px; }
}
main:has(.login-page) { max-width:1240px; }
@media (min-width: 900px) {
  .login-page { padding-left:clamp(90px, 8vw, 140px); }
  .login-intro { gap:14px; }
}

/* ---------- Login: partner logos, SYNETCO corner ---------- */
.intro-partners { display:flex; align-items:center; justify-content:center; gap:4%; width:100%; max-width:var(--nes-w, 560px); }
.intro-partners img { height:auto; min-width:0; }
.intro-partners img:first-child { width:35%; }
.intro-partners img:last-child { width:50%; }
.login-intro .intro-nes { width:min(560px, 100%); }
.synetco-corner { position:fixed; top:calc(14px + env(safe-area-inset-top)); left:calc(clamp(10px, 4vw, 48px) + 3 * clamp(10px, 1.6vw, 22px) + 2 * clamp(6px, 1vw, 12px) + 14px);
  z-index:30; display:flex; align-items:center; gap:6px; text-decoration:none; color:var(--muted); font-size:.68rem;
  animation:formIn .8s ease-out 1.5s both; }
.synetco-corner img { height:15px; width:auto; display:block; transform-origin:center; }
@media (max-width: 600px) {
  .synetco-corner { left:58px; top:calc(10px + env(safe-area-inset-top)); font-size:.6rem; }
  .synetco-corner img { height:12px; }
}
.fx-spin { animation:fxSpin .9s ease-in-out; } .fx-shake { animation:fxShake .6s ease-in-out; } .fx-pulse { animation:fxPulse .8s ease-in-out; }
.fx-flip { animation:fxFlip 1s ease-in-out; } .fx-bounce { animation:fxBounce .9s ease-out; } .fx-swing { animation:fxSwing 1s ease-in-out; }
@keyframes fxSpin { to { transform:rotate(360deg); } }
@keyframes fxShake { 0%,100% { transform:translateX(0); } 20%,60% { transform:translateX(-4px) rotate(-2deg); } 40%,80% { transform:translateX(4px) rotate(2deg); } }
@keyframes fxPulse { 0%,100% { transform:scale(1); } 50% { transform:scale(1.35); } }
@keyframes fxFlip { 0% { transform:perspective(300px) rotateY(0); } 100% { transform:perspective(300px) rotateY(360deg); } }
@keyframes fxBounce { 0%,100% { transform:translateY(0); } 30% { transform:translateY(-8px); } 55% { transform:translateY(0); } 75% { transform:translateY(-3px); } }
@keyframes fxSwing { 0%,100% { transform:rotate(0); } 25% { transform:rotate(12deg); } 50% { transform:rotate(-10deg); } 75% { transform:rotate(5deg); } }
@media (min-width: 900px) { .login-intro .intro-nes { width:min(560px, 100%); height:auto; max-height:calc(100vh - 400px); object-fit:contain; } }
@media (max-width: 899px) { .login-intro .intro-nes { width:auto; max-width:100%; max-height:130px; } .intro-partners { max-width:254px; } }

/* ---------- Login: NRT and public documents boxes framed like the NES logo ---------- */
.nrt-banner, .public-docs-link { position:relative; border:6px solid #0a0a0a; border-radius:18px;
  box-shadow:inset 0 0 0 3px #1f5fd6, 0 8px 24px rgba(0,0,0,.18); padding:18px 22px; }
.nrt-banner::before, .nrt-banner::after, .public-docs-link::before, .public-docs-link::after {
  content:''; position:absolute; left:22%; right:22%; height:4px; pointer-events:none;
  background:repeating-linear-gradient(90deg, #e3c13b 0 26px, transparent 26px 48px); }
.nrt-banner::before, .public-docs-link::before { top:7px; }
.nrt-banner::after, .public-docs-link::after { bottom:7px; }
.nrt-banner { background:linear-gradient(100deg, #0a0a0a 0%, #0a0a0a 55%, #16357a 100%); }
.public-docs-link { background:#0a0a0a; color:#fff; }
.public-docs-link small { color:#cbd5e1; }
.public-docs-link .go { color:#e3c13b; }
.public-docs-link:hover, .nrt-banner:hover { border-color:#0a0a0a; box-shadow:inset 0 0 0 3px #e3c13b, 0 8px 24px rgba(0,0,0,.25); }
@media (max-width: 600px) {
  .nrt-banner, .public-docs-link { border-width:4px; border-radius:14px; padding:13px 14px; }
  .nrt-banner::before, .public-docs-link::before { top:5px; }
  .nrt-banner::after, .public-docs-link::after { bottom:5px; }
  .nrt-banner::before, .nrt-banner::after, .public-docs-link::before, .public-docs-link::after {
    height:3px; background:repeating-linear-gradient(90deg, #e3c13b 0 18px, transparent 18px 34px); }
}

/* ---------- Login: logo | sign-in, then a row of boxes (NRT, teams registration, public documents) ---------- */
.login-boxes { display:flex; flex-direction:column; gap:14px; width:100%; max-width:420px; }
.login-boxes > * { width:100%; max-width:none; }
.nrt-slot:empty, .reg-slot:empty { display:none; }
.nrt-slot, .reg-slot { display:flex; }
.nrt-slot > a, .reg-slot > a { flex:1; }
@media (min-width: 900px) {
  .login-page { display:grid; grid-template-columns:minmax(0, 620px) 400px; grid-template-rows:auto auto;
    align-content:center; justify-content:center; align-items:center; column-gap:clamp(32px, 6vw, 96px); row-gap:22px; }
  .login-left, .login-right { display:contents; }
  .login-page .login-intro { grid-column:1; grid-row:1; }
  .login-page .login-form { grid-column:2; grid-row:1; max-width:none; }
  .login-boxes { grid-column:1 / -1; grid-row:2; flex-direction:row; align-items:stretch; max-width:none; gap:18px; }
  .login-boxes > * { flex:1 1 0; min-width:0; }
  .login-boxes .nrt-banner, .login-boxes .reg-banner, .login-boxes .public-docs-link { height:100%; justify-content:center; }
}
/* teams registration box: same frame as the NES logo */
.reg-banner { position:relative; display:flex; flex-direction:column; gap:4px; text-decoration:none; color:#fff; border:6px solid #0a0a0a; border-radius:18px;
  background:linear-gradient(100deg, #0a0a0a 0%, #0a0a0a 50%, #7f1d1d 100%); box-shadow:inset 0 0 0 3px #1f5fd6, 0 8px 24px rgba(0,0,0,.18);
  padding:18px 22px; animation:formIn .8s ease-out 2.5s both; }
.reg-banner::before, .reg-banner::after { content:''; position:absolute; left:22%; right:22%; height:4px; pointer-events:none;
  background:repeating-linear-gradient(90deg, #e3c13b 0 26px, transparent 26px 48px); }
.reg-banner::before { top:7px; } .reg-banner::after { bottom:7px; }
.reg-banner .kicker { color:#e3c13b; font-weight:800; letter-spacing:.08em; text-transform:uppercase; font-size:.72rem; }
.reg-banner > span:not(.reg-btn) { font-size:.88rem; opacity:.92; }
.reg-btn { align-self:flex-start; margin-top:4px; background:#dc2626; color:#fff; font-weight:800; padding:7px 14px; border-radius:10px; font-size:.95rem; }
.reg-banner:hover { box-shadow:inset 0 0 0 3px #e3c13b, 0 8px 24px rgba(0,0,0,.25); }
.reg-banner:hover .reg-btn { background:#b91c1c; }
@media (max-width: 600px) {
  .reg-banner { border-width:4px; border-radius:14px; padding:13px 14px; }
  .reg-banner::before { top:5px; } .reg-banner::after { bottom:5px; }
  .reg-banner::before, .reg-banner::after { height:3px; background:repeating-linear-gradient(90deg, #e3c13b 0 18px, transparent 18px 34px); }
}
@media (prefers-reduced-motion: reduce) { .reg-banner { animation:none; } }

/* ---------- Registration pages ---------- */
.reg-form { max-width:560px; }
.reg-form input.short { max-width:90px; text-transform:uppercase; }
.reg-email { background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:8px 12px; margin:4px 0 10px; }
.reg-email small { display:block; color:var(--muted); }
.reg-form fieldset { border:1px solid var(--line); border-radius:10px; padding:6px 12px; margin:0 0 10px; }
.reg-car { padding:0; overflow:hidden; }
.reg-car.open { border-color:var(--accent); }
.reg-car.is-new { padding:12px 16px; }
.reg-pick { display:flex; align-items:center; gap:12px; padding:12px 16px; margin:0; cursor:pointer; }
.reg-pick input { width:22px; height:22px; margin:0; flex:0 0 auto; }
.reg-pick > span:nth-child(2) { flex:1; display:flex; flex-direction:column; min-width:0; }
.reg-pick small { color:var(--muted); }
.reg-pick-lbl { color:var(--accent); font-weight:700; font-size:.85rem; white-space:nowrap; }
.reg-car.is-done .reg-pick { cursor:default; opacity:.75; }
.reg-body:empty { display:none; }
.reg-body { padding:0 16px 14px; border-top:1px solid var(--line); }
.reg-editor h3 { margin:12px 0 6px; }
.reg-chassis { display:flex; flex-wrap:wrap; align-items:flex-end; gap:6px 16px; background:#fef9c3; border-radius:10px; padding:8px 12px; margin:6px 0; }
.reg-chassis label:first-child { flex:1 1 220px; margin:0; }
.reg-chassis .check { margin:0 0 10px; }
table.reg-parts { width:100%; border-collapse:collapse; min-width:520px; }
table.reg-parts th { font-size:.75rem; text-transform:uppercase; color:var(--muted); text-align:left; padding:4px; }
table.reg-parts td { padding:3px 4px; border-top:1px solid var(--line); vertical-align:middle; }
table.reg-parts td input:not([type=checkbox]) { padding:7px 8px; }
table.reg-parts .c { text-align:center; width:80px; }
table.reg-parts td.c input { width:22px; height:22px; margin:0; }
table.reg-parts tr.req { background:#fef9c3; }
.req-tag { display:block; color:#b45309; font-weight:700; font-size:.7rem; text-transform:uppercase; }
.reg-actions { display:flex; gap:10px; flex-wrap:wrap; align-items:center; margin:18px 0 30px; }
.reg-actions button { width:auto; }
.reg-team-form > button.secondary { width:auto; }
.reg-parts-sum { display:flex; flex-wrap:wrap; gap:4px 14px; font-size:.88rem; margin-top:4px; }
.reg-parts-sum details { flex-basis:100%; }
.reg-key { display:inline-flex; align-items:center; gap:4px; flex-wrap:wrap; }
.reg-key .seals { display:inline-flex; margin:0; }
.reg-key .ok { color:#16a34a; font-weight:800; }
.reg-others { display:flex; flex-direction:column; gap:3px; padding:4px 0; }
.badge.reg-provisional { background:#fef3c7; color:#92400e; } .badge.reg-active { background:#dcfce7; color:#166534; text-decoration:none; }
.badge.reg-new { background:#0f172a; color:#facc15; margin-left:6px; } .badge.reg-changed { background:#fee2e2; color:#991b1b; margin-left:6px; }
.badge.reg-st-sent { background:#dcfce7; color:#166534; } .badge.reg-st-rejected { background:#fee2e2; color:#991b1b; } .badge.reg-st-pending { background:#fef3c7; color:#92400e; }
@media (prefers-color-scheme: dark) { .reg-chassis, table.reg-parts tr.req { background:rgba(250,204,21,.12); } }
.reg-chassis .check { display:flex; align-items:center; gap:8px; font-weight:700; }
.reg-chassis .check input { width:22px; height:22px; margin:0; }
.reg-list li.col > .row { width:100%; display:flex; justify-content:space-between; align-items:center; gap:8px 12px; flex-wrap:wrap; }
.reg-list .actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.reg-list .actions button { width:auto; }
.reg-list .chip { margin-left:8px; font-size:.75rem; }
.reg-list li.col > .row small { display:block; }
.reg-list li.col > .row > .actions { flex:0 0 auto; justify-content:flex-end; }
@media (min-width: 900px) { .login-boxes .nrt-banner, .login-boxes .reg-banner, .login-boxes .public-docs-link { height:auto; } }
.reg-form .hp { position:absolute; left:-9999px; width:1px; height:1px; opacity:0; }
.reg-other[hidden] { display:none; }
.del-btn { width:auto; margin-top:10px; }
.del-btn.icon { margin-top:0; padding:6px 10px; }
/* drivers of a registered car */
.drv-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:10px; margin:6px 0 10px; }
.drv-pick { border:1px solid var(--line); border-radius:10px; padding:8px 10px; background:var(--card); position:relative; }
.drv-pick > .chip { display:inline-block; margin-bottom:6px; font-size:.75rem; }
.drv-sel { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.drv-sel strong { flex:0 1 auto; }
.drv-sel button { margin-left:auto; width:auto; padding:4px 9px; }
.drv-prev { background:#dcfce7; color:#166534; border-radius:999px; padding:1px 8px; font-weight:700; }
.drv-search input { width:100%; }
.drv-tbd { display:block; color:var(--muted); margin-top:4px; font-size:.78rem; }
.drv-results { list-style:none; margin:4px 0 0; padding:0; border:1px solid var(--line); border-radius:8px; max-height:220px; overflow:auto; background:var(--card); }
.drv-results li button { width:100%; text-align:left; background:transparent; color:var(--text); border:0; border-radius:0; padding:7px 10px; font-weight:400; }
.drv-results li button:hover { background:var(--bg); }
.drv-results li.none { padding:7px 10px; color:var(--muted); }
.reg-drivers { margin:6px 0 2px; }
.reg-drivers .chip.tbd small { color:#b45309; font-weight:700; }
.reg-drv-edit { margin:4px 0; }
.reg-drv-edit > button { width:auto; }
/* logout: top right, next to the language selector */
.logout-btn { display:inline-flex; align-items:center; gap:6px; margin-right:8px; padding:6px 12px; border:1px solid var(--line); border-radius:999px;
  text-decoration:none; color:var(--text); font-weight:600; font-size:.9rem; white-space:nowrap; background:var(--card); }
.logout-btn[hidden] { display:none; }
.logout-btn .ico { color:var(--accent); font-weight:800; }
.logout-btn:hover { border-color:var(--accent); color:var(--accent); }
@media (max-width: 600px) { .logout-btn { padding:5px 9px; margin-right:6px; } .logout-btn .lbl { display:none; } }
.row.head .del-btn { margin-top:0; flex-shrink:0; }
.list li .actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; justify-content:flex-end; }
/* team manager box in the team cards */
.tm-box { display:flex; flex-wrap:wrap; align-items:center; gap:2px 10px; margin:8px 0 2px; padding:8px 12px; border:1px solid var(--line);
  border-left:4px solid var(--accent); border-radius:10px; background:var(--bg); }
.tm-box small { flex-basis:100%; color:var(--muted); text-transform:uppercase; letter-spacing:.05em; font-size:.7rem; font-weight:700; }
.tm-box span:not(.badge) { color:var(--muted); font-size:.88rem; }
.tm-box.none { border-left-color:#f59e0b; }
.tm-box.none strong { color:#b45309; }
.tm-fields { border:1px solid var(--line); border-radius:10px; padding:6px 12px 2px; margin:0 0 12px; }
.tm-fields legend { font-weight:700; padding:0 6px; }
.tm-box + .card { margin-top:12px; }
.tm-boxes { display:flex; flex-wrap:wrap; gap:8px; margin:6px 0 2px; }
.tm-boxes .tm-box { margin:0; flex:1 1 260px; }
.tm-box.tp { border-left-color:#0f172a; }
@media (prefers-color-scheme: dark) { .tm-box.tp { border-left-color:#facc15; } }
.tm-boxes + .card { margin-top:12px; }
/* test user: banner, no writing controls (the server refuses every change anyway) */
.test-banner { background:#fef3c7; color:#92400e; text-align:center; font-weight:700; font-size:.85rem; padding:6px 12px; border-bottom:1px solid #fcd34d; }
.test-banner[hidden] { display:none; }
.is-test #view form button[type=submit], .is-test #view .del-btn, .is-test #view button.danger, .is-test #view .actions > button,
.is-test #view .reg-actions, .is-test #view input[type=file] { display:none !important; }

/* ---------- Driver profile ---------- */
.drv-head h1 { margin:0; }
.drv-head .chips { margin:8px 0 4px; }
.drv-missing { background:#fef3c7; color:#92400e; border-radius:10px; padding:8px 12px; margin:10px 0 0; }
.drv-form .card h2, .drv-page .card h2 { font-size:1.1rem; margin:0 0 10px; }
.drv-guardian { border:1px solid #fcd34d; border-radius:10px; padding:6px 12px; margin:10px 0 0; background:#fffbeb; }
.drv-guardian legend { font-weight:700; padding:0 6px; }
.drv-guardian[hidden], .drv-social[hidden] { display:none; }
.drv-acks .check { margin:8px 0; }
.drv-acks button[type=submit] { width:auto; margin-top:8px; }
.drv-privacy { margin-bottom:6px; }
.drv-privacy p { white-space:pre-line; font-size:.9rem; color:var(--muted); }
.drv-docs .list li .row > div:first-child { min-width:0; }
.drv-docs .actions .button { width:auto; padding:6px 12px; }
.drv-upload { margin-top:8px; }
.drv-upload button { width:auto; }
.drv-link { text-decoration:none; color:inherit; }
.drv-link:hover strong { color:var(--accent); text-decoration:underline; }
.entry-wait { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:8px 0; padding:8px 12px; background:#fffbeb; border:1px solid #fcd34d; border-radius:10px; }
.entry-wait button { width:auto; }
.qr-missing { display:flex; flex-direction:column; gap:6px; justify-content:center; align-items:flex-start; padding:14px; border:2px dashed var(--line); border-radius:12px; min-height:180px; }
.qr-missing .button { width:auto; }

/* ---------- Event sign-on ---------- */
.signon-bar { display:flex; flex-wrap:wrap; gap:8px 12px; align-items:center; margin:0 0 12px; }
.signon-bar input[type=search] { flex:1 1 200px; width:auto; }
.signon-bar .subnav { margin:0; }
.signon-bar .button { width:auto; }
.signon-count { font-size:1.1rem; }
.signon-list li { display:flex; align-items:center; gap:12px; flex-wrap:nowrap; }
.signon-list li.clickable { cursor:pointer; }
.signon-list li.clickable:hover { border-color:var(--accent); }
.signon-list li.done { background:linear-gradient(90deg, rgba(22,163,74,.08), transparent 40%); }
.signon-main { flex:1; min-width:0; display:flex; flex-direction:column; }
.signon-warn { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.signon-list .badge small { font-weight:400; }
.sg-box { width:min(620px, 100%); text-align:left; }
.sg-head { display:flex; align-items:center; gap:12px; margin:0 0 10px; }
.sg-head h2 { margin:0; }
.sg-lic { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:8px; background:var(--bg); border-radius:10px; padding:10px 12px; margin:0 0 8px; }
.sg-lic small { display:block; color:var(--muted); }
.sg-lic .warn { color:#b91c1c; }
.sg-docs { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.sg-docs .button { width:auto; padding:6px 10px; font-size:.85rem; }
.sg-check { font-weight:700; font-size:1.05rem; margin:10px 0; }
.sg-check input { width:24px; height:24px; }
.sg-confirm { font-size:.92rem; background:#eff6ff; border-radius:8px; padding:8px 10px; }
.sg-pad-wrap { position:relative; margin:6px 0 12px; }
.sg-pad-wrap small { color:var(--muted); }
.sig-pad { display:block; width:100%; height:200px; border:2px dashed #94a3b8; border-radius:12px; background:#fff; touch-action:none; cursor:crosshair; }
.sg-clear { position:absolute; right:8px; bottom:8px; width:auto; padding:4px 10px; font-size:.8rem; }
.sig-img { display:block; max-width:100%; height:auto; max-height:180px; background:#fff; border:1px solid var(--line); border-radius:10px; margin:8px 0; }
.sg-form .nrt-submit { width:100%; }
/* drivers registration box (blue) and page */
.reg-banner.drv-banner { background:linear-gradient(100deg, #0a0a0a 0%, #0a0a0a 50%, #1e3a8a 100%); }
.reg-banner.drv-banner .reg-btn { background:#1d4ed8; }
.reg-banner.drv-banner:hover .reg-btn { background:#1e40af; }
.dreg-results { margin:-6px 0 12px; }
.dreg-results .dreg-new { font-weight:700; color:var(--accent); }
@media (min-width: 900px) {
  .login-boxes { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); }
}

/* ---------- Language: row of flags on the login page, next to "powered by SYNETCO" ---------- */
/* signed in: compact language menu in the header; login page: flags only */
body.is-login #lang { display:none; }
#lang { width:auto; padding:4px 6px; font-size:.8rem; border-radius:8px; cursor:pointer; }
.flags { display:inline-flex; align-items:center; gap:4px; margin-left:6px; flex-wrap:wrap; }
.flags button { display:inline-flex; align-items:center; gap:2px; padding:2px; margin:0; background:transparent; border:1px solid transparent;
  border-radius:4px; cursor:pointer; line-height:0; color:var(--muted); width:auto; min-height:0; box-shadow:none; }
.flags button img, .top .powered .flags button img { width:21px; height:14px; object-fit:cover; display:block; border-radius:2px; box-shadow:0 0 0 1px rgba(0,0,0,.25);
  opacity:.55; filter:saturate(.7); transition:opacity .15s, transform .15s; }
.flags button small { font-size:.55rem; font-weight:700; line-height:1; }
.flags button:hover img, .flags button:focus-visible img { opacity:1; filter:none; transform:scale(1.1); }
.flags button[aria-pressed="true"] { border-color:var(--accent); }
.flags button[aria-pressed="true"] img { opacity:1; filter:none; }
.synetco-corner a { display:flex; align-items:center; gap:6px; text-decoration:none; color:inherit; }
@media (max-width: 600px) {
  .flags { gap:2px; margin-left:2px; }
  .flags button img, .top .powered .flags button img { width:18px; height:12px; }
  .top .brand-text .powered .flags { margin-left:0; flex-basis:100%; }
  .synetco-corner { flex-wrap:wrap; right:12px; }
}

/* ---------- Access statistics (super administrator, promoter) ---------- */
.stats-periods { display:flex; flex-wrap:wrap; gap:6px; margin:6px 0 14px; }
.stats-periods button { width:auto; padding:6px 14px; border-radius:999px; font-size:.9rem; }
.stats-periods button.active { background:var(--accent); color:#fff; border-color:var(--accent); }
.stats-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(150px, 1fr)); gap:10px; margin-bottom:14px; }
.stats-kpi { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px; display:flex; flex-direction:column; gap:2px; }
.stats-kpi b { font-size:1.7rem; line-height:1.1; }
.stats-kpi span { color:var(--muted); font-size:.9rem; }
.stats-kpi small { color:var(--muted); font-size:.75rem; }
.stats-box { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px; margin-bottom:14px; min-width:0; }
.stats-box h3 { margin:0 0 10px; font-size:1rem; }
.stats-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(260px, 1fr)); gap:14px; }
.stats-grid .stats-box { margin-bottom:0; }
.stats-grid + .stats-box { margin-top:14px; }
.stats-chart { width:100%; height:auto; display:block; }
.stats-chart .grid { stroke:var(--line); stroke-width:1; }
.stats-chart .bar { fill:var(--accent); opacity:.75; }
.stats-chart .bar:hover { opacity:1; }
.stats-chart .line { fill:none; stroke:#1d4ed8; stroke-width:2; }
.stats-chart .dot { fill:#f5b800; stroke:#fff; stroke-width:1; }
.stats-chart .lbl { fill:var(--muted); font-size:11px; }
.stats-legend { display:flex; flex-wrap:wrap; gap:14px; font-size:.8rem; color:var(--muted); margin-top:6px; }
.stats-legend span::before { content:""; display:inline-block; vertical-align:middle; margin-right:6px; }
.stats-legend .lg-bar::before { width:12px; height:10px; background:var(--accent); opacity:.75; border-radius:2px; }
.stats-legend .lg-line::before { width:14px; height:2px; background:#1d4ed8; }
.stats-legend .lg-dot::before { width:8px; height:8px; border-radius:50%; background:#f5b800; }
.stats-top { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:6px; }
.stats-top li { position:relative; display:flex; justify-content:space-between; gap:10px; padding:5px 8px; border-radius:6px; overflow:hidden; font-size:.9rem; }
.stats-top li i { position:absolute; left:0; top:0; bottom:0; background:var(--accent); opacity:.12; z-index:0; }
.stats-top .k, .stats-top .v { position:relative; z-index:1; }
.stats-top .k { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.stats-top .v { font-variant-numeric:tabular-nums; font-weight:600; }
.stats-box.wide { overflow-x:auto; }
.stats-table { width:100%; border-collapse:collapse; font-size:.88rem; }
.stats-table th, .stats-table td { text-align:left; padding:6px 8px; border-bottom:1px solid var(--line); white-space:nowrap; }
.stats-table th { color:var(--muted); font-weight:600; font-size:.8rem; }
.stats-table td.num { text-align:right; font-variant-numeric:tabular-nums; }
@media (max-width: 600px) {
  #lang { width:52px; padding:3px 2px; font-size:.72rem; }
  .top { gap:.35rem !important; padding-left:10px; padding-right:10px; }
  .top .brand-logo { height:44px; width:auto; }
  .top .brand-text strong { font-size:.82rem; }
  .top .online { flex:0 0 auto; padding:4px 7px; }
  .logout-btn { margin-right:0; }
}
.stats-credit { font-size:.75rem; margin-top:8px; }

/* ---------- Public documents: box with the last 5 published ---------- */
.pdoc-latest { background:var(--card); border:2px solid #1d4ed8; border-radius:var(--radius); padding:14px 16px; margin:14px 0 18px;
  box-shadow:0 0 0 4px rgba(29,78,216,.08); }
.pdoc-latest h2 { margin:0 0 10px; font-size:1.05rem; }
.pdoc-latest .docs { margin:0; }
.pdoc-latest .badge.new { margin-left:8px; font-size:.65rem; vertical-align:middle; background:var(--accent); color:#fff; padding:2px 6px; border-radius:999px; }

/* ---------- Install as an app: login box, install page ---------- */
.app-box { display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px; text-decoration:none; color:var(--text);
  background:var(--card); border:1px solid var(--line); box-shadow:0 4px 14px rgba(0,0,0,.06); animation:formIn .8s ease-out 2.5s both; }
.app-box:hover { border-color:var(--accent); }
.app-box .app-qr { flex:0 0 auto; line-height:0; background:#fff; border-radius:8px; padding:2px; }
.app-box .app-qr:empty { width:92px; height:92px; }
.app-box .app-ico { font-size:1.6rem; flex:0 0 auto; }
.app-box .app-txt { display:flex; flex-direction:column; flex:1; min-width:0; }
.app-box .app-txt small { color:var(--muted); }
.app-box .go { color:var(--accent); font-weight:700; }
.app-icon { width:72px; height:72px; border-radius:16px; box-shadow:0 4px 14px rgba(0,0,0,.18); }
.install-card { display:flex; flex-direction:column; gap:12px; }
.install-btn { font-size:1.1rem; padding:14px 18px; }
.install-steps { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:12px; }
.install-steps li { display:flex; gap:12px; align-items:flex-start; line-height:1.45; }
.install-steps .step-n { flex:0 0 28px; height:28px; border-radius:50%; background:var(--accent); color:#fff; display:inline-flex; align-items:center; justify-content:center; }
.ios-share { display:inline-flex; vertical-align:middle; color:#0a84ff; margin:0 3px; }
.install-qr { display:flex; justify-content:center; padding:8px 0; }
.install-qr canvas { border-radius:10px; box-shadow:0 2px 10px rgba(0,0,0,.12); }
.install-share { border-top:1px solid var(--line); padding-top:14px; margin-top:4px; display:flex; flex-direction:column; gap:8px; }
.install-share h3 { margin:0; font-size:1rem; }
.notice-warn { background:#fef3c7; color:#92400e; padding:10px 12px; border-radius:8px; margin:0; }
a.card.app-account { text-decoration:none; color:inherit; display:flex; flex-direction:column; gap:4px; }

/* admin › users: password chosen by the administrator */
.set-pw { display:flex; gap:6px; align-items:center; flex-wrap:wrap; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }
.set-pw input { flex:1 1 220px; min-width:0; }
.set-pw button { width:auto; }
.set-pw .pw-eye { padding:6px 10px; }
.danger-zone { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; margin-top:10px; padding-top:10px; border-top:1px dashed var(--line); }

/* user lists: username and e-mail side by side */
.id-line { display:flex; flex-wrap:wrap; gap:4px 14px; }
.id-line .uname { font-family:ui-monospace, SFMono-Regular, Menlo, monospace; color:var(--text); }
.id-line .umail { overflow-wrap:anywhere; }

/* ---------- Computer screens: the whole menu on one line (also for the administrator's longer menu) ---------- */
@media (min-width: 900px) {
  .top { gap:.75rem; padding-top:8px; padding-bottom:8px; }
  .brand-logo { height:64px; }
  #tabs { flex-wrap:nowrap; gap:2px; margin:0 2px; }
  #tabs a { padding:6px 10px; font-size:.9rem; }
}
@media (min-width: 900px) and (max-width: 1599px) {
  .top .online-btn .lbl, .logout-btn .lbl { display:none; }   /* icons only; the full text is in the tooltip */
  .logout-btn { padding:6px 10px; margin-right:4px; }
  #tabs a { padding:6px 8px; font-size:.86rem; }
  .top .brand-text strong { font-size:.92rem; }
}
@media (min-width: 900px) and (max-width: 1199px) {
  .brand-logo { height:52px; }
  #tabs a { padding:5px 6px; font-size:.8rem; }
  .top .brand-text strong { white-space:normal; font-size:.85rem; }
  .top .brand-text .powered { font-size:.66rem; }
}

/* ---------- Standings (public) and race results (officials) ---------- */
.pub-links { display:flex; flex-direction:column; gap:10px; min-width:0; }
.standings-link .pd-ico { filter:none; }
.st-toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; justify-content:space-between; margin:6px 0 10px; }
.st-tabs { display:flex; flex-wrap:wrap; gap:6px; margin:10px 0 14px; }
.st-tabs button { width:auto; padding:8px 16px; border-radius:999px; }
.st-tabs button.active { background:var(--cls, var(--accent)); border-color:var(--cls, var(--accent)); color:#fff; }
.st-block { background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:14px; margin-bottom:14px; }
.st-block h2 { margin:0 0 10px; font-size:1.1rem; }
.st-block.cup h2 { font-size:1rem; }
.st-table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.st-table { width:100%; border-collapse:collapse; font-size:.9rem; }
.st-table th, .st-table td { padding:6px 8px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; vertical-align:middle; }
.st-table th { font-size:.75rem; color:var(--muted); font-weight:600; }
.st-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.st-table th.race-col { text-align:center; line-height:1.1; }
.st-table th.race-col span, .st-table th.race-col small { display:block; }
.st-table td.race-col { text-align:center; }
.st-table td.race-col.win { font-weight:700; color:var(--accent); }
.st-table td.total { font-size:1rem; }
.st-table sup { font-size:.6rem; color:#7c3aed; margin-left:2px; }
.st-table tr.podium.p1 td:first-child { color:#b8860b; font-weight:800; }
.st-table tr.podium.p2 td:first-child { color:#6b7280; font-weight:800; }
.st-table tr.podium.p3 td:first-child { color:#a0522d; font-weight:800; }
.st-table .nat { margin-left:6px; color:var(--muted); }
.st-table .cup-tag { margin-left:6px; font-size:.65rem; padding:1px 6px; border-radius:999px; background:#fef3c7; color:#92400e; }
.st-table .pen { color:#b91c1c; }
.st-table.small { font-size:.85rem; margin:6px 0 10px; }
.st-rules { margin:8px 0 0; }
.st-races h3 { margin:6px 0 10px; }
.st-event { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:8px 12px; margin-bottom:8px; }
.st-event > summary { cursor:pointer; display:flex; gap:10px; align-items:baseline; }
.st-event > summary small { color:var(--muted); }
.st-race { margin:6px 0 0 8px; }
.st-race > summary { cursor:pointer; font-weight:600; }
.badge.mult { margin-left:8px; background:#ede9fe; color:#5b21b6; }
@media (max-width: 700px) { .st-table .team-col, .st-table .gap-col { display:none; } }
.res-upload .grid2, .res-points .grid3 { display:grid; gap:10px; }
.res-upload .grid2 { grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); }
.res-points .grid3 { grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); }
.res-points { border-top:1px dashed var(--line); padding-top:12px; margin-top:12px; display:flex; flex-direction:column; gap:8px; }
.res-points .badge { margin-left:8px; }
.res-points button { width:auto; align-self:flex-start; }
.res-evs { display:flex; flex-direction:column; gap:6px; }
.res-ev { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.res-ev .ev { flex:1 1 220px; }
.res-ev input[type=number] { width:70px; }
.res-ev button { width:auto; }
.res-edit .car-in { width:64px; }
.res-edit .pen-in { width:64px; }
.res-edit tr.nc td { color:var(--muted); }
.res-edit .warn { color:#b45309; }
.res-edit .row-tools { display:flex; gap:4px; }
.res-edit .row-tools button { width:auto; padding:4px 8px; }
.res-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.res-actions button { width:auto; }
button.small, .button.small { padding:4px 10px; font-size:.85rem; width:auto; }
.st-table.small { width:auto; min-width:280px; }
.st-table td.race-col.joker { text-decoration:line-through; color:var(--muted); }
.st-table sup.bm { color:#0f766e; }
.res-edit .num-in { width:58px; }
.res-edit .time-in { width:96px; font-variant-numeric:tabular-nums; }
.st-table td.race-col.joker { text-decoration:line-through; color:var(--muted); }
.st-table sup.bm { color:#0f766e; }
.res-edit .num-in { width:58px; }
.res-edit .time-in { width:96px; font-variant-numeric:tabular-nums; }
.res-edit select { min-width:150px; }

/* ---------- Document viewer (phones and the installed app) ---------- */
body.viewer-on { overflow:hidden; }
.viewer { position:fixed; inset:0; z-index:1000; background:#1f2937; display:flex; flex-direction:column; }
.viewer-bar { display:flex; align-items:center; gap:8px; padding:8px 10px; padding-top:calc(8px + env(safe-area-inset-top)); background:#111827; color:#fff; }
.viewer-bar button { width:auto; padding:6px 12px; min-height:36px; }
.viewer-close { background:#e11d2a; border-color:#e11d2a; color:#fff; font-weight:700; }
.viewer-title { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:.9rem; }
.viewer-pages { font-size:.8rem; color:#d1d5db; white-space:nowrap; }
.viewer-zoom { display:inline-flex; gap:4px; }
.viewer-zoom button { padding:6px 10px; font-weight:700; }
.viewer-body { flex:1; overflow:auto; -webkit-overflow-scrolling:touch; padding:8px; padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
.viewer-pages-wrap { display:flex; flex-direction:column; align-items:center; gap:8px; min-width:min-content; }
.viewer-page { background:#fff; box-shadow:0 2px 8px rgba(0,0,0,.4); }
.viewer-page canvas { display:block; height:auto; }
.viewer-img { display:block; max-width:100%; margin:0 auto; background:#fff; }
.viewer-msg { color:#e5e7eb; text-align:center; margin-top:40px; }
.viewer-other { color:#f9fafb; text-align:center; margin:60px auto; max-width:360px; display:flex; flex-direction:column; gap:12px; align-items:center; }
.viewer-other .muted { color:#d1d5db; }
.viewer-ico { font-size:3rem; }
.viewer-other button { width:auto; }
@media (max-width: 480px) { .viewer-bar .secondary:not(.viewer-zoom button) { padding:6px 8px; font-size:.8rem; } .viewer-pages { display:none; } }

/* ---------- Help: e-mail to the support ---------- */
.help-btn { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; border:1px solid var(--line);
  background:var(--card); color:var(--text); font-weight:800; text-decoration:none; flex:0 0 auto; }
.help-btn:hover { border-color:var(--accent); color:var(--accent); }
body.is-login .help-btn { display:none; }
@media (max-width: 899px) { .help-btn { display:none; } }
.help-card { display:flex; flex-direction:column; gap:8px; }
.help-card .button { align-self:flex-start; width:auto; }
.help-link { display:block; margin-top:6px; }

/* ---- help chat (in the viewer layer: full screen on phones, panel on computers) */
.viewer.chat { background:var(--bg, #f8fafc); }
.chat-msgs { flex:1; overflow-y:auto; padding:12px; display:flex; flex-direction:column; gap:8px; -webkit-overflow-scrolling:touch; }
.chat-msg { max-width:85%; padding:8px 12px; border-radius:14px; white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.4; font-size:15px; }
.chat-msg.assistant { align-self:flex-start; background:var(--card); border:1px solid var(--line); color:var(--text); border-bottom-left-radius:4px; }
.chat-msg.user { align-self:flex-end; background:#e11d2a; color:#fff; border-bottom-right-radius:4px; }
.chat-msg.system { align-self:center; background:#fef3c7; color:#92400e; font-size:13px; text-align:center; max-width:95%; }
.chat-msg.system.error { background:#fee2e2; color:#991b1b; }
.chat-msg.typing { color:#6b7280; font-style:italic; animation:chatPulse 1.2s ease-in-out infinite; }
@keyframes chatPulse { 50% { opacity:.45; } }
.chat-msg a { color:inherit; text-decoration:underline; }
.chat-foot { border-top:1px solid var(--line); background:var(--card); padding:8px 10px; padding-bottom:calc(8px + env(safe-area-inset-bottom)); display:flex; flex-direction:column; gap:6px; }
.chat-input { display:flex; gap:8px; align-items:flex-end; }
.chat-input textarea { flex:1; resize:none; min-height:44px; max-height:140px; font-size:16px; margin:0; }
.chat-input button { width:auto; min-height:44px; padding:0 16px; }
.chat-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; font-size:14px; }
.chat-actions button { width:auto; padding:4px 10px; min-height:32px; font-size:14px; }
.chat-left { color:#b45309; margin-left:auto; }
.chat-note { color:#6b7280; font-size:12px; }
.viewer.chat .viewer-bar button.secondary { background:transparent; color:#fff; border-color:#4b5563; }
@media (min-width: 900px) {
  body.viewer-on:has(.viewer.chat) { overflow:auto; }
  .viewer.chat { inset:auto 20px 20px auto; width:420px; height:min(640px, calc(100vh - 100px)); border-radius:14px; overflow:hidden;
    box-shadow:0 20px 50px rgba(0,0,0,.25); border:1px solid var(--line, #e5e7eb); }
}
.help-actions { display:flex; flex-wrap:wrap; gap:8px; }
.help-actions .button, .help-actions button { width:auto; }
.chat-transcript { max-height:none; }
.chat-transcript .chat-msg small { display:block; opacity:.7; font-size:11px; margin-bottom:2px; }
.chat-row { display:flex; flex-direction:column; gap:2px; text-decoration:none; color:inherit; }
.chat-row span { color:var(--text); font-size:14px; }

/* ---- Drivers page of the team users: search, enter with a car */
.inline-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:6px; }
.inline-form select { flex:1 1 260px; margin:0; min-width:0; }
.inline-form button { width:auto; margin:0; }
.treg-new { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); display:flex; flex-direction:column; gap:8px; align-items:flex-start; }
.treg-new .button { width:auto; }
.pdoc-gate { max-width:560px; }

/* ---- "powered by": SYNETCO / JARVIS AI in rotation (crossfade) */
.logo-rotator { display:inline-grid; align-items:center; justify-items:start; perspective:400px; }
/* the outgoing mark turns on its vertical centre axis to edge-on, then the next one turns in from edge-on */
.logo-rotator > .rot-item { grid-area:1 / 1; opacity:0; transform:rotateY(90deg); backface-visibility:hidden;
  transition:transform .35s ease-in, opacity 0s linear .35s; pointer-events:none; }
.logo-rotator > .rot-item.on { opacity:1; transform:rotateY(0deg); pointer-events:auto;
  transition:transform .35s ease-out .35s, opacity 0s linear .35s; }
.logo-rotator picture, .logo-rotator picture img { display:block; }
.top .powered .logo-rotator img { height:14px; width:auto; }
.top .powered .logo-rotator .rot-jarvis img { height:19px; }
.synetco-corner .logo-rotator img { height:15px; width:auto; }
.synetco-corner .logo-rotator .rot-jarvis img { height:20px; }
@media (max-width: 600px) { .synetco-corner .logo-rotator img { height:12px; } .synetco-corner .logo-rotator .rot-jarvis img { height:16px; } }
@media (prefers-reduced-motion: reduce) { .logo-rotator > .rot-item, .logo-rotator > .rot-item.on { transition:none; } }

/* ---- home page: the marks fly to their place */
.flight-layer { position:fixed; inset:0; z-index:60; pointer-events:none; }
.flight-mark { position:absolute; left:0; top:0; height:auto; transform-origin:0 0; will-change:transform, opacity; opacity:0; }
.login-page.flown .login-intro { animation:none; }
.login-page.flown .synetco-corner { animation:none; }
.login-page.flown .intro-partners img:last-child { animation:fadeLate .4s ease-out 1.3s both; }
@keyframes fadeLate { from { opacity:0; } to { opacity:1; } }

/* ---- registration for the new season: clear call to action */
.button.reg-team-btn { width:auto; align-self:center; background:#16a34a; border-color:#16a34a; color:#fff; font-weight:600; white-space:nowrap; }
.reg-cta { display:flex; align-items:center; gap:14px; margin:0 0 16px; padding:14px 16px; border-radius:var(--radius);
  background:linear-gradient(135deg, #16a34a, #15803d); color:#fff; text-decoration:none; box-shadow:0 6px 18px rgba(22,163,74,.25); }
.reg-cta span:nth-child(2) { display:flex; flex-direction:column; gap:2px; flex:1; min-width:0; }
.reg-cta strong { font-size:1.05rem; }
.reg-cta small { color:#fff; opacity:.92; }
.reg-cta strong { color:#fff; }
.reg-cta-icon { font-size:1.8rem; line-height:1; }
.reg-cta-go { font-size:1.4rem; font-weight:700; }
.reg-cta:hover { filter:brightness(1.05); }

/* ---- messages of the organisation */
.bc-btn { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; border:1px solid var(--line);
  text-decoration:none; font-size:15px; }
.bc-btn:hover { border-color:var(--accent); }
body.is-login .bc-btn { display:none; }
.bc-card { display:flex; flex-direction:column; gap:4px; text-decoration:none; color:inherit; border-left:4px solid var(--accent); }
.bc-form textarea { resize:vertical; }
.bc-pick { display:flex; flex-direction:column; gap:8px; padding:10px 12px; border:1px solid var(--line); border-radius:10px; }
.bc-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:4px 14px; }
.bc-count { font-weight:600; margin:4px 0; }
.bc-body { white-space:pre-wrap; margin:4px 0; }
.bc-inbox { max-width:900px; margin:12px auto 0; padding:0 16px; display:flex; flex-direction:column; gap:8px; }
.bc-inbox .bc-msg { background:#fef3c7; color:#78350f; border:1px solid #fcd34d; border-radius:12px; padding:12px 14px; display:flex; flex-direction:column; gap:4px; }
.bc-inbox .bc-msg p { margin:0; white-space:pre-wrap; }
.bc-inbox .bc-msg a { color:#92400e; font-weight:600; }

@media (prefers-color-scheme: dark) { .bc-inbox .bc-msg { background:#422006; color:#fde68a; border-color:#a16207; } .bc-inbox .bc-msg a { color:#fcd34d; } }
.bc-msg-actions { display:flex; flex-wrap:wrap; gap:16px; align-items:center; }
.bc-inbox .bc-msg a.bc-translate { font-weight:500; }

/* ---------- Phones (≤ 600 px): header on two rows, lists that wrap instead of overlapping ---------- */
@media (max-width: 600px) {
  .top { flex-wrap:wrap !important; align-items:center; column-gap:8px; row-gap:6px; padding:8px 12px; padding-top:calc(8px + env(safe-area-inset-top)); }
  .top .brand-logo { height:46px !important; }
  .top .brand-text { flex:1 1 0 !important; min-width:0; margin:0 !important; }
  .top .brand-text strong { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:.9rem; }
  .top .brand-text .powered { flex-wrap:nowrap !important; white-space:nowrap; }
  /* row 1: logo + title; row 2: the buttons, on the right */
  .top::after { content:''; order:2; flex-basis:100%; height:0; }
  .top > #online, .top > .menu-btn, .top > .bc-btn, .top > .help-btn, .top > .logout-btn, .top > #lang { order:3; margin-top:0; }
  .top > #online:not([hidden]) { margin-left:auto !important; }
  .top > #online[hidden] + .menu-btn { margin-left:auto !important; }
  .top > #tabs { order:4; }
  .top > .logout-btn { margin-right:0; }
  /* lists: badges and buttons go under the text when there is no room */
  .list li .row { flex-wrap:wrap; }
  .list li .row > div:first-child { flex:1 1 180px; }
  .list li .row > .actions { flex:1 1 auto; justify-content:flex-end; margin-top:4px; }
  .list li .row > .badge { max-width:100%; white-space:normal; text-align:center; }
  .button.reg-team-btn { white-space:normal; }
}
body.is-login .top::after { display:none; }
.class-archive summary { cursor:pointer; font-weight:600; }
.class-archive-season { display:flex; flex-direction:column; gap:6px; padding:10px 0; border-top:1px solid var(--line); }
.class-archive-season .chips { display:flex; flex-wrap:wrap; gap:6px; }
.class-archive .chip { opacity:.85; }

/* ---------- Narrow desktops / tablets (900–1199 px): the menu stays on one row without covering the buttons ---------- */
@media (min-width: 900px) and (max-width: 1199px) {
  .top { gap:.5rem; padding-left:10px; padding-right:10px; }
  .brand-logo { height:52px !important; }
  .top .brand-text strong { display:none; }
  .top .brand-text .powered { flex-direction:column; align-items:flex-start; gap:2px; font-size:.62rem; }
  #tabs { gap:0; min-width:0; }
  #tabs a { padding:5px 7px; font-size:.8rem; }
  .top .online-btn { padding:3px 7px; }
  .top .online-btn .lbl { display:none; }
}
@media (min-width: 900px) and (max-width: 1023px) {
  .top .brand-text { display:none; }
  .brand-logo { height:44px !important; }
  #tabs a { padding:5px 6px; font-size:.78rem; }
  .top select#lang { padding:3px 2px; }
}

/* ---- requests waiting for the organisation */
.nav-badge { display:inline-flex; align-items:center; justify-content:center; min-width:18px; height:18px; padding:0 5px; margin-left:5px;
  border-radius:999px; background:#dc2626; color:#fff; font-size:.7rem; font-weight:700; line-height:1; vertical-align:middle; }
.subnav a.active .nav-badge { background:#fff; color:#dc2626; }
.pending-banner { display:flex; flex-wrap:wrap; align-items:center; gap:8px 16px; margin:0 0 14px; padding:10px 14px; border-radius:12px;
  background:#fee2e2; color:#7f1d1d; border:1px solid #fca5a5; font-weight:600; }
.pending-banner a { color:#b91c1c; text-decoration:underline; }
@media (prefers-color-scheme: dark) { .pending-banner { background:#450a0a; color:#fecaca; border-color:#7f1d1d; } .pending-banner a { color:#fca5a5; } }
/* ---- registration: race number */
.num-field { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 12px; margin-bottom:8px; }
.num-field > label { flex:1 1 200px; margin:0; }
.num-field .num-req-btn { width:auto; }
.num-request { flex-basis:100%; display:grid; grid-template-columns:120px 1fr; gap:8px 12px; padding:10px 12px; border:1px dashed var(--line); border-radius:10px; }
.num-request .hint { grid-column:1 / -1; }
.num-assign { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; margin:4px 0; }
.num-assign input { width:80px; margin:0; }
@media (max-width: 600px) { .num-request { grid-template-columns:1fr; } }

/* phones / web app: SYNETCO + flags in the page flow (not fixed), so the logos never go over them,
   whatever the height of the status bar (safe area) and the number of flag rows */
@media (max-width: 899px) {
  .synetco-corner { position:relative; top:auto; left:auto; align-self:flex-start; flex-wrap:wrap; row-gap:6px;
    margin:0 0 -12px; max-width:100%; }
}

/* Suggestion lists of the report forms (replace the browser's datalist, which Safari does not show) */
input.has-suggest { background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 13px) 55%, calc(100% - 8px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 22px; }
.suggest-panel { position: absolute; z-index: 1000; max-height: 18rem; overflow: auto; margin: 0; padding: 4px 0; list-style: none;
  background: Canvas; color: CanvasText; border: 1px solid rgba(128,128,128,.4); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
  font-size: .9rem; -webkit-overflow-scrolling: touch; }
.suggest-panel li { padding: 7px 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suggest-panel li:hover, .suggest-panel li.on { background: rgba(54,96,146,.18); }

/* ---------- Driver photos ---------- */
.drv-id { display:flex; align-items:center; gap:10px; min-width:0; }
.drv-id > div { min-width:0; display:flex; flex-direction:column; }
.drv-avatar { width:44px; height:44px; border-radius:50%; object-fit:cover; object-position:top; flex:none;
  background:linear-gradient(160deg, #1e293b, #334155); box-shadow:0 0 0 2px var(--line); }
.drv-avatar.sm { width:28px; height:28px; vertical-align:middle; margin-right:6px; }
.st-driver { white-space:nowrap; }
.drv-head { position:relative; }
.drv-photo-box { display:flex; flex-direction:column; align-items:center; gap:8px; margin-bottom:10px; }
.drv-photo { width:min(320px, 100%); aspect-ratio:4/3; object-fit:contain; object-position:bottom; border-radius:14px;
  background:radial-gradient(ellipse at 50% 35%, #334155, #0f172a 75%); }
.drv-photo-box .actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }
.ph-bulk .ph-drop { display:flex; flex-direction:column; align-items:center; gap:4px; padding:22px 12px; margin:8px 0;
  border:2px dashed var(--line); border-radius:14px; cursor:pointer; text-align:center; }
.ph-bulk .ph-drop.over, .ph-bulk .ph-drop:hover { border-color:var(--accent); background:rgba(54,96,146,.08); }
.ph-bulk .ph-input { position:absolute; width:1px; height:1px; opacity:0; pointer-events:none; }
.ph-list { margin-top:6px; }
.ph-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-left:4px solid transparent; padding-left:8px; }
.ph-row[data-st="ok"] { border-left-color:#16a34a; }
.ph-row[data-st="check"] { border-left-color:#eab308; }
.ph-row[data-st="none"] { border-left-color:#dc2626; opacity:.75; }
.ph-row[data-st="done"] { border-left-color:#16a34a; background:rgba(22,163,74,.06); }
.ph-row[data-st="error"] { border-left-color:#dc2626; background:rgba(220,38,38,.06); }
.ph-prev { width:56px; height:56px; border-radius:50%; flex:none; background:linear-gradient(160deg, #1e293b, #334155); }
.ph-prev.ph-bad { outline:2px solid #dc2626; }
.ph-main { display:flex; flex-direction:column; gap:4px; min-width:0; flex:1; }
.ph-name { font-size:.8rem; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ph-sel { max-width:100%; }
.ph-note { font-size:.78rem; }
.ph-missing { margin-top:10px; }

/* ---------- Admin › Permissions ---------- */
.perm-wrap { overflow-x:auto; border:1px solid var(--line); border-radius:12px; background:var(--card, #fff); }
.perm-grid { border-collapse:separate; border-spacing:0; width:100%; font-size:.86rem; }
.perm-grid th, .perm-grid td { padding:6px 8px; border-bottom:1px solid var(--line); text-align:center; }
.perm-grid thead th { position:sticky; top:0; background:var(--card, #fff); vertical-align:bottom; z-index:1; }
.perm-grid thead th span { display:inline-block; writing-mode:vertical-rl; transform:rotate(180deg); white-space:nowrap; font-weight:600; }
.perm-grid thead th:first-child { text-align:left; }
.perm-grid tbody th { text-align:left; font-weight:normal; min-width:220px; position:sticky; left:0; background:var(--card, #fff); }
.perm-grid tbody th strong { display:block; }
.perm-grid tbody th small { color:var(--muted); }
.perm-grid input[type=checkbox] { width:20px; height:20px; cursor:pointer; }
.perm-grid .perm-fixed { color:var(--muted); background:rgba(127,127,127,.06); }
.perm-grid td.perm-diff, .perm-legend { background:rgba(234,179,8,.22); }
.perm-legend { display:inline-block; width:14px; height:14px; border-radius:3px; vertical-align:middle; }
.perm-grid tbody tr:hover td, .perm-grid tbody tr:hover th { background:rgba(54,96,146,.06); }
.perm-actions { margin-top:12px; display:flex; gap:8px; position:sticky; bottom:8px; }
/* ---------- Account requests ---------- */
.ureq > div:first-child { display:flex; flex-direction:column; gap:2px; }
.ureq .badge { align-self:flex-start; margin:2px 0; }
.ureq-note { margin:4px 0; font-style:italic; }
.ureq-rejected { opacity:.6; }
/* NASCAR Premium Fan: folders they can read */
.fan-badge { background:#fef3c7; color:#92400e; }
.fan-toggle { display:inline-flex; align-items:center; gap:6px; font-size:.82rem; color:var(--muted); margin:6px 0; cursor:pointer; }
/* Request an account: first step, who are you */
.who-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(220px, 1fr)); gap:12px; margin-top:12px; }
.who-card { display:flex; flex-direction:column; gap:6px; padding:18px; border:1px solid var(--line); border-radius:14px;
  background:var(--card, #fff); color:inherit; text-decoration:none; transition:transform .12s, box-shadow .12s, border-color .12s; }
.who-card:hover, .who-card:focus-visible { transform:translateY(-2px); border-color:var(--accent); box-shadow:0 8px 20px rgba(0,0,0,.08); }
.who-ico { font-size:2rem; line-height:1; }
.who-card strong { font-size:1.05rem; }
.who-card small { color:var(--muted); }
.who-fan { border-color:#f59e0b; background:linear-gradient(160deg, #fffbeb, var(--card, #fff)); }
.who-chosen { margin:0 0 6px; font-weight:600; }
/* From the prologue: small registration boxes (teams: request to the organisation; drivers: button only) */
.reg-banner.reg-small { flex-direction:row; align-items:center; justify-content:space-between; gap:10px; flex-wrap:wrap;
  padding:9px 14px; border-width:3px; border-radius:12px; box-shadow:inset 0 0 0 2px #1f5fd6, 0 4px 12px rgba(0,0,0,.14); }
.reg-banner.reg-small::before, .reg-banner.reg-small::after { display:none; }
.reg-banner.reg-small .reg-btn { margin-top:0; align-self:center; padding:5px 11px; font-size:.85rem; }
.reg-banner.reg-small > span:not(.reg-btn) { font-size:.85rem; font-weight:600; }
.reg-banner.drv-banner.reg-small .kicker, .reg-banner.drv-banner.reg-small > span:not(.reg-btn) { display:none; }
.reg-banner.drv-banner.reg-small { justify-content:center; }
/* phones / web app: the list of users online across the screen under the header (it went out on the left) */
@media (max-width: 899px) {
  .online { position:static; }
  .online-menu { position:fixed; left:12px; right:12px; width:auto; top:calc(var(--online-top, 120px)); max-height:min(60vh, calc(100dvh - var(--online-top, 120px) - 24px)); }
}
/* driver record: media answers for the press release */
.drv-media textarea { width:100%; min-height:110px; resize:vertical; font:inherit; }
.drv-media .field > span { font-weight:600; line-height:1.35; }
.drv-media.todo { border-left:4px solid #eab308; }
.drv-media .media-qa { margin:10px 0; }
.drv-media blockquote { margin:6px 0 0; padding:8px 12px; border-left:3px solid var(--accent); background:rgba(54,96,146,.06); white-space:pre-wrap; font-style:italic; }
/* Race Director Report: line sent to teams and drivers */
.row-actions .push-line.sent { opacity:.55; }
.row-actions .push-line.sent::after { content:'✓'; font-size:.7em; margin-left:2px; color:#16a34a; }
/* photo of the helmet / seat in the safety tables */
.kit-photo { display:flex; align-items:center; gap:4px; margin-top:4px; font-weight:normal; }
.kit-photo .kit-thumb { width:52px; height:52px; object-fit:cover; border-radius:8px; border:1px solid var(--line); display:block; }
.kit-photo.busy { opacity:.5; pointer-events:none; }
.kit-photo .icon { padding:2px 6px; }

/* ---- in-car flag display (#/flags) ---- */
@font-face { font-family: 'NES Mono'; src: url('/assets/fonts/jbm-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'NES Mono'; src: url('/assets/fonts/jbm-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
#flagscreen { --cy: #4FD1FF; position: fixed; inset: 0; z-index: 100000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: #000; color: #fff; font-family: system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; text-align: center; user-select: none; -webkit-user-select: none;
  cursor: pointer; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left); }
body.is-flags { overflow: hidden; background: #000; }
#flagscreen .fs-big { font-weight: 900; line-height: .9; letter-spacing: -.02em; font-size: min(38vw, 62vh); white-space: nowrap; }
#flagscreen.fs-red .fs-big { font-size: min(21vw, 48vh); }
#flagscreen.fs-nosignal .fs-big { font-size: min(17vw, 40vh); }
#flagscreen.fs-green .fs-big { font-size: min(24vw, 55vh); }
#flagscreen .fs-sub { font-weight: 800; font-size: min(6vw, 9vh); margin-top: 2vh; }
#flagscreen .fs-sub:empty { display: none; }
#flagscreen .fs-info { position: absolute; left: 0; right: 0; bottom: 1.5vh; font-size: min(3vw, 4vh); opacity: .55; }
#flagscreen .fs-exit { position: absolute; bottom: 5vh; right: 5vw; font: 300 min(2.4vw, 3.4vh) 'NES Mono', ui-monospace, Menlo, monospace; color: inherit; opacity: .25; text-decoration: none; z-index: 3; }
#flagscreen .fs-keep { position: absolute; width: 2px; height: 2px; opacity: .01; pointer-events: none; left: 0; top: 0; }
#flagscreen.fs-fcy, #flagscreen.fs-sc, #flagscreen.fs-vsc { background: #FFD400; color: #000; }
#flagscreen.fs-red { background: #E00000; color: #fff; }
#flagscreen:is(.fs-fcyc, .fs-vscc) { background: #000; color: #FFD400; }
#flagscreen:is(.fs-fcyc, .fs-vscc) .fs-sub { order: -1; margin: 0 0 1vh; }
#flagscreen:is(.fs-fcyc, .fs-vscc) .fs-big { font-size: min(45vw, 62vh); animation: fs-count 1s ease-out infinite; }
@keyframes fs-count { from { transform: scale(1.15); } to { transform: scale(1); } }
#flagscreen.fs-green { background: #00A651; color: #fff; }
#flagscreen.fs-nosignal { background: #555; color: #fff; }
#flagscreen.fs-new { animation: fs-blink .35s steps(1) 6; }
@keyframes fs-blink { 50% { filter: brightness(.3); } }
/* SC / FCY / RED FLAG just declared: flashes for 10 s (black and colour, 2 times a second) */
#flagscreen.fs-flash.fs-fcy, #flagscreen.fs-flash.fs-sc, #flagscreen.fs-flash.fs-vsc { animation: fs-flash-y .5s steps(1) 20; }
#flagscreen.fs-flash.fs-red { animation: fs-flash-r .5s steps(1) 20; }
@keyframes fs-flash-y { 50% { background: #000; color: #FFD400; } }
@keyframes fs-flash-r { 50% { background: #000; color: #FF2A2A; } }

/* idle: black, "SYSTEM ON — MAINFRAME CONNECTED" top left (Synetco look) */
#flagscreen .fs-hud, #flagscreen .fs-awake, #flagscreen .fs-corner { display: none; }
#flagscreen:is(.fs-none, .fs-clear) :is(.fs-hud, .fs-awake, .fs-corner) { display: block; }
#flagscreen:is(.fs-none, .fs-clear) :is(.fs-big, .fs-sub, .fs-info) { display: none; }
#flagscreen .fs-hud { position: absolute; left: calc(5vw + var(--dx, 0px)); top: calc(6vh + var(--dy, 0px)); text-align: left;
  font-family: 'NES Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--cy); opacity: 0; transition: opacity .6s; }
#flagscreen .fs-hud.on { opacity: 1; }
#flagscreen .fs-hud-main { font-weight: 300; font-size: min(3.2vw, 5.6vh); letter-spacing: .12em; text-shadow: 0 0 12px rgba(79,209,255,.55); display: flex; align-items: center; gap: .6em; }
#flagscreen .fs-typed::after { content: '_'; animation: fs-caret 1s steps(1) infinite; }
@keyframes fs-caret { 50% { opacity: 0; } }
#flagscreen .fs-dot { width: .5em; height: .5em; border-radius: 50%; background: var(--cy); box-shadow: 0 0 14px var(--cy); flex: none; animation: fs-pulse 1.2s ease-in-out infinite alternate; }
@keyframes fs-pulse { from { opacity: 1; } to { opacity: .3; } }
#flagscreen .fs-hud-sub { font-weight: 300; font-size: min(1.9vw, 3.2vh); letter-spacing: .14em; color: #6F80A3; margin-top: 1.2vh; text-transform: uppercase; }
#flagscreen .fs-awake { position: absolute; bottom: 6vh; left: 5vw; font: 300 min(1.7vw, 2.8vh) 'NES Mono', ui-monospace, Menlo, monospace; letter-spacing: .14em; color: #FF3D7F; }
#flagscreen .fs-awake.on { color: #2E5A47; }
#flagscreen .fs-corner { position: absolute; width: 3vh; height: 3vh; border: 0 solid rgba(79,209,255,.35); }
#flagscreen .fs-corner.tl { left: 2vw; top: 2vh; border-top-width: 2px; border-left-width: 2px; }
#flagscreen .fs-corner.tr { right: 2vw; top: 2vh; border-top-width: 2px; border-right-width: 2px; }
#flagscreen .fs-corner.bl { left: 2vw; bottom: 2vh; border-bottom-width: 2px; border-left-width: 2px; }
#flagscreen .fs-corner.br { right: 2vw; bottom: 2vh; border-bottom-width: 2px; border-right-width: 2px; }

/* YFB: white on black, skull and crossbones, race number */
#flagscreen .fs-yfb { display: none; flex-direction: column; align-items: center; gap: 3vh; }
#flagscreen .fs-yfb-row { display: flex; align-items: center; justify-content: center; gap: 4vw; }
#flagscreen .fs-yfb-note { font: 300 min(2.6vw, 4.2vh) 'NES Mono', ui-monospace, Menlo, monospace; letter-spacing: .12em; color: #bbb; }
#flagscreen:is(.fs-yfb, .fs-meatball, .fs-bw, .fs-blk, .fs-blu) { background: #000; color: #fff; }
#flagscreen:is(.fs-yfb, .fs-meatball, .fs-bw, .fs-blk, .fs-blu) .fs-yfb { display: flex; }
#flagscreen:is(.fs-yfb, .fs-meatball, .fs-bw, .fs-blk, .fs-blu) :is(.fs-big, .fs-sub) { display: none; }
#flagscreen .fs-yfb-word:empty, #flagscreen .fs-yfb-note:empty { display: none; }
/* flags (3:2) instead of the skull: wider, the number next to them bigger */
/* TECHNICAL (orange disc) and WARNING (black/white): the flag fills the left 2/3 of the screen, the number the right 1/3 */
#flagscreen:is(.fs-meatball, .fs-bw, .fs-blk, .fs-blu) .fs-yfb-row { gap: 0; width: 100vw; height: 100vh; }
#flagscreen .fs-skull:is(.fs-g-meatball, .fs-g-bw, .fs-g-blk, .fs-g-blu) { width: 66vw; height: 100%; display: flex; align-items: center; justify-content: center; }
#flagscreen .fs-skull.fs-g-meatball svg { width: min(62vw, 84vh); height: min(62vw, 84vh); }
#flagscreen .fs-skull:is(.fs-g-bw, .fs-g-blk, .fs-g-blu) svg { width: min(62vw, 135vh); height: auto; }
#flagscreen:is(.fs-meatball, .fs-bw, .fs-blk, .fs-blu) .fs-yfb-txt { width: 34vw; align-items: center; }
#flagscreen:is(.fs-meatball, .fs-bw, .fs-blk, .fs-blu) .fs-yfb-car { font-size: min(calc(31vw / (var(--n, 2) * .62)), 80vh); letter-spacing: -.03em; }
/* WARNING: the black and white halves swap colours twice a second */
#flagscreen .fs-g-bw .bw-a { animation: bw-a 1s steps(1) infinite; }
#flagscreen .fs-g-bw .bw-b { animation: bw-b 1s steps(1) infinite; }
@keyframes bw-a { 50% { fill: #fff; } }
@keyframes bw-b { 50% { fill: #000; } }
#flagscreen .fs-skull svg { width: min(36vw, 62vh); height: min(36vw, 62vh); display: block; }
#flagscreen .fs-yfb-txt { display: flex; flex-direction: column; align-items: flex-start; line-height: .9; }
#flagscreen .fs-yfb-word { font-weight: 900; font-size: min(15vw, 26vh); letter-spacing: .02em; }
#flagscreen .fs-yfb-car { font-weight: 900; font-size: min(20vw, 36vh); letter-spacing: -.02em; }
@media (orientation: portrait) {
  #flagscreen .fs-yfb-row { flex-direction: column; gap: 2vh; }
  #flagscreen .fs-skull:is(.fs-g-meatball, .fs-g-bw, .fs-g-blk, .fs-g-blu) { width: 100vw; height: 66vh; }
  #flagscreen .fs-skull.fs-g-meatball svg { width: min(92vw, 62vh); height: min(92vw, 62vh); }
  #flagscreen .fs-skull:is(.fs-g-bw, .fs-g-blk, .fs-g-blu) svg { width: 94vw; }
  #flagscreen:is(.fs-meatball, .fs-bw, .fs-blk, .fs-blu) .fs-yfb-txt { width: 100vw; height: 34vh; justify-content: center; }
  #flagscreen:is(.fs-meatball, .fs-bw, .fs-blk, .fs-blu) .fs-yfb-car { font-size: min(calc(92vw / (var(--n, 2) * .62)), 30vh); }
  #flagscreen .fs-yfb-txt { align-items: center; }
  #flagscreen .fs-skull svg { width: min(60vw, 34vh); height: min(60vw, 34vh); }
  #flagscreen .fs-yfb-word { font-size: min(22vw, 14vh); }
  #flagscreen .fs-yfb-car { font-size: min(34vw, 22vh); }
  #flagscreen .fs-yfb-note { font-size: min(4.4vw, 2.6vh); }
}

/* start-up: partners' logos, one after the other (turn in, hold, fade out) */
#flagscreen .fs-logos .lg-stage { position: relative; width: min(78vw, 120vh); height: 56vh; perspective: 1200px; }
#flagscreen .fs-logos .lg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0;
  animation: lg-show 1.7s cubic-bezier(.2, .7, .2, 1) both; }
#flagscreen .fs-logos .lg1 { animation-delay: 1.7s; } #flagscreen .fs-logos .lg2 { animation-delay: 3.4s; }
#flagscreen .fs-logos .lg0 { padding: 0 4%; }
@keyframes lg-show {
  0% { opacity: 0; transform: rotateY(-95deg) scale(.55); filter: blur(6px); }
  32% { opacity: 1; transform: rotateY(0) scale(1); filter: blur(0); }
  72% { opacity: 1; transform: scale(1.04); filter: blur(0); }
  100% { opacity: 0; transform: scale(1.14); filter: blur(4px); } }
/* start-up: race director looks at you */
#flagscreen .fs-intro { position: absolute; inset: 0; z-index: 2; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3vh;
  font-family: 'NES Mono', ui-monospace, Menlo, monospace; animation: ri-in .5s steps(4) both; }
#flagscreen .fs-intro.out { animation: ri-out .55s steps(5) forwards; }
@keyframes ri-in { 0% { opacity: 0; } 30% { opacity: .8; } 45% { opacity: .1; } 100% { opacity: 1; } }
@keyframes ri-out { 0% { opacity: 1; transform: none; } 40% { opacity: .6; transform: scaleY(.6) skewX(8deg); filter: hue-rotate(90deg); } 100% { opacity: 0; transform: scaleY(.01); } }
#flagscreen .ri-frame { position: relative; height: 64vh; aspect-ratio: 616 / 665; }
#flagscreen .ri-frame img { width: 100%; height: 100%; object-fit: contain; display: block; animation: ri-flicker 2.4s steps(1) infinite; }
/* thug-life glasses: drop from above onto the eyes */
#flagscreen .ri-frame img.ri-glasses { position: absolute; inset: 0; animation: ri-drop 1.3s steps(9) .3s both; }
@keyframes ri-drop { from { transform: translateY(-75%); } to { transform: none; } }
@keyframes ri-flicker { 0%, 100% { opacity: 1; } 47% { opacity: .82; } 48% { opacity: 1; } 73% { opacity: .9; } }
#flagscreen .ri-tint { position: absolute; inset: 0; background: rgba(255, 20, 20, .38); mix-blend-mode: color; pointer-events: none;
  -webkit-mask: url('/assets/rd-intro.webp') center / contain no-repeat; mask: url('/assets/rd-intro.webp') center / contain no-repeat; }
#flagscreen .ri-frame::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0,0,0,.35) 0 2px, rgba(0,0,0,0) 2px 4px); }
#flagscreen .ri-scan { position: absolute; left: -4%; right: -4%; height: 2px; top: 0; background: #ff3030; box-shadow: 0 0 18px 4px rgba(255,40,40,.7); animation: ri-scan 1.6s ease-in-out infinite alternate; }
@keyframes ri-scan { from { top: 4%; } to { top: 96%; } }
#flagscreen .ri-frame .fs-corner { display: block; border-color: rgba(255,60,60,.8); width: 4vh; height: 4vh; }
#flagscreen .ri-frame .fs-corner.tl { left: -3vh; top: -2vh; } #flagscreen .ri-frame .fs-corner.tr { right: -3vh; top: -2vh; }
#flagscreen .ri-frame .fs-corner.bl { left: -3vh; bottom: -2vh; } #flagscreen .ri-frame .fs-corner.br { right: -3vh; bottom: -2vh; }
@media (max-width: 1000px) { #flagscreen .ri-data { display: none; } }
#flagscreen .ri-data { position: absolute; left: 5vw; top: 6vh; text-align: left; color: #ff4a4a; font-weight: 300; font-size: min(1.8vw, 3vh); letter-spacing: .12em; line-height: 1.7; opacity: .85; }
#flagscreen .ri-line { min-height: 1.2em; color: #fff; font-weight: 700; font-size: min(4.2vw, 7vh); letter-spacing: .14em; text-shadow: 0 0 14px rgba(255,40,40,.9), 0 0 2px #ff4a4a; }
#flagscreen .ri-line::after { content: '_'; color: #ff4a4a; animation: fs-caret .8s steps(1) infinite; }

/* page Track status (race director, chief steward) */
.tr-page .tr-now { display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; padding: 18px 22px; border-radius: 10px; margin: 6px 0 10px; background: #111; color: #fff; }
.tr-page .tr-now:is(.fs-fcy, .fs-sc, .fs-vsc) { background: #FFD400; color: #000; }
.tr-page .tr-now.fs-red { background: #E00000; }
.tr-page .tr-now.fs-green { background: #00A651; }
.tr-page .tr-now.fs-yfb { background: #000; border: 3px solid #fff; }
.tr-page .tr-now-big { font-weight: 900; font-size: 44px; line-height: 1; }
.tr-page .tr-now-meta { opacity: .8; }
.tr-page .tr-session { font-weight: 600; margin: 0 0 12px; }
.tr-page .tr-session.warn { color: #b45309; }
.tr-page .tr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.tr-page .tr-btn { min-height: 96px; font-size: 28px; font-weight: 900; border-radius: 12px; border: 3px solid transparent; }
.tr-page .tr-btn.on { outline: 4px solid #000; outline-offset: 2px; }
.tr-page .tr-btn.armed, .tr-page .tr-car.armed { animation: tr-arm .5s steps(1) infinite; font-size: 20px; }
@keyframes tr-arm { 50% { filter: brightness(.6); } }
.tr-page .tb-green { background: #00A651; color: #fff; }
.tr-page :is(.tb-fcy, .tb-sc, .tb-vsc) { background: #FFD400; color: #000; }
.tr-page .tb-red { background: #E00000; color: #fff; }
.tr-page .tr-h2 { margin: 26px 0 10px; font-size: 20px; }
.tr-page .tr-cars { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.tr-page .tr-car { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; min-height: 64px; text-align: left;
  background: #111; color: #fff; border: 0; border-left: 6px solid var(--c); border-radius: 8px; }
.tr-page .tr-car b { font-size: 24px; line-height: 1; }
.tr-page .tr-car small { font-size: 11px; opacity: .7; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tr-page .tr-car.on { outline: 4px solid #E00000; }
@media (max-width: 560px) { .tr-page .tr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* in-car display: TAP TO START / tap to keep the screen on */
#flagscreen .fs-gate { display: none; font-family: 'NES Mono', ui-monospace, Menlo, monospace; }
#flagscreen.fs-needtap:is(.fs-none, .fs-clear) .fs-gate { display: block; }
#flagscreen .fs-gate-main { font-weight: 700; font-size: min(6vw, 10vh); letter-spacing: .14em; color: var(--cy); text-shadow: 0 0 18px rgba(79,209,255,.6);
  animation: fs-pulse 1s ease-in-out infinite alternate; }
#flagscreen .fs-gate-sub { font-weight: 300; font-size: min(2vw, 3.4vh); letter-spacing: .14em; color: #6F80A3; margin-top: 2vh; text-transform: uppercase; }
#flagscreen.fs-needtap .fs-gate-main { color: var(--cy); }
#flagscreen .fs-keep { width: 4px; height: 4px; opacity: .02; }

/* Track status page: flag for one car */
.tr-page .tr-flags { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.tr-page .tr-flag { display: flex; align-items: center; gap: 10px; padding: 8px 14px; border-radius: 10px; background: #111; color: #fff; border: 3px solid transparent; font-weight: 800; }
.tr-page .tr-flag.sel { border-color: #E00000; }
.tr-page .tr-flag-ic svg { width: 54px; height: 36px; display: block; }

/* in-car display: new portal version, a touch reloads (only on the black screen) */
#flagscreen .fs-upd { display: none; position: absolute; left: 0; right: 0; bottom: 14vh; font: 700 min(2.6vw, 4.4vh) 'NES Mono', ui-monospace, Menlo, monospace;
  letter-spacing: .12em; color: #FF3D7F; animation: fs-pulse 1s ease-in-out infinite alternate; }
#flagscreen.fs-update:is(.fs-none, .fs-clear) .fs-upd { display: block; }

/* in-car display: VSC, chequered flag, penalty message, banner */
#flagscreen.fs-vsc .fs-big { font-size: min(34vw, 56vh); }
#flagscreen.fs-chequered { --sq: min(12.5vw, 16.6vh); background-color: #fff;
  background-image: conic-gradient(#000 25%, #fff 0 50%, #000 0 75%, #fff 0); background-size: calc(var(--sq) * 2) calc(var(--sq) * 2);
  animation: fs-cheq 1s steps(1) infinite; }
@keyframes fs-cheq { 50% { background-position: var(--sq) 0; } }
#flagscreen.fs-chequered :is(.fs-big, .fs-sub) { display: none; }
#flagscreen .fs-pen { display: none; flex-direction: column; align-items: center; gap: 2vh; padding: 0 4vw; }
#flagscreen.fs-pen { background: #000; color: #fff; }
#flagscreen.fs-pen .fs-pen { display: flex; }
#flagscreen.fs-pen :is(.fs-big, .fs-sub) { display: none; }
#flagscreen .fs-pen-label { font: 700 min(5vw, 9vh) 'NES Mono', ui-monospace, Menlo, monospace; letter-spacing: .2em; color: #FF3D3D; }
#flagscreen .fs-pen-cars { font-weight: 900; font-size: min(18vw, 34vh); line-height: .9; }
#flagscreen .fs-pen-text { font-weight: 800; line-height: 1.05; font-size: min(calc(170vw / var(--len, 12)), 16vh); max-width: 92vw; }
#flagscreen .fs-banner { display: none; position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6vh 3vw; background: #000; color: #fff;
  font-weight: 800; font-size: min(4.4vw, 8vh); border-top: .6vh solid #FF3D3D; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; z-index: 4; }
#flagscreen.fs-has-banner .fs-banner { display: block; }
#flagscreen.fs-has-banner .fs-info { display: none; }

/* Track status page: reset, flag for one car now, penalties, displays */
.tr-page :is(.tb-chequered) { background-color: #fff; color: #000; background-image: conic-gradient(#000 25%, #fff 0 50%, #000 0 75%, #fff 0);
  background-size: 24px 24px; }
.tr-page .tb-chequered span { background: #fff; color: #000; padding: 2px 10px; border-radius: 6px; }
.tr-page .tr-now.fs-chequered { background-color: #fff; color: #000; background-image: conic-gradient(#ddd 25%, #fff 0 50%, #ddd 0 75%, #fff 0); background-size: 40px 40px; }
.tr-page .tr-now :is(.tr-now-car) { font-weight: 800; font-size: 22px; padding: 4px 10px; border-radius: 6px; background: rgba(0,0,0,.75); color: #fff; }
.tr-page .tr-reset { width: 100%; margin-top: 12px; min-height: 64px; font-size: 22px; font-weight: 900; border-radius: 12px; background: #222; color: #fff; border: 3px dashed #888; }
.tr-page .tr-reset.armed { animation: tr-arm .5s steps(1) infinite; }
.tr-page .tr-cf-now { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tr-page .tr-msgs, .tr-page .tr-displays { width: 100%; border-collapse: collapse; }
.tr-page .tr-msgs td, .tr-page .tr-displays td { padding: 6px 8px; border-bottom: 1px solid var(--line, #ddd); vertical-align: middle; }
.tr-page .tr-msgs td:first-child { width: 80px; font-variant-numeric: tabular-nums; color: #666; }
.tr-page .tr-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: #bbb; margin-right: 8px; }
.tr-page .tr-dot.on { background: #00A651; box-shadow: 0 0 6px #00A651; }
.tr-page .tr-displays select { min-width: 200px; }

/* ---- circuits: GPS track and marshal posts ---- */
.cm-map { margin: 12px 0; background: #0B1220; border-radius: 12px; overflow: hidden; }
.cm-svg { display: block; width: 100%; height: min(62vh, 560px); }
.cm-svg.clickable { cursor: crosshair; }
.cm-post { cursor: pointer; }
.cm-empty { padding: 60px 16px; text-align: center; color: #9AA9C6; }
.cm-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.cm-tools button.on { outline: 3px solid #E2001A; outline-offset: 1px; }
.cm-here { background: #FF7A00; color: #fff; font-weight: 800; }
.cm-rec-info { font: 600 15px ui-monospace, Menlo, monospace; color: #E2001A; margin: 6px 0; }
.cm-mode { background: #fff4d6; border-left: 4px solid #FF9F00; padding: 8px 12px; border-radius: 6px; }
.cm-draft { background: #e8f6ee; border-left: 4px solid #00A651; padding: 10px 12px; border-radius: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cm-posts input { width: 100%; min-width: 0; }
.cm-posts .cm-num, .cm-manual .cm-num { max-width: 70px; }
.cm-posts .cm-coord, .cm-manual .cm-coord { max-width: 130px; }
.cm-manual { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 18px; }
.nowrap { white-space: nowrap; }

/* Track status page: sector flags */
.tr-sec-map .cm-svg { height: min(48vh, 420px); border-radius: 10px; background: #0B1220; }
.tr-sec-map .cm-post.sel circle { stroke-width: 4; }
.tr-sec-pick { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 10px 0; }
.tr-sec-btns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tr-secbtn { min-height: 72px; font-size: 20px; font-weight: 900; border-radius: 12px; border: 0; }
.tr-secbtn:disabled { opacity: .35; }
.tr-secbtn.armed { animation: tr-arm .5s steps(1) infinite; }
.sb-yellow { background: #FFD400; color: #000; }
.sb-double_yellow { background: #FFD400; color: #000; box-shadow: inset 10px 0 0 #000, inset -10px 0 0 #000; }
.sb-slippery { background: repeating-linear-gradient(90deg, #FFD400 0 18px, #E0301E 18px 36px); color: #000; }
.tr-secbtn.sb-slippery span, .tr-sec-chip.sb-slippery { background-color: #FFD400; }
.tr-secbtn span { padding: 2px 8px; border-radius: 6px; }
.tr-sec-chip { display: inline-block; padding: 3px 10px; border-radius: 6px; font-weight: 800; font-size: 13px; }
.tr-sec-none { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.tr-gps { color: #666; }

/* in-car display: sector flags */
#flagscreen:is(.fs-sec_yellow, .fs-sec_double_yellow) { background: #FFD400; color: #000; }
#flagscreen.fs-sec_double_yellow { box-shadow: inset 6vw 0 0 #000, inset -6vw 0 0 #000; }
#flagscreen.fs-sec_slippery { background: repeating-linear-gradient(90deg, #FFD400 0 8vw, #E0301E 8vw 16vw); color: #000; }
#flagscreen.fs-sec_slippery :is(.fs-big, .fs-sub) { background: #FFD400; padding: 0 2vw; }
#flagscreen:is(.fs-sec_yellow, .fs-sec_slippery) .fs-big { font-size: min(19vw, 42vh); }
#flagscreen.fs-sec_double_yellow .fs-big { font-size: min(11vw, 28vh); }
#flagscreen.fs-flash:is(.fs-sec_yellow, .fs-sec_double_yellow) { animation: fs-flash-y .5s steps(1) 20; }

/* admin › users: filter by role */
.role-filter-bar { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.role-filter { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line, #d0d5dd);
  background: #fff; color: inherit; font-size: 14px; font-weight: 600; min-height: 0; }
.rf-chip.on { background: #E2001A; border-color: #E2001A; color: #fff; }
.rf-chip .rf-n { font-size: 12px; font-weight: 700; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.08); }
.rf-chip.on .rf-n { background: rgba(255,255,255,.25); }
.role-search { max-width: 360px; }
.role-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.role-tools .role-search { flex: 1 1 240px; }
.role-sort-l { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }

/* account of several teams: switch bar under the header */
.team-switch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; padding: 6px 16px; background: #fff7e0; border-bottom: 1px solid #f0d58a; font-size: 14px; }
.team-switch .ts-label { font-weight: 700; margin-right: 4px; }
.team-switch .ts-team { padding: 4px 12px; border-radius: 999px; border: 1px solid #d9b44a; background: #fff; color: inherit; font-weight: 600; min-height: 0; font-size: 14px; }
.team-switch .ts-team.on { background: #E2001A; border-color: #E2001A; color: #fff; }
.other-teams { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line, #ddd); }
.other-teams h4 { margin: 0 0 4px; }
.other-teams .ot-list { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0; }
.num-change summary { cursor: pointer; font-size: 13px; color: #555; }

/* admin › race numbers */
.num-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.num-legend .lg { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); }
.num-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.num-tile { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 6px 4px;
  border-radius: 10px; border: 2px solid transparent; font-weight: 800; cursor: pointer; color: #111; overflow: hidden; }
.num-tile b { font-size: 22px; line-height: 1; }
.num-tile small { font-size: 10px; font-weight: 600; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.num-tile.sel { border-color: #111; box-shadow: 0 0 0 2px #fff inset; }
.num-tile.req { box-shadow: inset 0 -4px 0 #FF7A00; }
.st-car { background: #1f6feb; color: #fff; } .num-tile.st-car { color: #fff; }
.st-reserved { background: #8957e5; } .num-tile.st-reserved { color: #fff; }
.st-last { background: #ffd8a8; }
.st-free { background: #b6f2c3; }
.st-open { background: #f1f3f5; }
.st-requests { background: #FF7A00; }
.num-tile.big { width: 72px; min-height: 72px; font-size: 28px; flex: none; cursor: default; }
.num-detail { border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 14px; margin: 0 0 14px; background: #fff; }
.nd-head { display: flex; gap: 14px; align-items: flex-start; }
.nd-head > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.nd-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.nd-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.nd-row label { min-width: 150px; font-weight: 600; }
.nd-row select { min-width: 220px; max-width: 100%; }
.num-tile small { color: inherit; }
.nd-row select, .nd-row input { width: auto; flex: 1 1 200px; min-width: 0; margin: 0; }
.nd-row button { flex: none; margin: 0; }
.nd-row label { flex: 0 0 150px; }

/* statistics › latency (administrators) */
.lat-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.lat-head h3 { margin: 0; }
.lat-head .stats-periods { margin: 0 0 0 auto; }
.lat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 12px 0; }
.lat-card { border: 1px solid var(--line, #ddd); border-left: 5px solid #adb5bd; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.lat-card h4 { margin: 0; }
.lat-card.ok { border-left-color: #00A651; } .lat-card.mid { border-left-color: #FF9F00; } .lat-card.bad { border-left-color: #E00000; }
.lat-nums { display: flex; gap: 14px; margin: 4px 0; }
.lat-nums div { display: flex; flex-direction: column; }
.lat-nums b { font-size: 18px; }
.lat-nums span { font-size: 12px; color: #666; }
.lat-chart .lat-line { fill: none; stroke-width: 2; }
.lat-api { stroke: #1f6feb; color: #1f6feb; } .lat-display { stroke: #E2001A; color: #E2001A; } .lat-rtt { stroke: #8957e5; color: #8957e5; }
.lg-lat::before { content: ''; display: inline-block; width: 16px; height: 3px; background: currentColor; margin-right: 6px; vertical-align: middle; }
.stats-table td.ok { color: #00813f; } .stats-table td.mid { color: #b86e00; } .stats-table td.bad { color: #c00; font-weight: 700; }
.lat-nums b { white-space: nowrap; }
.lat-chart .lat-dot { stroke: none; fill: currentColor; }
.lat-nums { flex-wrap: wrap; gap: 6px 12px; }
.lat-nums b { font-size: 16px; }
/* Team images: logo, race number, livery */
.img-panel summary { cursor:pointer; }
.img-body { display:flex; flex-direction:column; gap:12px; margin-top:8px; }
.img-car h3 { margin:4px 0 6px; font-size:1rem; }
.img-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:10px; }
.kit-photo.img-tile { flex-wrap:wrap; align-content:flex-start; gap:6px; margin:0; padding:8px; border:1px solid var(--line); border-radius:10px; }
.kit-photo.img-tile.empty { border-style:dashed; }
.img-car h3 small { display:inline; }
.img-tile .img-label { flex-basis:100%; font-weight:600; }
.img-tile > a { flex-basis:100%; }
.img-tile .kit-thumb { width:100%; height:96px; object-fit:contain; border-radius:6px;
  background:repeating-conic-gradient(#8881 0% 25%, transparent 0% 50%) 50% / 16px 16px; }
/* Driver checks: licence, grade, trophy */
.drv-check .chk-block { border-top:1px solid var(--line); padding:10px 0; display:flex; flex-direction:column; gap:4px; }
.drv-check .chk-block:first-of-type { border-top:none; }
.drv-check .chk-form { display:flex; flex-direction:column; gap:6px; margin-top:6px; }
.drv-check .chk-form textarea { width:100%; }
.chk-filters { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:8px; }
.chip-btn { background:transparent; color:inherit; border:1px solid var(--line); border-radius:999px; padding:4px 10px; font-size:.85rem; }
.chip-btn.on { background:var(--accent, #1d4ed8); border-color:var(--accent, #1d4ed8); color:#fff; }
.chk-list .chk-badges { display:flex; flex-wrap:wrap; gap:4px; margin-top:4px; }
.trophy-info { margin:6px 0; padding:8px 10px; border-left:3px solid var(--line); }
.trophy-info:empty { display:none; }
.trophy-info p { margin:4px 0; }
.trophy-all ul { margin-top:6px; }
.trophy-edit { border-top:1px solid var(--line); padding:6px 0; }
.trophy-edit .wide { grid-column:1 / -1; }
/* printable documents (parents' authorisation) */
.print-doc { background:#fff; color:#111; max-width:190mm; margin:0 auto; padding:14mm; font-size:11pt; line-height:1.45; }
.print-doc .print-logo { height:22mm; }
.print-doc h1 { font-size:15pt; margin:6mm 0 4mm; } .print-doc h2 { font-size:11.5pt; margin:5mm 0 2mm; }
.print-table { width:100%; border-collapse:collapse; } .print-table th, .print-table td { border:1px solid #999; padding:2mm 3mm; text-align:left; vertical-align:top; }
.print-table th { width:38%; font-weight:600; background:#f3f3f3; } .print-table td { height:7mm; }
.print-sign { display:flex; gap:12mm; margin-top:14mm; } .print-sign > div { flex:1; display:flex; flex-direction:column; gap:12mm; }
.print-sign i { border-bottom:1px solid #111; display:block; }
@media print { .print-doc { padding:0; max-width:none; } .group-subnav { display:none !important; } }
.drv-check .chk-grade small { display:inline; }
button.ok { background:var(--ok); border-color:var(--ok); color:#fff; }
.lic-preview { display:flex; flex-wrap:wrap; gap:10px; margin:6px 0; }
.lic-preview:empty { display:none; }
.lic-preview figure { margin:0; } .lic-preview img { max-width:min(100%, 360px); max-height:240px; border:1px solid var(--line); border-radius:8px; display:block; }
.lic-preview figcaption { font-size:.8rem; color:var(--muted); }
/* administrative checks at events: waivers, tabs, printed lists */
.waiver { border:1px solid var(--line); border-radius:10px; padding:8px 12px; margin:8px 0; }
.waiver summary { cursor:pointer; font-weight:600; }
.waiver-body { max-height:40vh; overflow:auto; font-size:.92rem; }
.evreg-ok { color:var(--ok); display:block; }
.acheck-tabs { margin:6px 0 12px; }
.actions.wrap { flex-wrap:wrap; }
.print-doc .print-sub { color:#444; margin:-2mm 0 5mm; }
.print-list { width:100%; border-collapse:collapse; margin-top:4mm; font-size:10.5pt; }
.print-list th, .print-list td { border:1px solid #999; padding:1.6mm 2.5mm; text-align:left; vertical-align:middle; }
.print-list th { background:#f3f3f3; }
.print-list .sig-cell { width:45mm; height:12mm; } .print-list .sig-cell img { max-height:11mm; max-width:44mm; display:block; }
.print-sign strong { font-size:11pt; } .print-sig { max-height:20mm; max-width:70mm; }
@media print { .print-list tr { break-inside:avoid; } }
/* guest tickets */
.tix-quota { display:flex; align-items:baseline; gap:8px; margin:4px 0 10px; } .tix-quota strong { font-size:2rem; }
.tix-nums { display:flex; flex-wrap:wrap; gap:4px; margin:4px 0; } .tix-nums span { border:1px solid var(--line); border-radius:6px; padding:1px 6px; font-family:ui-monospace, Menlo, monospace; }
.tix-nums span.missing { border-color:#dc2626; color:#dc2626; text-decoration:line-through; }
.tix-qty { width:5em; }
.tix-detail { display:flex; flex-direction:column; gap:6px; margin-top:6px; } .tix-detail textarea { width:100%; font-family:ui-monospace, Menlo, monospace; }
.tix-sum { display:grid; grid-template-columns:repeat(auto-fill, minmax(120px, 1fr)); gap:8px; margin:10px 0; }
.tix-sum > div { border:1px solid var(--line); border-radius:10px; padding:8px; display:flex; flex-direction:column; } .tix-sum strong { font-size:1.3rem; }
.tix-boxes { display:flex; flex-wrap:wrap; gap:4px 14px; margin:6px 0; }
.tix-fee { gap:10px; }
/* driver statistics */
.stat-tiles { display:grid; grid-template-columns:repeat(auto-fill, minmax(92px, 1fr)); gap:8px; margin:8px 0 12px; }
.stat-tiles > div { border:1px solid var(--line); border-radius:10px; padding:8px; display:flex; flex-direction:column; align-items:flex-start; }
.stat-tiles strong { font-size:1.5rem; line-height:1.1; } .stat-tiles small { color:var(--muted); }
.table-wrap { overflow-x:auto; }
.stat-table { width:100%; border-collapse:collapse; font-size:.9rem; } .stat-table th, .stat-table td { padding:5px 8px; border-bottom:1px solid var(--line); text-align:right; white-space:nowrap; }
.stat-table th:nth-child(-n+2), .stat-table td:nth-child(-n+2) { text-align:left; }
.stat-table.alltime th:nth-child(-n+3), .stat-table.alltime td:nth-child(-n+3) { text-align:left; }
.stat-table th.sortable { cursor:pointer; } .stat-table th.on { color:var(--accent); }
.stat-filters { gap:8px; margin-bottom:8px; flex-wrap:wrap; } .stat-filters input { flex:1; min-width:160px; }
.stat-results li { gap:8px; }
.hist-preview { border-left:3px solid var(--line); padding:4px 10px; margin:8px 0; }

/* ---------- RACE DIRECTION boards on the in-car display (2026-11-29) ---------- */
#flagscreen.fs-blk { background: #111; }
#flagscreen.fs-blu { background: #001a4d; }
#flagscreen .fs-yfb-word.tl { font-size: min(4.6vw, 8vh); letter-spacing: .04em; margin-bottom: 2vh; }
#flagscreen.fs-turn_white { background: #fff; color: #000; }
#flagscreen.fs-turn_green { background: #00A651; color: #fff; }
#flagscreen:is(.fs-turn_white, .fs-turn_green) .fs-big { font-size: min(19vw, 42vh); }
#flagscreen.fs-sec_slippery .fs-big { white-space: nowrap; }
#flagscreen.fs-flash.fs-turn_white { animation: fs-flash-w .5s steps(1) 20; }
@keyframes fs-flash-w { 50% { background: #000; color: #fff; } }
/* procedure commands: a board held up to the driver */
#flagscreen[class*="fs-p_"] { background: #0B1220; color: #fff; }
#flagscreen[class*="fs-p_"] .fs-big { font-size: min(13vw, 30vh); white-space: normal; line-height: .95; padding: 0 4vw; }
#flagscreen:is(.fs-p_m10, .fs-p_m5, .fs-p_m3, .fs-p_m1, .fs-p_s30) { background: #000; color: #FFD400; }
#flagscreen:is(.fs-p_m10, .fs-p_m5, .fs-p_m3, .fs-p_m1, .fs-p_s30) .fs-big { font-size: min(24vw, 52vh); border: 1.2vh solid currentColor; padding: 2vh 5vw; }
#flagscreen.fs-p_pitexit { background: #00A651; color: #fff; }
#flagscreen:is(.fs-p_pregrid, .fs-p_fastlane) { background: #0057FF; color: #fff; }
#flagscreen[class*="fs-p_"] { animation: fs-blink .35s steps(1) 6; }
/* INFO: a written message */
#flagscreen .fs-rdinfo { display: none; flex-direction: column; align-items: center; gap: 3vh; padding: 0 5vw; }
#flagscreen.fs-rdinfo { background: #000; color: #fff; }
#flagscreen.fs-rdinfo .fs-rdinfo { display: flex; }
#flagscreen.fs-rdinfo :is(.fs-big, .fs-sub) { display: none; }
#flagscreen .fs-rdinfo-label { font: 700 min(3vw, 5vh) 'NES Mono', ui-monospace, Menlo, monospace; letter-spacing: .5em; color: #4FD1FF; border: 2px solid #4FD1FF; padding: .4em 1em .4em 1.5em; }
#flagscreen .fs-rdinfo-text { font-weight: 900; line-height: 1.05; font-size: min(calc(330vw / var(--len, 20)), 22vh, 12vw); max-width: 92vw; overflow-wrap: anywhere; }

/* ---------- RACE DIRECTION: the race director's board, on a second screen (2026-11-29) ---------- */
.rd-page { --rd-bg: #0B1220; --rd-panel: #121B2E; --rd-line: #24314d; background: var(--rd-bg); color: #E6ECF7; margin: -8px -12px 0; padding: 12px 14px 24px; border-radius: 12px; }
.rd-page .muted, .rd-page .hint { color: #8A98B6; }
.rd-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 8px; }
.rd-head h1 { margin: 0; font-size: 22px; letter-spacing: .18em; color: #fff; }
.rd-head select { max-width: 320px; }
.rd-session { font-weight: 700; font-size: 14px; color: #7CE0A3; }
.rd-session.warn { color: #FFB020; }
.rd-live { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-height: 36px; padding: 6px 10px; background: var(--rd-panel); border: 1px solid var(--rd-line); border-radius: 8px; font-size: 14px; }
.rd-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: 6px; background: #2a3550; color: #fff; font-weight: 800; letter-spacing: .02em; }
.rd-chip i { font-style: normal; font-weight: 600; opacity: .8; font-variant-numeric: tabular-nums; }
.rd-chip i:empty { display: none; }
.rd-chip button { background: rgba(0,0,0,.35); color: inherit; border: 0; border-radius: 4px; padding: 2px 7px; min-height: 0; font-size: 13px; cursor: pointer; }
.rd-chip:is(.rc-fcy, .rc-vsc, .rc-sc, .rc-yellow, .rc-dyellow) { background: #FFD400; color: #000; }
.rd-chip:is(.rc-red) { background: #E00000; }
.rd-chip:is(.rc-green, .rc-pitexit) { background: #00A651; }
.rd-chip.rc-oil { background: repeating-linear-gradient(90deg, #FFD400 0 10px, #E0301E 10px 20px); color: #000; }
.rd-chip.rc-white, .rd-chip.rc-chequered { background: #fff; color: #000; }
.rd-chip.rc-orange { background: #FF7A00; color: #000; }
.rd-chip.rc-blue, .rd-chip:is(.rc-pregrid, .rc-fastlane) { background: #0057FF; }
.rd-chip:is(.rc-black, .rc-warning, .rc-tracklimits) { background: #000; border: 2px solid #fff; }
.rd-chip.rc-info { background: #123a52; border: 1px solid #4FD1FF; max-width: 100%; }
.rd-hint { margin: 8px 0; padding: 8px 12px; border-radius: 8px; font-size: 14px; color: #8A98B6; display: flex; align-items: center; gap: 10px; }
.rd-hint.on { background: #4FD1FF; color: #001; font-weight: 800; font-size: 16px; }
.rd-board { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr) minmax(0, 1fr) minmax(0, 1.5fr); gap: 10px; align-items: start; }
.rd-col { background: var(--rd-panel); border: 1px solid var(--rd-line); border-radius: 10px; padding: 8px; min-width: 0; }
.rd-col h2 { margin: 2px 2px 8px; font-size: 13px; letter-spacing: .16em; color: #FF3B3B; font-weight: 800; }
.rd-stack { display: grid; gap: 5px; }
.rd-b { position: relative; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 42px; padding: 5px 8px; border-radius: 8px;
  border: 3px solid transparent; font-weight: 900; font-size: 16px; letter-spacing: .02em; line-height: 1.05; background: #26324f; color: #fff; cursor: pointer; text-align: center; }
.rd-b:hover { filter: brightness(1.12); }
.rd-b.sel { border-color: #4FD1FF; box-shadow: 0 0 0 3px rgba(79,209,255,.35), 0 0 18px rgba(79,209,255,.45); }
.rd-b.on { outline: 3px solid #fff; outline-offset: 2px; }
.rd-b.on::after { content: '●'; position: absolute; right: 8px; top: 4px; font-size: 11px; color: #E2001A; }
.rd-b.armed { animation: tr-arm .5s steps(1) infinite; font-size: 14px; }
.rd-ic svg { width: 36px; height: 24px; display: block; }
.rd-b.rb-orange .rd-ic svg { width: 24px; height: 24px; }
.rb-fcy, .rb-vsc, .rb-sc, .rb-yellow { background: #FFD400; color: #000; }
.rb-dyellow { background: #FFD400; color: #000; box-shadow: inset 8px 0 0 #000, inset -8px 0 0 #000; }
.rb-oil { background: repeating-linear-gradient(90deg, #FFD400 0 14px, #E0301E 14px 28px); color: #000; }
.rb-oil span { background: #FFD400; padding: 1px 6px; border-radius: 4px; }
.rb-green { background: #00A651; color: #fff; }
.rb-red { background: #E00000; color: #fff; }
.rb-white { background: #fff; color: #000; }
.rb-pitexit { background: #0d6b3a; }
.rb-pregrid, .rb-fastlane { background: #1d3f8f; }
.rb-m10, .rb-m5, .rb-m3, .rb-m1, .rb-s30 { background: #000; color: #FFD400; border-color: #3a3a3a; }
.rb-chequered { background-color: #fff; color: #000; background-image: conic-gradient(#000 25%, #fff 0 50%, #000 0 75%, #fff 0); background-size: 18px 18px; }
.rb-chequered span { background: #fff; padding: 1px 8px; border-radius: 4px; }
.rb-warning, .rb-tracklimits, .rb-black { background: #000; border-color: #555; }
.rb-orange { background: #000; }
.rb-blue { background: #0057FF; }
.rb-turnoff { background: #3b0d12; border: 3px dashed #ff6b6b; font-size: 20px; letter-spacing: .25em; min-height: 54px; }
.rb-turnoffall { background: #E00000; margin-top: 6px; }
.rd-alltrack { margin-top: 6px; }
.rd-sub { font-size: 12px; color: #8A98B6; margin: 10px 2px 6px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rd-turns { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px; }
.rd-t { min-height: 38px; padding: 0; border-radius: 6px; border: 2px solid #34425f; background: #18223a; color: #cfd8ea; font-weight: 800; font-size: 14px; cursor: pointer; }
.rd-turns.ready .rd-t { border-color: #4FD1FF; color: #fff; }
.rd-t.rt-yellow, .rd-t.rt-dyellow { background: #FFD400; color: #000; }
.rd-t.rt-dyellow { box-shadow: inset 5px 0 0 #000, inset -5px 0 0 #000; }
.rd-t.rt-oil { background: repeating-linear-gradient(90deg, #FFD400 0 8px, #E0301E 8px 16px); color: #000; }
.rd-t.rt-white { background: #fff; color: #000; }
.rd-t.rt-green { background: #00A651; color: #fff; }
.rd-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 6px; }
.rd-n { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 54px; padding: 4px 2px; border-radius: 8px; cursor: pointer;
  background: #000; color: #FFD400; border: 2px solid #2b3550; border-bottom: 4px solid var(--c, #666); }
.rd-n b { font-size: 26px; line-height: 1; font-weight: 900; }
.rd-n small { font-size: 9px; font-weight: 800; color: #fff; margin-top: 2px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rd-nums.ready .rd-n { border-color: #4FD1FF; }
.rd-n:is(.rn-warning, .rn-tracklimits, .rn-black) { outline: 3px solid #fff; }
.rd-n.rn-orange { outline: 3px solid #FF7A00; }
.rd-n.rn-blue { outline: 3px solid #0057FF; }
.rd-n.rn-info { outline: 3px solid #4FD1FF; }
.rd-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.6fr); gap: 10px; margin-top: 10px; align-items: start; }
.rd-off, .rd-infobox { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--rd-line); }
.rd-info-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.rd-info-head b { letter-spacing: .4em; color: #4FD1FF; }
.rd-info-head small { color: #8A98B6; }
.rd-info-in { width: 100%; font-size: 16px; background: #0B1220; color: #fff; border: 1px solid #34425f; border-radius: 8px; padding: 8px; resize: vertical; }
.rd-info-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; align-items: center; }
.rd-info-actions .sel { outline: 3px solid #4FD1FF; }
.rd-more { margin-top: 14px; background: var(--rd-panel); border: 1px solid var(--rd-line); border-radius: 10px; padding: 8px 12px; }
.rd-more summary { cursor: pointer; font-weight: 700; }
.rd-more :is(.tr-msgs, .tr-displays) td { border-bottom-color: var(--rd-line); }
@media (max-width: 1100px) { .rd-board { grid-template-columns: 1fr 1fr; } .rd-bottom { grid-template-columns: 1fr; } }
main:has(.rd-page) { max-width: none; padding: 8px 12px; }
/* RACE DIRECTION · FULL PAGE: only the logos top left, the board fills the whole page */
.rd-fullbtn { margin-left: auto; background: #4FD1FF; color: #001; font-weight: 900; letter-spacing: .12em; border: 0; border-radius: 8px; padding: 8px 14px; cursor: pointer; }
.rd-fullbtn.exit { background: #E2001A; color: #fff; }
body.rd-full { background: #0B1220; }
body.rd-full header.top { position: fixed; top: 0; left: 0; z-index: 50; padding: 6px 12px; border: 0; background: transparent; width: auto; }
body.rd-full header.top > :not(.brand, .brand-text) { display: none !important; }
body.rd-full header.top .brand-logo { height: 40px; width: auto; }
body.rd-full header.top .brand-text { color: #E6ECF7; }
body.rd-full :is(#search, #test-banner, .group-subnav, #view > .subnav) { display: none !important; }
body.rd-full main:has(.rd-page) { max-width: none; padding: 0; margin: 0; }
body.rd-full .rd-page { margin: 0; border-radius: 0; min-height: 100vh; padding: 8px 12px 16px; }
body.rd-full .rd-head { padding-left: 360px; min-height: 52px; }
@media (max-width: 1100px) { body.rd-full .rd-head { padding-left: 0; padding-top: 56px; } }
body.rd-full .logo-rotator .rot-jarvis { display: none !important; }
body.rd-full .logo-rotator img.rot-item:first-child { opacity: 1 !important; visibility: visible !important; transform: none !important; position: static !important; }
body.rd-full .rd-b { min-height: max(42px, calc((100vh - 330px) / 12 - 5px)); font-size: 18px; }
body.rd-full .rd-n { min-height: max(54px, calc((100vh - 600px) / 4)); }
body.rd-full .rd-n b { font-size: 30px; }
body.rd-full .rd-t { min-height: 44px; font-size: 15px; }

/* ---------- technical commissioners (2026-11-29) ---------- */
.req-thread { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.req-thread li { padding: 8px 10px; border-radius: 8px; background: var(--card-2, #f3f5f9); border-left: 4px solid #8a98b6; max-width: 720px; }
.req-thread li.staff { border-left-color: #E2001A; }
.req-thread li.team { border-left-color: #0057FF; margin-left: 24px; }
.req-thread small { display: block; color: var(--muted, #667); margin-bottom: 2px; }
.req-photo { display: block; margin-top: 6px; max-width: 260px; max-height: 200px; border-radius: 6px; border: 1px solid var(--line, #ddd); object-fit: cover; }
.req-verify { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: #fff4d6; color: #5a4200; font-weight: 600; }
.req-reply-box { margin-top: 8px; }
.req-reply-box summary { cursor: pointer; font-weight: 600; }
.req-reply { display: grid; gap: 6px; margin-top: 6px; max-width: 720px; }
.req-reply textarea { width: 100%; }
.req-file { font-size: 14px; }
.eq-expired, td.eq-expired, input.eq-expired { color: #c00 !important; font-weight: 700; }
.tk-search { width: 100%; max-width: 560px; margin: 6px 0 12px; font-size: 16px; }
.tk-car summary { cursor: pointer; font-size: 17px; display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap; }
.tk-num { font-size: 20px; }
.tk-open { margin-left: auto; font-size: 13px; }
.tk-car h3 { font-size: 14px; margin: 14px 0 4px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted, #556); }
.tk-table td, .tk-table th { font-size: 13.5px; padding: 4px 8px; }
.tk-table td.mono, .tk-table .mono { font-family: ui-monospace, Menlo, monospace; }
.tk-bad { color: #c00; font-weight: 700; }
.tk-warn { color: #a05a00; font-weight: 600; }
.ta-filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0 12px; }
.ta-filter button.on { outline: 2px solid currentColor; }
.ta-group h2 { display: flex; align-items: center; gap: 8px; font-size: 17px; margin: 0 0 6px; }
.ta-row { display: grid; grid-template-columns: 18px 56px 1fr; gap: 8px; align-items: baseline; padding: 7px 6px; border-top: 1px solid var(--line, #e3e6ee); color: inherit; text-decoration: none; }
.ta-row:hover { background: rgba(0,87,255,.05); }
.ta-row .ta-sev { font-size: 14px; }
.ta-bad .ta-sev { color: #E2001A; }
.ta-warn .ta-sev { color: #E5A000; }
.ta-car { font-size: 16px; }
.ta-what small { display: block; color: var(--muted, #667); }
.ok-big { font-size: 18px; color: #0a7a3a; font-weight: 700; }
@media print { header.top, #search, .group-subnav, .ta-filter, .hint { display: none !important; } .ta-row { break-inside: avoid; } }
.ta-filter select { width: auto; min-width: 220px; }

/* ---- demo site (NES_DEMO): banner and role buttons on the login page */
.demo-bar { position: sticky; top: 0; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; gap: .35rem 1rem; padding: .4rem 1rem;
  background: repeating-linear-gradient(-45deg, #ffcc00 0 14px, #ffd633 14px 28px); color: #111; font-size: .85rem; }
.demo-bar strong { background: #111; color: #ffcc00; padding: .1rem .5rem; border-radius: 4px; letter-spacing: .08em; }
.demo-bar .demo-txt { flex: 1 1 18rem; }
.demo-bar a { color: #111; font-weight: 600; text-decoration: underline; white-space: nowrap; }
.demo-bar a.demo-cta { background: #111; color: #fff; text-decoration: none; padding: .2rem .7rem; border-radius: 999px; }
body.demo-site.rd-full .demo-bar { display: none; }
.demo-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); gap: .5rem; margin: .75rem 0; }
.demo-role { display: flex; gap: .6rem; align-items: center; text-align: left; padding: .6rem .75rem; min-height: 3.4rem; }
.demo-role .ico { font-size: 1.5rem; }
.demo-role strong { display: block; }
.demo-role small { display: block; color: #fff; opacity: .85; font-weight: 400; font-size: .78rem; line-height: 1.2; }
.demo-mail summary { cursor: pointer; }
.demo-mail-body { white-space: pre-wrap; font: inherit; font-size: .9rem; margin: .5rem 0; }
body.demo-site .synetco-corner { top:calc(52px + env(safe-area-inset-top)); }
body.demo-site .login-stripes { top:40px; }
