/* =========================================================================
   Gtestspace — design system
   Light, quiet, fast. Inter, a restrained blue, status colours that mean
   something, subtle borders instead of floating cards.
   ========================================================================= */
@font-face { font-family: 'Inter'; src: url(fonts/inter.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #f8f9fa; --surface: #fff; --surface-2: #f1f3f4; --hover: #f1f3f4; --press: #e8eaed;
  --text: #202124; --text-2: #5f6368; --text-3: #6f7378;
  --line: #dadce0; --line-2: #e8eaed;
  --blue: #1a73e8; --blue-6: #1967d2; --blue-7: #185abc; --blue-50: #e8f0fe; --blue-100: #d2e3fc;
  --green: #188038; --green-7: #137333; --green-50: #e6f4ea; --green-100: #ceead6;
  --yellow: #f9ab00; --amber: #b06000; --yellow-50: #fef7e0; --yellow-100: #feefc3;
  --red: #d93025; --red-7: #c5221f; --red-50: #fce8e6; --red-100: #fad2cf;
  --purple: #8430ce; --purple-50: #f3e8fd;
  --radius: 8px; --radius-sm: 6px; --radius-lg: 12px;
  --shadow-1: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15);
  --shadow-2: 0 1px 3px rgba(60, 64, 67, .3), 0 4px 8px 3px rgba(60, 64, 67, .15);
  --f: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --fd: var(--f);
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace;
  --nav-w: 248px;
  /* names older templates still use */
  --ok: var(--green); --warn: var(--amber); --bad: var(--red); --dim: var(--text-2);
  --gold: var(--blue); --gold2: var(--text); --ember: var(--blue); --ember2: var(--blue-6);
  --line2: var(--line);
}
* { box-sizing: border-box; min-width: 0; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--f); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--blue); text-decoration: none; } a:hover { text-decoration: underline; }
b, strong { font-weight: 600; }
h1, h2, h3 { margin: 0; font-weight: 500; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
svg { flex: none; }
::selection { background: var(--blue-100); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mono { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; }
.spacer, .grow { flex: 1; }
.sep { height: 1px; background: var(--line-2); margin: 16px 0; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: var(--surface); color: var(--text-2); font: 500 11px var(--f); margin: 0 1px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle; flex: none; }
.token { display: inline-block; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12); vertical-align: -1px; }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.status-dot.ok { background: var(--green); } .status-dot.warn { background: var(--yellow); } .status-dot.bad { background: var(--red); }

/* ---------------------------------------------------------------- shell */
#app { min-height: 100vh; display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); grid-template-rows: 64px auto; }
body.nav-mini #app { --nav-w: 72px; }
.appbar { grid-column: 1 / -1; position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 4px; padding: 0 12px 0 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: none; color: var(--text-2); cursor: pointer; position: relative; flex: none; }
.iconbtn:hover { background: var(--hover); } .iconbtn svg { width: 22px; height: 22px; }
.iconbtn .badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/16px var(--f); }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 0 4px; height: 48px; color: var(--text-2); font-size: 21px; letter-spacing: -.01em; white-space: nowrap; text-decoration: none !important; }
.brand b { font-weight: 400; }
.brand #brandLogo { display: grid; } .brand svg { width: 32px; height: 32px; }
.evchip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--surface-2); color: var(--text-2); font-size: 12.5px; white-space: nowrap; margin-left: 4px; }
.evchip.live { background: var(--green-50); color: var(--green-7); }
.evchip.sim { background: var(--yellow-50); color: var(--amber); } .evchip.sim.live::before { background: var(--yellow); }
.evchip.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: breathe 2.4s ease-in-out infinite; }
.search { flex: 1; max-width: 720px; margin: 0 auto 0 24px; height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 8px 0 14px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text-2); cursor: text; text-align: left; transition: background .15s, box-shadow .15s; }
.search:hover { background: #e9ebee; } .search span { flex: 1; font-size: 15px; } .search svg { width: 20px; height: 20px; }
.acct { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--blue); color: #fff; font: 500 14px var(--f); cursor: pointer; margin-left: 6px; flex: none; }
.acct:hover { box-shadow: 0 0 0 4px var(--hover); }
@keyframes breathe { 50% { opacity: .35; } }
.iconbtn.dotted::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2px var(--surface); display: none; }
@media (max-width: 860px) { .iconbtn.dotted::after { display: block; } }

