@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/inter-400.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/inter-500.woff2") format("woff2"); }
/* UA Portal.
   Design tokens and components are the DLX Africa 50by30 Tracker 2.0 system, the same one UA Connect, the Championship Portal and the Nexus CRM use,
   so staff move between the systems without relearning. Inter at two weights (400, 500). Colour themes (navy, indigo, forest, graphite), light and dark,
   and comfortable or compact density are chosen from the account menu and remembered in the browser. Status colours are fixed on purpose:
   each one also carries an icon and a label. The portal's own pieces are in the last section. */


/* ---------- tokens, dark theme, palettes, base ---------- */
/* DLX Africa 50by30 Tracker 2.0: tokens first, then the shell, then components.
   Type is Inter at two weights only (400 and 500): what used to be bold is Medium now. The font files sit in /assets/fonts.
   Brand navy #123454 is the theme colour of dlxafrica.com. The colour theme (Admin, Brand) swaps the sidebar and accent colours; status colours
   are fixed on purpose because each one also carries an icon and a label. */


:root {
  --font: 'Inter', 'Segoe UI', ui-sans-serif, system-ui, -apple-system, Roboto, 'Helvetica Neue', Arial, sans-serif;
  --brand: #123454; --brand-2: #0C2740; --brand-ink: #FFFFFF; --brand-mute: #A9BCD2; --brand-line: rgba(255, 255, 255, .16);
  --side: #0F2B4A; --side-ink: #E3ECF7; --side-mute: #8FA6C2; --side-line: rgba(255, 255, 255, .09); --side-act: rgba(255, 255, 255, .13);
  --bg: #F4F6FA; --surface: #FFFFFF; --surface-2: #F8FAFD; --sunken: #EDF1F7;
  --ink: #0F1B2D; --ink-2: #3D4F66; --ink-3: #5B6C82;
  --line: #E1E7F0; --line-2: #CBD5E3;
  --accent: #1E5FD1; --accent-ink: #FFFFFF; --accent-soft: #E9F0FC; --accent-line: #AFC6EE; --accent-deep: #164AA6;
  --ok: #176B41; --ok-bg: #E3F2E9; --ok-line: #A5D2B6; --ok-mark: #2E9561;
  --watch: #8A5600; --watch-bg: #FBEFD2; --watch-line: #E6C77A; --watch-mark: #D9960B;
  --off: #AE231B; --off-bg: #FBE4E1; --off-line: #EDA9A3; --off-mark: #CF3A30;
  --none: #4A586A; --none-bg: #ECEFF3; --none-line: #CBD3DD; --none-mark: #9AA6B5;
  --c-actual: var(--ink); --c-plan: #256ABF; --c-likely: #5598E7; --c-floor: #86B6EF;
  --shadow: 0 1px 2px rgba(15, 27, 45, .04), 0 6px 18px rgba(15, 27, 45, .05);
  --shadow-lg: 0 12px 44px rgba(15, 27, 45, .26);
  --overlay: rgba(8, 20, 34, .5);
  --r: 12px; --r-sm: 8px; --r-xs: 6px;
  --sw: 248px; --tb: 56px;
  color-scheme: light;
}
html[data-palette="indigo"] { --side: #251B66; --side-mute: #A79DDA; --accent: #5A3FD1; --accent-soft: #EFEBFC; --accent-line: #C7BBF1; --accent-deep: #4630A8; }
html[data-palette="forest"] { --side: #0F3A30; --side-mute: #86B5A6; --accent: #17795D; --accent-soft: #E4F3EE; --accent-line: #A3D2C3; --accent-deep: #0F5E49; }
html[data-palette="graphite"] { --side: #1E2832; --side-mute: #93A2B3; --accent: #35567C; --accent-soft: #E8EEF5; --accent-line: #B3C4D8; --accent-deep: #26405F; }
html[data-theme="dark"] { --brand: #0B1C30; --brand-2: #08162A; --brand-mute: #8FA6C0; --brand-line: rgba(255, 255, 255, .12);
  --side: #0A1A2E; --side-mute: #7F96B2; --side-line: rgba(255, 255, 255, .07); --side-act: rgba(255, 255, 255, .1);
  --bg: #0A1626; --surface: #102235; --surface-2: #142A41; --sunken: #0C1C2E;
  --ink: #EAF0F7; --ink-2: #B4C2D3; --ink-3: #93A4B8; --line: #223850; --line-2: #2F4863;
  --accent: #7FAEF2; --accent-ink: #06182B; --accent-soft: #16304B; --accent-line: #2F5B8A; --accent-deep: #A9C8F6;
  --ok: #6FD39B; --ok-bg: #14301F; --ok-line: #2C6A47; --ok-mark: #4DBB82;
  --watch: #F2BC55; --watch-bg: #38290C; --watch-line: #7A5C1B; --watch-mark: #E0A32E;
  --off: #FF9088; --off-bg: #3B1816; --off-line: #7C3631; --off-mark: #F0675D;
  --none: #B3BFCD; --none-bg: #1B2E44; --none-line: #2F4863; --none-mark: #6A7D94;
  --c-plan: #9CC3F5; --c-likely: #5F93DC; --c-floor: #3F6FB5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); --shadow-lg: 0 12px 44px rgba(0, 0, 0, .6); --overlay: rgba(0, 0, 0, .6); color-scheme: dark; }
html[data-theme="dark"][data-palette="indigo"] { --side: #1A1348; --side-mute: #8F85C4; --accent: #A895F5; --accent-soft: #261F52; --accent-line: #4C3F94; --accent-deep: #C7BBF7; }
html[data-theme="dark"][data-palette="forest"] { --side: #0A2B24; --side-mute: #6FA392; --accent: #5BC7A2; --accent-soft: #123A30; --accent-line: #2A6A58; --accent-deep: #9BE0C8; }
html[data-theme="dark"][data-palette="graphite"] { --side: #141C25; --side-mute: #7D8DA0; --accent: #8EB1DA; --accent-soft: #1B2D42; --accent-line: #36557A; --accent-deep: #B6CDE8; }
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) { --brand: #0B1C30; --brand-2: #08162A; --brand-mute: #8FA6C0; --brand-line: rgba(255, 255, 255, .12);
  --side: #0A1A2E; --side-mute: #7F96B2; --side-line: rgba(255, 255, 255, .07); --side-act: rgba(255, 255, 255, .1);
  --bg: #0A1626; --surface: #102235; --surface-2: #142A41; --sunken: #0C1C2E;
  --ink: #EAF0F7; --ink-2: #B4C2D3; --ink-3: #93A4B8; --line: #223850; --line-2: #2F4863;
  --accent: #7FAEF2; --accent-ink: #06182B; --accent-soft: #16304B; --accent-line: #2F5B8A; --accent-deep: #A9C8F6;
  --ok: #6FD39B; --ok-bg: #14301F; --ok-line: #2C6A47; --ok-mark: #4DBB82;
  --watch: #F2BC55; --watch-bg: #38290C; --watch-line: #7A5C1B; --watch-mark: #E0A32E;
  --off: #FF9088; --off-bg: #3B1816; --off-line: #7C3631; --off-mark: #F0675D;
  --none: #B3BFCD; --none-bg: #1B2E44; --none-line: #2F4863; --none-mark: #6A7D94;
  --c-plan: #9CC3F5; --c-likely: #5F93DC; --c-floor: #3F6FB5;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25); --shadow-lg: 0 12px 44px rgba(0, 0, 0, .6); --overlay: rgba(0, 0, 0, .6); color-scheme: dark; }
  html:not([data-theme="light"])[data-palette="indigo"] { --side: #1A1348; --side-mute: #8F85C4; --accent: #A895F5; --accent-soft: #261F52; --accent-line: #4C3F94; --accent-deep: #C7BBF7; }
  html:not([data-theme="light"])[data-palette="forest"] { --side: #0A2B24; --side-mute: #6FA392; --accent: #5BC7A2; --accent-soft: #123A30; --accent-line: #2A6A58; --accent-deep: #9BE0C8; }
  html:not([data-theme="light"])[data-palette="graphite"] { --side: #141C25; --side-mute: #7D8DA0; --accent: #8EB1DA; --accent-soft: #1B2D42; --accent-line: #36557A; --accent-deep: #B6CDE8; }
}


* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 14px; line-height: 1.5; font-weight: 400; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
html[data-density="compact"] body { font-size: 13.5px; line-height: 1.4; }
html[data-density="compact"] .card { padding: 12px 14px; } html[data-density="compact"] .tbl td { padding: 6px 10px; } html[data-density="compact"] .mrow { padding: 6px 10px; }
html[data-density="compact"] .main { padding-top: 16px; } html[data-density="compact"] .need { padding: 7px 2px; } html[data-density="compact"] .nitem { padding: 8px 12px; }
html[data-density="compact"] .btn { min-height: 32px; padding: 5px 12px; }
b, strong { font-weight: 500; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.012em; line-height: 1.25; }
h1 { font-size: 24px; letter-spacing: -.02em; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); }
p { margin: 0 0 .6em; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); } .ink2 { color: var(--ink-2); }
.num, .tbl, .kpi .v, .ring, .mnum, .pl, .tag.id { font-variant-numeric: tabular-nums; }
.small { font-size: 12.5px; } .xs { font-size: 11.5px; }
.right { text-align: right; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.relpos { position: relative; }
[hidden] { display: none !important; }
.show-sm { display: none; }
svg.i { width: 18px; height: 18px; flex: none; }
svg.i.s16 { width: 16px; height: 16px; } svg.i.s14 { width: 14px; height: 14px; }


/* ---------- shell: sidebar, top bar, page ---------- */
/* ---------- shell: sidebar, top bar, page ---------- */
#top { display: contents; }
.side { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sw); background: var(--side); color: var(--side-ink); display: flex; flex-direction: column; z-index: 50; transition: width .16s ease, transform .2s ease; }
.side :focus-visible { outline-color: #fff; }
.side-brand { height: var(--tb); display: flex; align-items: center; gap: 12px; padding: 0 18px; border-bottom: 1px solid var(--side-line); flex: none; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--brand-ink); min-width: 0; }
.wm { display: flex; flex-direction: column; line-height: 1; font-weight: 500; font-size: 21px; letter-spacing: .02em; color: var(--brand-ink); flex: none; }
.wm i { font-style: normal; font-weight: 500; font-size: 9px; letter-spacing: .36em; margin-top: 3px; color: var(--brand-mute); }
.brand-logo { height: 28px; width: auto; max-width: 150px; display: block; flex: none; object-fit: contain; }
.brand-sub { padding-left: 12px; border-left: 1px solid var(--brand-line); line-height: 1.2; }
.brand-sub b { font-size: 13.5px; font-weight: 500; white-space: nowrap; display: block; }
.brand-sub small { display: block; font-size: 11px; color: var(--side-mute); white-space: nowrap; }
.snav { flex: 1 1 auto; overflow-y: auto; padding: 10px 10px 8px; scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .2) transparent; }
.sgrp { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--side-mute); padding: 14px 10px 5px; font-weight: 500; white-space: nowrap; }
.si { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px 10px; margin: 1px 0; border-radius: 9px; color: var(--side-ink); text-decoration: none; border: 0; background: none; font-size: 14px; text-align: left; position: relative; }
.si:hover { background: rgba(255, 255, 255, .07); }
.si[aria-current="page"] { background: var(--side-act); color: #fff; font-weight: 500; }
.si[aria-current="page"]::before { content: ''; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #fff; }
.si svg.i { opacity: .85; } .si[aria-current="page"] svg.i { opacity: 1; }
.si span.t { flex: 1 1 auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dotn { min-width: 19px; height: 19px; border-radius: 10px; background: #FF8A80; color: #2A0B08; font-size: 11px; font-weight: 500; display: inline-grid; place-items: center; padding: 0 6px; }
.dotn.soft { background: rgba(255, 255, 255, .16); color: #fff; }
.side-foot { flex: none; padding: 10px; border-top: 1px solid var(--side-line); }
.rpt { background: rgba(255, 255, 255, .07); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; font-size: 12px; color: var(--side-mute); }
.rpt b { display: block; color: #fff; font-size: 13px; margin-bottom: 1px; }
.rpt .prog { background: rgba(255, 255, 255, .15); margin-top: 7px; height: 5px; } .rpt .prog > i { background: #fff; }
body.side-min { --sw: 68px; }
body.side-min .side-brand { padding: 0; justify-content: center; } body.side-min .brand-sub, body.side-min .brand-logo, body.side-min .wm i { display: none; }
body.side-min .wm { font-size: 14px; letter-spacing: 0; }
body.side-min .si { justify-content: center; padding: 10px 0; } body.side-min .si span.t, body.side-min .sgrp, body.side-min .rpt { display: none; }
body.side-min .si .dotn { position: absolute; top: 2px; right: 8px; min-width: 15px; height: 15px; font-size: 10px; padding: 0 4px; }
body.side-min .si[aria-current="page"]::before { left: -10px; }
.topbar { position: sticky; top: 0; z-index: 30; margin-left: var(--sw); height: var(--tb); display: flex; align-items: center; gap: 10px; padding: 0 clamp(16px, 3vw, 40px); background: var(--bg); border-bottom: 1px solid var(--line); transition: margin .16s ease; }
.tb-burger { display: none; }
.tb-search { display: flex; align-items: center; gap: 9px; flex: 0 1 380px; min-width: 0; height: 36px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink-3); text-align: left; }
.tb-search:hover { border-color: var(--accent-line); }
.tb-search span.t { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kbd { font-size: 11px; border: 1px solid var(--line-2); border-radius: 5px; padding: 0 5px; color: var(--ink-3); background: var(--surface-2); line-height: 17px; }
.tb-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tb-period { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); padding: 0 12px; height: 32px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); white-space: nowrap; }
.tb-period i { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-mark); } .tb-period.warn i { background: var(--watch-mark); } .tb-period.bad i { background: var(--off-mark); }
.ib { width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; display: inline-grid; place-items: center; color: var(--ink-2); position: relative; }
.ib:hover { background: var(--sunken); }
.ib .dotn { position: absolute; top: 1px; right: 0; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; background: var(--off-mark); color: #fff; }
.user-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px; border-radius: 999px; }
.user-btn:hover { background: var(--sunken); }
.main { margin-left: var(--sw); padding: 24px clamp(16px, 3vw, 40px) 90px; transition: margin .16s ease; }
.main > * { max-width: 1360px; margin-left: auto; margin-right: auto; }
.foot { margin-left: var(--sw); padding: 16px clamp(16px, 3vw, 40px) 40px; border-top: 1px solid var(--line); display: flex; gap: 8px 24px; flex-wrap: wrap; justify-content: space-between; font-size: 12px; color: var(--ink-3); }
.side-scrim { display: none; }
.banner { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-sm); padding: 9px 12px; display: flex; gap: 10px; align-items: flex-start; font-size: 13px; margin-bottom: 16px; }
.banner button { margin-left: auto; }
.banner svg { width: 18px; height: 18px; flex: none; color: var(--accent); margin-top: 1px; }
.banner.warn { background: var(--watch-bg); border-color: var(--watch-line); } .banner.warn svg { color: var(--watch); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head p { margin: 4px 0 0; color: var(--ink-2); max-width: 74ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.eyebrow { display: none; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 26px 0 10px; }
.sec-h h2 { font-size: 15.5px; }


/* ---------- controls ---------- */
/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: 9px; padding: 7px 14px; min-height: 36px; font-weight: 500; font-size: 13.5px; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--sunken); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }
html[data-theme="dark"] .btn.primary:hover { background: var(--accent); filter: brightness(1.1); }
.btn.danger { color: var(--off); border-color: var(--off-line); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--sunken); }
.btn.sm { min-height: 30px; padding: 3px 10px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg.i { width: 16px; height: 16px; }
.linkbtn { background: none; border: 0; color: var(--accent); font-weight: 500; padding: 2px 0; font-size: inherit; text-decoration: none; }
.linkbtn:hover { text-decoration: underline; text-underline-offset: 3px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.in, select.in, textarea.in { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 7px 10px; min-height: 36px; width: 100%; }
textarea.in { min-height: 72px; resize: vertical; }
.in:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.in[readonly], .in[disabled] { background: var(--sunken); color: var(--ink-2); }
.in.sm { min-height: 32px; padding: 4px 8px; width: 130px; text-align: right; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: none; padding: 5px 12px; font-weight: 500; font-size: 13px; color: var(--ink-2); min-height: 32px; display: inline-flex; align-items: center; gap: 6px; }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); } .seg button[aria-pressed="true"] .muted { color: inherit; opacity: .82; }
.toggle { display: inline-flex; gap: 8px; align-items: center; font-weight: 400; font-size: 13.5px; cursor: pointer; }
.toggle input { width: 17px; height: 17px; accent-color: var(--accent); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .in { width: auto; min-width: 140px; }
.filters .search { flex: 1 1 220px; max-width: 340px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 0 0 16px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button, .tabs a { border: 0; background: none; padding: 9px 12px; color: var(--ink-3); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; display: inline-flex; gap: 7px; align-items: center; }
.tabs button:hover, .tabs a:hover { color: var(--ink); }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.tabs .cnt { font-size: 11px; background: var(--sunken); color: var(--ink-2); border-radius: 9px; padding: 0 6px; min-width: 18px; text-align: center; line-height: 17px; }
.tabs .cnt.hot { background: var(--off-mark); color: #fff; }


/* ---------- cards, grids, numbers ---------- */
/* ---------- cards, grids, numbers ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px 18px; min-width: 0; }
.card.flat { box-shadow: none; } .card.sunk { background: var(--surface-2); box-shadow: none; }
.card.tight { padding: 0; overflow: hidden; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-h h3, .card-h h4 { margin: 0; }
.card-h .sub, .sub { color: var(--ink-3); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-hero { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); } .g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.span2 { grid-column: span 2; }
.hero-fig { font-size: 48px; font-weight: 500; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.hero-sub { color: var(--ink-2); margin-top: 6px; }
.kpi { display: flex; flex-direction: column; gap: 3px; }
.kpi .v { font-size: 28px; font-weight: 500; letter-spacing: -.025em; line-height: 1.1; }
.kpi .l { font-size: 12.5px; color: var(--ink-3); }
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g2k { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); } .g2k .kpi .v { font-size: 24px; }
.stat { display: flex; gap: 12px; align-items: center; text-align: left; }
.stat .ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.stat .ico.ok { background: var(--ok-bg); color: var(--ok); } .stat .ico.watch { background: var(--watch-bg); color: var(--watch); } .stat .ico.off { background: var(--off-bg); color: var(--off); } .stat .ico.none { background: var(--none-bg); color: var(--none); }
.stat .v { font-size: 24px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .l { font-size: 12.5px; color: var(--ink-3); }


/* ---------- chips, bars ---------- */
/* ---------- chips, bars ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 2px 9px 2px 7px; font-size: 12px; font-weight: 500; border: 1px solid; white-space: nowrap; line-height: 1.5; }
.chip svg { width: 13px; height: 13px; flex: none; }
.chip.ok { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); } .chip.watch { color: var(--watch); background: var(--watch-bg); border-color: var(--watch-line); }
.chip.off { color: var(--off); background: var(--off-bg); border-color: var(--off-line); } .chip.none { color: var(--none); background: var(--none-bg); border-color: var(--none-line); }
.chip.info { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.chip-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tag { display: inline-block; font-size: 11.5px; font-weight: 500; color: var(--ink-2); background: var(--sunken); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.tag.id { letter-spacing: .01em; }
.tag.acc { background: var(--accent-soft); color: var(--accent); }
.sbar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--sunken); }
.sbar i { display: block; min-width: 3px; border-radius: 3px; }
.sbar .ok, .sq.ok { background: var(--ok-mark); } .sbar .watch, .sq.watch { background: var(--watch-mark); } .sbar .off, .sq.off { background: var(--off-mark); } .sbar .none, .sq.none { background: var(--none-mark); opacity: .75; }
.prog { height: 6px; border-radius: 3px; background: var(--sunken); overflow: hidden; min-width: 60px; }
.prog > i { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); }
.prog.ok > i { background: var(--ok-mark); } .prog.watch > i { background: var(--watch-mark); } .prog.off > i { background: var(--off-mark); } .prog.none > i { background: var(--none-mark); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.sq { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--ok-mark); } .dot.watch { background: var(--watch-mark); } .dot.off { background: var(--off-mark); } .dot.none { background: var(--none-mark); }
.ring { --p: 0; --c: var(--accent); width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(var(--c) calc(var(--p) * 1%), var(--sunken) 0); display: grid; place-items: center; flex: none; }
.ring > span { width: calc(100% - 14px); height: calc(100% - 14px); border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-weight: 500; font-size: 14px; }
.ring.ok { --c: var(--ok-mark); } .ring.watch { --c: var(--watch-mark); } .ring.off { --c: var(--off-mark); } .ring.none { --c: var(--none-mark); }
.ring.sm { width: 40px; height: 40px; } .ring.sm > span { font-size: 11px; width: calc(100% - 9px); height: calc(100% - 9px); }
.ring.lg { width: 92px; height: 92px; } .ring.lg > span { font-size: 22px; }
.spark { display: block; width: 84px; height: 24px; overflow: visible; }
.spark path { fill: none; stroke: var(--ink-3); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; } .spark .tg { stroke: var(--line-2); stroke-dasharray: 3 3; stroke-width: 1.2; }
.spark circle { fill: var(--ink); } .spark.ok path { stroke: var(--ok-mark); } .spark.watch path { stroke: var(--watch-mark); } .spark.off path { stroke: var(--off-mark); }
.spark.ok circle { fill: var(--ok-mark); } .spark.watch circle { fill: var(--watch-mark); } .spark.off circle { fill: var(--off-mark); }


/* ---------- tables ---------- */
/* ---------- tables ---------- */
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 500; padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.tbl-wrap .tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; } .tbl tbody tr.click:hover td { background: var(--surface-2); }
.tbl td.r, .tbl th.r { text-align: right; } .tbl th.c, .tbl td.c { text-align: center; }
.tbl td.c input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--accent); }
.tbl .name { font-weight: 500; min-width: 0; } .tbl .name .sub { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.tbl.fixed { table-layout: fixed; } .tbl-scroll { overflow-x: auto; }
.tbl tr[tabindex]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.tbl a.item-btn { display: inline; }


/* ---------- menus, modal ---------- */
/* ---------- panel (drawer), modal, menus, toast ---------- */
.scrim { position: fixed; inset: 0; background: var(--overlay); z-index: 60; animation: fade .12s ease-out; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--surface); z-index: 61; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: slide .16s ease-out; }
.drawer-h { padding: 16px 20px 0; display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; }
.drawer-h h2 { font-size: 19px; line-height: 1.3; }
.drawer-tabs { padding: 0 20px; margin-top: 12px; border-bottom: 1px solid var(--line); }
.drawer-tabs .tabs { margin: 0; border: 0; }
.drawer-b { padding: 18px 20px 40px; overflow-y: auto; flex: 1 1 auto; }
.modal { position: fixed; z-index: 62; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; animation: pop .14s ease-out; }
.modal.wide { width: min(780px, calc(100vw - 24px)); }
.modal-h { padding: 16px 20px 6px; display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.modal-b { padding: 8px 20px 14px; overflow-y: auto; }
.modal-f { padding: 12px 20px 16px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--line); }
.x { border: 0; background: none; width: 34px; height: 34px; border-radius: 9px; font-size: 22px; line-height: 1; color: var(--ink-2); flex: none; }
.x:hover { background: var(--sunken); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 70; width: 320px; max-width: calc(100vw - 24px); background: var(--surface); border: 1px solid var(--line-2); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; color: var(--ink); }
.menu button, .menu a.mi { display: flex; width: 100%; text-align: left; gap: 10px; align-items: flex-start; border: 0; background: none; padding: 9px 10px; border-radius: 9px; text-decoration: none; color: inherit; }
.menu button:hover, .menu a.mi:hover { background: var(--sunken); }
.menu button[aria-checked="true"] { background: var(--accent-soft); }
.menu .nm { font-weight: 500; } .menu .ds { display: block; font-size: 12px; color: var(--ink-3); }
.menu .menu-me { display: flex; gap: 12px; align-items: center; padding: 10px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu .mh { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 4px; font-weight: 500; }
.menu.wide { width: 400px; }
.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 10px 16px; border-radius: 10px; font-weight: 500; z-index: 90; box-shadow: var(--shadow-lg); max-width: calc(100vw - 24px); }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -48%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }


/* ---------- people (avatars) ---------- */
/* ---------- people, pictures, brand page ---------- */
.av { --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; position: relative; display: inline-flex; align-items: center; justify-content: center; background: var(--tone, var(--brand)); color: #fff; flex: none; overflow: hidden; vertical-align: middle; }
.av b { font-size: calc(var(--s) * .38); font-weight: 500; letter-spacing: .02em; line-height: 1; }
.av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.av.s22 { --s: 22px; } .av.s24 { --s: 24px; } .av.s28 { --s: 28px; } .av.s30 { --s: 30px; } .av.s34 { --s: 34px; } .av.s44 { --s: 44px; } .av.s56 { --s: 56px; } .av.s96 { --s: 96px; }
.av-stack { display: inline-flex; align-items: center; vertical-align: middle; }
.av-stack .av { box-shadow: 0 0 0 2px var(--surface); } .av-stack .av + .av { margin-left: -7px; }
.av.more { background: var(--sunken); color: var(--ink-2); }
.av-line { margin-top: 5px; display: flex; align-items: center; gap: 6px; min-width: 0; }
.av-line .av-name { font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pchip { display: inline-flex; align-items: center; gap: 7px; padding: 2px 11px 2px 3px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--surface); font-size: 13px; max-width: 100%; }
.pchip > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- sign-in and plain pages ---------- */
/* ---------- sign-in and plain pages (server rendered) ---------- */
.login-body { margin: 0; min-height: 100vh; background: var(--bg); }
.login { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.login-hero { background: var(--side); color: var(--brand-ink); padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.login-eyebrow { font-size: 11.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--brand-mute); margin-bottom: 14px; }
.login-hero h1 { font-size: clamp(26px, 3.4vw, 40px); line-height: 1.12; margin: 0 0 14px; max-width: 18ch; font-weight: 500; }
.login-lead { color: var(--brand-mute); font-size: 16px; max-width: 42ch; margin: 0; }
.login-foot { font-size: 12.5px; color: var(--brand-mute); }
.login-card { align-self: center; justify-self: center; width: min(420px, calc(100% - 40px)); padding: 32px 0; }
.login-card h2 { font-size: 24px; margin: 0 0 6px; }
.ms-btn { display: inline-flex; align-items: center; justify-content: center; gap: 12px; width: 100%; background: #FFFFFF; color: #1B1B1B; border: 1px solid #8C8C8C; border-radius: 4px; min-height: 44px; padding: 0 16px; font-size: 15px; font-weight: 500; text-decoration: none; }

/* ---------- responsive ---------- */
/* ---------- responsive ---------- */
@media (max-width: 1180px) { .oprog { width: 120px; } .mrow { grid-template-columns: 30px minmax(0, 1fr) 110px 140px 124px; } .pcards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1000px) {
  .g4, .g3, .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-hero, .g-main { grid-template-columns: minmax(0, 1fr); } .span2 { grid-column: auto; }
  .rep-layout { grid-template-columns: minmax(0, 1fr); } .tb-period { display: none; }
}
@media (max-width: 900px) {
  :root { --sw: 0px; }
  body.side-min { --sw: 0px; }
  .side { width: 276px; transform: translateX(-100%); box-shadow: none; visibility: hidden; transition: transform .18s ease-out, visibility 0s linear .18s; }
  body.side-open .side { transform: none; box-shadow: var(--shadow-lg); visibility: visible; transition: transform .18s ease-out, visibility 0s; }
  body.side-open .side-scrim { display: block; position: fixed; inset: 0; background: var(--overlay); z-index: 49; }
  .tb-burger { display: inline-grid; }
  body.side-min .side-brand { padding: 0 18px; justify-content: flex-start; } body.side-min .brand-sub, body.side-min .brand-logo, body.side-min .wm i { display: initial; }
  body.side-min .si { justify-content: flex-start; padding: 8px 10px; } body.side-min .si span.t, body.side-min .sgrp, body.side-min .rpt { display: initial; }
  .livebar { left: 12px; }
}
@media (max-width: 900px) {
  table.tbl.stackable, .stackable thead, .stackable tbody, .stackable tr, .stackable td { display: block; width: 100%; }
  .stackable thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .stackable tr { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; margin-bottom: 10px; background: var(--surface); }
  .stackable td { border: 0; padding: 4px 0; display: flex; gap: 10px; justify-content: space-between; align-items: baseline; text-align: right; }
  .stackable td::before { content: attr(data-label); color: var(--ink-3); font-size: 12px; text-align: left; flex: none; }
  .stackable td.first { display: block; text-align: left; font-size: 15px; padding-bottom: 6px; } .stackable td.first::before { display: none; }
  .stackable td.noLabel::before { display: none; } .stackable td.r { text-align: right; } .stackable td .prog { width: 55%; min-width: 0; }
  .tbl.fixed { table-layout: auto; } .stackable colgroup { display: none; }
}
@media (max-width: 700px) {
  .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .tiles, .pcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main { padding: 16px 14px 80px; } .topbar { padding: 0 12px; gap: 6px; } .tb-search { flex: 1 1 auto; }
  .tb-search .kbd, .tb-capture .t { display: none; }
  .hero-fig { font-size: 42px; } .gate-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } .result-row { grid-template-columns: 1fr; }
  .hide-sm { display: none !important; } .show-sm { display: inline; }
  .menu { position: fixed; left: 10px; right: 10px; top: 60px; width: auto !important; max-height: calc(100vh - 76px); overflow-y: auto; }
  .modal { top: auto; bottom: 0; left: 0; transform: none; width: 100vw; border-radius: 16px 16px 0 0; max-height: 92vh; animation: none; }
  .doc { padding: 18px 14px; overflow-x: auto; } .doc .kv { grid-template-columns: repeat(2, 1fr); }
  .kvtbl { grid-template-columns: 110px minmax(0, 1fr); } .ladder { grid-template-columns: repeat(3, minmax(0, 1fr)); } .tgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ocard > summary { grid-template-columns: 16px 30px minmax(0, 1fr); } .ocard > summary .oside { grid-column: 3; justify-content: space-between; }
  .oprog { width: auto; flex: 1 1 auto; }
  .mrow { grid-template-columns: 30px minmax(0, 1fr); row-gap: 6px; } .mrow .mnum { text-align: left; grid-column: 2; } .mrow .mprog, .mrow .mmeta { grid-column: 2; justify-content: flex-start; }
  .align-chain { margin-left: 4px; padding-left: 12px; } .align-chain > .ocard::before { left: -12px; width: 10px; }
  .alist .arow { grid-template-columns: minmax(0, 1fr) auto; } .alist .arow .spark { display: none; }
  .cm.reply { margin-left: 22px; } .swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login { grid-template-columns: minmax(0, 1fr); } .login-hero { padding: 28px 22px; gap: 22px; } .login-card { padding: 24px 0 40px; }
  .prof { flex-direction: column; align-items: flex-start; } .people-line .lbl { min-width: 0; }
  .drawer-h { padding: 14px 14px 0; } .drawer-tabs { padding: 0 14px; } .drawer-b { padding: 16px 14px 40px; }
}
@media (pointer: coarse) { .btn, .seg button, .in { min-height: 44px; } .btn.sm { min-height: 38px; } .ib { width: 42px; height: 42px; } }
@media print { .side, .topbar, .foot, .livebar, .toast { display: none !important; } .main { margin: 0; padding: 0; } body { background: #fff; } }


/* ---------- phones ---------- */
/* ---------- phones: stack the headers, never squeeze text into a narrow column ---------- */

/* ---------- tables on narrow screens ---------- */
/* a wide table never pushes the page sideways: its card scrolls instead (the narrow layout above stacks the rows) */
.card:has(> table.tbl) { overflow-x: auto; }


/* ---------- UA Connect additions: helpers, org card, insight rows ---------- */
/* UA Connect additions to the DLX design system. Layout helpers, 360Player-style navigation pieces, dotted-leader insight rows,
   chart marks (palette validated with the dataviz validator), calendar, board, forms. Colours always come from the DLX tokens. */
:root { --vz1: #2a78d6; --vz2: #eb6834; --vz3: #1baf7a; }
html[data-theme="dark"] { --vz1: #3987e5; --vz2: #d95926; --vz3: #199e70; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) { --vz1: #3987e5; --vz2: #d95926; --vz3: #199e70; } }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
.neg { color: var(--off); } .warnt { color: var(--watch); }
.split { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.g2 > .span2 { grid-column: 1 / -1; }
.tiles4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.statlink { color: inherit; text-decoration: none; } .statlink:hover { border-color: var(--accent-line); }
.stat .ico svg { width: 20px; height: 20px; }
.tbl-scroll { overflow-x: auto; }
.tbl caption { text-align: left; }
.tbl tfoot td { font-weight: 500; border-top: 1px solid var(--line-2); background: var(--surface-2); }
.tbl td .chip { margin: 1px 0; }

/* sidebar: organisation card, accordion groups, sub items */
.side-org { padding: 12px 10px 2px; flex: none; }
.org { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; background: rgba(255, 255, 255, .08); border: 1px solid var(--side-line); border-radius: 12px; color: #fff; text-align: left; }
.org:hover { background: rgba(255, 255, 255, .12); }
.org-t { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.org-t b { font-weight: 500; font-size: 13.5px; } .org-t small { color: var(--side-mute); font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.org .chev { width: 14px; height: 14px; opacity: .7; flex: none; }
.side-org .menu { left: 10px; right: auto; top: calc(100% + 4px); width: 300px; }
.side .menu { color: var(--ink); }
.si.gh .chev { margin-left: auto; width: 14px; height: 14px; opacity: .7; }
.si.gh.has { color: #fff; font-weight: 500; }
.si.sub-i { padding-left: 44px; font-size: 13.5px; }
.gb { margin: 1px 0 6px; }
body.side-min .org-t, body.side-min .org .chev, body.side-min .si.gh .chev, body.side-min .gb { display: none; }
body.side-min .side-org { padding: 12px 6px 2px; } body.side-min .org { justify-content: center; padding: 6px 0; }
.side-foot .si { margin: 1px 0; }
.tb-crumb { font-weight: 500; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 24vw; }
.ib.plus { background: var(--accent); color: var(--accent-ink); border-radius: 50%; } .ib.plus:hover { background: var(--accent-deep); }
.av-btn { padding: 0; } .tb-right .relpos { display: flex; }
.ctip { position: fixed; z-index: 95; background: var(--ink); color: var(--surface); padding: 6px 10px; border-radius: 8px; font-size: 12.5px; pointer-events: none; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); line-height: 1.35; }
.ctip[hidden] { display: none; } .ctip b { font-weight: 500; }

/* dotted-leader insight rows */
.dl-row { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; color: inherit; text-decoration: none; }
.dl-l { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.dl-fill { flex: 1 1 auto; border-bottom: 2px dotted var(--line-2); transform: translateY(-4px); min-width: 12px; }
.dl-v { white-space: nowrap; font-variant-numeric: tabular-nums; }
a.dl-row:hover .dl-l { color: var(--accent); }
.dl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--none-mark); flex: none; }
.dl-dot.ok { background: var(--ok-mark); } .dl-dot.watch { background: var(--watch-mark); } .dl-dot.off { background: var(--off-mark); }
.insight-f { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; }
.status-rows { display: grid; }
.status-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 10px; align-items: center; padding: 12px 6px; border-top: 1px solid var(--line); color: inherit; text-decoration: none; }
.status-row:first-child { border-top: 0; } .status-row:hover { background: var(--surface-2); } .status-row b { font-variant-numeric: tabular-nums; }


/* ---------- 0.2 additions: brand, logos, lock box, legal ---------- */
/* ---------- 0.2 additions shared by UA Connect and the Championship Portal ---------- */
.brand-mark { height: 30px; width: auto; max-width: 150px; display: block; flex: none; filter: brightness(0) invert(1); }
.av-logo { border-radius: 9px; object-fit: cover; flex: none; display: block; } .av-logo.s34 { width: 34px; height: 34px; }
.crest { --s: 34px; width: var(--s); height: var(--s); border-radius: 50%; position: relative; display: inline-flex; align-items: center; justify-content: center; background: var(--tone, var(--brand)); color: #fff; flex: none; overflow: hidden; vertical-align: middle; }
.crest b { font-size: calc(var(--s) * .34); font-weight: 500; letter-spacing: .02em; line-height: 1; }
.crest .crest-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 9%; opacity: 0; border-radius: 50%; }
.crest.ok .crest-img { opacity: 1; } .crest.ok b { visibility: hidden; }
.crest.s24 { --s: 24px; } .crest.s34 { --s: 34px; } .crest.s44 { --s: 44px; } .crest.s64 { --s: 64px; } .crest.s72 { --s: 72px; }
.lockbox { display: flex; align-items: center; gap: 12px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid var(--watch-line); background: var(--watch-bg); color: var(--ink); border-radius: var(--r-sm); }
.lockbox > div { flex: 1; min-width: 0; } .lockbox b { display: block; } .lockbox svg { width: 20px; height: 20px; flex: none; color: var(--watch); }
.masked { display: inline-block; color: var(--ink-3); letter-spacing: .08em; background: var(--sunken); padding: 0 8px; border-radius: 6px; font-size: .92em; user-select: none; white-space: nowrap; }
.ib.lockb { width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; justify-content: center; white-space: nowrap; } .ib.lockb svg { width: 17px; height: 17px; flex: none; } .lockb .lbl { font-size: 12.5px; font-weight: 500; }
.lockb.open { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
@media (max-width: 760px) { .lockb .lbl { display: none; } }
.tbl th.c, .tbl td.c { text-align: center; }
.legal { max-width: 68ch; } .legal p { margin: 0 0 10px; } .legal ul { margin: 0 0 10px; padding-left: 20px; } .legal li { margin-bottom: 4px; }
.pt-grp[hidden] { display: none; }
.payopts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.payopt { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; background: var(--surface-2); } .payopt .kvtbl { margin: 8px 0; }
.fr-card { display: flex; gap: 16px; align-items: center; text-align: left; width: 100%; cursor: pointer; font: inherit; color: inherit; }
.fr-card:hover { border-color: var(--accent-line); } .fr-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.fr-card h3 { margin: 0 0 2px; } .fr-stats { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; font-size: 13px; color: var(--ink-2); }
.fr-stats b { color: var(--ink); }
.btn.lg { padding: 12px 26px; font-size: 16px; min-height: 46px; }


/* ---------- UA Portal pieces (server-rendered pages) ---------- */
:root { --target: 44px; }
body.app { min-height: 100vh; }
.main { min-height: calc(100vh - var(--tb) - 62px); }
.main > .banner { margin-bottom: 16px; }
.banner.ok { background: var(--ok-bg); border-color: var(--ok-line); } .banner.ok svg { color: var(--ok); }
.banner.bad { background: var(--off-bg); border-color: var(--off-line); } .banner.bad svg { color: var(--off); }
.banner b { font-weight: 500; }
.foot a { color: inherit; }

/* page heading with actions, and the wording under it */
.page-head h1 { margin: 0; }
.page-head .lead, .lead { color: var(--ink-2); max-width: 74ch; margin: 4px 0 0; font-size: 14px; }
.crumbs { font-size: 12.5px; color: var(--ink-3); margin: 0 0 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.crumbs a { color: var(--ink-3); } .crumbs a:hover { color: var(--accent); }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 22px 0 10px; }
.sec-h h2 { margin: 0; }

/* forms */
form.card, section.card.prose, article.card { max-width: 44rem; }
form.card.full { max-width: none; }
form.card > .field, form.card > fieldset.field, form.card > p, form.card > .grid { margin-bottom: 14px; }
.field input:not([type="checkbox"]):not([type="radio"]), .field select, .field textarea {
  border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 7px 10px; min-height: 36px; width: 100%; }
.field textarea { min-height: 76px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.field input[readonly], .field input[disabled], .field select[disabled] { background: var(--sunken); color: var(--ink-2); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--off-mark); }
.field legend, fieldset.field > legend { font-size: 12.5px; font-weight: 500; color: var(--ink-2); padding: 0; margin-bottom: 4px; }
fieldset.field { border: 0; padding: 0; margin: 0; min-width: 0; }
.opt { color: var(--ink-3); font-weight: 400; }
p.hint, .hint { color: var(--ink-3); font-size: 12.5px; margin: 0 0 4px; }
p.error, .error { color: var(--off); font-size: 12.5px; font-weight: 500; margin: 2px 0 0; }
.field.check { flex-direction: row; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
.field.check input[type="checkbox"], .field.check input[type="radio"] { flex: none; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); }
.field.check > label { font-weight: 400; font-size: 14px; color: var(--ink); flex: 1 1 0; min-width: 0; }
.field.check .error { flex-basis: 100%; }
.radio { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; margin-right: 18px; font-weight: 400; }
.radio input { width: 18px; height: 18px; accent-color: var(--accent); }
input.code { font-size: 26px; letter-spacing: .3em; text-align: center; max-width: 15rem; }
.form-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.actions, .two { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.two { display: grid; grid-template-columns: 1fr; gap: 0 16px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); }
html[data-theme="dark"] .btn-primary:hover { background: var(--accent); filter: brightness(1.1); }
.btn-danger { color: var(--off); border-color: var(--off-line); }
.btn-quiet { border-color: transparent; background: transparent; }
.btn-quiet:hover { background: var(--sunken); }
form.inline { display: inline; margin: 0; }
.inline-form { margin: 10px 0; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.item { padding: 10px 0; border-top: 1px solid var(--line); }
.item:first-child, .item:first-of-type { border-top: 0; }
.prose { line-height: 1.7; }
.prose h2 { margin: 18px 0 6px; } .prose p { margin: 0 0 10px; } .prose ul, .prose ol { margin: 0 0 10px; padding-left: 20px; }
.filter { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 0 0 14px; }
.filter select, .filter input { width: auto; min-width: 150px; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 7px 10px; min-height: 36px; }
.note { margin-top: 4px; }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.table-wrap > table { margin: 0; }
.tbl td .sub { display: block; color: var(--ink-3); font-size: 12.5px; }
.tbl a.rowlink { font-weight: 500; text-decoration: none; } .tbl a.rowlink:hover { text-decoration: underline; }
.role-row { padding: 8px 0; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.role-row > strong { min-width: 9rem; font-weight: 500; }
.role-row .field.check { margin: 0; }
.kv { display: grid; grid-template-columns: minmax(120px, 190px) minmax(0, 1fr); gap: 6px 14px; margin: 0; }
.kv dt { color: var(--ink-3); font-size: 12.5px; padding-top: 2px; } .kv dd { margin: 0; }

/* status chips carry an icon and a word, never colour alone */
.chip.blue, .chip.info { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-line); }
.chip.plain { color: var(--none); background: var(--none-bg); border-color: var(--none-line); }

/* attendance register: one card per child, four big buttons */
.reg-row { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 0 0 10px; min-width: 0; }
.reg-row legend { font-weight: 500; padding: 0 4px; }
.seg { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 6px 0 8px; border: 0; background: none; overflow: visible; }
.seg-opt { position: relative; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.seg-opt span { display: flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 2px; border: 1px solid var(--line-2); border-radius: 9px; background: var(--surface); font-weight: 500; font-size: 13px; }
.seg-opt input:checked + span { color: #fff; border-color: transparent; }
.seg-present input:checked + span { background: var(--ok-mark); }
.seg-late input:checked + span { background: var(--watch); }
.seg-absent input:checked + span { background: var(--off-mark); }
.seg-excused input:checked + span { background: var(--none); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-opt input:disabled + span { opacity: .5; }
@media (min-width: 700px) { .seg-opt span { font-size: 14px; } }

/* the sidebar's switcher and the top bar's PIN state */
.menu .mh small { color: var(--ink-3); font-weight: 400; }
.menu .mi.here, .menu a.mi[aria-current="true"] { background: var(--accent-soft); }
.menu .tick { margin-left: auto; color: var(--accent); flex: none; }
.menu a.mi .av, .menu a.mi .av-logo { flex: none; }
.menu form { margin: 0; }
.menu form button { font: inherit; }
.menu .grp { padding: 8px 10px 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); font-weight: 500; }
.menu .rad[aria-checked="true"]::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); align-self: center; }
.tb-pin { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); font-size: 12.5px; text-decoration: none; white-space: nowrap; }
.tb-pin svg { width: 15px; height: 15px; }
.tb-pin.open { color: var(--ok); background: var(--ok-bg); border-color: var(--ok-line); }
.tb-pin:hover { border-color: var(--accent-line); }
.side-foot .si form { margin: 0; }
.nav-sep { height: 1px; background: var(--side-line); margin: 8px 6px; }
.si .dotn.hot { background: #FF8A80; color: #2A0B08; }

/* sign-in and plain pages */
.login-form .field { margin-bottom: 14px; }
.login-card .lead { margin: 0 0 18px; }
.login-card .or { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12.5px; margin: 16px 0; }
.login-card .or::before, .login-card .or::after { content: ''; flex: 1; border-top: 1px solid var(--line-2); }
.login-card .btn.primary, .login-card .btn-primary { width: 100%; min-height: 44px; font-size: 15px; }
.login-hero .brand-mark { height: 64px; width: auto; max-width: 100%; align-self: flex-start; flex: none; object-fit: contain; }
.login-hero ul { margin: 22px 0 0; padding: 0; list-style: none; color: var(--brand-mute); display: grid; gap: 8px; max-width: 42ch; }
.login-hero li::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-mute); margin-right: 10px; vertical-align: middle; }
.plain-card h1 { margin-bottom: 8px; }
.plain-brand img { height: 34px; width: auto; display: block; }
html:not([data-theme="dark"]) .plain-brand img { filter: none; }

@media (min-width: 700px) { .two { grid-template-columns: 1fr 1fr; } .form-grid.two-col { grid-template-columns: 1fr 1fr; } }
@media (max-width: 700px) { .page-head .actions { width: 100%; } .page-head .actions .btn { flex: 1 1 auto; } .role-row > strong { min-width: 100%; } .kv { grid-template-columns: 1fr; } .kv dt { padding-top: 6px; } }


/* round pictures: eight tones chosen by name (no inline styles) */
.tone0 { --tone: #123454; } .tone1 { --tone: #1E5FD1; } .tone2 { --tone: #176B41; } .tone3 { --tone: #8A5600; }
.tone4 { --tone: #6250D6; } .tone5 { --tone: #AE231B; } .tone6 { --tone: #0F6E78; } .tone7 { --tone: #7A3E9D; }
html[data-theme="dark"] .tone0 { --tone: #2B5A8A; }

/* sidebar groups use details/summary, so they open and close without scripts */
details.ng { margin: 0; }
details.ng > summary { list-style: none; cursor: pointer; }
details.ng > summary::-webkit-details-marker { display: none; }
details.ng > summary .chev { margin-left: auto; width: 14px; height: 14px; opacity: .7; transition: transform .15s; }
details.ng[open] > summary .chev { transform: rotate(90deg); }
details.ng > summary .dotn + .chev { margin-left: 8px; }
body.side-min details.ng .gb { display: none; }
html[data-side="min"] body:not(.side-min) { --sw: 68px; }
.menu[hidden] { display: none !important; }
.topbar .tb-search { cursor: text; }
.tb-search input { border: 0; background: none; outline: 0; flex: 1 1 auto; min-width: 0; padding: 0; height: 100%; color: var(--ink); }
.tb-search input::placeholder { color: var(--ink-3); }
.tb-search:focus-within { border-color: var(--accent); outline: 2px solid var(--accent); outline-offset: 0; }
.tb-search input:focus-visible { outline: 0; }
.ib.plus { background: var(--accent); color: var(--accent-ink); border-radius: 50%; } .ib.plus:hover { background: var(--accent-deep); }
.nav-ico { width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.nav-ico.watch { background: var(--watch-bg); color: var(--watch); } .nav-ico.off { background: var(--off-bg); color: var(--off); }
.menu a.mi { align-items: center; }
.menu a.mi .ds { display: block; }
.menu .menu-me .nm { font-weight: 500; }
.brand-mark { height: 30px; width: auto; max-width: 150px; object-fit: contain; }
@media (max-width: 900px) { html[data-side="min"] body:not(.side-min) { --sw: 0px; } .tb-pin .lbl { display: none; } }
@media (max-width: 700px) { .tb-search { flex: 1 1 auto; } .tb-search .kbd { display: none; } }

/* spacing helpers used by the page templates */
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.sp-top { margin-top: 16px; }
.sp-tight { margin: -4px 0 6px; }
ul.plain { list-style: none; padding: 0; margin: 0; }
.sp-bottom { margin-bottom: 16px; }
details > summary.linkbtn { cursor: pointer; color: var(--accent); font-weight: 500; padding: 6px 0; }
.reg-form .reg-row legend a { color: inherit; }
.policy-grid { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .policy-grid { grid-template-columns: minmax(0, 1fr); } }
.eyebrow { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin: 12px 0 4px; }
legend.eyebrow { margin-top: 0; padding: 0; }
.narrow { max-width: 44rem; }
.card-h .av { width: 28px; height: 28px; font-size: 11px; margin-right: 6px; }
.card-h h3 a { color: inherit; text-decoration: none; } .card-h h3 a:hover { color: var(--accent); }
.pin-grid { align-items: start; }
.login-card .lead { margin-bottom: 14px; }
.login-card .banner { margin-bottom: 14px; }
.login-card h2 { margin: 0 0 6px; }
.login-foot a { color: inherit; text-decoration: underline; }
.menu-note { padding: 8px 12px; }
.plain-card .sp-top { margin-top: 20px; }
@media (max-width: 900px) {
  /* inside the drawer the switcher opens under the org card and fills the drawer width */
  .side-org { position: relative; }
  .side-org .menu { position: absolute; left: 10px; right: 10px; top: calc(100% + 4px); width: auto !important; max-height: 70vh; overflow-y: auto; }
}
.menu { max-height: calc(100vh - 76px); overflow-y: auto; }

/* attendance register: legend inside the card, note box like the other fields */
.reg-row legend { float: left; width: 100%; padding: 0; margin: 0 0 8px; }
.reg-row .seg { clear: both; }
.reg-row input.note { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 7px 10px; min-height: 40px; }
.two { margin-bottom: 14px; }

/* ---------- Phase 2: tags, invoices, messages, previewing ---------- */
.tg { --tone: var(--accent); display: inline-flex; align-items: center; gap: 2px; font-size: 12px; line-height: 1; padding: 4px 4px 4px 9px; border-radius: 999px; border: 1px solid color-mix(in srgb, var(--tone) 40%, var(--line)); background: color-mix(in srgb, var(--tone) 12%, var(--surface)); color: var(--ink); max-width: 100%; }
.thr-t .tg { padding: 4px 9px; margin-left: 4px; }
.tg a { color: inherit; text-decoration: none; font-weight: 500; } .tg a:hover { text-decoration: underline; }
.tg .x { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 16px; line-height: 1; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center; padding: 0; }
.tg .x:hover { background: var(--sunken); color: var(--off); }
form.inline { display: inline; margin: 0; }
.tagbox form.row input[name=name] { flex: 1 1 140px; min-width: 0; }
.tagbox .chip-row { margin-bottom: 10px; }

.g-inv { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.inv-top { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 14px; }
.inv-top p { margin: 0; }
.inv td.r, .inv th.r, .tbl td.r, .tbl th.r { text-align: right; }
.inv tfoot td { border-top: 1px solid var(--line); }
.howto { margin-top: 16px; padding: 14px 16px; border: 1px dashed var(--accent-line); border-radius: var(--r-sm); background: var(--accent-soft); }
.howto p { margin: 0 0 8px; } .howto p:last-child { margin-bottom: 0; }

.g-thread { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
.msgs { display: grid; gap: 14px; margin-bottom: 14px; }
.msg { display: flex; gap: 10px; align-items: flex-start; }
.msg-b { min-width: 0; max-width: 100%; flex: 0 1 auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.msg.mine { flex-direction: row-reverse; }
.msg.mine .msg-b { background: var(--accent-soft); border-color: var(--accent-line); }
.msg-h { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 4px; }
.msg-t { overflow-wrap: anywhere; white-space: normal; }
.reply { border-top: 1px solid var(--line); padding-top: 14px; }
.reply textarea { width: 100%; }
.thread-list { padding: 0; overflow: hidden; }
.thr { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); color: inherit; text-decoration: none; }
.thr:last-child { border-bottom: 0; }
.thr:hover, .thr:focus-visible { background: var(--surface-2); }
.thr-b { display: grid; gap: 1px; min-width: 0; flex: 1 1 auto; }
.thr-s { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr.unread .thr-s { font-weight: 700; } .thr.unread { box-shadow: inset 3px 0 0 var(--accent); }
.thr-w { font-size: 12px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr-p { font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thr-t { flex: none; font-size: 12px; color: var(--ink-3); text-align: right; display: grid; gap: 4px; justify-items: end; }

/* a director looking at the portal as someone else */
.viewbar { position: sticky; top: 0; z-index: 30; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 16px; background: var(--watch-bg); color: var(--ink); border-bottom: 2px solid var(--watch-mark); }
.viewbar > div { flex: 1 1 260px; min-width: 0; }
.viewbar form { margin: 0; }
.viewbar svg { width: 20px; height: 20px; flex: none; color: var(--watch); }
.viewing .topbar { box-shadow: inset 0 3px 0 var(--watch-mark); }

@media (max-width: 900px) {
  .g-inv, .g-thread { grid-template-columns: minmax(0, 1fr); }
  .inv-top { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .thr { padding: 12px; }
}
@media print {
  .noprint, .viewbar, .btn, .page-head .actions, .crumbs { display: none !important; }
  .g-inv { grid-template-columns: minmax(0, 1fr); }
  .card { box-shadow: none; border-color: #999; break-inside: avoid; }
  .howto { background: none; border-color: #999; }
  body, .card { color: #000; background: #fff; }
}

/* Money never breaks across two lines in a table cell ("P" on one line, "450.00" on the next). */
.tbl td.num, .inv td.num, .tbl td.money, .tbl th.num { white-space: nowrap; }

/* The quick-add menu: four actions, then a "More" disclosure for the rest. */
.menu .mi-more { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu .mi-more > summary { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-sm); cursor: pointer; list-style: none; }
.menu .mi-more > summary::-webkit-details-marker { display: none; }
.menu .mi-more > summary:hover, .menu .mi-more > summary:focus-visible { background: var(--sunken); }
.menu .mi-more > summary .nm { font-weight: 600; flex: 1; }
.menu .mi-more > summary .ds { color: var(--ink-3); font-size: 12px; }
.menu .mi-more > summary::after { content: ''; width: 7px; height: 7px; border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3); transform: rotate(45deg); margin-left: 4px; transition: transform .15s; }
.menu .mi-more[open] > summary::after { transform: rotate(-135deg); }
.menu .mi-more[open] { max-height: min(46vh, 360px); overflow: auto; }

/* Logos and group codes */
.logo-prev { max-width: 280px; max-height: 120px; width: auto; height: auto; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.join-code .code, .code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 700; letter-spacing: .08em; }
.join-code .code { font-size: 1.6rem; margin-right: .5rem; }
.appr { display: grid; gap: 1rem; grid-template-columns: 1fr; margin-bottom: .75rem; }
@media (min-width: 760px) { .appr { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.appr-who > * { display: block; margin-top: .25rem; }
.sec-h .count { font-size: .85rem; font-weight: 600; background: var(--sunken); border-radius: 999px; padding: .1rem .55rem; margin-left: .4rem; }

/* ---------- charts (Ua\Chart): inline SVG and small HTML meters; colours follow the theme ---------- */
.chart { display: block; width: 100%; height: auto; max-height: 300px; overflow: visible; }
.chart.radar { max-width: 460px; margin: 0 auto; }
.chart .ch-grid { stroke: var(--line); stroke-width: 1; fill: none; }
.chart .ch-axis { stroke: var(--line-2); stroke-width: 1; }
.chart .ch-t { fill: var(--ink-3); font-size: 11px; }
.chart .ch-v { fill: var(--ink); font-size: 11.5px; font-weight: 500; }
.chart .ch-s1, .chart .ch-dot.s1, .m-fill.s1, .sw.s1, .sg.s1 { fill: var(--vz1); background: var(--vz1); }
.chart .ch-s2, .chart .ch-dot.s2, .m-fill.s2, .sw.s2, .sg.s2 { fill: var(--vz2); background: var(--vz2); }
.chart .ch-s3, .chart .ch-dot.s3, .m-fill.s3, .sw.s3, .sg.s3 { fill: var(--vz3); background: var(--vz3); }
.chart .ch-line { fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke: var(--vz1); }
.chart .ch-line.s2 { stroke: var(--vz2); } .chart .ch-line.s3 { stroke: var(--vz3); }
.chart .ch-line.then { stroke: var(--ink-3); stroke-dasharray: 5 4; stroke-width: 2; }
.chart .ch-dot { stroke: var(--surface); stroke-width: 2; }
.chart .ch-radar-now { fill: var(--vz1); fill-opacity: .2; stroke: var(--vz1); stroke-width: 2.4; stroke-linejoin: round; }
.chart .ch-radar-then { fill: none; stroke: var(--ink-3); stroke-width: 2; stroke-dasharray: 5 4; stroke-linejoin: round; }
.spark { width: 96px; height: 28px; display: block; }
.spark .ch-line { fill: none; stroke: var(--vz1); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.meters { display: grid; gap: 10px; }
.meter { display: grid; grid-template-columns: minmax(120px, 30%) 1fr auto; gap: 4px 12px; align-items: center; }
.meter .m-l { color: var(--ink-2); font-size: 13.5px; }
.meter .m-track { display: block; height: 10px; border-radius: 6px; background: var(--sunken); overflow: hidden; }
.meter .m-fill { display: block; height: 100%; border-radius: 6px; background: var(--vz1); }
.meter .m-fill.ok { background: var(--ok-mark); } .meter .m-fill.watch { background: var(--watch-mark); } .meter .m-fill.off { background: var(--off-mark); } .meter .m-fill.none { background: var(--none-mark); }
.meter .m-v { font-weight: 500; font-variant-numeric: tabular-nums; min-width: 4.5ch; text-align: right; }
.meter .m-n { grid-column: 2 / 4; color: var(--ink-3); font-size: 12px; margin-top: -2px; }
@media (max-width: 560px) { .meter { grid-template-columns: 1fr auto; } .meter .m-track { grid-column: 1 / 3; grid-row: 2; } .meter .m-n { grid-column: 1 / 3; } }
.splitbar { display: flex; gap: 2px; height: 22px; border-radius: 8px; overflow: hidden; background: var(--sunken); }
.splitbar .sg { display: block; min-width: 3px; }
.sg.ok, .sw.ok { background: var(--ok-mark); } .sg.watch, .sw.watch { background: var(--watch-mark); } .sg.off, .sw.off { background: var(--off-mark); } .sg.none, .sw.none { background: var(--none-mark); }
.split-key { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 10px 0 0; padding: 0; color: var(--ink-2); font-size: 13px; }
.split-key .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.rag { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; font-size: 12.5px; padding: 2px 9px 2px 7px; border-radius: 999px; }
.rag.ok { background: var(--ok-bg); color: var(--ok); } .rag.watch { background: var(--watch-bg); color: var(--watch); } .rag.off { background: var(--off-bg); color: var(--off); } .rag.none { background: var(--none-bg); color: var(--none); }
.rag svg { width: 12px; height: 12px; }
@media print { .chart { max-height: 260px; } }

/* ---------- assessments: the score picker and report card ---------- */
.crit { margin: 0 0 12px; padding: 14px 16px; }
.crit legend { font-weight: 500; padding: 0 6px; }
.scorebar { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.sc-opt { position: relative; }
.sc-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.sc-opt span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 44px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 10px; background: var(--surface); font-weight: 500; font-variant-numeric: tabular-nums; }
.sc-opt:hover span { border-color: var(--accent-line); background: var(--accent-soft); }
.sc-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sc-opt input:focus-visible + span { outline: 3px solid var(--accent-line); outline-offset: 2px; }
.sc-none span { font-weight: 400; color: var(--ink-3); }
.sc-none input:checked + span { background: var(--sunken); border-color: var(--ink-3); color: var(--ink); }
.tbl tr.grp th { background: var(--sunken); font-weight: 500; text-transform: none; font-size: 13px; color: var(--ink-2); text-align: left; }
.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.filters .field { margin: 0; }

/* ---------- player card ---------- */
.pcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden; }
.pc-top { display: flex; gap: 18px; align-items: flex-start; padding: 20px 22px; background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%); color: var(--brand-ink); position: relative; }
.pc-photo .av { box-shadow: 0 0 0 3px rgba(255, 255, 255, .85); flex: none; }
.pc-id { min-width: 0; flex: 1 1 auto; }
.pc-id h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; color: var(--brand-ink); }
.pc-sub { margin: 2px 0 10px; color: var(--brand-mute); }
.pc-top .muted { color: var(--brand-mute); }
.pc-top .hint { color: var(--brand-mute); }
.pc-top .linkbtn { color: #fff; text-decoration: underline; }
.pc-top .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .28); color: #fff; }
.pc-team { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .22); font-size: 12.5px; }
.pc-team svg { width: 14px; height: 14px; }
.sp-top-s { margin-top: 8px; }
.pc-photo-form { margin-top: 8px; }
.pc-photo-form form { background: var(--surface); color: var(--ink); padding: 12px; border-radius: var(--r-sm); margin-top: 8px; max-width: 420px; }
.pc-photo-form .hint { color: var(--ink-3); }
.pc-photo-form .btn { background: var(--surface-2); color: var(--ink); border-color: var(--line-2); }
.pc-photo-form .btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.pc-shirt { flex: none; text-align: center; line-height: 1; padding-left: 8px; }
.pc-shirt span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--brand-mute); }
.pc-shirt b { display: block; font-size: 54px; font-weight: 600; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.pc-strip { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.pc-tile { padding: 14px 20px; border-right: 1px solid var(--line); }
.pc-tile:last-child { border-right: 0; }
.pc-tile .v { font-size: 26px; font-weight: 500; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.pc-tile .l { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.pc-tile .s { font-size: 12px; color: var(--ink-3); }
.pc-body { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0; }
.pc-stats { padding: 18px 22px; border-right: 1px solid var(--line); }
.pc-stats h3 { margin: 0 0 10px; }
.pc-block { padding: 10px 0; border-top: 1px solid var(--line); }
.pc-block:first-of-type { border-top: 0; padding-top: 0; }
.pc-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin-top: 8px; }
.pc-num { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.pc-num .v { font-size: 22px; font-weight: 500; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.pc-num .l { font-size: 12px; color: var(--ink-3); }
.pc-details { margin: 0; padding: 18px 22px; background: var(--surface-2); }
.pc-f { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dotted var(--line-2); }
.pc-f:last-child { border-bottom: 0; }
.pc-f dt { color: var(--ink-3); font-size: 12.5px; flex: none; }
.pc-f dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
@media (max-width: 760px) {
  .pc-top { flex-wrap: wrap; padding: 16px; }
  .pc-shirt { order: -1; margin-left: auto; padding-left: 0; }
  .pc-shirt b { font-size: 40px; }
  .pc-strip { grid-template-columns: minmax(0, 1fr); }
  .pc-tile { border-right: 0; border-bottom: 1px solid var(--line); }
  .pc-tile:last-child { border-bottom: 0; }
  .pc-body { grid-template-columns: minmax(0, 1fr); }
  .pc-stats { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media print { .pcard { box-shadow: none; } .pc-top { background: #fff; color: #000; } .pc-top * { color: #000 !important; } }

/* ---------- commercial dashboard ---------- */
.sc-table td.name .sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; max-width: 46ch; }
.sc-table .spark { width: 96px; height: 28px; display: block; }
.sc-note { margin-top: 4px; }
.sc-note form { margin-top: 6px; min-width: 220px; }
.sc-targets input { width: 100%; min-width: 5.5rem; }
.sc-targets th.name .sub { display: block; font-size: 12px; color: var(--ink-3); font-weight: 400; }

/* Dashboard on small screens: a measure reads as a heading, group names as plain headings, notes get the full width, tile figures never wrap. */
.tiles-fit .stat > div { min-width: 0; }
.tiles-fit .stat .v { white-space: nowrap; }
@media (max-width: 900px) {
  .stackable tr.grp { border: 0; padding: 0; margin: 16px 0 6px; background: none; }
  .stackable tr.grp th { display: block; width: 100%; padding: 0; background: none; border: 0; text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
  .stackable td.first .sub { margin-top: 2px; }
  .stackable td.notecell { display: block; text-align: left; }
  .stackable td.notecell::before { display: block; margin-bottom: 2px; }
  .sc-note form { min-width: 0; }
}
@media (max-width: 480px) {
  .tiles-fit .stat { gap: 10px; }
  .tiles-fit .stat .ico { width: 34px; height: 34px; }
  .tiles-fit .stat .v { font-size: 19px; }
}


/* ---------- Championship Portal: fixtures, results, league tables, player cards, public results site ---------- */
.card-h h2 { margin: 0; font-size: 16px; font-weight: 500; }
.row2, .row3 { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.row2 > .field, .row3 > .field { min-width: 0; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; border-top: 0; padding-top: 0; margin: 0; }
.inline-form.sp-top { margin-top: 12px; }
.inline-form select { min-height: 34px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: var(--r-sm); padding: 4px 8px; font: inherit; }

/* One match per row: when, the two teams with the score between them, and the competition */
.fx-row { display: grid; grid-template-columns: minmax(110px, 150px) minmax(0, 1fr); gap: 2px 14px; align-items: center; padding: 11px 4px; border-top: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.fx-row:first-of-type, .card-h + .fx-row { border-top: 0; }
a.fx-row:hover { background: var(--surface-2); }
a.fx-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.fx-when { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.fx-teams { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 4px 10px; align-items: center; font-weight: 500; min-width: 0; overflow-wrap: break-word; }
.fx-h { text-align: right; } .fx-a { text-align: left; }
.fx-sc { display: inline-block; min-width: 3.4em; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--sunken); font-variant-numeric: tabular-nums; white-space: nowrap; }
.fx-comp { grid-column: 2; font-size: 12.5px; color: var(--ink-3); text-align: center; min-width: 0; overflow-wrap: break-word; }
.fx-comp:empty { display: none; }

/* The head of a match page */
.matchhead { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; text-align: center; padding: 22px 16px; }
.mh-team { font-size: 18px; font-weight: 500; overflow-wrap: anywhere; }
.mh-team a { color: inherit; text-decoration: none; } .mh-team a:hover { color: var(--accent); text-decoration: underline; }
.mh-score { font-size: 34px; font-weight: 500; font-variant-numeric: tabular-nums; letter-spacing: .02em; padding: 4px 18px; border-radius: var(--r); background: var(--sunken); white-space: nowrap; }

/* The result sheet: score at the top, one row per player below */
.scoreform { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 12px; align-items: end; max-width: 520px; }
.scoreform input { text-align: center; font-size: 22px; font-weight: 500; min-height: 48px; font-variant-numeric: tabular-nums; }
.scoredash { font-size: 26px; color: var(--ink-3); padding-bottom: 8px; }
.sheet th, .sheet td { white-space: nowrap; }
.sheet td.name { white-space: normal; min-width: 150px; }
.sheet tr.bad td { background: var(--off-bg); }
.sheet td .error { display: block; font-size: 12.5px; font-weight: 400; margin-top: 2px; }
.mini { width: 4.2em; min-height: 32px; text-align: right; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); border-radius: var(--r-xs); padding: 3px 7px; font: inherit; font-variant-numeric: tabular-nums; }
.mini:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.sheet input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--accent); }
@media (pointer: coarse) { .mini { min-height: 44px; } .sheet input[type="checkbox"] { width: 24px; height: 24px; } }

/* League table */
table.league td.name a { color: inherit; text-decoration: none; } table.league td.name a:hover { color: var(--accent); text-decoration: underline; }
table.league tbody tr:nth-child(-n+1) td.num:first-child { color: var(--accent); font-weight: 500; }
.form { display: inline-flex; gap: 3px; }
.form i { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-style: normal; font-size: 11px; font-weight: 500; color: #fff; }
.form i.fW { background: var(--ok-mark); } .form i.fD { background: var(--none-mark); } .form i.fL { background: var(--off-mark); }
html[data-theme="dark"] .form i { color: #06182B; }
@media (prefers-color-scheme: dark) { html:not([data-theme="light"]) .form i { color: #06182B; } }

/* A player's season figures and picture */
.figs { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.fig { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; }
.fig .v { font-size: 24px; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.1; }
.fig .l { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.playercard { text-align: center; }
.pc-photo { display: block; width: 168px; height: 168px; margin: 4px auto 12px; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); box-shadow: 0 0 0 1px var(--line-2), var(--shadow); background: var(--sunken); }
div.pc-photo { display: grid; place-items: center; font-size: 54px; font-weight: 500; letter-spacing: .02em; color: var(--accent-deep); background: var(--accent-soft); }
.playercard h3 { margin: 0 0 4px; }

/* Director pages */
.inline-edit { display: inline-block; text-align: left; }
.inline-edit summary { list-style: none; cursor: pointer; } .inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit[open] { display: block; margin-top: 8px; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); }
.inline-edit form { display: grid; gap: 10px; min-width: 220px; }
.rolenotes { margin: 10px 0 14px; padding-left: 18px; display: grid; gap: 4px; }
.steps { margin: 0 0 10px; padding-left: 22px; display: grid; gap: 8px; }
.steps code { font-size: 12.5px; background: var(--sunken); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }

/* The public results site: its own light frame, no sidebar, no staff controls */
body.pub { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); min-height: 100vh; display: flex; flex-direction: column; }
.pub-wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; box-sizing: border-box; }
.pub-head { background: var(--side); color: var(--side-ink); }
.pub-head .pub-wrap { display: flex; align-items: center; min-height: 64px; }
.pub-brand { display: inline-flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; font-size: 17px; font-weight: 500; }
.pub-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; background: #fff; padding: 3px; }
.pub-main { flex: 1; padding-top: 22px; padding-bottom: 36px; outline: none; }
.pub-main h1 { font-size: 24px; font-weight: 500; margin: 0 0 6px; }
.pub-main .lead { color: var(--ink-3); margin: 0 0 16px; }
.pub-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); margin-bottom: 4px; }
.pub-card { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: var(--ink); }
.pub-card b { font-weight: 500; font-size: 16px; } .pub-card span { color: var(--ink-3); font-size: 12.5px; }
a.pub-card:hover { border-color: var(--accent-line); box-shadow: var(--shadow-lg); } a.pub-card:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pub-foot { border-top: 1px solid var(--line); color: var(--ink-3); font-size: 12.5px; padding: 14px 0 22px; }
.pub-main .sp-bottom { margin-bottom: 16px; }

@media (max-width: 720px) {
  .row3 { grid-template-columns: 1fr; }
  .fx-row { grid-template-columns: 1fr; gap: 2px; padding: 12px 4px; }
  .fx-comp { grid-column: auto; text-align: left; }
  .matchhead { grid-template-columns: 1fr; gap: 8px; padding: 16px 12px; }
  .mh-score { justify-self: center; font-size: 30px; }
  .scoreform { grid-template-columns: 1fr auto 1fr; gap: 8px; }
  .pc-photo { width: 132px; height: 132px; }
  div.pc-photo { font-size: 42px; }
}

/* The result sheet on a phone: one card per player, each figure labelled, instead of a wide table to scroll sideways */
@media (max-width: 640px) {
  .sheet, .sheet tbody { display: block; }
  .sheet thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .sheet tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 10px; padding: 14px 2px; border-bottom: 1px solid var(--line); }
  .sheet tr:last-child { border-bottom: 0; }
  .sheet th, .sheet td { white-space: normal; }
  .sheet td { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0; border: 0; text-align: left; min-width: 0; }
  .sheet td::before { content: attr(data-label); font-size: 11.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
  .sheet td:first-child { grid-column: 1; flex-direction: row; align-items: center; font-weight: 500; color: var(--ink-3); }
  .sheet td:first-child::before { content: '#'; }
  .sheet td.name { grid-column: 2 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; font-size: 15px; min-width: 0; }
  .sheet td.name::before { content: none; }
  .sheet .mini { width: 100%; min-height: 44px; font-size: 16px; }
  .sheet td.c input[type="checkbox"], .sheet input[type="checkbox"] { width: 28px; height: 28px; }
  .sheet tr.bad { background: var(--off-bg); border-radius: var(--r-sm); }
  .sheet tr.bad td { background: transparent; }
}
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

/* Two-column pages (a player and their card, a team and its squad, the dashboard) become one column on tablets and phones */
@media (max-width: 900px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}

/* Two cards side by side that sit one above the other on a phone */
.two-up { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
@media (max-width: 900px) { .two-up { grid-template-columns: minmax(0, 1fr); } }

/* A row of fields is followed by more space before the next field */
.row2, .row3 { margin-bottom: 14px; }

/* Filter bars use the whole width, even though other cards in forms are capped */
form.card.filters { max-width: none; }

.fx-round { display: block; }
body.pub .fx-row { grid-template-columns: minmax(150px, 190px) minmax(0, 1fr); }
@media (max-width: 720px) { body.pub .fx-row { grid-template-columns: 1fr; } }

/* ---------- 1.1 additions: franchise teams, website pictures ---------- */
.tiles-fit { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.thumb { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.crest-prev { object-fit: contain; padding: 4px; }
.team-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--ink-3); vertical-align: baseline; }
.idcheck { border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 10px 14px; background: var(--surface-2); margin-bottom: 8px; }
.idcheck p { margin: 0 0 4px; }

.ref { white-space: nowrap; }
