@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("fonts/sora-600.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("fonts/sora-700.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-400.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-500.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-600.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #f9fbfd;
  --surface: #ffffff;
  --surface-2: #f0f4f6;
  --fill: #eaeff3;
  --line: #d9dfe3;
  --text: #0f1c24;
  --text-2: #5a656c;
  --text-3: #87929a;
  --accent: #016567;
  --accent-subtle: #dbf0f0;
  --on-accent: #ffffff;
  --brand: #11212b;
  --on-brand: #f3f6f8;
  --on-brand-2: #9fb0bb;
  --success: #007c59;
  --success-subtle: #d9f1e8;
  --warning: #bb731b;
  --warning-subtle: #fbecd8;
  --danger: #ba2b28;
  --danger-subtle: #fadedc;
  --info: #004143;
  --info-subtle: #dbf0f0;
  --sand: #11212b;
  --on-sand: #9fb0bb;
  --radius: 12px;
  --shadow: 0 1px 2px rgb(15 28 36 / 0.05), 0 4px 16px rgb(15 28 36 / 0.05);
  --heading: "Sora", ui-sans-serif, system-ui, sans-serif;
  font-family: "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b141a; --surface: #13202a; --surface-2: #172631; --fill: #1d2e3a; --line: #263845;
    --text: #e8eef2; --text-2: #9fb0bb; --text-3: #6c7d88;
    --accent: #5cc3c4; --accent-subtle: #0f3335; --on-accent: #0b141a;
    --brand: #070e13; --on-brand-2: #8a9ca8;
    --success: #4cc79a; --success-subtle: #0f2e24; --warning: #e9a95a; --warning-subtle: #33240f;
    --danger: #f08c86; --danger-subtle: #3a1715; --info: #8fd3d4; --info-subtle: #0f3335;
    --sand: #070e13; --on-sand: #8a9ca8; --shadow: none;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font-size: 15px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--heading); font-weight: 700; font-size: 28px; letter-spacing: -0.02em; margin: 0 0 4px; }
h2 { font-family: var(--heading); font-weight: 600; font-size: 17px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; }
p { margin: 0 0 8px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); font-size: 13px; }
.hidden { display: none !important; }