.sidenav { grid-column: 1; grid-row: 2; position: sticky; top: 64px; height: calc(100vh - 64px); overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; padding: 8px 12px 12px 0; }
.newbtn { display: inline-flex; align-items: center; gap: 12px; height: 56px; margin: 4px 0 12px 8px; padding: 0 22px 0 16px; border: 0; border-radius: 16px; background: var(--surface); color: var(--text); font: 500 14px var(--f); box-shadow: var(--shadow-1); cursor: pointer; align-self: flex-start; transition: box-shadow .15s, background .15s; }
.newbtn:hover { box-shadow: var(--shadow-2); background: #fafbfc; } .newbtn svg { width: 24px; height: 24px; color: var(--blue); }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav button { display: flex; align-items: center; gap: 18px; width: 100%; height: 36px; padding: 0 12px 0 24px; border: 0; border-radius: 0 18px 18px 0; background: none; color: var(--text); font: 500 14px var(--f); cursor: pointer; text-align: left; white-space: nowrap; }
.nav button svg { width: 20px; height: 20px; color: var(--text-2); }
.nav button:hover { background: var(--hover); }
.nav button.on { background: var(--blue-50); color: var(--blue-6); font-weight: 600; } .nav button.on svg { color: var(--blue-6); }
.nav button span:first-of-type { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.nav .count { min-width: 20px; padding: 0 6px; border-radius: 10px; font: 600 12px/20px var(--f); text-align: center; color: var(--text-2); }
.nav button.on .count { color: var(--blue-6); }
.nav .count.hot, .nav button.on .count.hot { background: var(--blue); color: #fff; } .nav .count.err, .nav button.on .count.err { background: var(--red); color: #fff; }
.side-foot { margin-top: auto; padding: 16px 12px 4px 24px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.clock { font: 500 20px var(--f); color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.clock small { display: block; font: 400 12px var(--f); color: var(--text-2); letter-spacing: 0; }
.mailstat { display: flex; align-items: center; gap: 8px; margin-top: 10px; cursor: pointer; }
.mailstat:hover { color: var(--text); }
body.nav-mini .nav button { padding: 0; justify-content: center; border-radius: 18px; margin-left: 12px; width: 48px; gap: 0; }
body.nav-mini .nav button span, body.nav-mini .side-foot, body.nav-mini .newbtn span { display: none; }
body.nav-mini .newbtn { padding: 0; width: 56px; justify-content: center; margin-left: 8px; }
body.nav-mini .nav button .count { display: block; position: absolute; transform: translate(14px, -10px); min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; background: var(--blue); color: #fff; }
body.nav-mini .nav button { position: relative; }
body.nav-mini .brand b, body.nav-mini .evchip { display: inline-flex; }

main { grid-column: 2; grid-row: 2; min-width: 0; padding: 0 28px 64px; }
.pagehead { display: flex; align-items: flex-end; gap: 16px; padding: 22px 0 6px; flex-wrap: wrap; }
.pagehead h1 { font: 400 24px/1.25 var(--f); letter-spacing: -.01em; }
.pagehead h1:focus { outline: none; }
.pagehead h1 small { display: block; margin-top: 2px; font: 400 14px var(--f); color: var(--text-2); letter-spacing: 0; }
.top-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.strip { display: flex; align-items: center; gap: 8px; padding: 10px 0 16px; overflow-x: auto; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.sc { flex: none; display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); color: var(--text); font: 500 13px var(--f); white-space: nowrap; cursor: pointer; }
.sc:hover { background: var(--hover); }
.sc .t { color: var(--text-2); font-weight: 400; } .sc .n { color: var(--text-3); font-weight: 400; } .sc .dim { color: var(--text-3); font-weight: 400; }
.sc .mono { font-weight: 600; }
.sc.live { border-color: var(--green-100); background: var(--green-50); }
.sc.live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.sc.live.warn { border-color: var(--yellow-100); background: var(--yellow-50); } .sc.live.warn::before { background: var(--yellow); }
.sc.live.hot { border-color: var(--red-100); background: var(--red-50); } .sc.live.hot::before { background: var(--red); animation: breathe 1s infinite; }
.sc.gold { border-color: #202124; background: #202124; color: #fff; } .sc.gold .mono { color: #e9d2fd; }
.sc.bad { border-color: var(--red-100); background: var(--red-50); color: var(--red-7); }
.sc.att { border-color: var(--blue-100); background: var(--blue-50); color: var(--blue-6); }
.sc.quiet { cursor: default; color: var(--text-2); font-weight: 400; } .sc.quiet:hover { background: var(--surface); }
.warnword { color: var(--red-7); font-weight: 600; }
.tabbar { display: none; }
.demo-note { margin: 0 0 16px; padding: 10px 14px; border-radius: var(--radius); background: var(--blue-50); color: #174ea6; font-size: 13px; }
.scrim { display: none; }

/* ---------------------------------------------------------------- building blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 20px; }
.card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font: 500 15px var(--f); color: var(--text); letter-spacing: 0; text-transform: none; }
.card h3 .pill { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 11px; background: var(--blue); color: #fff; font: 600 12px/22px var(--f); text-align: center; }
.card h3 .btn { font-weight: 500; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.span2 { grid-column: 1 / -1; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 24px 0 10px; font: 500 13px var(--f); color: var(--text-2); }
.section-title:first-child { margin-top: 4px; }
.section-title .hint { margin-left: auto; font-weight: 400; color: var(--text-3); font-size: 12px; }
.kicker { font: 500 12px var(--f); color: var(--text-2); letter-spacing: 0; text-transform: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--text-2); font-size: 13.5px; }
.empty b { display: block; margin-bottom: 4px; color: var(--text); font: 500 15px var(--f); }
.card.empty { padding: 36px 20px; }
.errline { margin-top: 8px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--red-50); color: var(--red-7); font-size: 13px; }
pre.cmd { margin: 8px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font: 12.5px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface); color: var(--blue); font: 500 14px var(--f); cursor: pointer; white-space: nowrap; text-decoration: none; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: #f6f9fe; border-color: #d2e3fc; text-decoration: none; }
.btn:active { background: var(--blue-50); }
.btn svg { width: 18px; height: 18px; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn.primary:hover { background: var(--blue-6); border-color: var(--blue-6); box-shadow: 0 1px 2px rgba(60, 64, 67, .3), 0 1px 3px 1px rgba(60, 64, 67, .15); }
.btn.gold { background: var(--blue-50); border-color: var(--blue-50); color: var(--blue-6); } .btn.gold:hover { background: var(--blue-100); border-color: var(--blue-100); }
.btn.ghost { border-color: transparent; background: none; color: var(--text-2); } .btn.ghost:hover { background: var(--hover); color: var(--text); }
.btn.danger { color: var(--red-7); } .btn.danger:hover { background: var(--red-50); border-color: var(--red-100); }
.btn.ghost.danger { color: var(--text-3); } .btn.ghost.danger:hover { color: var(--red-7); background: var(--red-50); }
.btn.on { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-6); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; } .btn.sm svg { width: 16px; height: 16px; }
.btn.xs { height: 28px; padding: 0 10px; font-size: 12.5px; gap: 6px; border-radius: 6px; } .btn.xs svg { width: 15px; height: 15px; }
.btn[disabled] { opacity: .45; cursor: default; pointer-events: none; }
.btn kbd { height: 18px; min-width: 18px; font-size: 10.5px; }
.btn.primary kbd { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .35); color: #fff; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; max-width: 100%; padding: 0 9px; border-radius: 11px; border: 0; background: var(--surface-2); color: var(--text-2); font: 500 12px var(--f); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip svg { width: 13px; height: 13px; }
.chip.ok { background: var(--green-50); color: var(--green-7); }
.chip.late, .chip.bad { background: var(--red-50); color: var(--red-7); }
.chip.warn { background: var(--yellow-50); color: var(--amber); }
.chip.live { background: var(--green-50); color: var(--green-7); }
.chip.live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.chip.gold, .chip.blue { background: var(--blue-50); color: var(--blue-6); }
.chip.how { background: none; box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-weight: 400; }
.chip.val { cursor: pointer; background: var(--blue-50); color: var(--blue-7); font-weight: 600; font-variant-numeric: tabular-nums; }
.chip.val:hover { background: var(--blue-100); }
.chip.val.judge { box-shadow: inset 0 0 0 1px var(--blue); }
.chip.val.none { background: var(--yellow-50); color: var(--amber); }
.pill { display: inline-block; }

/* forms */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; margin-bottom: 6px; font: 500 12.5px var(--f); color: var(--text-2); letter-spacing: 0; text-transform: none; }
.field > em { display: block; margin-top: 5px; font-style: normal; font-size: 12px; color: var(--text-3); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], input[type=datetime-local], input:not([type]), select, textarea {
  width: 100%; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: var(--text); outline: none; transition: border-color .12s, box-shadow .12s; }
textarea { resize: vertical; line-height: 1.5; }
select { padding-right: 32px; appearance: none; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='20' height='20'%3E%3Cpath d='M7 10l5 5 5-5' fill='none' stroke='%235f6368' stroke-width='1.8'/%3E%3C/svg%3E") no-repeat right 8px center; }
input:hover, select:hover, textarea:hover { border-color: #bdc1c6; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
input[type=file] { font-size: 13px; color: var(--text-2); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
.fl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; } .fl3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.toggle { display: flex; align-items: center; gap: 12px; margin: 6px 0 12px; cursor: pointer; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle i { position: relative; flex: none; width: 36px; height: 14px; border-radius: 7px; background: #bdc1c6; transition: background .15s; }
.toggle i::after { content: ''; position: absolute; top: -3px; left: -2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-1); transition: transform .15s, background .15s; }
.toggle input:checked + i { background: #8ab4f8; } .toggle input:checked + i::after { transform: translateX(18px); background: var(--blue); }
.toggle input:focus-visible + i { outline: 2px solid var(--blue); outline-offset: 4px; }
.toggle input:disabled + i { opacity: .5; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; background: var(--surface); }
.seg button { height: 34px; padding: 0 14px; border: 0; border-right: 1px solid var(--line); background: none; color: var(--text); font: 500 13px var(--f); cursor: pointer; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--hover); }
.seg button.on { background: var(--blue-50); color: var(--blue-6); }
.seg button[disabled] { color: var(--text-3); cursor: default; }
.trow { display: grid; grid-template-columns: minmax(0, 1fr) 110px 130px 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.mrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) 36px; gap: 8px; margin-bottom: 8px; align-items: center; }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 0; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .1); }
.swatches button.on { box-shadow: 0 0 0 2px #fff, 0 0 0 4px currentColor; }
.dropping { outline: 2px dashed var(--blue); outline-offset: -2px; background: var(--blue-50) !important; }

/* tables */
.tblwrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { padding: 10px 10px; border-bottom: 1px solid var(--line); text-align: left; font: 500 12.5px var(--f); color: var(--text-2); white-space: nowrap; }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover td { background: #f8fafd; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl .r { text-align: right; } .tbl .c { text-align: center; }
.tbl td.team { white-space: nowrap; font-weight: 500; }
.tbl .pts { font-weight: 600; font-variant-numeric: tabular-nums; }
.tbl.lb td.rk { width: 36px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tbl.lb tr.rank1 td.rk { color: var(--amber); font-weight: 700; }
.tbl.lb td.cell { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl.lb td.cell.place { color: var(--blue-7); font-weight: 600; }
.tbl.lb td.cell.missed { color: var(--red-7); }
.tbl.lb td.cell.none { color: var(--line); }
.tbl.lb td.cell.pend, .pts.pend { color: var(--text-3) !important; font-style: italic; }
.tbl.lb th.c { color: var(--text-3); }
.tbl.lb td:nth-child(1), .tbl.lb th:nth-child(1) { position: sticky; left: 0; background: var(--surface); z-index: 1; }
.tbl.lb td:nth-child(2), .tbl.lb th:nth-child(2) { position: sticky; left: 36px; background: var(--surface); z-index: 1; box-shadow: 1px 0 0 var(--line-2); }
.tbl.lb tbody tr:hover td:nth-child(-n+2) { background: #f8fafd; }
.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 10px 16px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--text-2); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--blue); border-radius: 3px; }
.meter.warn i { background: var(--yellow); } .meter.bad i { background: var(--red); }
.bar { height: 4px; border-radius: 2px; background: var(--line-2); overflow: hidden; margin: 10px 0; }
.bar i { display: block; height: 100%; background: var(--blue); transition: width 1s linear; }
.count-big { font: 500 28px/1.1 var(--f); font-variant-numeric: tabular-nums; letter-spacing: -.01em; color: var(--text); }
.count-big.warn { color: var(--red-7); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input[type=search] { flex: 1 1 240px; } .filters select { width: auto; flex: 0 1 200px; }

/* ---------------------------------------------------------------- home */
.home-greet { margin: -2px 0 14px; color: var(--text-2); font-size: 14px; }
.card.overview { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; padding: 0; overflow: hidden; }
.ov { padding: 16px 20px; border-right: 1px solid var(--line-2); min-width: 0; }
.ov:last-child { border-right: 0; }
.ov .lbl { font: 500 12.5px var(--f); color: var(--text-2); display: flex; align-items: center; gap: 6px; }
.ov .val { margin-top: 6px; font: 400 26px/1.15 var(--f); letter-spacing: -.01em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov .val.small { font-size: 17px; line-height: 1.35; white-space: normal; }
.ov .osub { margin-top: 4px; font-size: 12.5px; color: var(--text-2); }
.ov.link { cursor: pointer; } .ov.link:hover { background: #fafbfc; }
.ov-tl { grid-column: 1 / -1; border-top: 1px solid var(--line-2); padding: 6px 20px 14px; border-right: 0; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 16px; margin-top: 16px; align-items: start; }
.home-col { display: grid; gap: 16px; min-width: 0; }
.attn-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.attn-row:first-of-type { border-top: 0; padding-top: 2px; }
.attn-row .ai { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2); color: var(--text-2); }
.attn-row .ai svg { width: 16px; height: 16px; }
.attn-row .ai.blue { background: var(--blue-50); color: var(--blue-6); } .attn-row .ai.red { background: var(--red-50); color: var(--red-7); }
.attn-row .ai.yellow { background: var(--yellow-50); color: var(--amber); } .attn-row .ai.green { background: var(--green-50); color: var(--green-7); }
.attn-row .ai.purple { background: var(--purple-50); color: var(--purple); }
.attn.ok .calm { display: flex; align-items: center; gap: 10px; color: var(--text-2); font-size: 13.5px; }
.live-row { padding: 14px 0; border-top: 1px solid var(--line-2); }
.live-row:first-of-type { border-top: 0; padding-top: 2px; }
.live-row .lt { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.live-row .lt b { font-weight: 500; font-size: 15px; }
.live-row .who-in { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.who-in .chip { height: 20px; font-size: 11.5px; padding: 0 7px; }
.who-in .chip .dot { width: 7px; height: 7px; }
.who-in .chip.ok { background: var(--green-50); }
.standing { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 0; font-size: 13.5px; border-top: 1px solid var(--line-2); }
.standing:first-of-type { border-top: 0; }
.standing .rk { color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; }
.standing:nth-child(2) .rk, .standing.first .rk { color: var(--amber); font-weight: 700; }
.standing .pts { font-weight: 600; font-variant-numeric: tabular-nums; }
.standing b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-h { margin: 10px 0 2px; font: 500 12px var(--f); color: var(--text-3); }
.sub-h:first-child { margin-top: 0; }
.up-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; cursor: pointer; }
.up-row:first-of-type { border-top: 0; } .up-row:hover .t { color: var(--blue); }
.up-row .num, .badge-num { display: inline-grid; place-items: center; height: 26px; min-width: 36px; padding: 0 6px; border-radius: 6px; background: var(--surface-2); color: var(--text-2); font: 600 12px var(--f); }
.badge-num.pop { background: var(--purple-50); color: var(--purple); } .badge-num.ess { background: var(--blue-50); color: var(--blue-6); }
.feed { max-height: 460px; overflow-y: auto; margin: 0 -8px; }
.feed .it { display: grid; grid-template-columns: 64px 22px minmax(0, 1fr); gap: 8px; align-items: start; padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.feed .it:hover { background: #f8fafd; }
.feed .it time { color: var(--text-3); font-variant-numeric: tabular-nums; font-size: 12px; padding-top: 1px; white-space: nowrap; }
.feed .it .ic { display: grid; place-items: center; width: 20px; height: 20px; color: var(--text-3); }
.feed .it .ic svg { width: 16px; height: 16px; }
.feed .it.new { animation: newrow 2.5s ease-out; }
@keyframes newrow { from { background: var(--blue-50); } }
.ic.blue { color: var(--blue) !important; } .ic.green { color: var(--green) !important; } .ic.yellow { color: var(--amber) !important; } .ic.red { color: var(--red) !important; } .ic.purple { color: var(--purple) !important; }
.timeline { position: relative; height: 54px; margin: 0 4px; }
.timeline .track { position: absolute; left: 0; right: 0; top: 26px; height: 4px; border-radius: 2px; background: var(--line-2); }
.timeline .fill { position: absolute; left: 0; top: 26px; height: 4px; border-radius: 2px; background: var(--blue-100); }
.timeline .now { position: absolute; top: 14px; width: 2px; height: 28px; background: var(--red); transform: translateX(-1px); }
.timeline .now::before { content: ''; position: absolute; top: -4px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--red); }
.timeline .ends { position: absolute; top: 40px; font-size: 11.5px; color: var(--text-3); }
.timeline .mk { position: absolute; top: 20px; transform: translateX(-50%); cursor: pointer; }
.timeline .mk i { display: block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--blue); background: var(--surface); }
.timeline .mk.pop i { width: 10px; height: 10px; margin-top: 2px; border-radius: 50%; border-color: var(--purple); }
.timeline .mk.sent i { background: var(--blue); } .timeline .mk.pop.sent i { background: var(--purple); }
.timeline .mk.live i { background: var(--green); border-color: var(--green); box-shadow: 0 0 0 4px var(--green-50); }
.timeline .mk.mkt i { width: 8px; height: 8px; margin-top: 3px; border-radius: 2px; border-color: var(--amber); background: var(--yellow); transform: rotate(45deg); }
.timeline .mk span { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); font: 500 11px var(--f); color: var(--text-2); white-space: nowrap; }
.timeline .mk:hover i { box-shadow: 0 0 0 4px var(--blue-50); }
.setup-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.setup-row:first-of-type { border-top: 0; }
.setup-row .box { width: 18px; height: 18px; border-radius: 3px; border: 2px solid var(--text-3); flex: none; }

/* ---------------------------------------------------------------- challenges (schedule) */
.chtabs { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.card.sched { padding: 0; overflow: hidden; }
.sched-g { padding: 10px 20px; background: #fafbfc; border-bottom: 1px solid var(--line-2); font: 500 12.5px var(--f); color: var(--text-2); display: flex; align-items: center; gap: 8px; }
.sched-g:not(:first-child) { border-top: 1px solid var(--line-2); }
.crow { display: grid; grid-template-columns: 88px 44px minmax(0, 1fr) minmax(200px, auto); gap: 14px; align-items: center; padding: 14px 20px; border-bottom: 1px solid var(--line-2); }
.crow:last-child { border-bottom: 0; }
.crow:hover { background: #fafbfd; }
.crow .when { font-size: 13.5px; font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.crow .when small { display: block; color: var(--text-3); font-size: 11.5px; font-weight: 400; }
.crow .t { font-size: 15px; font-weight: 500; }
.crow .meta { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.crow .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.crow .side .acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.crow.live { box-shadow: inset 3px 0 0 var(--green); }
.crow.failed { box-shadow: inset 3px 0 0 var(--red); }
.clist { display: grid; gap: 0; }
.fx { display: inline-flex; align-items: center; min-height: 22px; max-width: 100%; padding: 2px 8px; border-radius: 4px; font: 500 12px/1.4 var(--f); background: var(--surface-2); color: var(--text-2); }
.fx.double { background: var(--purple-50); color: var(--purple); } .fx.skip { background: var(--surface-2); color: var(--text-2); }
.fx.second { background: var(--blue-50); color: var(--blue-6); } .fx.shield { background: var(--green-50); color: var(--green-7); }
.fx.elim { background: var(--red-50); color: var(--red-7); } .fx.sab { background: var(--yellow-50); color: var(--amber); }

/* ---------------------------------------------------------------- submissions */
.pickers { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; scrollbar-width: thin; }
.pickers button { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-2); font: 400 13px var(--f); white-space: nowrap; cursor: pointer; flex: none; }
.pickers button b { color: var(--text); font-weight: 600; }
.pickers button:hover { background: var(--hover); }
.pickers button.on { background: var(--blue-50); border-color: var(--blue-100); color: var(--blue-6); } .pickers button.on b { color: var(--blue-7); }
.pickers .n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--surface-2); font: 600 11.5px/20px var(--f); color: var(--text-2); text-align: center; }
.pickers button.on .n { background: var(--blue-100); color: var(--blue-7); }
.pickers button.alert .n { background: var(--red); color: #fff; }
.pickers .chip.live { height: 18px; padding: 0 6px; font-size: 11px; }
.chead { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.chead .title { font: 400 22px/1.25 var(--f); margin: 6px 0 4px; letter-spacing: -.01em; }
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: start; }
.board.cols { display: flex; gap: 14px; align-items: flex-start; }
.bcol { flex: 1 1 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.unit { padding: 0; overflow: hidden; }
.unit > header { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
.unit > header > div { flex: 1; min-width: 0; }
.unit > header .nm { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.unit > header .pts { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); font-size: 14px; }
.unit > header .pts.neg { color: var(--red-7); }
.unit.missing > header { border-bottom: 0; } .unit.missing .nm { color: var(--text-2); }
.unit .empty.miss { padding: 0 16px 14px 36px; text-align: left; font-size: 13px; margin-top: -4px; }
.unit.missing > header { padding-bottom: 8px; }
.unit.placed-1 { border-color: #fdd663; box-shadow: 0 0 0 1px #fdd663; } .unit.placed-2 { border-color: #bdc1c6; }
.unit > .tools { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line-2); background: #fafbfc; }
.unit > .tools.fxrow { background: none; }
.medal { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 12px; background: #fef7e0; color: var(--amber); font: 700 11.5px var(--f); box-shadow: inset 0 0 0 1px #fdd663; }
.medal.p2 { background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.medal.p3 { background: #fce8e6; color: #a50e0e; box-shadow: inset 0 0 0 1px var(--red-100); }
.valbest { display: inline-flex; align-items: baseline; gap: 5px; height: 24px; padding: 0 9px; border-radius: 12px; background: var(--blue-50); color: var(--blue-7); font: 600 12.5px/24px var(--f); font-variant-numeric: tabular-nums; white-space: nowrap; }
.valbest small { color: var(--blue-6); font-size: 11px; font-weight: 500; opacity: .8; }
.valbest.done { background: var(--green-50); color: var(--green-7); }
.sub { padding: 12px 16px; border-bottom: 1px solid var(--line-2); position: relative; }
.sub:last-child { border-bottom: 0; }
.sub.sel { background: #f8fafd; box-shadow: inset 3px 0 0 var(--blue); }
.sub.rejected > *:not(.acts):not(.who):not(.note) { opacity: .5; }
.sub .who { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 13px; }
.sub .who b { font-weight: 600; }
.sub .msg, .sheet .msg, .sp-detail .msg { margin: 8px 0 0; padding: 8px 12px; border-radius: 6px; background: var(--surface-2); color: var(--text); font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 140px; overflow: auto; }
.sub .msg.reply, .sheet .msg.reply, .sp-detail .msg.reply { background: var(--blue-50); color: #174ea6; }
.sub .msg.reply b, .sheet .msg.reply b, .sp-detail .msg.reply b { font-weight: 600; }
.sheet .msg { max-height: 200px; }
.sp-detail .msg { font-size: 15px; max-height: none; }
.media { display: grid; gap: 8px; margin-top: 10px; }
.media img, .media video { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 6px; background: #202124; }
.media img { background: var(--surface-2); }
.media audio { width: 100%; height: 36px; }
.fileline { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.fileline .nm { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fakevid { display: grid; place-items: center; aspect-ratio: 16 / 9; border-radius: 6px; background: repeating-linear-gradient(135deg, var(--surface-2) 0 12px, #eceef1 12px 24px); color: var(--text-2); font: 600 12px var(--f); text-align: center; }
.fakevid.photo { aspect-ratio: 4 / 3; }
.fakevid span { display: grid; gap: 2px; } .fakevid small { font-weight: 400; color: var(--text-3); }
.linkchip { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; color: var(--blue-6); font-size: 13px; overflow-wrap: anywhere; }
.linkchip:hover { background: var(--blue-50); text-decoration: none; }
.sub .acts { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 10px; }
.note { display: block; width: 100%; min-height: 34px !important; height: 34px; margin-top: 8px; padding: 6px 10px !important; border: 1px solid transparent !important; background: none !important; font-size: 13px; resize: none; }
.note:hover { border-color: var(--line) !important; } .note:focus { height: 64px; border-color: var(--blue) !important; background: var(--surface) !important; }
.answers { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.ans { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 6px 0 3px; border-radius: 6px; background: var(--surface-2); font-size: 12.5px; color: var(--text); }
.ans b { display: inline-grid; place-items: center; min-width: 20px; height: 20px; border-radius: 4px; background: var(--surface); color: var(--text-2); font: 600 11px var(--f); }
.ans i { font-style: normal; font-weight: 700; }
.ans.ok { background: var(--green-50); } .ans.ok i { color: var(--green); }
.ans.bad { background: var(--red-50); } .ans.bad i { color: var(--red); }
.ans.g-ok, .ans.g-bad { background: none; box-shadow: inset 0 0 0 1px var(--line); } .ans.g-ok i { color: var(--green); opacity: .7; } .ans.g-bad i { color: var(--red); opacity: .7; }
.answers.big .ans { height: 30px; font-size: 14px; }
.clar { margin-top: 10px; padding: 8px 12px; border-radius: 6px; background: var(--blue-50); color: #174ea6; font-size: 13px; display: grid; gap: 4px; }
.mrks { display: grid; gap: 8px; margin-bottom: 16px; }
.mrk { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.mk-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); font: 600 13px var(--f); color: var(--text-2); }
.mk-a { font-size: 14px; overflow-wrap: anywhere; } .mk-a small { display: block; margin-top: 2px; color: var(--text-3); font-size: 12px; }
.seg.sm button { height: 30px; padding: 0 10px; font-size: 12.5px; }
.seg.sm button[data-val="1"].on { background: var(--green-50); color: var(--green-7); } .seg.sm button[data-val="0"].on { background: var(--red-50); color: var(--red-7); }
.mk-sum { font-size: 13px; color: var(--text-2); margin: -4px 0 14px; } .mk-sum b { color: var(--text); }
.ins { gap: 6px; margin: -6px 0 12px; }
.ins .btn { border-color: var(--line); color: var(--text-2); }

/* spotlight (big view) */
.spot { position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; background: var(--surface); animation: fadein .12s ease-out; }
.sp-top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.sp-title { font: 500 17px var(--f); }
.sp-body { display: grid; grid-template-columns: 320px minmax(0, 1fr); min-height: 0; }
.sp-list { overflow-y: auto; border-right: 1px solid var(--line); padding: 8px 0; background: #fafbfc; }
.sp-g { padding: 12px 16px 6px; font: 500 12px var(--f); color: var(--text-3); }
.sp-it { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 8px 16px; cursor: pointer; font-size: 13px; }
.sp-it:hover { background: var(--hover); }
.sp-it.on { background: var(--blue-50); box-shadow: inset 3px 0 0 var(--blue); }
.sp-it .nm { overflow: hidden; } .sp-it .nm small { display: block; color: var(--text-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-it.none { cursor: default; color: var(--text-3); } .sp-it.none:hover { background: none; }
.sp-detail { overflow-y: auto; padding: 20px 28px 28px; }
.sp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sp-head .nm { font: 500 20px var(--f); }
.sp-head .pts { font: 600 18px var(--f); font-variant-numeric: tabular-nums; } .sp-head .pts.neg { color: var(--red-7); } .sp-head .pts small { font-size: 12px; font-weight: 400; }
.sp-media { display: grid; gap: 10px; }
.sp-media img, .sp-media video { max-height: 58vh; width: 100%; object-fit: contain; border-radius: 8px; background: #202124; }
.sp-media img { background: var(--surface-2); }
.sp-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.sp-foot { padding: 8px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--text-2); display: flex; gap: 4px; flex-wrap: wrap; align-items: center; background: #fafbfc; }
@keyframes fadein { from { opacity: 0; } }

/* ---------------------------------------------------------------- roster */
.roster td .members { margin: 0; padding: 0; list-style: none; display: grid; gap: 2px; }
.roster td .members li { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; } .roster td .members li span { color: var(--text-2); overflow-wrap: anywhere; }
.code { display: inline-flex; align-items: center; height: 26px; padding: 0 8px; border-radius: 4px; background: var(--surface-2); font: 500 12.5px var(--mono); letter-spacing: .04em; cursor: pointer; white-space: nowrap; }
.code:hover { background: var(--blue-50); color: var(--blue-6); }

/* ---------------------------------------------------------------- market */
.card.bm { background: #202124; border-color: #202124; color: #e8eaed; }
.card.bm h3 { color: #fff; } .card.bm .muted, .card.bm .faint { color: #bdc1c6 !important; } .card.bm .count-big { color: #fff; }
.card.bm .btn { background: transparent; border-color: #5f6368; color: #e8eaed; } .card.bm .btn:hover { background: rgba(255, 255, 255, .08); }
.card.bm .btn.ghost { border-color: transparent; color: #bdc1c6; }
.card.bm .btn.primary { background: #c58af9; border-color: #c58af9; color: #202124; } .card.bm .btn.primary:hover { background: #d7aefb; border-color: #d7aefb; }
.card.bm .chip.gold { background: rgba(197, 138, 249, .2); color: #e9d2fd; }
.buy { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 32px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); font-size: 13.5px; }
.buy:first-of-type { border-top: 0; } .buy .pts { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------------------------------------------------------------- dialogs */
#modal { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; background: rgba(32, 33, 36, .6); overflow-y: auto; animation: fadein .12s; }
.sheet { width: min(600px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12), 0 11px 15px -7px rgba(0, 0, 0, .2); animation: rise .16s ease-out; }
.sheet.wide { width: min(880px, 100%); }
.sheet > header { display: flex; align-items: center; gap: 12px; padding: 18px 16px 6px 24px; }
.sheet > header h2 { flex: 1; font: 400 20px/1.3 var(--f); overflow-wrap: anywhere; }
.sheet > .body { padding: 12px 24px 20px; overflow-y: auto; }
.sheet > footer { display: flex; align-items: center; gap: 8px; padding: 12px 24px 18px; border-top: 1px solid var(--line-2); }
.preview-frame { width: 100%; height: 68vh; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.askwrap { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 24px; background: rgba(32, 33, 36, .5); animation: fadein .1s; }
.ask { width: min(460px, 100%); padding: 22px 24px 18px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12); animation: rise .14s ease-out; }
.ask .q { margin-bottom: 20px; font-size: 14.5px; line-height: 1.55; color: var(--text); }
.ask .q::first-line { font-size: 16px; font-weight: 500; }
.menu { position: fixed; z-index: 90; min-width: 220px; padding: 8px 0; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-2); animation: rise .1s ease-out; }
.menu button { display: flex; align-items: center; gap: 14px; width: 100%; height: 36px; padding: 0 16px; border: 0; background: none; color: var(--text); font: 400 14px var(--f); cursor: pointer; text-align: left; white-space: nowrap; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button svg { width: 18px; height: 18px; color: var(--text-2); }
.menu .mh { padding: 8px 16px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; font-size: 13px; color: var(--text-2); }
.menu .mh b { display: block; color: var(--text); font-size: 14px; font-weight: 500; }
.menu hr { border: 0; border-top: 1px solid var(--line-2); margin: 6px 0; }
.menu kbd { margin-left: auto; }

/* snackbars */
#toasts { position: fixed; left: 24px; bottom: 24px; z-index: 100; display: flex; flex-direction: column-reverse; gap: 8px; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 16px; min-width: 300px; max-width: 520px; padding: 12px 16px; border-radius: 6px; background: #323232; color: #e8eaed; font-size: 14px; box-shadow: var(--shadow-2); pointer-events: auto; animation: snack .18s ease-out; }
.toast b { font-weight: 500; color: #fff; }
.toast .muted { color: #bdc1c6 !important; }
.toast.err { background: #3c1f1d; } .toast.err b { color: #f6aea9; }
.toast .btn { margin-left: auto; height: 30px; border: 0; background: none; color: #8ab4f8; font-weight: 600; }
.toast .btn:hover { background: rgba(138, 180, 248, .12); } .toast .btn kbd { background: none; border-color: #5f6368; color: #bdc1c6; }
@keyframes snack { from { transform: translateY(10px); opacity: 0; } }

/* command palette */
.palwrap { position: fixed; inset: 0; z-index: 90; background: rgba(32, 33, 36, .35); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; animation: fadein .1s; }
.pal { width: min(680px, 100%); max-height: 72vh; display: flex; flex-direction: column; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12); overflow: hidden; animation: rise .12s ease-out; }
.pal-in { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-bottom: 1px solid var(--line-2); }
.pal-in svg { width: 20px; height: 20px; color: var(--text-2); }
.pal-in input { flex: 1; border: 0 !important; box-shadow: none !important; padding: 0; font-size: 17px; min-height: 0; height: 40px; background: none; }
.pal-list { overflow-y: auto; padding: 6px 0 8px; }
.pal-g { padding: 10px 20px 4px; font: 500 12px var(--f); color: var(--text-3); }
.pal-it { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 40px; padding: 4px 20px; cursor: pointer; font-size: 14px; }
.pal-it.on { background: var(--blue-50); }
.pal-it .pi { display: grid; place-items: center; color: var(--text-2); } .pal-it .pi svg { width: 18px; height: 18px; } .pal-it .pi .dot { width: 10px; height: 10px; background: currentColor; }
.pal-it .pl small { display: block; color: var(--text-3); font-size: 12px; }
.pal-empty { padding: 28px 20px; text-align: center; color: var(--text-2); font-size: 13.5px; }
.pal-foot { display: flex; gap: 16px; padding: 8px 16px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--text-2); background: #fafbfc; }
.keys { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 32px; }
.keys-sec .kicker { margin: 6px 0 8px; font-weight: 600; color: var(--text); font-size: 13px; }
.keys-row { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 6px 0; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--text-2); }

/* ---------------------------------------------------------------- guided tour */
.tour { position: fixed; inset: 0; z-index: 110; }
.tour-block { position: absolute; inset: 0; background: transparent; }
.tour.nohole .tour-block { background: rgba(32, 33, 36, .55); animation: fadein .2s; }
.tour-hole { position: fixed; border-radius: 10px; pointer-events: none; box-shadow: 0 0 0 3px #8ab4f8, 0 0 0 9999px rgba(32, 33, 36, .55); transition: top .28s ease, left .28s ease, width .28s ease, height .28s ease; }
.tour-pop { position: fixed; width: min(360px, calc(100vw - 24px)); padding: 18px 20px 14px; border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 24px 38px 3px rgba(0, 0, 0, .14), 0 9px 46px 8px rgba(0, 0, 0, .12), 0 11px 15px -7px rgba(0, 0, 0, .2); transition: left .28s ease, top .28s ease; animation: rise .18s ease-out; }
.tour-pop.center { inset: 0; margin: auto; height: fit-content; width: min(460px, calc(100vw - 32px)); padding: 28px 28px 18px; transition: none; }
.tour-pop.dock { width: auto; transition: none; }
.tour-art { margin-bottom: 14px; } .tour-art svg { display: block; }
.tour-count { margin-bottom: 4px; font: 500 12px var(--f); color: var(--blue-6); }
.tour-pop h2 { margin: 0 0 8px; font: 500 17px/1.3 var(--f); color: var(--text); }
.tour-pop.center h2 { font: 400 24px/1.3 var(--f); letter-spacing: -.01em; }
.tour-body { color: var(--text-2); font-size: 14px; line-height: 1.55; } .tour-body b { color: var(--text); font-weight: 600; }
.tour-pop.center .tour-body { font-size: 15px; }
.tour-acts { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
.tour-acts .btn.ghost { padding: 0 10px; margin-left: -10px; }
.tour-dots { display: flex; justify-content: center; gap: 5px; margin-top: 14px; }
.tour-dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .2s, background .2s; }
.tour-dots i.done { background: var(--blue-100); } .tour-dots i.on { width: 16px; background: var(--blue); }

/* ---------------------------------------------------------------- settings page */
.settings { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.settings .col { display: grid; gap: 16px; min-width: 0; }
.card .lede { margin: -6px 0 14px; color: var(--text-2); font-size: 13px; }

/* ---------------------------------------------------------------- responsive */
@media (max-width: 1280px) {
  .home-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .card.overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ov:nth-child(2) { border-right: 0; } .ov:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
}
@media (max-width: 1100px) {
  body:not(.nav-open) #app { --nav-w: 72px; }
  body:not(.nav-open) .nav button { padding: 0; justify-content: center; border-radius: 18px; margin-left: 12px; width: 48px; gap: 0; position: relative; }
  body:not(.nav-open) .nav button span, body:not(.nav-open) .side-foot, body:not(.nav-open) .newbtn span { display: none; }
  body:not(.nav-open) .newbtn { padding: 0; width: 56px; justify-content: center; margin-left: 8px; }
  body:not(.nav-open) .nav button .count { display: block; position: absolute; transform: translate(14px, -10px); min-width: 16px; padding: 0 4px; font-size: 10px; line-height: 16px; background: var(--blue); color: #fff; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .settings { grid-template-columns: minmax(0, 1fr); }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  #app { grid-template-columns: minmax(0, 1fr); grid-template-rows: 56px auto; --nav-w: 0px !important; }
  main { grid-column: 1; }
  .appbar { height: 56px; padding: 0 4px; }
  .brand { font-size: 19px; padding: 0 4px; } .brand svg { width: 28px; height: 28px; }
  .evchip { display: none !important; }
  .search { margin-left: 4px; height: 40px; background: none; padding: 0; justify-content: center; flex: none; width: 40px; border-radius: 50%; margin-left: auto; }
  .search span, .search kbd { display: none; }
  .sidenav { position: fixed; z-index: 70; top: 0; left: 0; bottom: 0; height: 100vh; width: 284px; background: var(--surface); padding-top: 16px; transform: translateX(-100%); transition: transform .2s ease-out; box-shadow: none; }
  body.nav-open .sidenav { transform: none; box-shadow: var(--shadow-2); }
  body.nav-open .scrim { display: block; position: fixed; inset: 0; z-index: 65; background: rgba(32, 33, 36, .5); }
  .nav button span, .side-foot, .newbtn span { display: initial !important; }
  .nav button { padding: 0 12px 0 24px !important; justify-content: flex-start !important; border-radius: 0 20px 20px 0 !important; margin-left: 0 !important; width: 100% !important; gap: 18px !important; height: 44px; }
  .nav button .count { position: static !important; transform: none !important; background: none !important; color: var(--text-2) !important; font-size: 12px !important; }
  .newbtn { padding: 0 22px 0 16px !important; width: auto !important; }
  main { padding: 0 16px 96px; }
  .pagehead { padding-top: 16px; } .pagehead h1 { font-size: 22px; }
  .top-actions { margin-left: 0; width: 100%; } .top-actions .btn { flex: 1 1 auto; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; height: calc(64px + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--surface); border-top: 1px solid var(--line); }
  .tabbar button { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: 0; background: none; color: var(--text-2); font: 500 10.5px var(--f); position: relative; padding: 0; min-width: 0; }
  .tabbar button svg { width: 22px; height: 22px; padding: 2px 14px; box-sizing: content-box; border-radius: 14px; }
  .tabbar button.on { color: var(--blue-6); } .tabbar button.on svg { background: var(--blue-50); }
  .tabbar button span:not(.count) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .tabbar .count { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--red); color: #fff; font: 600 10px/16px var(--f); }
  #toasts { left: 12px; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); } .toast { min-width: 0; max-width: none; }
  .card.overview { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .ov { padding: 12px 14px; } .ov .val { font-size: 21px; }
  .g2, .g3, .fl, .fl3, .keys { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 14px 16px; } .card.overview, .card.sched { padding: 0; } .tblwrap { margin: 0 -16px; padding: 0 16px; }
  .crow { grid-template-columns: 52px minmax(0, 1fr); gap: 4px 12px; padding: 12px 16px; }
  .crow .when { grid-column: 2; grid-row: 1; } .crow .num-col { grid-row: 1 / span 2; align-self: start; padding-top: 4px; } .crow .info { grid-column: 2; }
  .section-title .hint, .sp-foot, .search kbd { display: none; }
  .live-row .lt b { flex: 1 1 calc(100% - 64px); }
  .live-row .lt .spacer { display: none; }
  .crow .side { grid-column: 1 / -1; align-items: flex-start; } .crow .side .acts { justify-content: flex-start; }
  .board, .board.cols { display: grid; grid-template-columns: minmax(0, 1fr); }
  .sp-body { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .sp-list { max-height: 30vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .sp-detail { padding: 16px; } .sp-foot { display: none; }
  .sheet { max-height: calc(100vh - 24px); } #modal { padding: 12px; align-items: end; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .kv dd { margin-bottom: 8px; }
  .buy { grid-template-columns: 52px minmax(0, 1fr) auto 28px; }
  .mrk { grid-template-columns: 26px minmax(0, 1fr); } .mrk .seg { grid-column: 1 / -1; justify-self: start; }
  .roster thead { display: none; } .roster tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
  .roster td { padding: 0; border: 0 !important; } .roster td.mem { grid-column: 1 / -1; }
  .btn, .seg button, .pickers button { min-height: 40px; }
  .btn.xs { min-height: 36px; } .sc { height: 36px; }
  .tbl.log { min-width: 560px; }
}
@media (max-width: 520px) {
  .card.overview { grid-template-columns: minmax(0, 1fr); } .ov { border-right: 0 !important; border-bottom: 1px solid var(--line-2); }
  .ov-tl { display: none; }
  .crow .side .acts .btn { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
