/* Genesis Hackathon — one stylesheet for sign-in, team portal and organiser console.
   Theme comes from the Genesis logo: a light bulb built from coloured facets
   separated by white gaps (deep teal → ocean → teal → cyan → mint). The 24-hour
   dial is drawn the same way, so the bulb "lights up" as the event runs. */

@font-face { font-family: 'Big Shoulders Display'; src: url('../fonts/big-shoulders-display-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Big Shoulders Display'; src: url('../fonts/big-shoulders-display-latin-800-normal.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('../fonts/figtree-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Martian Mono'; src: url('../fonts/martian-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Martian Mono'; src: url('../fonts/martian-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  /* surfaces */
  --bg: #f2f8f6;
  --bg-tint: #e6f3ee;
  --surface: #ffffff;
  --surface-2: #f5faf8;
  --surface-3: #e8f2ee;
  --line: #d3e4de;
  --line-soft: #e5efeb;
  /* text */
  --text: #0f2e2e;
  --muted: #4d6866;
  --faint: #7b9592;
  /* brand (from the logo) */
  --brand-ink: #103030;
  --petrol: #005060;
  --ocean: #0070a0;
  --teal: #0b7a70;
  --teal-hi: #096a61;
  --teal-logo: #20a090;
  --cyan: #00d9ea;
  --mint: #6fd18f;
  --mint-deep: #3fb77a;
  /* status (text-strength colours; chips tint them) */
  --ok: #157a48;
  --bad: #c0362c;
  --info: #006a99;
  --warn: #9a6400;
  --live: #007f8c;

  --stripe: linear-gradient(90deg, #103030 0 18%, #005060 18% 36%, #0070a0 36% 54%, #20a090 54% 72%, #00d9ea 72% 86%, #6fd18f 86% 100%);

  --f-display: 'Big Shoulders Display', 'Arial Narrow', Impact, sans-serif;
  --f-body: 'Figtree', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Martian Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --dawn: 0;
  --shadow-sm: 0 1px 2px rgb(16 48 48 / 0.06);
  --shadow: 0 1px 2px rgb(16 48 48 / 0.05), 0 10px 28px -14px rgb(16 48 48 / 0.18);
  --shadow-lg: 0 24px 60px -20px rgb(16 48 48 / 0.35);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--f-body);
  -webkit-font-smoothing: antialiased;
}

/* Soft brand light in the page corners. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60% 45% at 100% 0%, rgb(0 217 234 / 0.10), transparent 70%),
    radial-gradient(55% 45% at 0% 100%, rgb(111 209 143 / 0.14), transparent 70%);
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; }
p { margin: 0; }
a { color: var(--ocean); text-underline-offset: 3px; }
a:hover { color: var(--petrol); }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
::selection { background: rgb(0 217 234 / 0.28); }

:focus-visible { outline: 2px solid var(--ocean); outline-offset: 2px; border-radius: 6px; }

[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; align-content: start; }
.stack-sm { display: grid; gap: 8px; align-content: start; }
.grow { flex: 1 1 auto; }

/* ---------- display type ---------- */
.display { font-family: var(--f-display); font-weight: 800; text-transform: uppercase; letter-spacing: 0.01em; line-height: 0.92; }
.page-title { font: 800 clamp(34px, 4.6vw, 48px)/0.95 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--brand-ink); }
.section-title { font: 700 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-ink); }
.page-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head p { color: var(--muted); margin-top: 8px; max-width: 60ch; }