.banner { background: var(--sand); color: var(--on-sand); text-align: center; font-size: 11px; font-weight: 600; padding: 6px 12px; letter-spacing: 0.08em; text-transform: uppercase; }
.layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: calc(100vh - 29px); }
.layout > main { min-width: 0; }
.grid > *, .stack > *, .row > * { min-width: 0; }
.topbar { display: none; }
.sidebar { background: var(--brand); color: var(--on-brand); padding: 18px 14px 14px; display: flex; flex-direction: column; gap: 6px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 6px 16px; }
.brand img { width: 88px; height: 44px; border-radius: 8px; object-fit: cover; }
.brand strong { display: block; font-family: var(--heading); font-size: 15px; }
.brand span { color: var(--on-brand-2); font-size: 12px; }
.venue-pick { gap: 6px; color: var(--on-brand-2); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 4px 10px; }
.venue-pick select, .sidebar select { width: 100%; background: rgb(255 255 255 / 0.08); color: var(--on-brand); border: 1px solid rgb(255 255 255 / 0.16); border-radius: 10px; padding: 9px 10px; font: 500 14px/1.2 var(--body); text-transform: none; letter-spacing: 0; }
.sidebar select option { color: #141a18; }
.venue-name { display: flex; align-items: center; gap: 8px; margin: 0 4px 10px; padding: 9px 10px; border-radius: 10px; background: rgb(255 255 255 / 0.06); color: var(--on-brand); font-weight: 500; font-size: 14px; }
.nav { display: flex; flex-direction: column; gap: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { color: var(--on-brand-2); opacity: 0.75; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; padding: 0 12px 4px; }
.nav a { display: flex; align-items: center; gap: 11px; color: var(--on-brand-2); padding: 8px 12px; border-radius: 10px; font-weight: 500; font-size: 14.5px; transition: background 0.12s ease, color 0.12s ease; }
.nav a .icon { opacity: 0.85; flex: none; }
.nav a:hover { background: rgb(255 255 255 / 0.07); color: var(--on-brand); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--accent); color: #ffffff; box-shadow: 0 4px 14px rgb(1 101 103 / 0.35); }
.nav a[aria-current="page"] .icon { opacity: 1; }
.nav .count { margin-left: auto; background: var(--danger); color: #fff; border-radius: 99px; font-size: 11px; font-weight: 600; padding: 1px 7px; }
.sidebar .spacer { flex: 1; min-height: 12px; }
.user-box { display: flex; align-items: center; gap: 10px; border-top: 1px solid rgb(255 255 255 / 0.12); padding: 12px 4px 2px; font-size: 13px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 600 13px/1 var(--heading); flex: none; }
.user-meta { min-width: 0; flex: 1; }
.user-meta strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta span { display: block; color: var(--on-brand-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-button { background: transparent; border: 1px solid rgb(255 255 255 / 0.16); color: var(--on-brand-2); width: 34px; height: 34px; padding: 0; border-radius: 10px; display: grid; place-items: center; flex: none; }
.icon-button:hover { color: var(--on-brand); background: rgb(255 255 255 / 0.08); }
.user-box .pill-admin, .brand .pill-admin { display: inline-block; }

.auth-page { min-height: calc(100vh - 29px); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand { position: relative; overflow: hidden; background: radial-gradient(700px 400px at 100% 0%, rgb(92 195 196 / 0.25), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgb(1 101 103 / 0.45), transparent 60%), #11212b; color: #eef3f6; padding: 48px 56px; display: flex; flex-direction: column; gap: 40px; }
.auth-logo { width: 150px; height: auto; border-radius: 10px; }
.auth-pitch { margin-block: auto; max-width: 480px; }
.auth-eyebrow { color: #5cc3c4; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.auth-title { font-family: var(--heading); font-weight: 700; font-size: clamp(28px, 3vw, 40px); line-height: 1.15; letter-spacing: -0.02em; margin: 14px 0 30px; color: #fff; }
.auth-pitch ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.auth-pitch li { display: flex; gap: 14px; align-items: flex-start; color: #b9c7cf; font-size: 15px; }
.auth-pitch li .icon { color: #5cc3c4; flex: none; margin-top: 1px; }
.auth-foot { color: #6c7d88; font-size: 12px; margin: 0; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; background: var(--bg); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 30px; }
.auth-mobile-logo { display: none; }

@media (max-width: 960px) {
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30; background: var(--brand); color: var(--on-brand); padding: 10px 12px 10px 16px; border-bottom: 1px solid rgb(255 255 255 / 0.08); }
  .topbar-logo img { height: 34px; width: auto; border-radius: 6px; display: block; }
  .topbar-title { flex: 1; font-family: var(--heading); font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .menu-toggle { background: transparent; border: 1px solid rgb(255 255 255 / 0.18); color: var(--on-brand); width: 44px; height: 44px; padding: 0; border-radius: 12px; display: grid; place-items: center; }
  .layout { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .sidebar { display: none; position: fixed; inset: 0; z-index: 25; height: auto; padding: 108px 16px 16px; }
  .sidebar .brand { display: none; }
  .layout.menu-open .sidebar { display: flex; }
  .nav a { padding: 12px; font-size: 16px; }
  .auth-page { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-mobile-logo { display: block; width: 140px; border-radius: 10px; margin-bottom: 8px; }
}

main { padding: 28px 32px 48px; max-width: 1240px; width: 100%; }
main > * + * { margin-top: 16px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }

.card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); border: 1px solid var(--line); }
.card.stat { transition: transform 0.15s ease; }
a.card:hover, .card.link:hover { border-color: var(--accent); }
details > summary { cursor: pointer; font-weight: 600; color: var(--accent); margin: 4px 0 10px; }
.grid { display: grid; gap: 14px; }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .value { font-family: var(--heading); font-size: 30px; font-weight: 700; letter-spacing: -0.02em; }
.stat .label { color: var(--text-2); font-size: 13px; }
.stat.danger .value { color: var(--danger); }
.stat.warning .value { color: var(--warning); }
.stat.success .value { color: var(--success); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.pass { background: var(--success-subtle); color: var(--success); }
.badge.warning { background: var(--warning-subtle); color: var(--warning); }
.badge.fail { background: var(--danger-subtle); color: var(--danger); }
.badge.neutral { background: var(--fill); color: var(--text-2); }
.badge.info { background: var(--info-subtle); color: var(--info); }
.badge.accent { background: var(--accent-subtle); color: var(--accent); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: break-word; }
td:first-child { min-width: 160px; }
thead th { position: sticky; top: 0; background: var(--surface); }
tr:last-child td { border-bottom: none; }
tr.link { cursor: pointer; }
tr.link:hover td { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.temp { font-weight: 700; font-variant-numeric: tabular-nums; }
.strike { text-decoration: line-through; color: var(--text-3); }
.table-wrap { overflow-x: auto; }

button, .button { font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 18px; border: 1px solid transparent; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
button.primary, .button.primary { background: var(--accent); color: var(--on-accent); }
button.secondary, .button.secondary { background: transparent; color: var(--accent); border-color: var(--line); }
button.danger { background: transparent; color: var(--danger); border-color: var(--line); }
button.ghost { background: rgb(255 255 255 / 0.1); color: var(--on-brand); border-color: rgb(255 255 255 / 0.2); padding: 6px 14px; font-size: 13px; }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.link { background: none; border: none; padding: 0; color: var(--accent); font-weight: 600; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.field-error { color: var(--danger); font-size: 12px; font-weight: 500; }
.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-weight: 500; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
form.stack { max-width: 520px; }
.segmented { display: inline-flex; background: var(--fill); border-radius: 99px; padding: 3px; gap: 3px; }
.segmented button { background: transparent; color: var(--text-2); padding: 7px 14px; font-size: 13px; }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.notice { border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.notice.info { background: var(--info-subtle); color: var(--info); }
.notice.danger { background: var(--danger-subtle); color: var(--danger); }
.notice.success { background: var(--success-subtle); color: var(--success); }
.notice.warning { background: var(--warning-subtle); color: var(--warning); }
.empty { text-align: center; color: var(--text-2); padding: 36px 12px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button { background: none; color: var(--text-2); border-radius: 0; padding: 10px 14px; border-bottom: 2px solid transparent; }
.tabs button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }

.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline .entry { border-left: 3px solid var(--line); padding: 2px 0 2px 14px; }
.timeline .entry.fail { border-color: var(--danger); }
.timeline .entry.warning { border-color: var(--warning); }
.timeline .entry.pass { border-color: var(--success); }
ul.plain { margin: 6px 0 0; padding-left: 18px; }
ul.plain li { margin-bottom: 4px; }
.code-box { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: 0.12em; background: var(--surface-2); border: 1px dashed var(--line); border-radius: 12px; padding: 14px 18px; text-align: center; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-family: ui-monospace, Menlo, monospace; }

dialog { border: none; border-radius: 20px; padding: 24px; max-width: 480px; width: calc(100% - 32px); background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgb(0 0 0 / 0.25); }
dialog::backdrop { background: rgb(0 0 0 / 0.35); }

.divider { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; }
.divider::before, .divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

@media (max-width: 960px) {
  main { padding: 20px 16px 40px; }
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

h3 { font-family: var(--heading); font-weight: 600; font-size: 14px; margin: 0; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.05em; }
.stack.tight { gap: 8px; }
.temp.big { font-family: var(--heading); font-size: 22px; font-weight: 700; }
.card.issue { border-left: 4px solid var(--line); }
.card.issue.fail { border-left-color: var(--danger); }
.card.issue.warning { border-left-color: var(--warning); }
.card.issue.pass { border-left-color: var(--success); }
.card.issue > * + * { margin-top: 14px; }
.review-form textarea { width: 100%; box-sizing: border-box; }
form.stack.wide { max-width: none; }
label.check.inline { flex-direction: row; align-items: center; font-weight: 500; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.fact { display: flex; flex-direction: column; gap: 2px; }
.fact span { color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; }
.card.signed { border-color: var(--success); background: var(--success-subtle); }
blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 8px 8px 0; }
table.compact td, table.compact th { padding: 6px 10px; }
.print-logo { display: none; height: 36px; margin-bottom: 6px; }
.alert-strip { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }

@media (max-width: 960px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media print {
  :root { --bg: #ffffff; --shadow: none; }
  .banner, .sidebar, .page-head .row, .no-print, details { display: none !important; }
  .layout { display: block; }
  main { padding: 0; max-width: none; }
  .card { break-inside: avoid; border-color: #cfd6db; }
  .print-logo { display: block; }
  .table-wrap { overflow: visible; max-height: none; }
  thead th { position: static; }
  a { color: inherit; }
}

h1, h2 { overflow-wrap: anywhere; }
td, .faint, .muted, .user-meta, .venue-name, .topbar-title, blockquote { unicode-bidi: plaintext; }
body.menu-locked { overflow: hidden; }
@media (min-width: 961px) { body.menu-locked { overflow: auto; } }
