
/* Layout idea: app shell — slim top bar, regatta cards on a cool grey canvas, navy event band per regatta, Race Office with left rail. */
:root {
  --navy: #022E5F;
  --red: #DA291C;
  --bg: #F4F6FA;
  --surface: #FFFFFF;
  --ink: #0E1B2E;
  --muted: #5A6A80;
  --line: #E2E7EF;
  --tint: #EAF0F8;
  --tint-red: #FDECEA;
  --bistre: #A65B2A;
  --ok: #157A4C; --ok-bg: #E5F5EC;
  --warn: #9A5B00; --warn-bg: #FFF3DD;
  --bad: #B42318; --bad-bg: #FDECEA;
  --info: #1D4E89; --info-bg: #E6EEF9;
  --band: #022E5F; --band-ink: #FFFFFF;
  --shadow: 0 1px 2px rgba(2,46,95,.06), 0 6px 20px rgba(2,46,95,.06);
  --radius: 16px;
  --font: "Poppins", "Segoe UI", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --navy: #8FB4E8; --red: #FF6B5E; --bg: #0A1220; --surface: #111C2D; --ink: #E7EDF6; --muted: #93A2B8;
    --line: #22314A; --tint: #18263C; --tint-red: #3A1A1A; --bistre: #D9925E;
    --ok: #5BD39A; --ok-bg: #12301F; --warn: #F2B65A; --warn-bg: #33260F; --bad: #FF8A80; --bad-bg: #3A1A1A; --info: #8FB4E8; --info-bg: #18263C;
    --band: #0E2747; --band-ink: #FFFFFF; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --navy: #8FB4E8; --red: #FF6B5E; --bg: #0A1220; --surface: #111C2D; --ink: #E7EDF6; --muted: #93A2B8;
  --line: #22314A; --tint: #18263C; --tint-red: #3A1A1A; --bistre: #D9925E;
  --ok: #5BD39A; --ok-bg: #12301F; --warn: #F2B65A; --warn-bg: #33260F; --bad: #FF8A80; --bad-bg: #3A1A1A; --info: #8FB4E8; --info-bg: #18263C;
  --band: #0E2747; --band-ink: #FFFFFF; --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.25); color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: var(--navy); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; font-weight: 600; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.grid-2 { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.spacer { flex: 1; }

/* Top bar */
.top { border-top: 3px solid #DA291C; position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 18px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: var(--band); display: grid; place-items: center; position: relative; overflow: hidden; }
.brand-mark::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: #DA291C; }
.brand b { display: block; font-size: 14px; letter-spacing: .02em; }
.brand span { display: block; font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.nav a[aria-current="page"], .nav a:hover { color: var(--ink); background: var(--tint); }
.iconbtn { position: relative; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; }
.dot { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #DA291C; color: #fff; font-size: 10px; font-weight: 600; display: grid; place-items: center; }
@media (max-width: 760px) { .nav { display: none; } .brand .bt > span { display: none; } }
.mnav { display: none; }
@media (max-width: 760px) { .mnav { display: flex; gap: 6px; overflow-x: auto; padding: 8px 20px; border-top: 1px solid var(--line); } .mnav a { white-space: nowrap; text-decoration: none; color: var(--muted); padding: 6px 12px; border-radius: 8px; background: var(--tint); font-size: 13px; } .mnav a[aria-current="page"] { background: var(--navy); color: #fff; } }

/* Buttons & chips */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 9px 16px; border-radius: 12px; font-size: 14px; font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--navy); }
.btn.primary { background: #DA291C; border-color: #DA291C; color: #fff; }
.btn.primary:hover { filter: brightness(1.05); }
.btn.navy { background: #022E5F; border-color: #022E5F; color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 8px; background: var(--tint); color: var(--info); white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.neutral { background: var(--tint); color: var(--muted); }
.chip.live::before { content: ""; width: 7px; height: 7px; border-radius: 28%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
@media (prefers-reduced-motion: reduce) { .chip.live::before { animation: none; } }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; min-width: 0; }
.card.flat { box-shadow: none; }
.card h3 { font-size: 17px; }
.ico { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--navy); flex: none; }
.ico.red { background: var(--tint-red); color: var(--red); }
.ico.green { background: var(--ok-bg); color: var(--ok); }
.ico.amber { background: var(--warn-bg); color: var(--warn); }
.ico.sm { width: 36px; height: 36px; border-radius: 10px; }

/* Hero */
.hero { padding: 36px 0 8px; }
.hero h1 { font-size: clamp(26px, 4vw, 38px); letter-spacing: -.01em; }
.eyebrow { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--bistre); font-weight: 600; margin-bottom: 8px; }
.lede { color: var(--muted); max-width: 62ch; margin: 10px 0 0; }
.next { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; background: var(--band); color: var(--band-ink); border-radius: var(--radius); padding: 20px 24px; margin-top: 24px; }
.next .datebox { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 14px; text-align: center; min-width: 74px; }
.next .datebox b { display: block; font-size: 26px; line-height: 1; }
.next .datebox span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; opacity: .8; }
.next .count { text-align: right; }
.next .count b { font-size: 30px; display: block; line-height: 1; }
@media (max-width: 640px) { .next { grid-template-columns: auto 1fr; } .next .count { grid-column: 1 / -1; text-align: left; } }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 28px 0 16px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 6px 12px; border-radius: 9px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }
.search { flex: 1; min-width: 200px; position: relative; }
.search input { width: 100%; padding: 10px 14px 10px 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.rcard { display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: transform .15s, border-color .15s; text-align: left; }
.rcard:hover { border-color: var(--navy); }
@media (prefers-reduced-motion: no-preference) { .rcard:hover { transform: translateY(-2px); } }
.rcard .when { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.rcard h3 { font-size: 18px; }
.meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.meta span { display: inline-flex; gap: 6px; align-items: center; }
.rcard .foot { display: flex; gap: 8px; align-items: center; border-top: 1px solid var(--line); padding-top: 14px; margin-top: auto; }

/* Event band */
.band { background: var(--band); color: var(--band-ink); padding: 28px 0 0; }
.band a { color: #fff; }
.band .crumbs { font-size: 13px; opacity: .8; margin-bottom: 14px; }
.band h1 { font-size: clamp(22px, 3.4vw, 32px); }
.band .facts { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; opacity: .92; }
.band .facts span { display: inline-flex; gap: 6px; align-items: center; }
.band .chip { background: rgba(255,255,255,.14); color: #fff; }
.band .chip.ok { background: #2FB37A; color: #fff; }
.band .chip.warn { background: #F2B65A; color: #2B1A00; }
.tabs { display: flex; gap: 4px; margin-top: 22px; overflow-x: auto; scrollbar-width: none; }
.tabs a { color: rgba(255,255,255,.75); text-decoration: none; padding: 12px 16px; font-size: 14px; font-weight: 500; border-radius: 12px 12px 0 0; white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; }
.tabs a[aria-current="page"] { background: var(--bg); color: var(--ink); }
.tabs .count { font-size: 11px; background: rgba(255,255,255,.18); border-radius: 8px; padding: 1px 7px; }
.tabs a[aria-current="page"] .count { background: var(--tint); color: var(--navy); }
.ptl { background: #FFF3DD; color: #5A3600; border: 1px solid #F2C46D; border-radius: 12px; padding: 12px 16px; display: flex; gap: 12px; align-items: center; margin-top: 20px; }
.page { padding: 24px 0 60px; }

/* Tables */
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: var(--tint); }
.docrow { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.docrow:last-child { border-bottom: 0; }
.docrow .title { font-weight: 500; }
.empty { text-align: center; padding: 28px 12px; color: var(--muted); font-size: 14px; }
.section-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.section-h h2 { font-size: 18px; }
.kv { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.kv div b { display: block; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.timeline li::before { content: ""; width: 10px; height: 10px; border-radius: 28%; background: var(--red); margin-top: 7px; flex: none; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field label { font-size: 13px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.field textarea { min-height: 96px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px var(--tint); }
.req::after { content: " *"; color: var(--red); }
.fgrid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.check input { margin-top: 4px; width: 16px; height: 16px; accent-color: #DA291C; }
.err { color: var(--bad); font-size: 13px; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(5,15,30,.55); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.modal { background: var(--bg); border-radius: 20px; width: min(760px, 100%); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.modal .mh { background: var(--surface); border-radius: 20px 20px 0 0; padding: 20px 24px; display: flex; gap: 14px; align-items: center; border-bottom: 1px solid var(--line); }
.modal .mb { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.modal .mf { padding: 16px 24px 24px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.steps { display: flex; gap: 6px; padding: 14px 24px 0; }
.steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--line); }
.steps span.on { background: #DA291C; }
.sig { border: 1.5px dashed var(--muted); border-radius: 12px; background: #fff; touch-action: none; width: 100%; height: 160px; display: block; cursor: crosshair; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 12px; z-index: 80; font-size: 14px; box-shadow: var(--shadow); max-width: calc(100% - 32px); }

/* Race Office */
.office { display: grid; grid-template-columns: 240px 1fr; gap: 24px; padding: 24px 0 60px; }
.rail { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 4px; }
.rail button { display: flex; gap: 10px; align-items: center; border: 0; background: transparent; padding: 10px 12px; border-radius: 12px; cursor: pointer; text-align: left; color: var(--muted); font-weight: 500; font-size: 14px; }
.rail button[aria-current="page"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.rail .badge { margin-left: auto; font-size: 11px; background: #DA291C; color: #fff; border-radius: 8px; padding: 1px 7px; }
@media (max-width: 900px) { .office { grid-template-columns: 1fr; } .rail { position: static; flex-direction: row; overflow-x: auto; } .rail button { white-space: nowrap; } }
.kpis { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi b { font-size: 30px; font-weight: 600; display: block; line-height: 1.1; }
.module { display: flex; flex-direction: column; gap: 12px; cursor: pointer; position: relative; text-align: left; }
.module:hover { border-color: var(--navy); }
.module .tag { position: absolute; top: 18px; right: 18px; }
.module p { margin: 0; color: var(--muted); font-size: 14px; }
.check-list { display: flex; gap: 6px; flex-wrap: wrap; }
.banner { border-radius: 12px; padding: 12px 16px; background: var(--info-bg); color: var(--info); font-size: 14px; display: flex; gap: 10px; align-items: center; }
.banner.warn { background: var(--warn-bg); color: var(--warn); }
.drawer-sec { border-top: 1px solid var(--line); padding-top: 14px; }
footer { border-top: 1px solid var(--line); padding: 24px 0 40px; color: var(--muted); font-size: 13px; }

/* v2 additions */
.clsb { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 7px; border-radius: 9px; font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #fff; flex: none; }
.official { display: inline-flex; gap: 6px; align-items: center; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: #fff; background: #022E5F; padding: 3px 8px; border-radius: 6px; }
:root[data-theme="dark"] .official { background: #2B5A97; }
.alert { display: grid; grid-template-columns: auto 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.alert:last-child { border-bottom: 0; }
.alert.bad .ico { background: var(--bad-bg); color: var(--bad); }
.alert.warn .ico { background: var(--warn-bg); color: var(--warn); }
.series-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.act { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); min-width: 130px; }
.act:hover { border-color: var(--navy); }
.act b { font-size: 13px; }
.act span { font-size: 12px; color: var(--muted); }
.res td, .res th { padding: 8px 10px; text-align: center; }
.res td:nth-child(2), .res th:nth-child(2), .res td:nth-child(3), .res th:nth-child(3) { text-align: left; }
.res .disc { color: var(--muted); text-decoration: line-through; }
.res tr.me td { background: var(--tint); }
.rank { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 28%; font-weight: 600; font-size: 13px; background: var(--tint); }
.rank.r1 { background: #D4A72C; color: #1A1200; } .rank.r2 { background: #B8C2CC; color: #111; } .rank.r3 { background: #C98B5A; color: #1A0E00; }
.callbox { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.call { border-radius: 14px; padding: 16px; background: var(--bad-bg); color: var(--bad); }
.call b { display: block; font-size: 24px; line-height: 1.1; }
.call span { font-size: 13px; }
.call.navy { background: var(--tint); color: var(--navy); }
.lock { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.pick { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); cursor: pointer; }
.pick.on { border-color: #DA291C; box-shadow: 0 0 0 3px var(--tint-red); }
.pick input { margin-top: 4px; accent-color: #DA291C; }
.libchip { display: inline-flex; gap: 8px; align-items: center; padding: 6px 10px 6px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-size: 13px; }
.libchip.on { border-color: #022E5F; background: var(--tint); }
.warnline { font-size: 12px; color: var(--warn); display: flex; gap: 6px; align-items: center; }
.logo-img { height: 36px; width: auto; display: block; }
.sr { position: absolute; left: -9999px; }
.boatcard { display: flex; gap: 12px; align-items: center; }
.tally td.out { color: var(--bad); font-weight: 600; }
.band .act { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.band .act b { color: #fff; }
.band .act span { color: rgba(255,255,255,.7); }
.band .act:hover { border-color: #fff; }

/* Mobile-first app shell */
@media (max-width: 760px) {
  body { padding-bottom: calc(74px + env(safe-area-inset-bottom)); font-size: 15px; }
  .wrap { padding: 0 16px; }
  .mnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 20px rgba(2,46,95,.08); overflow: visible; }
  .mnav a { display: flex; flex-direction: column; align-items: center; gap: 3px; background: transparent !important; border-radius: 12px; padding: 6px 4px; font-size: 11px; color: var(--muted); }
  .mnav a[aria-current="page"] { color: var(--red) !important; background: var(--tint-red) !important; }
  .top .wrap { height: 56px; }
  .hero { padding-top: 22px; }
  .band { padding-top: 18px; }
  .band .facts { gap: 10px; font-size: 13px; }
  .tabs { margin-top: 14px; }
  .tabs a { padding: 10px 12px; font-size: 13px; }
  .page { padding: 16px 0 40px; }
  .card { padding: 18px; border-radius: 14px; }
  .grid, .grid-2 { grid-template-columns: 1fr; gap: 14px; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi b { font-size: 24px; }
  table { font-size: 13px; }
  th, td { padding: 9px 8px; }
  .overlay { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; min-height: 100%; width: 100% !important; }
  .modal .mh { border-radius: 0; position: sticky; top: 0; z-index: 2; padding: 14px 16px; }
  .modal .mb { padding: 16px; }
  .modal .mf { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal .mf .err { flex-basis: 100%; }
  .fgrid { grid-template-columns: 1fr; }
  .toolbar .seg { overflow-x: auto; max-width: 100%; }
  .seg { overflow-x: auto; max-width: 100%; }
  .seg button { white-space: nowrap; }
  .office { padding-top: 12px; }
  .rail { position: sticky; top: 56px; z-index: 20; background: var(--bg); margin: 0 -16px; padding: 6px 16px; }
  .rail .small.muted { display: none; }
  .next { padding: 16px; gap: 12px; }
  .toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
  footer { padding-bottom: 20px; }
  .callbox { grid-template-columns: 1fr 1fr; }
  .call b { font-size: 20px; }
  .docrow { grid-template-columns: auto 1fr; }
  .docrow > .row:last-child { grid-column: 1 / -1; justify-content: flex-start; }
  .res td, .res th { padding: 7px 6px; }
}
@media (min-width: 761px) { .mnav { display: none !important; } }
@media (display-mode: standalone) { .top { padding-top: env(safe-area-inset-top); } }

/* PDF viewer */
.pdfv { position: fixed; inset: 0; z-index: 90; background: #1B2433; display: flex; flex-direction: column; }
.pdfbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top)); background: #022E5F; color: #fff; border-bottom: 3px solid #DA291C; flex-wrap: wrap; }
.pdfbar .iconbtn { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.pdfbar .btn { background: rgba(255,255,255,.1); border-color: transparent; color: #fff; }
.pdfbar .btn:hover { background: rgba(255,255,255,.2); }
.pdftitle { min-width: 0; display: flex; flex-direction: column; }
.pdftitle b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdftitle span { font-size: 12px; opacity: .75; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdfsearch { flex: 0 1 200px; min-width: 140px; }
.pdfsearch input { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; padding-top: 7px; padding-bottom: 7px; }
.pdfsearch input::placeholder { color: rgba(255,255,255,.6); }
.pdfsearch svg { color: rgba(255,255,255,.7); }
.pdfbody { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 14px; -webkit-overflow-scrolling: touch; }
.pdfpage { background: #fff; box-shadow: 0 4px 18px rgba(0,0,0,.35); flex: none; max-width: none; }
.pdfloading { color: #C9D3E0; padding: 60px 0; }
.pdfhits { background: #0E2747; color: #fff; padding: 8px 14px; display: flex; gap: 8px; overflow-x: auto; align-items: center; }
.pdfhits button { flex: none; max-width: 320px; text-align: left; background: rgba(255,255,255,.08); color: #fff; border: 0; border-radius: 10px; padding: 6px 10px; cursor: pointer; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 760px) { .pdfbar { gap: 8px; padding: 8px 10px; } .pdftitle { flex-basis: calc(100% - 110px); order: 0; } .pdfnav { order: 2; } .pdfzoom { order: 3; } .pdfsearch { order: 4; flex: 1 1 100%; } .hide-sm { display: none; } .pdfbody { padding: 10px; } }

/* Event cover images */
.rcover { position: relative; height: 150px; margin: -24px -24px 0; border-radius: 16px 16px 0 0; background: linear-gradient(135deg, #022E5F 0%, #0B4A8B 60%, #1F6FB2 100%); background-size: cover; background-position: center; display: grid; place-items: center; overflow: hidden; }
.rcover::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #DA291C; }
.rcover-mark { color: rgba(255,255,255,.35); }
.rcover-tag:not(:empty) { position: absolute; top: 12px; left: 12px; background: rgba(2,46,95,.85); color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; padding: 4px 9px; border-radius: 8px; }
@media (max-width: 760px) { .rcover { margin: -18px -18px 0; height: 130px; border-radius: 14px 14px 0 0; } }

/* Entries open: high visibility */
.chip.open { background: #DA291C; color: #fff; font-weight: 600; }
.band .chip.open { background: #DA291C; color: #fff; }
.rcard.is-open { border-color: #DA291C; box-shadow: 0 0 0 1px #DA291C, var(--shadow); }
.open-ribbon { position: absolute; right: 12px; bottom: 14px; display: inline-flex; gap: 6px; align-items: center; background: #DA291C; color: #fff; font-size: 12px; font-weight: 600; padding: 6px 11px; border-radius: 8px; box-shadow: 0 4px 12px rgba(218,41,28,.35); }
.openstrip { margin-top: 26px; background: var(--surface); border: 1px solid #DA291C; border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.openstrip-h { display: inline-flex; gap: 10px; align-items: center; font-weight: 600; color: #DA291C; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.pulse { width: 10px; height: 10px; border-radius: 28%; background: #DA291C; box-shadow: 0 0 0 0 rgba(218,41,28,.5); }
@media (prefers-reduced-motion: no-preference) { .pulse { animation: ring 1.8s infinite; } @keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(218,41,28,.5); } 80%, 100% { box-shadow: 0 0 0 10px rgba(218,41,28,0); } } }
.openstrip-list { display: flex; gap: 10px; overflow-x: auto; margin-top: 12px; padding-bottom: 2px; }
.openchip { flex: none; display: flex; gap: 12px; align-items: center; padding: 10px 12px; border-radius: 14px; background: var(--tint-red); text-decoration: none; color: var(--ink); min-width: 260px; }
.openchip > span:nth-child(2) { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.openchip b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.openchip span span { font-size: 12px; color: var(--muted); }
.clsb svg { display: block; }

/* ===== Modern & dynamic layer ===== */
body { overflow-x: clip; }
.hero-x { position: relative; margin: 0 calc(50% - 50vw); padding: 56px calc(50vw - 50% + 0px) 96px; background: radial-gradient(1200px 500px at 85% -10%, rgba(218,41,28,.35), transparent 60%), radial-gradient(900px 500px at 0% 0%, #0A4C8F, transparent 60%), linear-gradient(160deg, #022E5F 0%, #011C3B 100%); color: #fff; overflow: hidden; }
.hero-x .hero-in { position: relative; z-index: 1; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.hero-x .eyebrow { color: #F2B65A; }
.hero-x h1 { font-size: clamp(30px, 5.4vw, 56px); line-height: 1.05; letter-spacing: -.02em; max-width: 16ch; }
.hero-x .hl { background: linear-gradient(90deg, #fff 0%, #FFD7D2 50%, #fff 100%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-x .lede { color: rgba(255,255,255,.82); font-size: 17px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn.glass { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28); backdrop-filter: blur(8px); }
.btn.glass:hover { background: rgba(255,255,255,.2); }
.hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 34px; max-width: 760px; }
.hero-stats > div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; padding: 14px 16px; backdrop-filter: blur(6px); }
.hero-stats b { display: block; font-size: 30px; font-weight: 600; line-height: 1; }
.hero-stats span { font-size: 12px; opacity: .75; text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 640px) { .hero-stats { grid-template-columns: repeat(2, 1fr); } .hero-x { padding-top: 34px; padding-bottom: 80px; } }
.hero-waves { position: absolute; left: -60px; bottom: -2px; width: calc(100% + 120px); height: 140px; }
.hero-waves path { fill: var(--bg); }
.hero-waves .w1 { opacity: .18; } .hero-waves .w2 { opacity: .35; } .hero-waves .w3 { opacity: 1; }
.hero-x + section .next { margin-top: -40px; position: relative; z-index: 2; box-shadow: 0 18px 40px rgba(2,46,95,.25); }
@media (prefers-reduced-motion: no-preference) {
  .hero-waves .w1 { animation: drift 14s ease-in-out infinite alternate; }
  .hero-waves .w2 { animation: drift 10s ease-in-out infinite alternate-reverse; }
  .hero-x .hl { animation: sheen 6s linear infinite; }
  @keyframes drift { from { transform: translateX(-40px); } to { transform: translateX(40px); } }
  @keyframes sheen { from { background-position: 200% 0; } to { background-position: -200% 0; } }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .grid > .card, .kpis > .card, .openstrip, .qa-grid > .card, .hero-stats > div { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
  .grid > .card:nth-child(2), .kpis > .card:nth-child(2), .qa-grid > .card:nth-child(2), .hero-stats > div:nth-child(2) { animation-delay: .06s; }
  .grid > .card:nth-child(3), .kpis > .card:nth-child(3), .qa-grid > .card:nth-child(3), .hero-stats > div:nth-child(3) { animation-delay: .12s; }
  .grid > .card:nth-child(4), .kpis > .card:nth-child(4), .qa-grid > .card:nth-child(4), .hero-stats > div:nth-child(4) { animation-delay: .18s; }
  .grid > .card:nth-child(n+5), .qa-grid > .card:nth-child(n+5) { animation-delay: .24s; }
  .rcard, .module, .qa, .openchip, .libchip, .btn { transition: transform .18s ease, box-shadow .18s ease, border-color .18s, background .18s; }
  .rcard:hover, .module:hover, .qa:hover { transform: translateY(-4px); box-shadow: 0 14px 34px rgba(2,46,95,.16); }
  .openchip:hover { transform: translateY(-2px); }
  .btn:active { transform: scale(.97); }
  .modal { animation: pop .22s cubic-bezier(.2,.7,.2,1) both; }
  @keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
  .vbar-fill { animation: grow .8s cubic-bezier(.2,.7,.2,1) both; transform-origin: bottom; }
  @keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  .smart::before { animation: sheen 8s linear infinite; }
}
.rcard { overflow: hidden; }
.rcard .rcover { transition: transform .5s ease; }
@media (prefers-reduced-motion: no-preference) { .rcard:hover .rcover { transform: scale(1.03); } }

/* Smart entry panel */
.smart { position: relative; border-radius: 16px; padding: 16px 18px; color: #fff; background: linear-gradient(135deg, #022E5F, #0A4C8F 60%, #12325E); overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.smart::before { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.08) 50%, transparent 70%); background-size: 200% 100%; pointer-events: none; }
.smart > * { position: relative; }
.smart select { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; padding: 6px 10px; max-width: 220px; }
.smart select option { color: #0E1B2E; }
.smart-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: #DA291C; }
.smart-sum { margin: 0; font-size: 16px; font-weight: 500; }
.smart-have { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.smart-have span { display: inline-flex; gap: 6px; align-items: flex-start; opacity: .9; }
.smart-have .need { color: #FFD7A8; } .smart-have .ok { color: #B9F0C9; }

/* Rules */
.rule { padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; border-left: 4px solid #022E5F; }
.rule.off { opacity: .55; border-left-color: var(--line); }
.rule-n { width: 26px; height: 26px; border-radius: 8px; background: var(--tint); display: grid; place-items: center; font-weight: 600; font-size: 13px; flex: none; }
.rule-line { gap: 6px; flex-wrap: wrap; }
.rule-kw { font-size: 11px; font-weight: 700; letter-spacing: .08em; color: #022E5F; background: var(--tint); padding: 4px 8px; border-radius: 6px; min-width: 52px; text-align: center; }
.rule-kw.then { color: #DA291C; background: var(--tint-red); }

/* Todo after roll-over */
.todo { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: var(--warn-bg, #FFF4E0); border: 1px solid #E8B65A; }
.todo.done { background: var(--ok-bg); border-color: var(--ok); }

/* Communication centre */
.qa-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.qa { display: flex; flex-direction: column; gap: 6px; text-align: left; cursor: pointer; padding: 18px; }
.qa .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--tint); color: var(--navy); margin-bottom: 4px; }
.qa:hover .ico { background: #022E5F; color: #fff; }

/* Analytics bars */
.vbars { display: flex; gap: 18px; align-items: flex-end; height: 240px; padding: 10px 4px 0; overflow-x: auto; }
.vbar { flex: 1; min-width: 70px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; text-align: center; }
.vbar-fill { width: 100%; max-width: 64px; background: #022E5F; border-radius: 4px 4px 0 0; }
.vbar-fill.live { background: repeating-linear-gradient(135deg, #022E5F 0 6px, #0A4C8F 6px 12px); }
.vbar:hover .vbar-fill { filter: brightness(1.25); }

/* ===== Design v3: navy-led, restrained red, unified controls ===== */
:root { --navy-2: #0A3D78; --ink-navy: #022E5F; --accent: #DA291C; --gold: #C9A46A; --open: #1BA97F; }
:focus-visible { outline-color: var(--navy); }
/* Header: navy, blends into hero and event bands */
.top { border-top: 0; background: rgba(2,30,62,.92); backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid rgba(255,255,255,.08); box-shadow: none; }
.top .brand, .top .brand b { color: #fff; }
.top .brand span { color: rgba(255,255,255,.6); }
.top .nav a { color: rgba(255,255,255,.72); }
.top .nav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.top .nav a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.14); }
.top .iconbtn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); color: #fff; }
.top .iconbtn:hover { background: rgba(255,255,255,.16); }
.top .brand-mark { background: rgba(255,255,255,.1); }
.top .card { color: var(--ink); }

/* Buttons: one system, same height and radius everywhere */
.btn { min-height: 42px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 600; letter-spacing: .01em; justify-content: center; border: 1px solid var(--line); background: var(--surface); color: var(--ink); line-height: 1; }
.btn:hover { border-color: var(--navy); background: var(--tint); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 15px; border-radius: 14px; }
.btn.primary, .btn.navy { background: var(--ink-navy); border-color: var(--ink-navy); color: #fff; }
.btn.primary:hover, .btn.navy:hover { background: var(--navy-2); border-color: var(--navy-2); filter: none; }
.btn.white { background: #fff; border-color: #fff; color: var(--ink-navy); box-shadow: 0 8px 24px rgba(0,0,0,.18); }
.btn.white:hover { background: #F1F5FB; }
.btn.glass { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); color: #fff; }
.btn.glass:hover { background: rgba(255,255,255,.18); border-color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--tint); }
.band .btn.primary { background: #fff; border-color: #fff; color: var(--ink-navy); }
.band .btn:not(.primary) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }

/* Hero with photo */
.hero-x { background: linear-gradient(100deg, rgba(1,24,52,.94) 0%, rgba(2,46,95,.82) 45%, rgba(2,46,95,.35) 100%), var(--hero, linear-gradient(160deg, #022E5F, #011C3B)) center 60% / cover no-repeat; padding-top: 72px; padding-bottom: 110px; }
.hero-x .hl { background: none; -webkit-background-clip: initial; background-clip: initial; color: #fff; animation: none !important; box-shadow: inset 0 -0.16em 0 rgba(218,41,28,.9); }
.hero-x .eyebrow { color: var(--gold); }
.hero-stats { display: flex; gap: 0; margin-top: 40px; max-width: 720px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); border-radius: 18px; backdrop-filter: blur(10px); }
.hero-stats > div { flex: 1; background: none; border: 0; border-radius: 0; padding: 16px 20px; backdrop-filter: none; display: flex; flex-direction: column; gap: 4px; }
.hero-stats > div + div { border-left: 1px solid rgba(255,255,255,.14); }
.hero-stats b { font-size: 32px; letter-spacing: -.02em; }
.hero-stats span { font-size: 11px; letter-spacing: .12em; white-space: nowrap; opacity: .7; }
@media (max-width: 640px) { .hero-stats { flex-wrap: wrap; } .hero-stats > div { flex: 1 1 50%; } .hero-stats > div:nth-child(3) { border-left: 0; } .hero-stats > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.14); } .hero-stats b { font-size: 26px; } }
@media (prefers-reduced-motion: no-preference) { .hero-x { animation: kenburns 30s ease-in-out infinite alternate; background-size: auto, cover; } @keyframes kenburns { from { background-position: center, 50% 55%; } to { background-position: center, 58% 65%; } } }
.hero-x + section .next { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.hero-x + section .next .datebox { background: var(--tint); color: var(--ink-navy); }
.hero-x + section .next .small { opacity: 1; color: var(--muted); }
@media (prefers-color-scheme: dark) { .hero-x + section .next { background: var(--surface); } }

/* Red only as accent */
.chip.open, .band .chip.open { background: var(--ink-navy); color: #fff; gap: 7px; }
.chip.open::before { content: ""; width: 7px; height: 7px; border-radius: 28%; background: var(--open); box-shadow: 0 0 0 3px rgba(27,169,127,.3); }
.band .chip.open { background: #fff; color: var(--ink-navy); }
.rcard.is-open { border-color: var(--line); box-shadow: var(--shadow); }
.rcard.is-open:hover { border-color: var(--ink-navy); }
.open-ribbon { background: rgba(255,255,255,.94); color: var(--ink-navy); box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.open-ribbon svg { color: var(--open); }
.openstrip { border-color: var(--line); }
.openstrip-h { color: var(--ink-navy); }
.pulse { background: var(--open); }
@media (prefers-reduced-motion: no-preference) { @keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(27,169,127,.5); } 80%, 100% { box-shadow: 0 0 0 10px rgba(27,169,127,0); } } }
.openchip { background: var(--tint); }
.openchip .btn { min-height: 32px; }
.rcover::after { display: none; }
.pick.on { border-color: var(--ink-navy); box-shadow: 0 0 0 3px rgba(2,46,95,.12); }
.pick input, .check input { accent-color: var(--ink-navy); }
.steps span.on { background: var(--ink-navy); }
.ico.red { background: var(--tint); color: var(--ink-navy); }
.smart-ico { background: rgba(255,255,255,.16); }
.rule-kw.then { color: #8A4B1F; background: #F7EDE3; }
.mnav a[aria-current="page"] { color: var(--ink-navy) !important; background: var(--tint) !important; }
.libchip.on { border-color: var(--ink-navy) !important; background: var(--tint) !important; }

/* Event cards: photo-led */
.rcover { height: 190px; background-size: cover; background-position: center; }
.rcover::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(2,30,62,0) 45%, rgba(2,30,62,.55)); pointer-events: none; }
.rcover-tag:not(:empty) { background: rgba(255,255,255,.92); color: var(--ink-navy); backdrop-filter: blur(6px); }
@media (max-width: 760px) { .rcover { height: 170px; } }

/* Programme timeline */
.prog { display: flex; flex-direction: column; gap: 18px; }
.prog-day { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: start; }
.prog-date { display: flex; flex-direction: column; align-items: center; padding: 10px 0 8px; border-radius: 14px; background: var(--tint); color: var(--ink-navy); line-height: 1.05; }
.prog-date b { font-size: 24px; font-weight: 600; }
.prog-date span { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
.prog-date em { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 4px; }
.prog-day.today .prog-date { background: var(--ink-navy); color: #fff; }
.prog-day.today .prog-date em { color: rgba(255,255,255,.75); }
.prog-list { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.prog-list li { position: relative; display: flex; gap: 14px; align-items: baseline; padding: 8px 0; }
.prog-list li::before { content: ""; position: absolute; left: -25px; top: 15px; width: 10px; height: 10px; border-radius: 28%; background: var(--surface); border: 2px solid var(--ink-navy); }
.prog-list time { font-weight: 600; color: var(--ink-navy); min-width: 46px; font-size: 14px; }
.prog-list div { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.prog-list b { font-weight: 500; font-size: 15px; }
.prog-list div span { font-size: 13px; color: var(--muted); }
.prog-list li.cx b { text-decoration: line-through; opacity: .6; }
.hero-x .hl { box-shadow: none; }
.hero-x h1 { margin-bottom: 18px; }
.hero-x .eyebrow { display: inline-flex; align-items: center; gap: 10px; }
.hero-x .eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--accent); }
.hero-cta .btn { min-width: 230px; }
@media (max-width: 640px) {
  .lede-more { display: none; }
  .hero-x .lede { font-size: 16px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn { width: 100%; min-width: 0; }
  .hero-stats { display: grid; grid-template-columns: 1fr 1fr; }
  .hero-stats > div { border-left: 0 !important; border-top: 0 !important; }
  .hero-stats > div:nth-child(2n) { border-left: 1px solid rgba(255,255,255,.14) !important; }
  .hero-stats > div:nth-child(n+3) { border-top: 1px solid rgba(255,255,255,.14) !important; }
}

/* ===== Layout robustness: no horizontal scroll, clean wrapping ===== */
html, body { max-width: 100%; overflow-x: hidden; }
.clslist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; }
.clsitem { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.clsitem > span:last-child { min-width: 0; overflow-wrap: break-word; }
.clsitem.wide { grid-column: 1 / -1; }
.tabs { flex-wrap: wrap; overflow: visible; row-gap: 4px; }
.tabs a { border-radius: 12px 12px 0 0; }
.openstrip-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); overflow: visible; }
.openchip { min-width: 0; }
.vbars { overflow: visible; gap: 10px; }
.vbar { min-width: 0; }
.seg { flex-wrap: wrap; max-width: 100%; }
.row { min-width: 0; }
.tablewrap { overflow: visible; }
.tablewrap table { width: 100%; }
.tablewrap td, .tablewrap th { overflow-wrap: break-word; word-break: normal; }
.tablewrap td b, .tablewrap td .title { white-space: normal; word-break: keep-all; }
.fgrid > * { min-width: 0; }
.fgrid input, .fgrid select, .fgrid textarea { width: 100%; min-width: 0; text-overflow: ellipsis; }
.cover-prev { width: 220px; height: 124px; flex: none; border-radius: 12px; background: linear-gradient(135deg, #022E5F, #0B4A8B) center / cover no-repeat; display: grid; place-items: center; color: rgba(255,255,255,.5); }
@media (max-width: 760px) {
  .tablewrap thead { display: none; }
  .tablewrap table, .tablewrap tbody, .tablewrap tr, .tablewrap td { display: block; width: 100%; }
  .tablewrap tr { border: 1px solid var(--line); border-radius: 14px; padding: 10px 14px; margin-bottom: 10px; background: var(--surface); }
  .tablewrap td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border: 0 !important; text-align: right; }
  .tablewrap td::before { content: attr(data-label); font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-align: left; flex: none; max-width: 45%; }
  .tablewrap td[data-label=""]::before { display: none; }
  .tablewrap td[data-label=""] { justify-content: flex-start; }
  .tablewrap td > * { max-width: 100%; }
  .tablewrap tr.empty td, .tablewrap td.empty { justify-content: center; }
  .cover-prev { width: 100%; }
  .qa-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) { .clslist { grid-template-columns: 1fr; } }

/* ===== Accounts ===== */
.nav-cta { background: #fff !important; color: var(--ink-navy) !important; }
.acct-hero { max-width: 860px; margin: 0 auto 22px; text-align: center; }
.acct-hero h1 { font-size: clamp(28px, 4vw, 40px); letter-spacing: -.02em; }
.acct-hero .lede { margin: 10px auto 0; }
.acct-steps { display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.acct-steps span { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; font-weight: 500; }
.acct-steps b { width: 22px; height: 22px; border-radius: 28%; background: var(--ink-navy); color: #fff; display: grid; place-items: center; font-size: 12px; }
.acct-form h3 { font-size: 15px; margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.acct-form h3:first-of-type { border-top: 0; padding-top: 0; }
.meter { height: 6px; border-radius: 8px; background: var(--tint); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, var(--ink-navy), var(--open)); transition: width .4s ease; }
.acct-onb { display: flex; gap: 20px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 20px; background: linear-gradient(120deg, var(--surface), var(--tint)); }
.acct-sum { margin-bottom: 20px; }
.avatar { width: 56px; height: 56px; border-radius: 16px; background: var(--ink-navy); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 20px; text-transform: uppercase; flex: none; }
.res-top { width: 100%; display: flex; align-items: center; gap: 16px; padding: 18px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(120deg, var(--surface), var(--tint)); cursor: pointer; text-align: left; color: var(--ink); margin-bottom: 8px; }
.res-top:hover { border-color: var(--ink-navy); }
.res-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--ink-navy); color: #fff; display: grid; place-items: center; flex: none; }
.res-txt { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.res-txt b { font-size: 17px; }
@media (max-width: 640px) { .res-top { flex-wrap: wrap; } .res-top .btn { width: 100%; } }
.rail-select { display: none; }
@media (max-width: 900px) {
  .rail { display: none !important; }
  .rail-select { display: block; position: sticky; top: 64px; z-index: 5; background: var(--bg); padding: 10px 0; }
  .rail-select select { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 15px; color: var(--ink); }
  .office { grid-template-columns: 1fr !important; }
}

/* Class cards (event page) */
.cls-cards { display: flex; flex-direction: column; gap: 10px; }
.cls-card { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.cls-card.off { opacity: .55; }
.cls-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cls-name { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 600; font-size: 16px; }
.cls-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.cls-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cls-meta svg { color: var(--ink-navy); opacity: .7; }
.cls-count { text-align: center; min-width: 56px; padding: 6px 10px; border-radius: 12px; background: var(--tint); color: var(--ink-navy); display: flex; flex-direction: column; line-height: 1.1; }
.cls-count b { font-size: 20px; }
.cls-count span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
@media (max-width: 480px) { .cls-card { flex-wrap: wrap; } .cls-main { flex-basis: calc(100% - 140px); } }

/* ===== Forms: fix checkbox widths, editor sections, switches, drop zone ===== */
.fgrid input[type="checkbox"], .fgrid input[type="radio"], .check input { width: 16px !important; min-width: 16px; flex: none; }
.span2 { grid-column: 1 / -1; }
.ed-sections { display: flex; flex-direction: column; gap: 14px; }
.ed-sec { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.ed-sec header { display: flex; gap: 12px; align-items: center; }
.ed-sec h4 { margin: 0; font-size: 15px; }
.ed-sec header p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.ed-ico { width: 36px; height: 36px; border-radius: 11px; background: var(--tint); color: var(--ink-navy); display: grid; place-items: center; flex: none; }
.ed-sec .fgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .ed-sec .fgrid { grid-template-columns: 1fr; } .ed-sec { padding: 16px; } }
.seg-full { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 4px; }
.seg-full button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; text-align: left; }
.seg-full button b { font-size: 14px; color: inherit; }
.seg-full button span { font-size: 12px; opacity: .75; }
.switches { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 640px) { .switches { grid-template-columns: 1fr; } }
.switch { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; background: var(--bg); }
.switch:hover { border-color: var(--ink-navy); }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sw { width: 40px; height: 24px; border-radius: 8px; background: #C9D3E0; position: relative; flex: none; transition: background .2s; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 28%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s; }
.switch input:checked + .sw { background: var(--open); }
.switch input:checked + .sw::after { transform: translateX(16px); }
.switch input:focus-visible + .sw { outline: 2px solid var(--ink-navy); outline-offset: 2px; }
.sw-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sw-t b { font-size: 14px; font-weight: 600; }
.sw-t span { font-size: 12px; color: var(--muted); }
.drop { position: relative; display: grid; place-items: center; height: 180px; border-radius: 16px; border: 2px dashed var(--line); background: var(--tint) center / cover no-repeat; cursor: pointer; overflow: hidden; }
.drop:hover { border-color: var(--ink-navy); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-in { display: inline-flex; gap: 8px; align-items: center; padding: 10px 16px; border-radius: 12px; background: rgba(255,255,255,.95); color: var(--ink-navy); font-weight: 600; font-size: 14px; box-shadow: 0 6px 18px rgba(0,0,0,.15); pointer-events: none; }
input[type="file"]::file-selector-button { border: 1px solid var(--line); background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 10px; font: inherit; font-weight: 600; margin-right: 10px; cursor: pointer; }
input[type="file"]::file-selector-button:hover { border-color: var(--ink-navy); }
.modal .mb { background: var(--bg); }
.framing { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.frame-prev { position: relative; height: 190px; max-width: 380px; border-radius: 16px; background-size: cover; background-repeat: no-repeat; cursor: crosshair; box-shadow: var(--shadow); }
.frame-tag { position: absolute; left: 10px; top: 10px; background: rgba(255,255,255,.92); color: var(--ink-navy); font-size: 11px; font-weight: 600; padding: 4px 8px; border-radius: 8px; }
.drop { height: 120px; }
.open-ribbon { top: 12px; right: 12px; bottom: auto; }

/* Highlights & NEW */
.chip.new { background: #DA291C; color: #fff; font-weight: 700; letter-spacing: .06em; font-size: 10.5px; padding: 2px 8px; }
.tabnew { margin-left: 6px; font-size: 9.5px; font-weight: 700; letter-spacing: .06em; background: #DA291C; color: #fff; border-radius: 8px; padding: 2px 6px; }
@media (prefers-reduced-motion: no-preference) { .chip.new, .tabnew { animation: newpulse 2.4s ease-in-out infinite; } @keyframes newpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(218,41,28,.35); } 50% { box-shadow: 0 0 0 4px rgba(218,41,28,0); } } }
.chip.hlc { font-weight: 600; }
.chip.hlc.hl-red { background: #FDECEA; color: #B3261E; }
.chip.hlc.hl-amber { background: #FFF1D6; color: #8A5A00; }
.chip.hlc.hl-blue { background: #E3EEFB; color: #0A3D78; }
.docrow.hl, .alert.hl { border-radius: 14px; padding-left: 14px; padding-right: 14px; margin: 6px 0; }
.docrow.hl-red, .alert.hl-red { background: #FDF3F2; box-shadow: inset 4px 0 0 #DA291C; }
.docrow.hl-amber, .alert.hl-amber { background: #FFF8EA; box-shadow: inset 4px 0 0 #E8A33C; }
.docrow.hl-blue, .alert.hl-blue { background: #F0F6FD; box-shadow: inset 4px 0 0 #0A3D78; }
@media (prefers-color-scheme: dark) { .docrow.hl-red, .alert.hl-red { background: #2A1716; } .docrow.hl-amber, .alert.hl-amber { background: #2A2111; } .docrow.hl-blue, .alert.hl-blue { background: #12223A; } }
.btn.doc-act { min-width: 104px; justify-content: center; gap: 8px; background: var(--surface); border-color: var(--line); color: var(--ink-navy); }
.btn.doc-act:hover { background: var(--ink-navy); border-color: var(--ink-navy); color: #fff; }
.docrow > .row { flex-wrap: nowrap; gap: 8px; }
@media (max-width: 640px) { .docrow { flex-wrap: wrap; } .docrow > .row { width: 100%; justify-content: flex-end; } }

/* Weather */
.wx-now { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: center; margin-top: 14px; }
@media (max-width: 640px) { .wx-now { grid-template-columns: 1fr; } }
.wx-wind { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: 16px; background: var(--ink-navy); color: #fff; }
.wx-wind b { font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.02em; display: block; }
.wx-wind b small { font-size: 16px; font-weight: 500; opacity: .8; }
.wx-wind span { font-size: 13px; opacity: .85; }
.wx-arrow { display: inline-grid; place-items: center; color: inherit; }
.wx-wind .wx-arrow { width: 58px; height: 58px; border-radius: 28%; background: rgba(255,255,255,.12); }
.wx-arrow svg { transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.wx-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; }
.wx-tiles > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 14px; background: var(--tint); color: var(--ink-navy); }
.wx-tiles b { font-size: 17px; }
.wx-tiles span { font-size: 12px; color: var(--muted); }
.wx-hours { display: grid; grid-template-columns: repeat(auto-fill, minmax(62px, 1fr)); gap: 6px; margin-top: 14px; }
.wx-hours > div { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; border-radius: 12px; border: 1px solid var(--line); text-align: center; }
.wx-hours .wx-arrow { color: var(--ink-navy); }
.wx-note { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: #FFF8EA; box-shadow: inset 3px 0 0 #E8A33C; font-size: 14px; }
.chip.live-wx { background: #E3F6EE; color: #0F7A55; }
.chip.live-wx::before { content: ""; width: 7px; height: 7px; border-radius: 28%; background: #1BA97F; margin-right: 6px; display: inline-block; }
.hero-wx { display: inline-flex; gap: 10px; align-items: center; margin-top: 22px; padding: 8px 14px 8px 8px; border-radius: 8px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.18); font-size: 13.5px; backdrop-filter: blur(8px); max-width: 100%; }
.hero-wx .wx-arrow { width: 32px; height: 32px; border-radius: 28%; background: rgba(255,255,255,.16); flex: none; }
.hero-wx b { font-weight: 600; }
.wx-sky { color: var(--muted); line-height: 0; }

/* Race Office: two-level navigation */
.rail-h { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 12px 6px; }
.rail-g { font-size: 11px; font-weight: 600; letter-spacing: .06em; color: var(--bistre); padding: 12px 12px 4px; }
.rail-club { padding: 0 6px 6px; }
.rail-me { display: flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 600; color: var(--ink-navy); background: var(--tint); border-radius: 10px; padding: 8px 10px; margin: 0 4px 4px; }
.evcard { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 108px; margin: 2px 4px 4px; padding: 12px; border-radius: 16px; background: linear-gradient(135deg, #022E5F, #0A4C8F) center / cover no-repeat; color: #fff; cursor: pointer; overflow: hidden; box-shadow: var(--shadow); }
.evcard-t b { display: block; font-size: 14px; line-height: 1.25; }
.evcard-t span { font-size: 12px; opacity: .85; }
.evcard-sw { position: absolute; top: 10px; right: 10px; display: inline-flex; gap: 5px; align-items: center; font-size: 11px; font-weight: 600; background: rgba(255,255,255,.92); color: var(--ink-navy); padding: 4px 8px; border-radius: 8px; }
.evcard select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.evbadge { display: inline-flex; gap: 10px; align-items: center; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); max-width: 360px; }
.evthumb { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #022E5F, #0A4C8F) center / cover; flex: none; }
.evbadge b { display: block; font-size: 13px; }
.evbadge span span { font-size: 12px; color: var(--muted); }
.rail-select select + select { margin-top: 8px; }
/* Event overview */
.ev-hero { display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; padding: 26px 28px; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #022E5F, #0A4C8F) center / cover no-repeat; min-height: 170px; }
.ev-hero h1 { font-size: clamp(22px, 3vw, 32px); margin: 4px 0 8px; }
.ev-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; opacity: .9; }
.ev-facts span { display: inline-flex; gap: 6px; align-items: center; }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kpi.click { cursor: pointer; text-align: left; }
.kpi.click:hover { border-color: var(--ink-navy); }
.check-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ck { width: 22px; height: 22px; border-radius: 28%; display: grid; place-items: center; background: #FDECEA; color: #B3261E; flex: none; }
.ck.ok { background: #E3F6EE; color: #0F7A55; }
/* Access */
.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.role-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.role-card span { font-size: 12.5px; color: var(--muted); }
.role-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.role-opt { text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.role-opt span { font-size: 12px; color: var(--muted); }
.role-opt.on { border-color: var(--ink-navy); box-shadow: 0 0 0 3px rgba(2,46,95,.12); background: var(--tint); }

/* ===== v6: access gate, team racing, event logos, motion ===== */
.gate { max-width: 640px; margin: 36px auto; display: flex; flex-direction: column; gap: 14px; padding: 32px; }
.gate h1 { font-size: 28px; margin: 0; }
.gate-ico { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #0A4C8F, #022E5F); box-shadow: 0 10px 30px rgba(2,46,95,.25); }
.gate-steps { list-style: none; display: flex; gap: 8px; padding: 0; margin: 4px 0; flex-wrap: wrap; }
.gate-steps li { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 6px 12px 6px 6px; border-radius: 8px; background: var(--tint); }
.gate-steps li span { width: 24px; height: 24px; border-radius: 28%; display: grid; place-items: center; background: var(--surface); font-weight: 600; font-size: 12px; }
.gate-steps li.ok { color: var(--ok); background: var(--ok-bg); } .gate-steps li.ok span { background: var(--ok); color: #fff; }
.gate-steps li.cur { color: var(--ink); font-weight: 600; } .gate-steps li.cur span { background: var(--ink-navy, #022E5F); color: #fff; }
.gate-box { border: 1px solid var(--line); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }
.gate-box.ok { border-color: var(--ok); background: var(--ok-bg); }
.acct-who { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--tint); text-align: left; }
.acct-who > span:last-child, .acct-who .spacer { display: flex; flex-direction: column; min-width: 0; }
.acct-who.pick { cursor: pointer; background: var(--surface); width: 100%; } .acct-who.pick:hover { border-color: var(--ink-navy, #022E5F); }
.acct-who .avatar, .req-row .avatar { width: 40px; height: 40px; border-radius: 12px; font-size: 14px; }
.avatar.sm { width: 32px; height: 32px; border-radius: 10px; font-size: 12px; }
.req-card { border-color: #F2B65A; }
.req-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.req-row:first-of-type { border-top: 0; }
.prog-mini { display: grid; grid-template-columns: 112px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; align-items: baseline; }
.prog-mini b { display: flex; flex-direction: column; font-size: 13px; } .prog-mini b span { font-weight: 500; color: var(--muted); font-size: 12px; }
.kpi.click[disabled] { cursor: default; } .kpi.click[disabled]:hover { border-color: var(--line); transform: none; }

/* flags & club badges */
.flag { display: inline-block; flex: none; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 1px rgba(14,27,46,.12); vertical-align: middle; line-height: 0; }
.flag svg { width: 100%; height: 100%; display: block; }
.flag.none { display: inline-grid; place-items: center; font-size: 9px; font-weight: 600; background: var(--tint); color: var(--muted); }
.rel { display: inline-grid; place-items: center; border-radius: 50%; flex: none; vertical-align: middle; }
.rel svg { width: 72%; height: 72%; fill: none; stroke-width: 2.1; stroke-linecap: round; stroke-linejoin: round; }
.rel.twinned { background: #C8102E; } .rel.twinned svg { stroke: #fff; }
.rel.reciprocal { background: #fff; box-shadow: inset 0 0 0 1.6px #1B2B44; } .rel.reciprocal svg { stroke: #1B2B44; }

/* team entry list (public) */
.teamlist { border-radius: 26px; padding: 44px clamp(14px, 4vw, 48px) 34px; color: #fff; background: radial-gradient(900px 380px at 50% -10%, rgba(255,255,255,.10), transparent 60%), linear-gradient(180deg, #17335E, #0A1931); box-shadow: 0 20px 50px rgba(2,30,62,.25); overflow: hidden; }
.tl-head { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 10px; margin-bottom: 30px; }
.tl-eyebrow { letter-spacing: .42em; font-size: 12px; font-weight: 500; text-transform: uppercase; opacity: .85; }
.tl-rule { width: 54px; height: 3px; background: #DA291C; border-radius: 2px; }
.tl-head h2 { font-family: var(--font); font-weight: 600; font-size: clamp(26px, 4.4vw, 46px); line-height: 1.1; margin: 4px 0 0; letter-spacing: -.01em; }
.tl-head p { font-family: var(--font); font-weight: 400; font-size: clamp(15px, 1.9vw, 20px); margin: 0; opacity: .88; }
.tl-card { background: #fff; color: #0E1B2E; border-radius: 22px; padding: 10px clamp(14px, 3vw, 34px) 8px; box-shadow: 0 18px 40px rgba(0,0,0,.25); }
.tl-row { display: grid; grid-template-columns: 56px minmax(0, 1.55fr) minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: center; padding: 15px 0; border-top: 1px solid #E6EAF0; }
.tl-row.tl-th { border-top: 0; border-bottom: 2px solid #0E1B2E; padding: 16px 0 12px; font-size: 11.5px; letter-spacing: .26em; text-transform: uppercase; color: #6B7A90; font-weight: 600; }
.tl-row.tl-th + .tl-row { border-top: 0; }
.tl-n { font-family: var(--font); font-weight: 600; font-size: 22px; color: #C8102E; line-height: 1; font-variant-numeric: tabular-nums; }
.tl-club { display: flex; align-items: center; gap: 10px; min-width: 0; } .tl-club b { font-weight: 600; font-size: 16px; overflow-wrap: break-word; }
.tl-team { color: #4A5A70; font-size: 15px; overflow-wrap: break-word; }
.tl-nat { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; min-width: 0; }
.tl-legend { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 24px; font-size: 14px; letter-spacing: .04em; opacity: .92; }
.tl-legend span { display: inline-flex; align-items: center; gap: 10px; }
@media (max-width: 760px) {
  .tl-row { grid-template-columns: 44px 1fr; row-gap: 6px; padding: 14px 0; }
  .tl-row.tl-th { display: none; } .tl-row.tl-th + .tl-row { border-top: 0; }
  .tl-n { grid-row: span 2; font-size: 24px; align-self: start; }
  .tl-team { grid-column: 2; font-size: 13.5px; } .tl-nat { grid-column: 2; font-size: 13.5px; }
  .tl-team:empty { display: none; }
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .tl-card { background: #F7F9FC; } }

/* social visual (office) */
.vis-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .vis-grid { grid-template-columns: 1fr; } }
.vis-prev { border-radius: 14px; background: var(--tint); display: grid; place-items: center; overflow: hidden; aspect-ratio: 4 / 5; }
.vis-prev.story { aspect-ratio: 9 / 16; max-height: 640px; margin: 0 auto; width: 100%; max-width: 360px; }
.vis-canvas { width: 100%; height: 100%; object-fit: contain; display: block; }
.vis-card { position: sticky; top: 84px; }

/* event logos & emblems */
.evmark { position: relative; display: inline-grid; place-items: center; flex: none; border-radius: 28%; color: #022E5F; line-height: 1; }
.evmark svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.evmark svg .o { fill: #fff; stroke: #022E5F; stroke-width: 1.4; } .evmark svg .i { fill: none; stroke: #C8A15A; stroke-width: .9; } .evmark svg .w { fill: none; stroke: #C8102E; stroke-width: 1.3; stroke-linecap: round; }
.evmark b { position: relative; font-family: var(--font); font-weight: 600; letter-spacing: .02em; margin-top: -6%; }
.evmark.light svg .o { fill: rgba(255,255,255,.96); stroke: rgba(255,255,255,.9); }
.evmark.img { border-radius: 16px; background: #fff; padding: 8%; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.evmark.img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.evmark.light { filter: drop-shadow(0 6px 14px rgba(0,0,0,.25)); }
.rcover { position: relative; }
.rcover-logo { position: absolute; left: 14px; bottom: -22px; z-index: 2; }
.rcard .rcover + .row, .rcard .rcover ~ .row:first-of-type { margin-top: 12px; }
.evcard { position: relative; }
.evcard-logo { position: absolute; top: 10px; left: 10px; z-index: 1; }
.ev-hero { gap: 18px; }
.logo-ed { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.logo-prev { width: 112px; height: 112px; border-radius: 20px; display: grid; place-items: center; background: repeating-conic-gradient(var(--tint) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--line); }

/* ===== motion: modern, smooth, respectful of reduced motion ===== */
@media (prefers-reduced-motion: no-preference) {
  .page > *, .ostage > * { animation: v6rise .55s cubic-bezier(.2,.7,.2,1) both; }
  .page > *:nth-child(2), .ostage > *:nth-child(2) { animation-delay: .06s; } .page > *:nth-child(3), .ostage > *:nth-child(3) { animation-delay: .12s; } .page > *:nth-child(n+4), .ostage > *:nth-child(n+4) { animation-delay: .18s; }
  .grid > .card, .kpis > .card, .qa-grid > *, .role-grid > * { animation: v6rise .6s cubic-bezier(.2,.7,.2,1) both; }
  .grid > .card:nth-child(2), .kpis > .card:nth-child(2) { animation-delay: .07s; } .grid > .card:nth-child(3), .kpis > .card:nth-child(3) { animation-delay: .14s; } .grid > .card:nth-child(4), .kpis > .card:nth-child(4) { animation-delay: .21s; } .grid > .card:nth-child(n+5) { animation-delay: .28s; }
  @supports (animation-timeline: view()) {
    .grid > .card, .tl-row, .docrow, .cls-card { animation: v6rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
  }
  .tl-row:not(.tl-th) { animation: v6row .5s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms + .15s); }
  .card, .btn, .rcard, .kpi, .evcard, .role-opt, .libchip, .acct-who.pick { transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .25s ease, border-color .2s ease, background-color .2s ease, color .2s ease; }
  .card.click:hover, .kpi.click:not([disabled]):hover, .card.qa:hover, .card.module:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(2,46,95,.13); }
  .rcard:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(2,46,95,.14); }
  .rcard .rcover { transition: transform .8s cubic-bezier(.2,.7,.2,1), background-size .8s ease; }
  .btn:not([disabled]):active { transform: scale(.97); }
  .btn.primary, .btn.navy { position: relative; overflow: hidden; }
  .btn.primary::after, .btn.navy::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.28) 50%, transparent 70%); transform: translateX(-120%); transition: transform .7s ease; pointer-events: none; }
  .btn.primary:hover::after, .btn.navy:hover::after { transform: translateX(120%); }
  .tabs a { position: relative; } .tabs a::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; border-radius: 2px; background: #fff; transform: scaleX(0); transition: transform .3s cubic-bezier(.2,.7,.2,1); }
  .tabs a:hover::after, .tabs a[aria-current="page"]::after { transform: scaleX(1); }
  .hero-x::before { content: ""; position: absolute; inset: -20%; background: radial-gradient(600px 300px at 20% 30%, rgba(10,76,143,.45), transparent 60%), radial-gradient(500px 260px at 80% 70%, rgba(242,182,90,.14), transparent 60%); animation: v6float 30s ease-in-out infinite alternate; opacity: .6; pointer-events: none; }
  .ev-hero, .band { background-size: cover; }
  .evmark { animation: v6pop .7s cubic-bezier(.2,1.3,.4,1) both .1s; }
  .gate-ico { animation: v6pop .7s cubic-bezier(.2,1.3,.4,1) both; }
  .modal, .sheet { animation: v6modal .35s cubic-bezier(.2,.8,.2,1) both; }
  .chip.ok, .chip.warn { transition: background-color .3s ease; }
  @keyframes v6rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
  @keyframes v6row { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
  @keyframes v6pop { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }
  @keyframes v6float { from { transform: translate3d(-3%, -2%, 0); } to { transform: translate3d(3%, 3%, 0); } }
  @keyframes v6wave { from { background-position-x: 0; } to { background-position-x: 120px; } }
  @keyframes v6modal { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
}

.hero-x { background-position: center, var(--hero-pos, 50% 60%) !important; padding-bottom: 72px; }
.hero-waves { display: none; }
.hero-ed { height: 190px; border-radius: 16px; background: linear-gradient(160deg, #022E5F, #011C3B) center / cover; display: flex; align-items: flex-end; padding: 18px 22px; color: #fff; font-weight: 600; font-size: 20px; }
.hero-picks { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.hero-pick { height: 84px; border-radius: 12px; border: 2px solid transparent; background-size: cover; cursor: pointer; display: flex; align-items: flex-end; padding: 6px 8px; position: relative; overflow: hidden; }
.hero-pick span { position: relative; color: #fff; font-size: 11.5px; font-weight: 600; text-shadow: 0 1px 4px rgba(0,0,0,.6); text-align: left; }
.hero-pick.on { border-color: var(--ink-navy); box-shadow: 0 0 0 3px rgba(2,46,95,.2); }

/* ===== v7: open system, exports, import, certificates, notifications, team rows ===== */
.exp-menu { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.exp-menu > span { font-size: 12px; color: var(--muted); font-weight: 500; margin-right: 2px; }
.exp-menu > span:empty { display: none; }
.imp-drop { min-height: 96px; }
.imp-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.imp-map label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.open-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.open-card h3 { margin: 0; font-size: 17px; } .open-card p { margin: 0; flex: 1; }
.open-card .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--tint); color: var(--ink-navy); }
.conn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.conn { display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.cert-box { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; background: var(--surface); }
.cert-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.cert-t th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.cert-t td { padding: 6px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.banner.ok { background: var(--ok-bg); color: var(--ok); }
.notify-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; }
.trows { display: flex; flex-direction: column; }
.trow { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 170px) auto auto; gap: 12px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); }
.trow:first-child { border-top: 0; }
.trow-main { display: flex; flex-direction: column; min-width: 0; } .trow-main b { overflow-wrap: anywhere; }
.trow-nat { display: flex; align-items: center; gap: 8px; min-width: 0; }
.tl-n.sm { font-size: 22px; }
@media (max-width: 760px) { .trow { grid-template-columns: 34px minmax(0, 1fr) auto; } .trow-nat { grid-column: 2; } .trow .chip { grid-column: 2; justify-self: start; } .trow > .btn { grid-row: 1; grid-column: 3; } }
.hero-pick::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(1,24,52,.75)); }
.hero-ed { position: relative; }
/* header: account on the right */
.top .wrap { gap: 14px; }
.top-cta { white-space: nowrap; }
.acct-chip { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px 4px 4px; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 500; border: 1px solid rgba(255,255,255,.16); }
.acct-chip:hover, .acct-chip[aria-current="page"] { background: rgba(255,255,255,.18); }
.acct-chip .avatar.sm { width: 30px; height: 30px; border-radius: 28%; font-size: 11.5px; background: #fff; color: var(--ink-navy); }
@media (max-width: 640px) { .top-cta { padding: 7px 10px; font-size: 12.5px; } .acct-chip { padding: 3px; } }
/* round event logos (no white card) */
.evmark.img { background: none; padding: 0; box-shadow: none; border-radius: 18%; }
.evmark.img img { filter: drop-shadow(0 6px 14px rgba(0,0,0,.22)); }
.within { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; padding: 7px 14px; border-radius: 8px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); color: #fff; font-size: 13px; font-weight: 500; text-decoration: none; }
.within:hover { background: rgba(255,255,255,.2); }
.rcover-logo { bottom: 12px; left: 12px; }
.rcard .rcover + .row, .rcard .rcover ~ .row:first-of-type { margin-top: 0; }
.evmark.img.light { box-shadow: 0 0 0 3px rgba(255,255,255,.9), 0 8px 20px rgba(0,0,0,.25); }
/* test accounts */
.test-ribbon { background: #F2B65A; color: #3A2400; font-size: 13px; position: relative; z-index: 60; }
.test-ribbon .wrap { padding-top: 6px; padding-bottom: 6px; gap: 10px; }
.tr-dot { width: 8px; height: 8px; border-radius: 28%; background: #3A2400; }
.test-sw { position: fixed; left: 18px; bottom: 18px; z-index: 70; }
.test-sw.inline { position: relative; left: auto; bottom: auto; }
.test-fab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 8px; border: 0; background: #F2B65A; color: #3A2400; font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: 0 8px 24px rgba(2,30,62,.25); }
.test-menu { position: absolute; bottom: calc(100% + 10px); left: 0; width: min(330px, calc(100vw - 36px)); display: flex; flex-direction: column; gap: 6px; padding: 14px; z-index: 80; }
.test-sw.inline .test-menu { bottom: auto; top: calc(100% + 8px); left: auto; right: 0; }
.test-opt { display: flex; align-items: center; gap: 10px; text-align: left; padding: 9px 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); }
.test-opt > span:last-child { display: flex; flex-direction: column; } .test-opt span span { font-size: 12px; color: var(--muted); }
.test-opt.on { border-color: var(--ink-navy); background: var(--tint); }
@media (max-width: 760px) { .test-sw { bottom: 84px; left: 12px; } .test-ribbon .wrap > span:not(.spacer):not(.tr-dot) { display: none; } }
/* compact Race Office menu: Club / Événement tabs */
.rail { gap: 1px; }
.rail button { padding: 7px 10px; font-size: 14px; border-radius: 10px; }
.rail-g { padding: 10px 10px 3px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; }
.rail-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--tint); border-radius: 12px; margin-bottom: 6px; }
.rail .rail-tabs button { justify-content: center; padding: 8px 6px; font-weight: 600; font-size: 13px; color: var(--muted); }
.rail .rail-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink-navy); box-shadow: var(--shadow); }
.evcard.compact { min-height: 76px; padding: 10px 10px 10px 54px; margin: 2px 0 4px; justify-content: center; }
.evcard.compact .evcard-logo { top: 50%; left: 10px; transform: translateY(-50%); }
.evcard.compact .evcard-sw { top: 6px; right: 6px; padding: 2px 7px; font-size: 10.5px; }
.evcard.compact .evcard-t b { font-size: 13px; padding-right: 54px; }
.rail-club { padding: 0 0 4px; }
/* Régates: readable list */
.reg-list { display: flex; flex-direction: column; gap: 10px; }
.reg-card { padding: 6px 14px; }
.reg-row { display: grid; grid-template-columns: 48px minmax(0, 1fr) 150px 70px 190px auto; gap: 14px; align-items: center; padding: 10px 0; }
.reg-row + .reg-row { border-top: 1px solid var(--line); }
.reg-row.child { padding-left: 22px; grid-template-columns: 48px minmax(0, 1fr) 150px 70px 190px auto; }
.reg-row.child .reg-logo { justify-self: center; }
.reg-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.reg-main b { font-size: 15px; line-height: 1.25; }
.reg-row.series .reg-main b { font-size: 16px; }
.reg-meta { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.reg-chips { display: flex; gap: 4px; flex-wrap: wrap; } .reg-chips:empty { display: none; }
.reg-cls { display: flex; gap: 4px; flex-wrap: wrap; }
.reg-n { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.1; } .reg-n b { font-size: 20px; } .reg-n span { font-size: 11px; color: var(--muted); }
.reg-open { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 8px; padding: 6px 12px; font-size: 12.5px; font-weight: 500; cursor: pointer; justify-self: start; }
.reg-open .dot { width: 8px; height: 8px; border-radius: 28%; background: #B8C2D0; }
.reg-open.on { color: var(--ok); border-color: rgba(21,122,76,.35); background: var(--ok-bg); } .reg-open.on .dot { background: var(--ok); }
.reg-act { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: nowrap; }
.reg-list.past { opacity: .85; }
@media (max-width: 1180px) { .reg-row, .reg-row.child { grid-template-columns: 44px minmax(0, 1fr) auto; } .reg-cls, .reg-n { display: none; } .reg-open { grid-column: 2; } .reg-act { grid-column: 2 / -1; justify-content: flex-start; } }
.reg-row, .reg-row.child { grid-template-columns: 48px minmax(0, 1fr) auto; row-gap: 8px; }
.reg-row.child { padding-left: 18px; }
.reg-meta { display: block; }
.reg-foot { grid-column: 2 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.reg-foot:empty { display: none; }
.reg-cls { display: flex; gap: 6px; flex-wrap: wrap; }
.reg-cls .clsitem { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 3px 9px 3px 3px; border-radius: 8px; background: var(--tint); }
.reg-n { display: inline; font-size: 12.5px; color: var(--muted); } .reg-n b { font-size: 15px; color: var(--ink); }
@media (max-width: 1180px) { .reg-row, .reg-row.child { grid-template-columns: 44px minmax(0, 1fr); } .reg-act { grid-column: 2; justify-content: flex-start; } .reg-cls, .reg-n { display: flex; } .reg-open { grid-column: auto; } }
/* easier to read for everyone */
.rail button { font-size: 15px; padding: 9px 12px; min-height: 40px; }
.rail-g { font-size: 11.5px; color: var(--muted); }
.sec-help { margin: 4px 0 0; color: var(--muted); font-size: 15px; max-width: 70ch; }
.office h1 + .sec-help { margin-top: 2px; }
.card-partners { display: flex; align-items: center; gap: 10px; padding: 10px 0 2px; border-top: 1px dashed var(--line); margin-top: 4px; }
.card-partners > span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.card-partners > div { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.card-partners img { height: 24px; max-width: 90px; object-fit: contain; filter: grayscale(1); opacity: .8; transition: filter .2s, opacity .2s; }
.rcard:hover .card-partners img { filter: none; opacity: 1; }
.card-partners b { font-size: 12px; color: var(--muted); }
.partner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.partner-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; position: relative; }
.partner-item img { height: 40px; max-width: 120px; object-fit: contain; }
.partner-item .btn { position: absolute; top: 4px; right: 4px; padding: 4px; }
.bk-list { display: flex; flex-direction: column; gap: 4px; }
.bk-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); font-size: 13px; }
.bk-row:hover { border-color: var(--ink-navy); }
.ai-feats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ai-feats .card { display: flex; flex-direction: column; gap: 6px; padding: 14px; }
.ai-meter { height: 10px; border-radius: 8px; background: var(--tint); overflow: hidden; }
.ai-meter span { display: block; height: 100%; background: linear-gradient(90deg, #1BA97F, #022E5F); border-radius: 8px; }

/* v9 · Header harmonised: every control 40px high, 12px corners, Poppins 14px; full-screen hero photo */
.top .nav { gap: 6px; }
.top .nav a { display: inline-flex; align-items: center; height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1; }
.top .acct-chip { height: 40px; padding: 0 14px; border-radius: 12px; font-size: 14px; font-weight: 500; line-height: 1; gap: 9px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); }
.top .acct-chip:has(.avatar) { padding-left: 5px; }
.top .acct-chip .avatar.sm { width: 30px; height: 30px; border-radius: 9px; font-size: 11.5px; font-weight: 600; }
.top .top-cta { min-height: 40px; height: 40px; padding: 0 16px; border-radius: 12px; font-size: 14px; font-weight: 600; box-shadow: none; gap: 8px; }
.top .iconbtn { width: 40px; height: 40px; border-radius: 12px; }
.top .brand b { font-size: 14px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.top .brand span { font-size: 11px; font-weight: 500; letter-spacing: .16em; }
@media (max-width: 640px) {
  .top .acct-chip, .top .top-cta, .top .iconbtn { height: 36px; min-height: 36px; font-size: 13px; }
  .top .iconbtn { width: 36px; }
  .top .top-cta { padding: 0 12px; }
  .top .acct-chip:has(.avatar) { padding: 0 3px; }
  .top .acct-chip .avatar.sm { width: 28px; height: 28px; }
}
.hero-x { min-height: calc(100svh - 64px); display: flex; align-items: center; box-sizing: border-box; background: linear-gradient(100deg, rgba(1,24,52,.86) 0%, rgba(2,46,95,.55) 42%, rgba(2,46,95,.12) 100%), linear-gradient(0deg, rgba(1,24,52,.55) 0%, rgba(1,24,52,0) 28%), var(--hero, linear-gradient(160deg, #022E5F, #011C3B)) var(--hero-pos, center 55%) / cover no-repeat; }
.hero-x .hero-in { width: 100%; }
@media (max-width: 760px) { .hero-x { min-height: calc(100svh - 56px - 64px); background: linear-gradient(180deg, rgba(1,24,52,.55) 0%, rgba(1,24,52,.82) 100%), var(--hero, linear-gradient(160deg, #022E5F, #011C3B)) var(--hero-pos, center 55%) / cover no-repeat; } }

/* ===== v10 · Official alerts redesign ===== */
.al { position: relative; display: grid; grid-template-columns: 36px 1fr; gap: 12px; padding: 14px 12px 14px 14px; border-radius: 14px; }
.al + .al { margin-top: 4px; }
.al.clickable { cursor: pointer; }
.al.clickable:hover, .al.clickable:focus-visible { background: var(--tint); outline: none; }
.al-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--tint); color: var(--navy); }
.al.bad .al-ico { background: var(--bad-bg); color: var(--bad); }
.al.warn .al-ico { background: var(--warn-bg); color: var(--warn); }
.al-main { min-width: 0; }
.al-top { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); line-height: 1.3; flex-wrap: wrap; }
.al-type { font-weight: 600; color: var(--ink); letter-spacing: .01em; }
.al-when { margin-left: auto; white-space: nowrap; font-variant-numeric: tabular-nums; }
.al-new { width: 8px; height: 8px; border-radius: 28%; background: var(--red); font-size: 0; flex: none; }
.al-hl { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 8px; background: var(--info-bg); color: var(--info); }
.al.hl-red .al-hl { background: var(--bad-bg); color: var(--bad); }
.al.hl-amber .al-hl { background: var(--warn-bg); color: var(--warn); }
.al.hl-red::before, .al.hl-amber::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 3px; background: var(--red); }
.al.hl-amber::before { background: #E3A13B; }
.al-title { font-size: 15px; font-weight: 500; color: var(--ink); margin-top: 4px; line-height: 1.35; }
.al.is-new .al-title { font-weight: 600; }
.al-meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.al-body { font-size: 13.5px; margin-top: 6px; white-space: pre-wrap; color: var(--ink); }
.alerts-anchor { position: relative; }
.alerts-scrim { display: none; }
.alerts-pop { position: absolute; right: 20px; top: 8px; width: min(420px, calc(100% - 40px)); z-index: 40; padding: 8px; max-height: 72vh; overflow: auto; border-radius: 18px; box-shadow: 0 24px 60px rgba(2,30,62,.28); }
.alerts-head { display: flex; align-items: center; gap: 10px; padding: 8px 8px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; position: sticky; top: -8px; background: var(--surface); z-index: 1; }
.alerts-head b { display: block; font-size: 15px; color: var(--ink); }
.alerts-head div span { display: block; font-size: 12px; color: var(--muted); }
.al-shield { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ink-navy); color: #fff; }
.alerts-grab { display: none; }
.iconbtn.light { width: 34px; height: 34px; border-radius: 10px; background: var(--tint); border-color: transparent; color: var(--ink); }

/* ===== v10 · Layout fix: page keeps its side margins ===== */
.wrap.page { padding-left: 20px; padding-right: 20px; }

/* ===== v10 · Mobile web app ===== */
@media (max-width: 760px) {
  html { -webkit-text-size-adjust: 100%; }
  body { font-size: 14.5px; }
  .wrap, .wrap.page { padding-left: 16px; padding-right: 16px; }
  h1 { font-size: 24px; line-height: 1.15; }
  h2 { font-size: 19px; }
  h3 { font-size: 16px; }
  /* header */
  .top .wrap { gap: 10px; }
  .top .brand { min-width: 0; gap: 9px; }
  .top .brand .bt b { white-space: nowrap; font-size: 13px; }
  .top .top-cta { height: 36px; min-height: 36px; padding: 0 12px; font-size: 13px; }
  .top .top-cta svg { display: none; }
  /* hero */
  .hero-x { padding-top: 28px; padding-bottom: 72px; }
  .hero-x .eyebrow { font-size: 10.5px; letter-spacing: .12em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .hero-x h1 { font-size: 30px; line-height: 1.08; }
  .hero-x .lede { font-size: 15px; }
  .hero-cta { flex-direction: column; gap: 10px; margin-top: 20px; }
  .hero-cta .btn { width: 100%; min-height: 50px; font-size: 15px; }
  .hero-wx { font-size: 12.5px; border-radius: 14px; }
  /* open-now: horizontal carousel */
  .openstrip-list { display: flex !important; flex-direction: row !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px; padding-bottom: 4px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
  .openstrip-list::-webkit-scrollbar { display: none; }
  .openchip { min-width: 78%; scroll-snap-align: start; }
  /* regatta cards: compact */
  .grid { gap: 12px; }
  .rcard { gap: 10px; padding: 14px; }
  .rcard .rcover { margin: -14px -14px 0; height: 132px; border-radius: 14px 14px 0 0; }
  .rcard .rcover-logo { transform: scale(.8); transform-origin: left bottom; }
  .rcard h3 { font-size: 16.5px; line-height: 1.25; }
  .rcard .meta { font-size: 12.5px; }
  .rcard .clslist { display: flex; flex-wrap: wrap; gap: 6px; }
  .rcard .clsitem { font-size: 12px; gap: 5px; padding: 3px 8px 3px 3px; border-radius: 8px; background: var(--tint); }
  .rcard .clsitem svg, .rcard .clsitem img { width: 18px !important; height: 18px !important; }
  .rcard .series-acts { display: none; }
  .rcard .card-partners img { max-height: 20px; }
  .rcard .foot { padding-top: 10px; }
  .rcard .foot .btn { min-height: 36px; }
  /* regatta header band */
  .band { padding-top: 14px; }
  .band .crumbs { font-size: 12px; margin-bottom: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .band h1 { font-size: 21px; }
  .band .facts { font-size: 12.5px; gap: 6px 12px; }
  .tabs { flex-wrap: nowrap !important; overflow-x: auto !important; margin: 14px -16px 0; padding: 0 16px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 10px 13px; font-size: 13.5px; flex: none; }
  .band .acts, .acts { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; gap: 8px; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
  .act { min-width: 112px; flex: none; padding: 8px 12px; }
  /* cards and banners */
  .card { padding: 16px; border-radius: 16px; }
  .banner { flex-wrap: wrap; font-size: 13.5px; }
  .banner > .spacer { flex: 1 1 calc(100% - 30px); min-width: 0; }
  .banner > .btn { flex: 1 1 auto; justify-content: center; }
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  /* alerts: bottom sheet */
  .alerts-scrim { display: block; position: fixed; inset: 0; background: rgba(1,18,40,.45); z-index: 48; animation: v10fade .2s ease both; }
  .alerts-anchor { position: static; padding: 0; }
  .alerts-pop { position: fixed; left: 0; right: 0; bottom: 0; top: auto; width: auto; max-height: 82vh; border-radius: 22px 22px 0 0; padding: 6px 10px calc(16px + env(safe-area-inset-bottom)); z-index: 50; animation: v10sheet .28s cubic-bezier(.2,.8,.2,1) both; }
  .alerts-head { position: sticky; top: -6px; flex-wrap: wrap; padding-top: 18px; }
  .alerts-grab { display: block; position: absolute; top: 7px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line); }
  .al { padding: 12px 8px 12px 10px; }
}
@media (max-width: 380px) {
  .top .brand .bt { display: none; }
  .hero-x h1 { font-size: 27px; }
}
@keyframes v10fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes v10sheet { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .alerts-pop, .alerts-scrim { animation: none; } }

/* v10 · Shapes: rounded rectangles everywhere (no circles or pills) */
.rcover-logo .evmark, .rcover-logo img { border-radius: 14px; }
.hero-wx, .within, .acct-steps span, .gate-steps li, .test-fab { border-radius: 12px; }
.chip, .al-hl, .tabs .count, .rail .badge, .clsitem, .reg-cls .clsitem { border-radius: 7px; }

/* v10 · Regatta header */
.band-head { display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; }
.band-title { min-width: 0; }
.band-tags { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.band-tag { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 7px; background: rgba(255,255,255,.12); color: #fff; }
.band-head h1 { margin: 0; font-size: clamp(24px, 3vw, 34px); line-height: 1.12; letter-spacing: -.01em; }
.band-head .facts { margin-top: 10px; }
.band-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 190px; }
.band-actions .btn { justify-content: center; min-height: 42px; border-radius: 12px; }
.band .band-ghost { background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.22) !important; color: #fff !important; font-weight: 500; }
.band .band-ghost:hover { background: rgba(255,255,255,.18) !important; }
.band-ext { font-size: 13px; opacity: .75; margin-left: 2px; }
.band-head .evmark { border-radius: 18px; }
@media (max-width: 960px) {
  .band-head { grid-template-columns: auto 1fr; }
  .band-actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; min-width: 0; }
  .band-actions .btn { flex: 1 1 auto; }
}
@media (max-width: 760px) {
  .band-head { gap: 12px 14px; align-items: start; }
  .band-head .evmark { width: 58px !important; height: 58px !important; border-radius: 14px; }
  .band-head h1 { font-size: 21px; }
  .band-tags { margin-bottom: 6px; }
  .band-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
  .band-actions .band-enter { grid-column: 1 / -1; min-height: 48px; font-size: 15px; }
  .band-actions .band-display { display: none; }
  .band-actions .btn { min-height: 42px; font-size: 13.5px; }
}

/* ===== v10 · One button scale for the whole platform =====
   sm 36px / 13px · default 44px / 14px · lg 52px / 15px · all 600, rounded rectangles */
.btn { min-height: 44px; height: auto; padding: 0 18px; font-size: 14px; font-weight: 600; line-height: 1.1; border-radius: 12px; gap: 8px; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; font-weight: 600; border-radius: 10px; gap: 6px; }
.btn.lg { min-height: 52px; padding: 0 24px; font-size: 15px; font-weight: 600; border-radius: 14px; }
.btn svg { flex: none; }
.btn.sm svg { width: 15px; height: 15px; }
.btn:not(.sm):not(.lg) svg { width: 17px; height: 17px; }
.btn.lg svg { width: 19px; height: 19px; }
.band .btn, .band-actions .btn, .hero-cta .btn { box-shadow: none; }
.band-actions .btn { min-height: 44px; font-size: 14px; }
.top .top-cta { min-height: 40px; }
.iconbtn { border-radius: 12px; }
@media (max-width: 760px) {
  .btn { min-height: 44px; }
  .btn.sm { min-height: 36px; }
  .btn.lg, .hero-cta .btn { min-height: 50px; font-size: 15px; }
  .band-actions .btn { min-height: 44px; font-size: 14px; }
  .band-actions .band-enter { min-height: 50px; font-size: 15px; }
  .top .top-cta { min-height: 36px; }
}
/* v10 · alerts panel lives outside the sticky header */
.alerts-anchor { position: static; height: 0; }
.alerts-pop { position: fixed; top: 74px; right: max(20px, calc((100vw - 1180px) / 2 + 20px)); z-index: 60; }
.alerts-scrim { z-index: 55; }
@media (min-width: 761px) { .alerts-scrim { display: block; position: fixed; inset: 0; background: transparent; } }
@media (max-width: 760px) {
  .alerts-pop { top: auto; right: 0; left: 0; bottom: 0; z-index: 60; }
  .band .series-acts { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; margin: 14px -16px 0 !important; padding: 0 16px 2px; scrollbar-width: none; }
  .band .series-acts::-webkit-scrollbar { display: none; }
  .band .series-acts .act { min-width: 104px; flex: none; }
  .band-actions { display: flex; flex-wrap: wrap; }
  .band-actions .btn { flex: 1 1 40%; }
  .band-actions .band-enter { flex-basis: 100%; }
}
/* v10 · document rows: same calm highlight as alerts; mobile stacking */
.docrow.hl-red, .docrow.hl-amber, .docrow.hl-blue { background: transparent; box-shadow: inset 3px 0 0 #DA291C; border-radius: 0; }
.docrow.hl-amber { box-shadow: inset 3px 0 0 #E3A13B; }
.docrow.hl-blue { box-shadow: inset 3px 0 0 #0A3D78; }
@media (max-width: 760px) {
  .docrow { grid-template-columns: auto 1fr; align-items: start; gap: 6px 12px; }
  .docrow > :nth-child(3) { grid-column: 2; justify-self: start; }
  .docrow .title { line-height: 1.3; }
}
/* v11 · Home hero: full-width photo, moderate height */
.hero-x { min-height: clamp(440px, 60vh, 620px); padding-top: 56px; padding-bottom: 88px; }
@media (max-width: 760px) { .hero-x { min-height: 0; padding-top: 32px; padding-bottom: 64px; } }

/* v11 · Results: every ranking has the same weight */
.res-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.res-head h2 { margin: 2px 0 2px; font-size: 19px; }
.res-head p { margin: 0; font-size: 13.5px; color: var(--muted); }
.res-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 12.5px; color: var(--muted); padding: 10px 12px; border-radius: 12px; background: var(--tint); margin-bottom: 8px; }
.res-legend span:not(.res-st) { margin-right: 10px; }
.res-group { margin-top: 14px; }
.res-gh { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 2px 6px; border-bottom: 1px solid var(--line); }
.resrow { width: 100%; display: grid; grid-template-columns: 34px 1fr auto auto auto; gap: 12px; align-items: center; padding: 12px 6px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; cursor: pointer; color: var(--ink); font: inherit; border-radius: 0; }
.resrow:last-child { border-bottom: 0; }
.resrow:hover, .resrow:focus-visible { background: var(--tint); outline: none; border-radius: 10px; }
.resrow-cls { display: grid; place-items: center; }
.resrow-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--tint); color: var(--navy); }
.resrow-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.resrow-main b { font-size: 15px; font-weight: 600; }
.resrow-main span { font-size: 12.5px; color: var(--muted); }
.res-st { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 7px; white-space: nowrap; }
.res-st.prov { background: var(--warn-bg); color: var(--warn); }
.res-st.final { background: var(--ok-bg, #E5F5EC); color: var(--ok, #157A4C); }
.res-new { font-size: 11px; font-weight: 600; color: var(--red); white-space: nowrap; }
.resrow-go { font-size: 13px; font-weight: 600; color: var(--navy); white-space: nowrap; padding: 7px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
@media (max-width: 640px) {
  .resrow { grid-template-columns: 30px 1fr auto; gap: 4px 10px; padding: 12px 2px; }
  .resrow-main { grid-column: 2 / 4; }
  .resrow .res-new, .resrow .res-st { grid-column: 2; grid-row: 2; justify-self: start; }
  .resrow .res-new + .res-st { grid-column: 2; grid-row: 3; }
  .resrow-go { grid-column: 3; grid-row: 2; justify-self: end; padding: 6px 10px; }
}
.res-legend { gap: 6px 18px; }
.res-legend .lg { display: inline-flex; align-items: center; gap: 8px; margin: 0 !important; }
.band .act.on { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.75); }
/* v11 · folded result groups */
details.res-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 10px 2px 8px; user-select: none; }
details.res-group > summary::-webkit-details-marker { display: none; }
details.res-group > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin: 0 4px 0 2px; flex: none; }
details.res-group[open] > summary::before { transform: rotate(45deg); }
details.res-group > summary:hover { color: var(--ink); }
.res-count { margin-left: auto; font-size: 11.5px; font-weight: 500; letter-spacing: 0; text-transform: none; color: var(--muted); background: var(--tint); padding: 2px 8px; border-radius: 7px; }
details.res-group:not([open]) { border-bottom: 1px solid var(--line); }
details.res-group:not([open]) > summary { border-bottom: 0; }
.res-more { margin: 2px 0 6px 46px; }
.res-more > summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--navy); padding: 8px 0; list-style: none; }
.res-more > summary::-webkit-details-marker { display: none; }
.res-more > summary::after { content: " ▾"; }
.res-more[open] > summary::after { content: " ▴"; }
@media (max-width: 640px) { .res-more { margin-left: 0; } }