/* ---------- surfaces ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .card-head { padding: 18px 20px 0; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; border: 0; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-2); border-color: #bcd7cf; color: var(--text); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--teal); border-color: transparent; color: #fff; box-shadow: 0 1px 2px rgb(11 122 112 / 0.3), inset 0 -2px 0 rgb(0 0 0 / 0.12); }
.btn-primary:hover { background: var(--teal-hi); border-color: transparent; color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }
.btn-danger { color: var(--bad); }
.btn-danger:hover { background: #fdeeec; color: #9f271e; }
.btn-danger.btn-solid { background: var(--bad); color: #fff; border-color: transparent; }
.btn-danger.btn-solid:hover { background: #a42c23; color: #fff; }
.btn-sm { min-height: 32px; padding: 6px 11px; font-size: 13px; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }
.btn.is-busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-busy::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 2px solid #fff;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.btn:not(.btn-primary):not(.btn-solid).is-busy::after { border-color: var(--teal); border-right-color: transparent; }
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 18px; height: 18px; }

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field .hint { font-size: 12px; color: var(--faint); font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%234d6866' stroke-width='1.8'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input::placeholder, .textarea::placeholder { color: #9bb0ad; }
.input:hover, .select:hover, .textarea:hover { border-color: #bcd7cf; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--teal-logo); box-shadow: 0 0 0 3px rgb(32 160 144 / 0.2); }
.input[aria-invalid='true'] { border-color: var(--bad); box-shadow: 0 0 0 3px rgb(192 54 44 / 0.12); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--surface-2); color: var(--faint); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-error { color: #9f271e; background: #fdeeec; border: 1px solid #f5c6c0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.form-error:empty { display: none; }
.check { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
.check input { width: 18px; height: 18px; accent-color: var(--teal); }

/* switch */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.switch-row:last-child { border-bottom: 0; }
.switch-row strong { display: block; font-weight: 600; }
.switch-row small { color: var(--muted); font-size: 13px; }
.switch { appearance: none; flex: none; width: 44px; height: 24px; border-radius: 99px; background: #cddfd9; position: relative; cursor: pointer; transition: background 0.2s; margin: 0; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(16 48 48 / 0.3); transition: transform 0.2s; }
.switch:checked { background: var(--teal); }
.switch:checked::after { transform: translateX(20px); }

/* segmented control */
.seg { display: inline-flex; padding: 3px; gap: 2px; background: var(--surface-3); border: 1px solid var(--line-soft); border-radius: 11px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; }
.seg button:hover { color: var(--text); }
.seg button[aria-pressed='true'] { background: var(--surface); color: var(--brand-ink); box-shadow: 0 1px 3px rgb(16 48 48 / 0.14); }

/* ---------- chips & badges ---------- */
.chip {
  --c: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 8px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  color: var(--c);
  background: color-mix(in oklab, var(--c) 11%, white);
  border: 1px solid color-mix(in oklab, var(--c) 18%, white);
}
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-plain::before { display: none; }
.chip-plain { padding: 4px 10px; }
a.chip { text-decoration: none; }
a.chip:hover { filter: brightness(0.95); }
.chip-selected, .chip-advanced, .chip-resolved { --c: var(--ok); }
.chip-eliminated, .chip-urgent, .chip-disabled { --c: var(--bad); }
.chip-pending, .chip-in_progress { --c: var(--info); }
.chip-live, .chip-open, .chip-new { --c: var(--live); }
.chip-judging, .chip-important, .chip-award { --c: var(--warn); }
.chip-upcoming { --c: var(--faint); }
.chip-completed, .chip-normal { --c: var(--muted); }
.chip-live::before { animation: pulse 1.6s ease-in-out infinite; }
.badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--teal); color: #fff; font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1; }
.badge:empty, .badge[data-count='0'] { display: none; }
.code-tag { font: 500 12px var(--f-mono); letter-spacing: -0.02em; color: var(--petrol); background: #e2f3f0; border: 1px solid #cbe8e2; padding: 3px 8px; border-radius: 6px; white-space: nowrap; }
@keyframes pulse { 50% { opacity: 0.35; } }

/* live connection indicator */
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; color: var(--faint); }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.live.is-on { color: var(--muted); }
.live.is-on::before { background: var(--mint-deep); box-shadow: 0 0 0 3px rgb(63 183 122 / 0.2); }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); position: sticky; top: 0; z-index: 1; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f7fbfa; }
.table .num { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; white-space: nowrap; }
.table th.num { font-family: var(--f-body); letter-spacing: 0; line-height: 1.35; }
.table .actions { text-align: right; white-space: nowrap; }
.table .team-cell strong { display: block; font-weight: 600; }
.table .team-cell small { color: var(--faint); font-size: 12px; }
.table tr.is-dim td { color: var(--faint); }
.table tr.is-me td { background: #e3f6f1; }
.table tr.is-me:hover td { background: #d8f1ea; }
details > summary::-webkit-details-marker { display: none; }
details > summary .section-title::before { content: '▸'; display: inline-block; margin-right: 10px; color: var(--faint); transition: transform 0.2s; }
details[open] > summary .section-title::before { transform: rotate(90deg); }

/* ---------- empty / loading ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--muted); }
.empty h3 { font: 700 22px var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-ink); margin-bottom: 6px; }
.empty p { max-width: 44ch; margin: 0 auto 16px; }
.loading { padding: 60px 0; display: grid; place-items: center; color: var(--faint); }
.loading::before { content: ''; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--teal); animation: spin 0.8s linear infinite; }

/* ---------- toasts ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 32px)); }
.toast {
  --c: var(--info);
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--c);
  border-radius: 10px;
  padding: 12px 14px;
  box-shadow: var(--shadow-lg);
  font-size: 14px;
  display: flex; gap: 10px; align-items: start;
  animation: toast-in 0.25s ease-out;
}
.toast strong { display: block; color: var(--brand-ink); }
.toast-ok { --c: var(--mint-deep); }
.toast-error { --c: var(--bad); }
.toast-warn { --c: #e0a100; }
.toast-ember { --c: var(--teal-logo); }
.toast button { margin-left: auto; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

/* ---------- modal ---------- */
dialog.modal {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
dialog.modal::before { content: ''; display: block; height: 4px; background: var(--stripe); }
dialog.modal-wide { width: min(860px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgb(15 46 46 / 0.42); backdrop-filter: blur(3px); }
.modal-inner { display: flex; flex-direction: column; max-height: calc(100dvh - 38px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px 12px; }
.modal-head h2 { font: 700 24px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--brand-ink); }
.modal-body { padding: 4px 20px 20px; overflow-y: auto; display: grid; gap: 14px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-soft); background: var(--surface-2); flex-wrap: wrap; }
dialog.modal[open] { animation: modal-in 0.2s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }

/* credential display */
.cred { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 14px; align-items: center; background: var(--surface-2); border: 1px dashed #b9d6cd; border-radius: 12px; padding: 14px 16px; margin: 0; }
.cred dt { color: var(--muted); font-size: 13px; }
.cred dd { margin: 0; font: 500 16px var(--f-mono); letter-spacing: -0.01em; color: var(--petrol); word-break: break-all; }

/* ---------- the dial (signature) ----------
   A faceted ring: coloured segments with white gaps, like the logo. */
.dial { position: relative; width: min(100%, 320px); aspect-ratio: 1; margin-inline: auto; --p: 0; --track: #e3efeb; container-type: inline-size; }
.dial-ring {
  position: absolute;
  inset: 7.142857%;
  border-radius: 50%;
  background:
    conic-gradient(transparent 0 calc(var(--p) * 1turn), var(--track) 0),
    conic-gradient(#0f5a63, #0070a0 0.22turn, #0b8f84 0.45turn, #20a090 0.6turn, #00c9dc 0.8turn, #6fd18f 1turn);
  -webkit-mask: radial-gradient(closest-side, transparent 86%, #000 86.6%), repeating-conic-gradient(#000 0 13.8deg, transparent 13.8deg 15deg);
  -webkit-mask-composite: source-in;
  mask: radial-gradient(closest-side, transparent 86%, #000 86.6%), repeating-conic-gradient(#000 0 13.8deg, transparent 13.8deg 15deg);
  mask-composite: intersect;
}
.dial-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.dial-svg .tick { stroke: #cfe0da; stroke-width: 1.5; stroke-linecap: round; }
.dial-svg .tick.major { stroke: var(--faint); stroke-width: 2; }
.dial-svg .tick.past { stroke: var(--teal-logo); }
.dial-svg .hour { fill: var(--faint); font: 500 8.5px var(--f-mono); text-anchor: middle; dominant-baseline: middle; }
.dial-svg .notch { stroke: var(--surface); stroke-width: 3.5; }
.dial-svg .marker { fill: var(--muted); font: 700 11px var(--f-display); letter-spacing: 0.04em; text-anchor: middle; dominant-baseline: middle; }
.dial-svg .marker-dot { fill: var(--faint); }
.dial-svg .marker.past, .dial-svg .marker-dot.past { fill: var(--teal); }
.dial-hand { transform-origin: 140px 140px; transition: transform 0.9s linear; }
.dial-hand circle { fill: #fff; stroke: var(--teal); stroke-width: 3; filter: drop-shadow(0 0 5px rgb(0 217 234 / 0.8)); }
.dial[data-phase='unset'] .dial-hand, .dial[data-phase='before'] .dial-hand { opacity: 0; }
.dial-center { position: absolute; inset: 22%; display: grid; place-content: center; text-align: center; gap: 6px; }
.dial-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: 0.02em; }
.dial-time { font: 500 8.6cqi/1 var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.05em; white-space: nowrap; color: var(--brand-ink); }
.dial-time.is-long { font-size: 6.4cqi; }
.dial-sub { font-size: 12px; color: var(--muted); }
.dial-sm { width: min(100%, 240px); }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--brand-ink); text-decoration: none; }
.brand img { height: 40px; width: auto; }
.brand span { font: 800 22px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.05em; }
.brand:hover { color: var(--brand-ink); }

/* ---------- app chrome: team portal ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  box-shadow: 0 1px 0 rgb(16 48 48 / 0.02), 0 6px 20px -16px rgb(16 48 48 / 0.3);
}
.topbar::before { content: ''; display: block; height: 4px; background: var(--stripe); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 10px 24px 0; }
.topbar-row { display: flex; align-items: center; gap: 16px; }
.topbar .who { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.who-name { text-align: right; line-height: 1.25; }
.who-name strong { display: block; font-size: 14px; }
.who-name small { color: var(--faint); font-size: 12px; }
.tabs { display: flex; gap: 4px; margin-top: 8px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 12px 12px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a:hover { color: var(--brand-ink); }
.tabs a[aria-current='page'] { color: var(--teal); border-bottom-color: var(--teal); }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }

/* urgent banner */
.urgent-bar { background: var(--bad); color: #fff; }
.urgent-bar .wrap-bar { max-width: 1180px; margin: 0 auto; padding: 10px 24px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.urgent-bar .wrap-bar > svg { width: 18px; height: 18px; flex: none; }
.urgent-bar span { min-width: 0; }
.urgent-bar a { color: inherit; white-space: nowrap; }
.urgent-bar a:hover { color: inherit; }
.urgent-bar button { margin-left: auto; color: inherit; flex: none; }
.urgent-bar .icon-btn:hover { background: rgb(0 0 0 / 0.12); color: inherit; }

/* ---------- overview ---------- */
.hero-grid { display: grid; grid-template-columns: minmax(260px, 360px) 1fr; gap: 20px; align-items: stretch; }
.hero-dial { display: grid; align-content: center; gap: 14px; padding: 26px 22px; }
.hero-dial .event-line { text-align: center; color: var(--muted); font-size: 13px; }
.standing { padding: 28px; display: flex; flex-direction: column; gap: 18px; position: relative; overflow: hidden; }
/* Facet stripes in the corner, echoing the logo's side panels. */
.standing::after {
  content: '';
  position: absolute;
  top: -40px; right: -60px;
  width: 260px; height: 260px;
  background: repeating-linear-gradient(135deg, transparent 0 16px, var(--f1, #20a090) 16px 30px, transparent 30px 34px, var(--f2, #6fd18f) 34px 48px);
  opacity: 0.14;
  -webkit-mask: radial-gradient(circle at 100% 0%, #000 0 45%, transparent 72%);
  mask: radial-gradient(circle at 100% 0%, #000 0 45%, transparent 72%);
  pointer-events: none;
}
.standing[data-kind='eliminated']::after { --f1: #7b9592; --f2: #b8c9c5; }
.standing > * { position: relative; z-index: 1; }
.standing-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.standing-team { font: 800 clamp(22px, 2.6vw, 28px)/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--muted); }
.standing-title { font: 800 clamp(44px, 6.4vw, 76px)/0.9 var(--f-display); text-transform: uppercase; letter-spacing: 0.005em; text-wrap: balance; color: var(--brand-ink); }
.standing[data-kind='advancing'] .standing-title, .standing[data-kind='finished'] .standing-title {
  background: linear-gradient(100deg, #0b7a70 0%, #0070a0 55%, #1aa37d 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.standing[data-kind='eliminated'] .standing-title { color: var(--brand-ink); }
.standing-text { color: var(--muted); max-width: 52ch; font-size: 16px; }
.standing.reveal .standing-title { animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes rise { from { opacity: 0; transform: translateY(18px); filter: blur(4px); } }

/* round path */
.path { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); gap: 0; }
.path li { position: relative; padding-top: 46px; padding-right: 10px; }
.path li::before { content: ''; position: absolute; top: 18px; left: 38px; right: 0; height: 3px; border-radius: 3px; background: var(--line); }
.path li:last-child::before { display: none; }
.path li.is-done::before { background: linear-gradient(90deg, var(--teal-logo), var(--mint)); }
.path .node {
  position: absolute; top: 0; left: 0;
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 18px var(--f-display);
  border: 2px solid var(--line);
  background: var(--surface);
  color: var(--faint);
}
.path .node svg { width: 17px; height: 17px; stroke-width: 2.4; }
.path li.is-done .node { background: var(--teal); border-color: var(--teal); color: #fff; }
.path li.is-out .node { background: var(--bad); border-color: var(--bad); color: #fff; }
.path li.is-now .node { border-color: var(--cyan); color: var(--live); box-shadow: 0 0 0 5px rgb(0 217 234 / 0.2); }
.path li.is-pending .node { border-color: var(--info); color: var(--info); }
.path li.is-unreached .node { border-style: dashed; }
.path li.is-unreached { opacity: 0.55; }
.path strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.3; }
.path small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.two-col { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; margin-top: 20px; }

/* ---------- announcements ---------- */
.ann-list { display: grid; gap: 12px; }
.ann {
  --c: var(--line);
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--c);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}
.ann-urgent { --c: var(--bad); }
.ann-important { --c: #e0a100; }
.ann-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ann h3 { font-size: 17px; font-weight: 700; line-height: 1.3; color: var(--brand-ink); }
.ann-meta { color: var(--faint); font-size: 12.5px; margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ann-body { color: var(--muted); margin-top: 4px; overflow-wrap: anywhere; }
.ann-body strong { color: var(--text); }
.ann.is-new { background: linear-gradient(90deg, #eefaf7, var(--surface) 40%); border-color: #bfe6dc; }
.ann-compact { padding: 12px 14px; box-shadow: none; background: var(--surface-2); }
.ann-compact h3 { font-size: 15px; }
.pin { color: var(--teal); display: inline-flex; }
.pin svg { width: 14px; height: 14px; }

/* ---------- scorecard ---------- */
.round-card { padding: 22px; }
.round-head { display: flex; align-items: start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.round-no { font: 700 15px var(--f-display); text-transform: uppercase; letter-spacing: 0.08em; color: var(--teal-logo); }
.round-name { font: 800 30px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; margin-top: 4px; color: var(--brand-ink); }
.round-total { text-align: right; }
.round-total .big { font: 500 28px/1 var(--f-mono); letter-spacing: -0.04em; color: var(--brand-ink); }
.round-total .of { color: var(--faint); font: 400 14px var(--f-mono); }
.crit-list { display: grid; gap: 12px; margin-top: 18px; }
.crit { display: grid; grid-template-columns: minmax(120px, 220px) 1fr auto; gap: 14px; align-items: center; font-size: 14px; }
.bar { height: 10px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #0b7a70, #20a090 60%, #6fd18f); transform-origin: left; animation: grow 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes grow { from { transform: scaleX(0); } }
.crit .mono { font-size: 13px; color: var(--muted); white-space: nowrap; }
.notes { margin-top: 18px; padding: 14px 16px; border-radius: 10px; background: #effaf6; border-left: 4px solid var(--teal-logo); }
.notes .label { display: block; margin-bottom: 4px; color: var(--teal); }
.notes p { white-space: pre-wrap; overflow-wrap: anywhere; }
.round-locked { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.crit-names { color: var(--faint); font-size: 13px; margin-top: 6px; }

/* ---------- schedule timeline ---------- */
.timeline { display: grid; gap: 28px; }
.tl-day h2 { font: 800 26px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; margin-bottom: 12px; color: var(--brand-ink); }
.tl-items { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); margin-left: 6px; }
.tl-item { position: relative; padding: 10px 0 14px 22px; display: grid; grid-template-columns: 120px 1fr; gap: 14px; }
.tl-item::before { content: ''; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2px solid var(--faint); }
.tl-time { font: 500 12.5px/1.6 var(--f-mono); color: var(--muted); letter-spacing: -0.02em; padding-top: 2px; }
.tl-body h3 { font-size: 16px; font-weight: 600; color: var(--brand-ink); }
.tl-body p { color: var(--muted); font-size: 14px; margin-top: 2px; }
.tl-body .row { margin-top: 6px; }
.tl-item.is-past { opacity: 0.55; }
.tl-item.is-past::before { background: var(--line); border-color: var(--line); }
.tl-item.is-now { background: linear-gradient(90deg, #e3f7f4, transparent 70%); border-radius: 0 10px 10px 0; }
.tl-item.is-now::before { background: var(--cyan); border-color: var(--teal); box-shadow: 0 0 0 5px rgb(0 217 234 / 0.22); }
.tl-item.is-now .tl-body h3 { color: var(--teal); }
.kind-round::before { border-color: var(--teal-logo) !important; }
.kind-deadline::before { border-color: var(--bad) !important; }
.upnext { display: grid; gap: 2px; }
.upnext-item { display: grid; grid-template-columns: 118px 1fr; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.upnext-item:last-child { border-bottom: 0; }
.upnext-item .mono { font-size: 12px; color: var(--teal); padding-top: 2px; line-height: 1.5; }
.upnext-item .mono .faint { font-size: 11px; }
.upnext-item strong { font-weight: 600; display: block; }
.upnext-item small { color: var(--faint); }

/* ---------- help desk ---------- */
.ticket-list { display: grid; }
.ticket-row { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit; position: relative; }
.ticket-row:last-child { border-bottom: 0; }
.ticket-row:hover { background: var(--surface-2); color: inherit; }
.ticket-row[aria-current='true'] { background: #e8f6f2; box-shadow: inset 3px 0 0 var(--teal); }
.ticket-row strong { font-weight: 600; overflow-wrap: anywhere; }
.ticket-row small { color: var(--faint); font-size: 12.5px; }
.ticket-row .chip { align-self: start; }
.ticket-row.is-unread strong::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 2px rgb(0 217 234 / 0.25); margin-right: 8px; vertical-align: 2px; }
.thread { display: grid; gap: 12px; }
.msg { max-width: 82%; padding: 12px 14px; border-radius: 14px 14px 14px 4px; background: var(--surface-3); justify-self: start; }
.msg.mine { justify-self: end; border-radius: 14px 14px 4px 14px; background: #d9f2eb; }
.msg p { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg small { display: block; color: var(--faint); font-size: 12px; margin-top: 6px; }
.help-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 20px; align-items: start; }
.contact-box { white-space: pre-wrap; color: var(--muted); font-size: 14px; }

/* ---------- stats (admin) ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.stat { padding: 16px 18px; position: relative; overflow: hidden; }
.stat::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--s, var(--teal-logo)); }
.stat:nth-child(2) { --s: var(--mint); }
.stat:nth-child(3) { --s: #e27d74; }
.stat:nth-child(4) { --s: var(--ocean); }
.stat:nth-child(5) { --s: var(--cyan); }
.stat:nth-child(6) { --s: var(--petrol); }
.stat b { display: block; font: 800 44px/1 var(--f-display); letter-spacing: 0.01em; color: var(--brand-ink); }
.stat span { color: var(--muted); font-size: 13px; }
.stat.is-warn b { color: var(--live); }

/* ---------- organiser console ---------- */
.console { display: grid; grid-template-columns: 240px 1fr; min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh;
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px 14px;
  background: linear-gradient(180deg, #0f3434, #0b2929);
  color: #d4e9e3;
  overflow-y: auto;
}
.sidebar::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--stripe); }
.sidebar .brand { padding: 4px 6px 0; color: #fff; }
.sidebar .brand img { height: 40px; background: #fff; border-radius: 10px; padding: 4px 7px; box-sizing: content-box; }
.sidebar .brand:hover { color: #fff; }
.sidebar-label { font-size: 12px; color: #86aca5; padding: 0 10px; margin-top: -6px; }
.nav { display: grid; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 10px; border-radius: 9px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 14px; }
.nav a svg { width: 18px; height: 18px; flex: none; }
.nav a:hover { background: var(--surface-3); color: var(--text); }
.nav a[aria-current='page'] { background: #dff3ee; color: var(--teal); }
.sidebar .nav a { color: #b5d3cc; }
.sidebar .nav a:hover { background: rgb(255 255 255 / 0.07); color: #fff; }
.sidebar .nav a[aria-current='page'] { background: rgb(111 209 143 / 0.16); color: #fff; box-shadow: inset 3px 0 0 var(--mint); }
.sidebar .nav a[aria-current='page'] svg { color: var(--mint); }
.nav .badge { margin-left: auto; }
.sidebar .badge { background: var(--cyan); color: #06282b; }
.sidebar-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid rgb(255 255 255 / 0.1); display: grid; gap: 10px; }
.sidebar-foot strong { display: block; font-size: 14px; color: #fff; }
.sidebar-foot small { color: #86aca5; font-size: 12px; }
.sidebar .live { color: #86aca5; }
.sidebar .live.is-on { color: #cfe6e0; }
.sidebar .btn-ghost { color: #b5d3cc; }
.sidebar .btn-ghost:hover { background: rgb(255 255 255 / 0.08); color: #fff; }
.console-main { min-width: 0; }
.console-main .wrap { max-width: 1240px; padding-top: 30px; }
.mobile-bar { display: none; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 340px; }
.toolbar .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.toolbar .search .input { padding-left: 34px; min-height: 40px; }

/* round tabs in admin */
.round-tabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; margin-bottom: 18px; }
.round-tab { text-align: left; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; display: grid; gap: 6px; color: inherit; text-decoration: none; }
.round-tab:hover { border-color: var(--line); color: inherit; }
.round-tab[aria-current='page'] { border-color: var(--teal-logo); box-shadow: 0 0 0 1px var(--teal-logo) inset, var(--shadow); background: linear-gradient(180deg, #f1fbf8, var(--surface)); }
.round-tab .round-no { font-size: 13px; }
.round-tab strong { font: 800 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--brand-ink); }
.progress { height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal-logo), var(--mint)); }

/* score sheet */
.sheet td { padding: 8px 10px; }
.sheet .score-input { width: 68px; min-height: 36px; padding: 6px 8px; text-align: center; font: 500 13px var(--f-mono); letter-spacing: -0.02em; background: var(--surface-2); }
.sheet .score-input:focus { background: var(--surface); }
.sheet .score-input:invalid, .sheet .score-input[aria-invalid='true'] { border-color: var(--bad); }
.sheet .status-select { min-height: 36px; padding: 6px 30px 6px 10px; font-size: 13px; width: 132px; font-weight: 600; }
.sheet .status-select[data-v='selected'] { color: var(--ok); background-color: #eaf7ef; border-color: #bfe3cc; }
.sheet .status-select[data-v='eliminated'] { color: var(--bad); background-color: #fdf0ee; border-color: #f2c8c2; }
.sheet .total { font: 500 14px var(--f-mono); white-space: nowrap; color: var(--brand-ink); }
.sheet tr.notes-row td { background: var(--surface-2); padding: 14px 12px; }
.sheet tr.notes-row:hover td { background: var(--surface-2); }
.sheet tr.is-ineligible td { opacity: 0.5; }
.save-state { width: 22px; display: inline-grid; place-items: center; }
.save-state::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: transparent; }
.save-state[data-s='dirty']::before { background: #e0a100; }
.save-state[data-s='saving']::before { background: var(--info); animation: pulse 0.8s infinite; }
.save-state[data-s='saved']::before { background: var(--mint-deep); }
.save-state[data-s='error']::before { background: var(--bad); }
.flash td { animation: flash 1.4s ease-out; }
@keyframes flash { from { background: rgb(0 217 234 / 0.18); } }
.criteria-editor { display: grid; gap: 8px; }
.crit-edit { display: grid; grid-template-columns: 1fr 110px auto; gap: 8px; align-items: center; }
.sheet-note { display: grid; grid-template-columns: 1fr 240px; gap: 12px; }
.callout { display: flex; gap: 12px; align-items: start; padding: 12px 14px; border-radius: 10px; background: #eaf4fa; border: 1px solid #c9e1ee; color: #29516a; font-size: 14px; }
.callout svg { width: 18px; height: 18px; color: var(--info); flex: none; margin-top: 2px; }
.callout strong { color: #123e57; }
.callout-warn { background: #fff7e6; border-color: #f3dca8; color: #6b4a06; }
.callout-warn strong { color: #4d3500; }
.callout-warn svg { color: #b57f00; }
.list-plain { list-style: none; margin: 0; padding: 0; display: grid; }
.list-plain li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.list-plain li:last-child { border-bottom: 0; }
.drop { border: 1.5px dashed #b9d6cd; border-radius: 12px; padding: 22px; text-align: center; color: var(--muted); cursor: pointer; background: var(--surface-2); }
.drop:hover, .drop.is-over { border-color: var(--teal-logo); color: var(--text); background: #ecf8f4; }
.error-list { max-height: 180px; overflow: auto; font-size: 13px; color: #9f271e; margin: 0; padding-left: 18px; }

/* ---------- sign-in page ---------- */
.signin { min-height: 100dvh; display: grid; grid-template-columns: 1.15fr minmax(360px, 0.85fr); }
.signin-hero {
  position: relative;
  overflow: hidden;
  padding: 48px clamp(24px, 5vw, 72px);
  display: flex; flex-direction: column; justify-content: center; gap: 48px;
  background: linear-gradient(155deg, #ffffff 0%, #eef8f4 55%, #dff2ea 100%);
  border-right: 1px solid var(--line-soft);
}
.signin-hero::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--stripe); }
/* Large facet stripes bleeding off the bottom-right, like the logo's leaves. */
.signin-hero::after {
  content: '';
  position: absolute;
  right: -120px; bottom: -120px;
  width: 520px; height: 520px;
  background: repeating-linear-gradient(135deg, transparent 0 22px, #20a090 22px 44px, transparent 44px 50px, #6fd18f 50px 72px, transparent 72px 78px, #00d9ea 78px 100px);
  opacity: 0.1;
  -webkit-mask: radial-gradient(circle at 100% 100%, #000 0 40%, transparent 70%);
  mask: radial-gradient(circle at 100% 100%, #000 0 40%, transparent 70%);
  pointer-events: none;
}
.signin-hero > * { position: relative; z-index: 1; }
.lockup { display: flex; align-items: center; gap: clamp(20px, 3vw, 40px); }
.hero-logo { height: clamp(150px, 20vw, 260px); width: auto; flex: none; filter: drop-shadow(0 18px 30px rgb(16 48 48 / 0.18)); }
.wordmark { font: 800 clamp(64px, 9.5vw, 150px)/0.82 var(--f-display); text-transform: uppercase; letter-spacing: -0.005em; margin: 0; color: var(--brand-ink); }
.wordmark span { display: block; }
.wordmark span + span { font-size: 0.4em; letter-spacing: 0.14em; margin-top: 0.22em; background: linear-gradient(90deg, #0b7a70, #0070a0 60%, #20a090); -webkit-background-clip: text; background-clip: text; color: transparent; }
.signin-tagline { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 34ch; margin-top: 18px; }
.facts { display: flex; gap: 10px 28px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.facts b { display: block; color: var(--brand-ink); font-weight: 600; }
.horizon { display: grid; gap: 10px; max-width: 560px; padding: 18px 20px; background: rgb(255 255 255 / 0.75); border: 1px solid var(--line-soft); border-radius: 14px; box-shadow: var(--shadow-sm); }
.horizon-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.horizon-top .mono { font-size: clamp(20px, 2.4vw, 28px); letter-spacing: -0.04em; color: var(--brand-ink); }
.horizon-bar { position: relative; height: 12px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.horizon-bar i {
  display: block; height: 100%;
  width: calc(var(--p, 0) * 100%);
  background: linear-gradient(90deg, #0f5a63, #0070a0 22%, #0b8f84 45%, #20a090 60%, #00c9dc 80%, #6fd18f);
  background-size: calc(100% / max(var(--p, 0), 0.001)) 100%;
  transition: width 1s linear;
}
/* White gaps every hour, like the logo's facets. */
.horizon-bar::after { content: ''; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 calc(100% / 24 - 2px), #fff calc(100% / 24 - 2px) calc(100% / 24)); }
.horizon-scale { display: flex; justify-content: space-between; font: 400 11px var(--f-mono); color: var(--faint); }
.signin-panel { display: grid; place-items: center; padding: 32px 24px; }
.signin-card { width: min(420px, 100%); padding: 30px; display: grid; gap: 18px; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; }
.signin-card::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--stripe); }
.signin-card h1 { font: 800 34px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--brand-ink); }
.signin-card .seg { width: 100%; }
.signin-card .seg button { flex: 1; justify-content: center; padding: 9px; font-size: 14px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 44px; }
.pw-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.signin-foot { font-size: 13px; color: var(--faint); text-align: center; }

/* competition chooser */
.comp-options { display: grid; gap: 12px; }
.comp-option {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  width: 100%; text-align: left; cursor: pointer; color: inherit;
  padding: 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}
.comp-option::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--comp-c, var(--teal)); }
.comp-option[data-comp='ideathon'] { --comp-c: #6fd18f; --comp-ink: #16794a; --comp-bg: #e9f8ef; }
.comp-option[data-comp='hackathon'] { --comp-c: #0070a0; --comp-ink: #005e87; --comp-bg: #e6f2f9; }
.comp-option:hover { border-color: var(--comp-c); box-shadow: var(--shadow); transform: translateY(-1px); }
.comp-option:focus-visible { outline: 2px solid var(--comp-c); outline-offset: 2px; }
.comp-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--comp-bg); color: var(--comp-ink); }
.comp-icon svg { width: 24px; height: 24px; }
.comp-text { display: grid; gap: 3px; }
.comp-text strong { font: 800 24px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.03em; color: var(--brand-ink); }
.comp-text small { color: var(--muted); font-size: 13px; line-height: 1.4; }
.comp-clock { font: 500 11.5px var(--f-mono); letter-spacing: -0.02em; color: var(--faint); margin-top: 2px; }
.comp-clock[data-kind='live'] { color: var(--live); }
.comp-clock[data-kind='before'] { color: var(--comp-ink); }
.comp-go { color: var(--faint); }
.comp-go svg { width: 20px; height: 20px; }
.comp-option:hover .comp-go { color: var(--comp-c); }
.back-btn { padding-left: 6px; }
.back-btn svg, .back-btn span svg { width: 16px; height: 16px; }
.comp-chip { --c: var(--info); }
.comp-chip[data-comp='ideathon'] { --c: var(--ok); }

/* ---------- competitions: header tag ---------- */
.brand .brand-comp {
  font: 700 11px/1 var(--f-body); text-transform: uppercase; letter-spacing: 0.08em;
  padding: 5px 8px; border-radius: 99px; background: #e6f2f9; color: #005e87; align-self: center;
}
[data-comp='ideathon'] .brand .brand-comp { background: #e9f8ef; color: #16794a; }
.brand .brand-comp:empty { display: none; }

/* ---------- team portal: ideathon ---------- */
.deadline-line { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--muted); }
.deadline-line svg { width: 16px; height: 16px; color: var(--teal-logo); }
.deadline-line b { color: var(--brand-ink); font-weight: 500; }
.idea-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.tips { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.tips li { position: relative; padding-left: 22px; }
.tips li::before { content: ''; position: absolute; left: 2px; top: 7px; width: 9px; height: 9px; border-radius: 3px; background: linear-gradient(135deg, var(--teal-logo), var(--mint)); }
.idea-title { font: 800 32px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--brand-ink); overflow-wrap: anywhere; }
.idea-view section .label { display: block; margin-bottom: 4px; color: var(--teal); }
.idea-view section div { overflow-wrap: anywhere; }
.idea-item { padding: 0; }
.idea-item summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; cursor: pointer; list-style: none; }
.idea-item summary::-webkit-details-marker { display: none; }
.idea-item summary:hover { background: var(--surface-2); }
.idea-item[open] summary { border-bottom: 1px solid var(--line-soft); }
.idea-item .idea-view { padding: 16px 18px 18px; }
.idea-sum { display: grid; gap: 3px; min-width: 0; }
.idea-sum strong { font-weight: 600; font-size: 16px; overflow-wrap: anywhere; }
.idea-sum small { color: var(--faint); font-size: 12.5px; }
.feedback { display: grid; gap: 10px; }
.fb { padding: 10px 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line-soft); }
.fb strong { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--teal); margin-bottom: 2px; }
.fb p { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- judge portal ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; }
.back-link:hover { color: var(--teal); }
.back-link svg { width: 15px; height: 15px; }
.only-mobile { display: none; }
.judge-cta { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 16px 18px; border-radius: 12px; background: linear-gradient(135deg, #eaf7f3, #f2fbf6); border: 1px solid #cfe9df; }
.jrounds { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.jround { display: grid; gap: 6px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--surface); color: inherit; text-decoration: none; height: 100%; }
.jround:hover { border-color: var(--line); color: inherit; box-shadow: var(--shadow-sm); }
.jround.is-open { border-color: var(--teal-logo); box-shadow: 0 0 0 1px var(--teal-logo) inset; }
.jround.is-empty { opacity: 0.65; }
.jround strong { font: 800 20px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.02em; color: var(--brand-ink); }
.jround .round-no { font-size: 13px; }
.jround-progress { display: grid; gap: 4px; }
.jsummary { display: grid; gap: 6px; min-width: 200px; justify-items: end; }
.jsummary .progress { width: 100%; }
.judge-grid { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 20px; align-items: start; }
.jlist { position: sticky; top: 120px; }
.jlist-head { padding: 12px; border-bottom: 1px solid var(--line-soft); }
.jlist-head .search { position: relative; display: block; }
.jlist-head .search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--faint); pointer-events: none; }
.jlist-head .search .input { padding-left: 34px; min-height: 40px; }
.jlist-items { max-height: 66vh; overflow-y: auto; }
.jteam { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.jteam:last-child { border-bottom: 0; }
.jteam:hover { background: var(--surface-2); color: inherit; }
.jteam[aria-current='true'] { background: #e8f6f2; box-shadow: inset 3px 0 0 var(--teal); }
.jteam-main { display: grid; gap: 2px; min-width: 0; }
.jteam-main strong { font-weight: 600; overflow-wrap: anywhere; }
.jteam-main small { color: var(--faint); font-size: 12px; }
.jteam-side { display: grid; justify-items: end; gap: 4px; flex: none; }
.jteam.is-done .jteam-main strong { color: var(--muted); }
.jteam-title { font: 800 30px/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.01em; color: var(--brand-ink); overflow-wrap: anywhere; }
.score-rows { display: grid; gap: 4px; }
.score-row { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(120px, 1.3fr) 84px; gap: 14px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.score-row label { display: grid; gap: 2px; }
.score-row label strong { font-weight: 600; }
.score-row label small { color: var(--faint); font-size: 12px; }
.score-row .score-input { text-align: center; font: 500 15px var(--f-mono); letter-spacing: -0.02em; min-height: 44px; padding: 6px; }
.score-row .score-input[aria-invalid='true'] { border-color: var(--bad); }
.range { width: 100%; accent-color: var(--teal-logo); height: 28px; cursor: pointer; }
.range.is-empty { opacity: 0.35; }
.range:disabled { cursor: default; }
.score-total { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 0; }
.score-total b { font: 500 26px/1 var(--f-mono); letter-spacing: -0.04em; color: var(--brand-ink); }
.score-total .of { color: var(--faint); font: 400 14px var(--f-mono); }
.save-line { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- organiser: judges & assignments ---------- */
.ok-text { color: var(--ok); font-weight: 600; }
.seg a.seg-link { color: var(--muted); padding: 7px 13px; border-radius: 8px; font-weight: 600; font-size: 13px; text-decoration: none; }
.seg a.seg-link:hover { color: var(--text); }
.seg a.seg-link[aria-current='page'] { background: var(--surface); color: var(--brand-ink); box-shadow: 0 1px 3px rgb(16 48 48 / 0.14); }
.matrix th.num, .matrix td.num { text-align: center; }
.matrix td { padding: 6px 10px; }
.matrix tr.is-ineligible td { opacity: 0.55; }
.cell-check { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.cell-check:hover { background: var(--surface-3); }
.cell-check input { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; margin: 0; }
.cell-check.is-done { background: #e3f5ea; box-shadow: inset 0 0 0 1px #bfe3cc; }
.table tfoot th, .table tfoot td { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; font-weight: 600; position: static; }
.judges-btn { font: 500 13px var(--f-mono); letter-spacing: -0.02em; padding: 4px 8px; }
.judges-btn.is-complete { color: var(--ok); }
.judging-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.judging-round { display: grid; gap: 6px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line-soft); color: inherit; text-decoration: none; }
.judging-round:hover { border-color: var(--line); color: inherit; }
.judging-round.is-open { border-color: var(--teal-logo); background: linear-gradient(180deg, #f1fbf8, var(--surface)); }
.judging-round strong { font-weight: 600; }
.judging-round .round-no { font-size: 13px; }
.sheet .score-input::placeholder { color: #7fa39d; font-style: italic; }
.results-table .input { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.results-table .team-cell { min-width: 150px; }

@media (max-width: 1080px) {
  .idea-grid { grid-template-columns: 1fr; }
  .judge-hero .hero-dial { order: 2; }
}
@media (max-width: 900px) {
  .judge-grid { grid-template-columns: 1fr; }
  .judge-grid.has-team .jlist { display: none; }
  .jlist { position: static; }
  .only-mobile { display: inline-flex; }
  .jsummary { justify-items: start; }
}
@media (max-width: 640px) {
  .grid-3 { grid-template-columns: 1fr; }
  .score-row { grid-template-columns: 1fr 84px; gap: 6px 12px; }
  .score-row .range { grid-column: 1 / -1; grid-row: 2; }
  .idea-item summary { flex-direction: column; align-items: start; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100dvh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 16px; padding: 24px; }
.lost img { height: 120px; width: auto; }
.lost .wordmark { font-size: clamp(80px, 18vw, 160px); }

/* ---------- print: credential slips ---------- */
#print-area { display: none; }
@media print {
  @page { margin: 12mm; }
  body { background: #fff !important; color: #000 !important; }
  body::before { display: none; }
  body > *:not(#print-area) { display: none !important; }
  #print-area { display: grid !important; grid-template-columns: 1fr 1fr; gap: 6mm; }
  .slip { border: 1.5px dashed #555; border-radius: 3mm; padding: 5mm 6mm; break-inside: avoid; font: 11pt/1.4 var(--f-body); color: #000; display: grid; grid-template-columns: auto 1fr; gap: 0 5mm; align-items: start; }
  .slip img { height: 24mm; width: auto; }
  .slip h3 { font: 800 16pt/1 var(--f-display); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 1mm; }
  .slip .team { font-weight: 700; font-size: 12pt; margin: 1mm 0 2mm; }
  .slip dl { display: grid; grid-template-columns: auto 1fr; gap: 1mm 4mm; margin: 0; }
  .slip dt { color: #444; }
  .slip dd { margin: 0; font: 500 12pt var(--f-mono); }
  .slip small { display: block; margin-top: 3mm; color: #444; font-size: 9pt; grid-column: 1 / -1; }
}

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-dial { grid-template-columns: minmax(200px, 260px) 1fr; align-items: center; text-align: left; }
  .hero-dial .event-line { text-align: left; }
  .two-col, .help-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .console { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-bar { display: block; position: sticky; top: 0; z-index: 20; background: rgb(255 255 255 / 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); padding: 0 16px; }
  .mobile-bar::before { content: ''; display: block; height: 4px; margin: 0 -16px 8px; background: var(--stripe); }
  .mobile-bar .brand img { height: 32px; }
  .mobile-bar .nav { display: flex; overflow-x: auto; gap: 4px; padding: 8px 0 10px; scrollbar-width: none; }
  .mobile-bar .nav a { white-space: nowrap; padding: 7px 10px; }
  .signin { grid-template-columns: 1fr; }
  .signin-hero { gap: 28px; padding-top: 40px; padding-bottom: 32px; border-right: 0; border-bottom: 1px solid var(--line-soft); }
  .signin-panel { padding-top: 28px; padding-bottom: 48px; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .topbar-inner { padding: 8px 16px 0; }
  .brand img { height: 32px; }
  .wrap { padding: 20px 16px 64px; }
  .who-name { display: none; }
  .hero-dial { grid-template-columns: 1fr; text-align: center; }
  .hero-dial .event-line { text-align: center; }
  .standing { padding: 22px 18px; }
  .path { grid-template-columns: 1fr; gap: 14px; }
  .path li { padding: 6px 0 0 52px; min-height: 38px; }
  .path li::before { top: 42px; bottom: -14px; left: 18px; right: auto; width: 3px; height: auto; }
  .path li.is-done::before { background: linear-gradient(180deg, var(--teal-logo), var(--mint)); }
  .crit { grid-template-columns: 1fr auto; }
  .crit .bar { grid-column: 1 / -1; grid-row: 2; }
  .form-grid { grid-template-columns: 1fr; }
  .tl-item { grid-template-columns: 1fr; gap: 2px; }
  .card { padding: 16px; }
  .round-card { padding: 18px; }
  .msg { max-width: 92%; }
  .sheet-note { grid-template-columns: 1fr; }
  .crit-edit { grid-template-columns: 1fr 84px auto; }
  .toasts { right: 16px; left: 16px; bottom: 16px; width: auto; }
  .signin-card { padding: 24px 18px; }
  .lockup { gap: 16px; }
  .hero-logo { height: 118px; }
  .wordmark { font-size: 62px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
