/* ══════════════════════════════════════════════════════════════
   BashaByte · Problem workspace
   Visual layer only. Every id / class used by problem_detail.js
   is preserved; see the section headers for where each lives.
   ══════════════════════════════════════════════════════════════ */

/* ── 1. Tokens ─────────────────────────────────────────────────── */
/* Every value points at the shared palette in tokens.css (DD-28), so the
   workspace follows the site theme. Names are kept for problem_detail.js. */
:root {
  --bg: var(--bb-bg);
  --bg-2: var(--bb-surface-subtle);
  --panel: var(--bb-surface);
  --panel-2: var(--bb-surface-subtle);
  --panel-3: var(--bb-surface-selected);
  --ink: var(--bb-text);
  --muted: var(--bb-text-secondary);
  --faint: var(--bb-text-tertiary);
  --line: var(--bb-border);
  --line-2: var(--bb-border-strong);
  --line-3: var(--bb-border-control);

  --brand: var(--bb-accent);
  --brand-2: var(--bb-accent-hover);
  --brand-ink: var(--bb-text-on-accent);
  --brand-soft: var(--bb-accent-soft);
  --accent: var(--bb-warning);
  --accent-soft: var(--bb-warning-soft);
  --blue: var(--bb-info);
  --purple: var(--bb-chart-4);

  --easy: var(--bb-easy);
  --medium: var(--bb-medium);
  --hard: var(--bb-hard);
  --ok: var(--bb-success);
  --bad: var(--bb-danger);
  --warn: var(--bb-warning);

  --editor-bg: var(--bb-code-bg);
  --shadow: var(--bb-shadow-0);
  --pop: var(--bb-shadow-2);
  --ease: var(--bb-ease);
  --mono: var(--bb-font-mono);
  --radius: var(--bb-radius-md);
}

/* ── 2. Base ───────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body.pd {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 14px/1.6 var(--bb-font-sans);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
body.pd h1, body.pd h2, body.pd h3, body.pd h4, body.pd p { margin: 0; }
body.pd a { color: inherit; text-decoration: none; }
body.pd button { font-family: inherit; }
body.pd :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
body.pd ::selection { background: color-mix(in srgb, var(--brand) 30%, transparent); }

/* thin, quiet scrollbars */
body.pd * { scrollbar-width: thin; scrollbar-color: var(--line-3) transparent; }
body.pd *::-webkit-scrollbar { width: 8px; height: 8px; }
body.pd *::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
body.pd *::-webkit-scrollbar-thumb:hover { background-color: var(--line-3); }
body.pd *::-webkit-scrollbar-track { background: transparent; }

/* ── 3. Page + navbar ──────────────────────────────────────────── */
#problem-page {
  position: relative;
  display: flex; flex-direction: column;
  height: 100vh; height: 100dvh;
  overflow: hidden;
  background:
    var(--bg);
}

#top-navbar {
  position: relative; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  height: 54px; min-height: 54px; padding: 0 14px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
}
.navbar-left, .navbar-right { display: flex; align-items: center; gap: 8px; }
.navbar-right { justify-content: flex-end; }
.navbar-center { display: flex; justify-content: center; }

.nav-home-btn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  background: var(--panel); border: 1px solid var(--line-2);
  transition: transform 0.3s var(--ease), border-color 0.2s ease;
}
.nav-home-btn img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; }
.nav-home-btn:hover { transform: translateY(-1px); border-color: var(--brand); }

#btn-problem-list {
  display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted);
  font-size: 13px; font-weight: 700; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
#btn-problem-list:hover { color: var(--ink); border-color: var(--line-3); }
#btn-problem-list i { font-size: 15px; }

.nav-sep { width: 1px; height: 20px; background: var(--line-2); margin: 0 2px; }
.nav-step { display: inline-flex; padding: 2px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line-2); }
.nav-step .nav-icon-btn { border: 0; background: transparent; width: 30px; height: 28px; }

.nav-icon-btn {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted);
  font-size: 15px; cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.35s var(--ease);
}
.nav-icon-btn:hover { color: var(--ink); background: var(--panel-2); }
.nav-icon-btn.disabled { opacity: 0.35; pointer-events: none; }
.nav-shuffle:hover i { display: inline-block; transform: rotate(180deg); transition: transform 0.4s var(--ease); }
#btn-theme-toggle:hover i { display: inline-block; transform: rotate(35deg); transition: transform 0.4s var(--ease); }

/* Run / Submit */
.run-group { display: inline-flex; gap: 6px; padding: 4px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
#btn-run, #btn-submit {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 34px; min-width: 96px; padding: 0 16px; border-radius: 8px;
  font-size: 13px; font-weight: 800; letter-spacing: 0.01em; cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.2s ease, color 0.2s ease, box-shadow 0.25s ease, opacity 0.2s ease;
}
#btn-run { border: 0; background: transparent; color: var(--ink); }
#btn-run:hover:not(:disabled) { background: var(--panel-3); }
#btn-run .btn-icon { color: var(--brand); }
#btn-submit { border: 0; background: var(--brand); color: var(--brand-ink); box-shadow: none; }
#btn-submit:hover:not(:disabled) { background: var(--brand-2); box-shadow: none; }
#btn-run:active:not(:disabled), #btn-submit:active:not(:disabled) { transform: scale(0.97); }
#btn-run:disabled, #btn-submit:disabled { cursor: progress; }
.btn-spinner {
  display: none; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.btn-spinner.teal { color: var(--brand); }
.btn-loading .btn-icon { display: none; }
.btn-loading .btn-spinner { display: inline-block; }
.btn-loading::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
  transform: translateX(-100%); animation: sweep 1.2s var(--ease) infinite;
}
#btn-run.btn-loading { background: var(--brand-soft); }
/* the button that is not doing the work just rests, disabled */
body[data-busy="run"] #btn-submit.btn-loading, body[data-busy="submit"] #btn-run.btn-loading { opacity: 0.45; background-color: initial; }
body[data-busy="run"] #btn-submit.btn-loading { background: var(--brand); }
body[data-busy="run"] #btn-submit.btn-loading .btn-icon, body[data-busy="submit"] #btn-run.btn-loading .btn-icon { display: inline; }
body[data-busy="run"] #btn-submit.btn-loading .btn-spinner, body[data-busy="submit"] #btn-run.btn-loading .btn-spinner { display: none; }
body[data-busy="run"] #btn-submit.btn-loading::after, body[data-busy="submit"] #btn-run.btn-loading::after { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sweep { to { transform: translateX(100%); } }

/* User menu */
.user-menu { position: relative; outline: none; }
.user-avatar {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--brand); color: var(--brand-ink);
  font-weight: 800; font-size: 14px; cursor: pointer;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 3px var(--line-2);
}
.user-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  min-width: 200px; padding: 6px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--pop);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(0.98); transform-origin: top right;
  transition: opacity 0.18s ease, transform 0.25s var(--ease), visibility 0.18s;
}
.user-menu:hover .user-dropdown, .user-menu:focus-within .user-dropdown { opacity: 1; visibility: visible; transform: none; }
.user-menu::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 12px; }
.ud-user { display: block; padding: 8px 10px 10px; color: var(--faint); font-size: 12px; font-weight: 700; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.ud-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer; }
.ud-item:hover { background: var(--panel-2); color: var(--ink); }
.ud-item.disabled { opacity: 0.5; pointer-events: none; }
.ud-logout:hover { color: var(--bad); }
.ud-divider { display: block; height: 1px; margin: 4px 0; background: var(--line); }
.nav-btn-outline { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-3); color: var(--ink); font-size: 13px; font-weight: 700; }
.nav-btn-outline:hover { border-color: var(--brand); color: var(--brand); }

/* ── 4. Main layout ────────────────────────────────────────────── */
#main-content { position: relative; flex: 1; min-height: 0; display: flex; padding: 10px; gap: 0; }

#left-panel, #editor-zone, #testcase-panel {
  position: relative; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
#left-panel { flex: 0 0 44%; min-width: 300px; max-width: 65vw; display: flex; flex-direction: column; }
.left-panel-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: smooth; }

#right-panel { flex: 1; min-width: 0; display: flex; flex-direction: column; }
#editor-zone { flex: 1 1 58%; min-height: 160px; display: flex; flex-direction: column; transition: flex-basis 0.5s var(--ease); }
#right-panel.report-open #editor-zone { flex-basis: 80%; }
#testcase-panel { flex: 1 1 42%; min-height: 120px; display: flex; flex-direction: column; transition: flex-basis 0.5s var(--ease); }
#right-panel.report-open #testcase-panel { flex-basis: 20%; }

#resize-handle-vertical, #resize-handle-horizontal { position: relative; z-index: 5; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#resize-handle-vertical { width: 10px; cursor: col-resize; }
#resize-handle-horizontal { height: 10px; cursor: row-resize; }
.resize-handle-line, .resize-handle-h-line { border-radius: 4px; background: var(--line-3); transition: all 0.25s var(--ease); }
.resize-handle-line { width: 3px; height: 32px; }
.resize-handle-h-line { width: 32px; height: 3px; }
#resize-handle-vertical:hover .resize-handle-line, #resize-handle-vertical.dragging .resize-handle-line { height: 72px; background: var(--brand); box-shadow: none; }
#resize-handle-horizontal:hover .resize-handle-h-line, #resize-handle-horizontal.dragging .resize-handle-h-line { width: 72px; background: var(--brand); box-shadow: none; }
.no-select, .no-select * { user-select: none !important; cursor: inherit; }

/* ── 5. Tabs (left panel + testcase panel) ─────────────────────── */
.tabs-bar, .testcase-tabs-bar {
  position: relative; flex: none;
  display: flex; align-items: center; gap: 2px;
  height: 44px; padding: 0 8px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-2);
  overflow-x: auto; scrollbar-width: none;
}
.tabs-bar::-webkit-scrollbar, .testcase-tabs-bar::-webkit-scrollbar { display: none; }
.tab-btn, .testcase-tab-btn {
  position: relative; z-index: 1;
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 32px; padding: 0 12px; border: 0; border-radius: 8px;
  background: transparent; color: var(--faint);
  font-size: 13px; font-weight: 700; cursor: pointer; white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.tab-btn:hover, .testcase-tab-btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.tab-btn.active, .testcase-tab-btn.active { color: var(--ink); }
.tab-btn.active i, .testcase-tab-btn.active i { color: var(--brand); }
.tabs-ink {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 0;
  border-radius: 2px; background: var(--brand); box-shadow: none;
  transition: transform 0.4s var(--ease), width 0.4s var(--ease);
  pointer-events: none;
}

.tab-content { display: none; padding: 20px 22px 28px; }
.tab-content.active { display: block; animation: tabIn 0.35s var(--ease); }
@keyframes tabIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
#tab-description { padding-top: 22px; }

/* ── 6. Description ────────────────────────────────────────────── */
.problem-header { margin-bottom: 18px; }
.problem-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.problem-title-row h1 { font-size: 22px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.3; }
.title-num { color: var(--faint); font-weight: 700; }
.solved-badge { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }

.problem-pills-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.problem-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 0 0 12px; color: var(--faint); font-size: 13px; }
.meta-item b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.meta-item + .meta-item { padding-left: 14px; border-left: 1px solid var(--line-2); }
.pill-wrapper { position: relative; }
.pill-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: var(--bb-radius-sm);
  border: 1px solid var(--line-2); background: var(--panel); color: var(--muted);
  font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
button.pill-btn:hover { color: var(--ink); border-color: var(--line-3); }
.pill-btn.diff-easy { color: var(--easy); background: color-mix(in srgb, var(--easy) 12%, transparent); border-color: transparent; }
.pill-btn.diff-medium { color: var(--medium); background: color-mix(in srgb, var(--medium) 12%, transparent); border-color: transparent; }
.pill-btn.diff-hard { color: var(--hard); background: color-mix(in srgb, var(--hard) 12%, transparent); border-color: transparent; }
.dropdown-caret { font-size: 10px; transition: transform 0.25s var(--ease); }
.pill-btn.hint-pill { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: var(--accent-soft); }
.pill-dropdown {
  position: absolute; left: 0; top: calc(100% + 8px); z-index: 30;
  display: flex; flex-wrap: wrap; gap: 6px;
  min-width: 220px; max-width: 320px; padding: 10px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--pop);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.25s var(--ease), visibility 0.18s;
}
.pill-dropdown.open { opacity: 1; visibility: visible; transform: none; }
.tag-pill, .company-pill { padding: 4px 10px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--ink); font-size: 12px; font-weight: 600; }
.dropdown-empty { color: var(--faint); font-size: 12.5px; }

.hints-area { display: grid; gap: 10px; }
.hints-area:not(:empty) { margin-bottom: 18px; }
.hint-card {
  padding: 12px 14px; border-radius: 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  background: var(--accent-soft); color: var(--ink); font-size: 14px;
  animation: tabIn 0.35s var(--ease);
}
.hint-card strong { display: block; margin-bottom: 4px; color: var(--accent); font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; }

.problem-statement { color: var(--ink); font-size: 15px; line-height: 1.75; margin-bottom: 28px; max-width: 72ch; }
.problem-statement code { padding: 1px 6px; border-radius: 6px; background: var(--panel-3); font: 500 13px var(--mono); }

/* Examples (DD-28): one spec block per example. Input and output sit side by
   side in a single hairline-divided panel and stack when the panel is narrow. */
.examples { display: grid; gap: 20px; margin-bottom: 8px; }
.section-label {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font: 600 12px/1 var(--bb-font-sans); letter-spacing: 0.04em; text-transform: uppercase;
}
.section-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.ex { display: grid; gap: 8px; }
.ex-title { color: var(--ink); font-size: 14px; font-weight: 600; letter-spacing: -0.005em; }
.ex-io {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1px; overflow: hidden;
  border: 1px solid var(--line); border-radius: var(--bb-radius-md);
  background: var(--line);
}
.ex-pane { margin: 0; min-width: 0; background: var(--panel-2); }
.ex-pane figcaption {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 30px; padding: 0 6px 0 12px; border-bottom: 1px solid var(--line);
  color: var(--faint); font-size: 12px; font-weight: 600;
}
.ex-pane pre {
  margin: 0; padding: 10px 12px 12px; overflow-x: auto;
  color: var(--ink); font: 500 13px/1.6 var(--mono);
  white-space: pre-wrap; word-break: break-word;
}
.ex-copy {
  display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border: 0; border-radius: var(--bb-radius-xs); background: transparent; color: var(--faint);
  font-size: 12px; cursor: pointer; opacity: 0; transition: opacity 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.ex-pane:hover .ex-copy, .ex-copy:focus-visible, .ex-copy.is-done { opacity: 1; }
.ex-copy:hover { color: var(--ink); background: var(--panel-3); }
.ex-copy.is-done { color: var(--ok); }
@media (hover: none) { .ex-copy { opacity: 1; } }
.ex-why {
  margin: 2px 0 0; padding: 2px 0 2px 12px; border-left: 2px solid var(--line-2);
  color: var(--muted); font-size: 14px; line-height: 1.65;
}
.ex-why-label { color: var(--ink); font-weight: 600; }

.stats-bar {
  display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 10px;
  margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line-2);
}
.stat-tile { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); }
.stat-label { color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.stat-value { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-meter { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 2px; }
.stat-meter i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--brand); animation: grow 1s var(--ease) both 0.2s; transform-origin: left; }
.stat-votes { flex-direction: row; align-items: center; gap: 14px; color: var(--muted); font-weight: 700; }
@keyframes grow { from { transform: scaleX(0); } }

/* ── 7. Editor zone ────────────────────────────────────────────── */
.editor-view-tabs { flex: none; display: flex; gap: 4px; padding: 6px 8px 0; background: var(--panel-2); border-bottom: 1px solid var(--line); }
.editor-view-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 34px; padding: 0 14px; border: 1px solid transparent; border-bottom: 0; border-radius: 8px 8px 0 0;
  background: transparent; color: var(--faint); font-size: 13px; font-weight: 700; cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease;
}
.editor-view-tab:hover { color: var(--ink); }
.editor-view-tab.active { background: var(--panel); color: var(--ink); border-color: var(--line); margin-bottom: -1px; }
.editor-view-tab[hidden] { display: none; }
.editor-tab-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); }
.code-dot { background: var(--brand); box-shadow: none; }
.editor-view-tab-submission { animation: tabIn 0.35s var(--ease); }
.status-pending .submission-dot { background: var(--accent); animation: pulse 1s ease-in-out infinite; }
.status-accepted .submission-dot { background: var(--ok); box-shadow: none; }
.status-failed .submission-dot { background: var(--bad); box-shadow: none; }
.status-accepted #editor-view-tab-submission-label { color: var(--ok); }
.status-failed #editor-view-tab-submission-label { color: var(--bad); }
.editor-view-tab-close { display: grid; place-items: center; width: 18px; height: 18px; margin-left: 2px; border-radius: 5px; color: var(--faint); font-size: 15px; line-height: 1; }
.editor-view-tab-close:hover { background: var(--panel-3); color: var(--ink); }
@keyframes pulse { 50% { opacity: 0.35; transform: scale(0.8); } }

.editor-view-panel { display: none; flex: 1; min-height: 0; flex-direction: column; overflow: hidden; }
.editor-view-panel.active { display: flex; }

.editor-toolbar { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 46px; padding: 0 10px; border-bottom: 1px solid var(--line); }
.editor-toolbar-left, .editor-toolbar-right { display: flex; align-items: center; gap: 6px; min-width: 0; }

.editor-lang-wrapper { position: relative; display: inline-flex; align-items: center; }
.lang-icon { position: absolute; left: 10px; color: var(--brand); font-size: 13px; pointer-events: none; }
#language-select {
  height: 32px; padding: 0 30px 0 30px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink);
  font: 700 13px "Manrope", sans-serif; cursor: pointer;
  appearance: none; -webkit-appearance: none;
  transition: border-color 0.2s ease;
}
#language-select:hover, #language-select:focus { border-color: var(--brand); outline: none; }
#language-select option { background: var(--panel); color: var(--ink); }
.lang-select-arrow { position: absolute; right: 10px; color: var(--faint); font-size: 10px; pointer-events: none; }

.editor-timer-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
  font: 600 13px var(--mono); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.editor-timer-btn.running { color: var(--brand); border-color: color-mix(in srgb, var(--brand) 40%, transparent); }
.editor-timer-btn.running .timer-icon { animation: tick 1s steps(1) infinite; }
@keyframes tick { 50% { opacity: 0.5; } }
.editor-timer-reset {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--faint); cursor: pointer;
  transition: color 0.2s ease, transform 0.4s var(--ease);
}
.editor-timer-reset:hover { color: var(--ink); transform: rotate(-120deg); }

.autosave-indicator { display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; color: var(--faint); font-size: 12px; font-weight: 700; white-space: nowrap; }
.autosave-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: none; }

.toolbar-icon-btn {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px;
  border: 1px solid transparent; background: transparent; color: var(--faint); font-size: 14px; cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.toolbar-icon-btn:hover { color: var(--ink); background: var(--panel-2); border-color: var(--line-2); }

#monaco-editor-container { flex: 1; min-height: 0; position: relative; overflow: hidden; background: var(--editor-bg); }

.editor-status-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  height: 28px; padding: 0 12px; border-top: 1px solid var(--line);
  background: var(--panel-2); color: var(--faint); font: 500 11.5px var(--mono);
}
#editor-save-status { display: inline-flex; align-items: center; gap: 7px; transition: color 0.2s ease; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; }
#editor-save-status.saved { color: var(--brand); }
#editor-save-status.saved .status-dot { background: var(--brand); }
#editor-save-status.unsaved { color: var(--warn); }
#editor-save-status.unsaved .status-dot { background: var(--warn); animation: pulse 1s ease-in-out infinite; }

.error-highlight-line { background-color: rgba(255, 111, 111, 0.12) !important; border-top: 1px solid rgba(255, 111, 111, 0.4); border-bottom: 1px solid rgba(255, 111, 111, 0.4); }
.error-highlight-line-number { background-color: rgba(255, 111, 111, 0.6); width: 3px !important; margin-left: 3px; border-radius: 2px; }

/* ── 8. Testcase panel ─────────────────────────────────────────── */
.testcase-tab-content { display: none; flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px 18px; }
.testcase-tab-content.active { display: block; animation: tabIn 0.3s var(--ease); }

.case-pills-row, .result-case-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.case-pill {
  height: 32px; padding: 0 14px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
  font: 600 12.5px var(--mono); cursor: pointer;
  transition: all 0.2s var(--ease);
}
.case-pill:hover { color: var(--ink); border-color: var(--line-3); }
.case-pill.active { color: var(--brand-ink); background: var(--brand); border-color: var(--brand); box-shadow: none; }
.case-pill-custom { display: inline-flex; align-items: center; gap: 6px; }
.case-pill-remove {
  display: inline-grid; place-items: center; width: 16px; height: 16px; margin-left: 2px; border-radius: 50%;
  font-size: 14px; line-height: 1; opacity: .7; transition: opacity .15s, background .15s;
}
.case-pill-remove:hover { opacity: 1; background: rgba(0, 0, 0, .18); }
.case-pill-add {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 8px;
  font: 600 12.5px var(--mono); color: var(--faint); background: transparent;
  border: 1px dashed var(--line-3, var(--line)); cursor: pointer; transition: color .15s, border-color .15s, background .15s;
}
.case-pill-add:hover { color: var(--ink); border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, transparent); }
.case-pill-add[hidden] { display: none; }

.tc-case-details, #case-detail-panel { display: grid; gap: 12px; }
.case-io-card { border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: var(--panel-2); transition: border-color 0.2s ease; animation: tabIn 0.3s var(--ease) both; }
.case-io-card:focus-within { border-color: color-mix(in srgb, var(--brand) 55%, transparent); }
.case-io-card.io-fail { border-color: color-mix(in srgb, var(--bad) 45%, transparent); }
.case-io-card.io-pass { border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.case-io-card-header { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 8px 0 12px; border-bottom: 1px solid var(--line); }
.case-header-tag { color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.io-flag { display: inline-flex; align-items: center; gap: 5px; color: var(--bad); font-size: 11.5px; font-weight: 700; }
.io-flag.ok { color: var(--ok); }
.copy-btn {
  margin-left: auto; height: 26px; padding: 0 10px; border-radius: 7px;
  border: 1px solid transparent; background: transparent; color: var(--faint);
  font-size: 12px; font-weight: 700; cursor: pointer; transition: all 0.2s ease;
}
.copy-btn:hover { color: var(--ink); background: var(--panel-3); border-color: var(--line-2); }
.case-input-textarea, .case-io-card-body {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px;
  border: 0; background: transparent; color: var(--ink);
  font: 500 13px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; resize: vertical;
}
.case-input-textarea:focus { outline: none; }
.io-empty { color: var(--faint); font-style: italic; }
.diff-line { display: block; padding: 0 4px; margin: 0 -4px; border-radius: 4px; }
.diff-line.is-bad { background: color-mix(in srgb, var(--bad) 14%, transparent); box-shadow: inset 2px 0 0 var(--bad); }

/* ── 9. Results ────────────────────────────────────────────────── */
.result-placeholder { display: grid; place-items: center; gap: 6px; height: 100%; min-height: 160px; text-align: center; color: var(--faint); font-size: 13px; }
.result-placeholder strong { color: var(--muted); font-size: 15px; }
.result-placeholder-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 20px; margin-bottom: 4px; }

.rr-enter > * { animation: tabIn 0.45s var(--ease) both; }
.rr-enter > *:nth-child(2) { animation-delay: 60ms; }
.rr-enter > *:nth-child(3) { animation-delay: 120ms; }
.rr-enter > *:nth-child(4) { animation-delay: 180ms; }

.verdict-banner, .result-status-banner {
  position: relative; display: flex; align-items: center; gap: 14px;
  margin-bottom: 14px; padding: 14px 16px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--panel-2); overflow: visible;
}
.vb-icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 19px; }
.vb-copy { flex: 1; min-width: 0; }
.verdict-banner h3, .result-banner-title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.verdict-banner p { margin-top: 2px; color: var(--muted); font-size: 13px; }
.vb-stats { display: flex; gap: 18px; }
.vb-stats span { display: flex; flex-direction: column; align-items: flex-end; color: var(--faint); font: 500 12px var(--mono); }
.vb-stats b { color: var(--ink); font: 800 18px "Manrope", sans-serif; letter-spacing: -0.02em; }
.vb-stats small { font-family: "Manrope", sans-serif; font-size: 11px; }
.result-stats-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2px; color: var(--muted); font: 500 12px var(--mono); }

.v-accepted .vb-icon, .result-status-banner.accepted .vb-icon { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.verdict-banner.v-accepted, .result-status-banner.accepted { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 6%, var(--panel)); }
.verdict-banner.v-accepted h3, .result-status-banner.accepted .result-banner-title { color: var(--ok); }
.verdict-banner:not(.v-accepted), .result-status-banner:not(.accepted) { border-color: color-mix(in srgb, var(--bad) 32%, transparent); background: color-mix(in srgb, var(--bad) 6%, var(--panel)); }
.verdict-banner:not(.v-accepted) h3, .result-status-banner:not(.accepted) .result-banner-title { color: var(--bad); }
.verdict-banner:not(.v-accepted) .vb-icon, .result-status-banner:not(.accepted) .vb-icon { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.verdict-banner.v-tle h3, .verdict-banner.v-tle .vb-icon { color: var(--warn); }
.verdict-banner.v-tle .vb-icon { background: color-mix(in srgb, var(--warn) 15%, transparent); }
.verdict-banner:not(.v-accepted) { animation: tabIn 0.45s var(--ease) both, nudge 0.45s var(--ease) 0.15s; }
@keyframes nudge { 25% { transform: translateX(-5px); } 50% { transform: translateX(4px); } 75% { transform: translateX(-2px); } }

.result-case-pill {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted);
  font: 600 12.5px var(--mono); cursor: pointer; transition: all 0.2s var(--ease);
}
.result-case-pill small { color: var(--faint); font-size: 11px; }
.result-case-pill.pill-passed i { color: var(--ok); }
.result-case-pill.pill-failed i { color: var(--bad); }
.result-case-pill:hover { color: var(--ink); border-color: var(--line-3); }
.result-case-pill.active.pill-passed { border-color: color-mix(in srgb, var(--ok) 55%, transparent); background: color-mix(in srgb, var(--ok) 10%, var(--panel-2)); color: var(--ink); }
.result-case-pill.active.pill-failed { border-color: color-mix(in srgb, var(--bad) 55%, transparent); background: color-mix(in srgb, var(--bad) 10%, var(--panel-2)); color: var(--ink); }

.result-case-summary { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); }
.result-case-summary i { font-size: 22px; }
.result-case-summary b { display: block; font-size: 14px; }
.result-case-summary span { color: var(--faint); font-size: 12.5px; }
.result-case-summary.case-pass i { color: var(--ok); }
.result-case-summary.case-fail i { color: var(--bad); }
.result-progress-bar { height: 6px; margin: -4px 0 14px; border-radius: 999px; background: var(--line); overflow: hidden; }
.result-progress-fill { height: 100%; border-radius: inherit; background: var(--brand); }

.error-console { margin-bottom: 14px; border-radius: 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--bad) 30%, transparent); background: var(--bb-code-bg); }
[data-theme="light"] .error-console { background: var(--bb-code-surface); }
.ec-head { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 12px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); color: var(--bb-code-muted); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.ec-dots { display: inline-flex; gap: 5px; }
.ec-dots i { width: 8px; height: 8px; border-radius: 50%; background: #ff5f57; }
.ec-dots i:nth-child(2) { background: #febc2e; }
.ec-dots i:nth-child(3) { background: #28c840; }
.error-console pre { margin: 0; padding: 12px 14px; max-height: 220px; overflow: auto; color: #ffb4ad; font: 500 12.5px/1.6 var(--mono); white-space: pre-wrap; word-break: break-word; }

/* ── 10. Judge pipeline ────────────────────────────────────────── */
.judge { position: relative; display: grid; gap: 16px; padding: 4px 2px; animation: tabIn 0.35s var(--ease); }
.judge-submit { max-width: 640px; margin: 24px auto; padding: 26px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel); box-shadow: var(--shadow); }
.judge-head { display: flex; align-items: center; gap: 14px; }
.judge-copy { flex: 1; min-width: 0; }
.judge-title { display: block; font-size: 16px; font-weight: 800; letter-spacing: -0.02em; }
.judge-submit .judge-title { font-size: 20px; }
.judge-sub { display: flex; flex-wrap: wrap; gap: 6px; color: var(--faint); font-size: 12.5px; }
.judge-elapsed { color: var(--brand); font: 600 12.5px var(--mono); font-variant-numeric: tabular-nums; min-width: 34px; }
.judge-pct { color: var(--ink); font: 800 22px "Manrope", sans-serif; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }

.judge-orb { position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; color: var(--brand); font-size: 19px; background: var(--brand-soft); }
.judge-submit .judge-orb { width: 64px; height: 64px; font-size: 24px; }
.orb-ring { position: absolute; inset: -4px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--brand) 40%, transparent); animation: ping 1.8s var(--ease) infinite; }
.orb-ring.r2 { animation-delay: 0.9s; }
.orb-sweep { position: absolute; inset: 0; border-radius: 50%; background: conic-gradient(from 0deg, transparent 0 70%, color-mix(in srgb, var(--brand) 55%, transparent) 100%); animation: spin 1.1s linear infinite; -webkit-mask: radial-gradient(circle, transparent 55%, #000 57%); mask: radial-gradient(circle, transparent 55%, #000 57%); }
.judge-orb i { position: relative; animation: breathe 1.6s ease-in-out infinite; }
@keyframes ping { 0% { transform: scale(0.85); opacity: 0.9; } 100% { transform: scale(1.5); opacity: 0; } }
@keyframes breathe { 50% { transform: scale(0.9); opacity: 0.75; } }

.judge-track { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.judge-fill { display: block; height: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0); background: var(--brand); transition: transform 0.3s ease-out; }
@keyframes flow { to { background-position: -200% 0; } }

.judge-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 0; padding: 0; list-style: none; }
.judge-submit .judge-stages { grid-template-columns: repeat(2, 1fr); }
.judge-stages li { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--panel); color: var(--faint); font-size: 12px; font-weight: 700; transition: all 0.35s var(--ease); }
.st-dot { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--panel-3); font-size: 11px; transition: all 0.35s var(--ease); }
.st-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.judge-stages li.is-active { color: var(--ink); border-color: color-mix(in srgb, var(--brand) 45%, transparent); box-shadow: 0 0 0 3px var(--brand-soft); }
.judge-stages li.is-active .st-dot { background: var(--brand); color: var(--brand-ink); animation: breathe 1s ease-in-out infinite; }
.judge-stages li.is-done { color: var(--muted); }
.judge-stages li.is-done .st-dot { background: var(--brand-soft); color: var(--brand); }
.judge-stages li.is-done .st-dot i { display: none; }
.judge-stages li.is-done .st-dot::after { content: "✓"; font-weight: 800; font-size: 12px; }

.judge-cells { display: grid; grid-template-columns: repeat(20, 1fr); gap: 4px; }
.judge-cells i { aspect-ratio: 1; border-radius: 3px; background: var(--line); animation: cell 1.6s var(--ease) infinite; animation-delay: calc(var(--k) * 47ms); }
.judge-cells-run { display: flex; flex-wrap: wrap; gap: 8px; }
.judge-cells-run i { width: 76px; height: 30px; aspect-ratio: auto; border-radius: 8px; background: linear-gradient(90deg, var(--panel-2), var(--panel-3), var(--panel-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; animation-delay: calc(var(--k) * 120ms); border: 1px solid var(--line); }
@keyframes cell { 0%, 100% { background: var(--line); transform: scale(1); } 30% { background: color-mix(in srgb, var(--brand) 70%, transparent); transform: scale(0.85); } }
@keyframes shimmer { to { background-position: -200% 0; } }

.judge-log { min-height: 54px; padding: 10px 12px; border-radius: 8px; background: var(--bb-code-bg); color: var(--bb-code-muted); font: 500 12px/1.55 var(--mono); }
[data-theme="light"] .judge-log { background: var(--bb-code-surface); }
.judge-log div { animation: tabIn 0.3s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.judge-log div:last-child::after { content: "▍"; margin-left: 2px; animation: tick 0.8s steps(1) infinite; }
.judge-run .judge-log { display: none; }

.judge.is-finished .judge-orb i { animation: none; }
.judge.is-finished .orb-sweep, .judge.is-finished .orb-ring { animation: none; opacity: 0; }
.judge.is-ok .judge-fill { background: var(--ok); }
.judge.is-fail .judge-fill { background: var(--bad); }
.judge.is-fail .judge-orb { color: var(--bad); background: color-mix(in srgb, var(--bad) 14%, transparent); }
.judge.is-finished .judge-cells i { animation: none; background: color-mix(in srgb, var(--ok) 55%, transparent); transition: background 0.3s ease; }
.judge.is-fail .judge-cells i { background: var(--line-2); }

/* Confetti */
.confetti { position: absolute; left: 40px; top: 50%; width: 0; height: 0; pointer-events: none; z-index: 5; }
.confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; opacity: 0; animation: confetti 1.2s var(--ease) forwards; animation-delay: var(--d); }
@keyframes confetti {
  0% { opacity: 1; transform: translate(0, 0) rotate(0) scale(0.6); }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translate(var(--tx), calc(var(--ty) + 60px)) rotate(var(--r)) scale(1); }
}

/* ── 11. Submission report ─────────────────────────────────────── */
.submission-status-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px; scroll-behavior: smooth; }
.submission-empty-state { display: grid; place-items: center; height: 100%; min-height: 160px; color: var(--faint); font-size: 13px; }

.sr { display: grid; gap: 14px; max-width: 980px; margin: 0 auto; }
.sr-enter > * { animation: tabIn 0.5s var(--ease) both; }
.sr-enter > *:nth-child(2) { animation-delay: 70ms; }
.sr-enter > *:nth-child(3) { animation-delay: 140ms; }
.sr-enter > *:nth-child(4) { animation-delay: 210ms; }
.sr-enter > *:nth-child(5) { animation-delay: 280ms; }
.sr-enter > *:nth-child(6) { animation-delay: 350ms; }

.sr-hero {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border-radius: 12px; border: 1px solid var(--line-2);
}
.sr.v-accepted .sr-hero { border-color: color-mix(in srgb, var(--ok) 35%, transparent); background: color-mix(in srgb, var(--ok) 6%, var(--panel)); }
.sr:not(.v-accepted) .sr-hero { border-color: color-mix(in srgb, var(--bad) 32%, transparent); background: color-mix(in srgb, var(--bad) 6%, var(--panel)); }
.sr-verdict { display: flex; align-items: center; gap: 16px; min-width: 0; }
.sr-icon { flex: none; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 12px; font-size: 26px; animation: popIn 0.6s var(--ease) both 0.1s; }
.sr.v-accepted .sr-icon { background: var(--ok); color: var(--brand-ink); box-shadow: none; }
.sr:not(.v-accepted) .sr-icon { background: color-mix(in srgb, var(--bad) 16%, transparent); color: var(--bad); }
@keyframes popIn { 0% { transform: scale(0.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: none; } }
.sr-kicker { color: var(--faint); font: 600 11.5px var(--mono); letter-spacing: 0.06em; }
.sr-hero h3 { font-size: 26px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; }
.sr.v-accepted .sr-hero h3 { color: var(--ok); }
.sr:not(.v-accepted) .sr-hero h3 { color: var(--bad); }
.sr-hero p { color: var(--muted); font-size: 13.5px; font-weight: 600; }
.sr-when { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.sr-when b { font-size: 14px; }
.sr-when span { color: var(--faint); font-size: 12px; }

.sr-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); transition: transform 0.3s var(--ease), border-color 0.2s ease; }
.kpi:hover { transform: translateY(-2px); border-color: var(--line-3); }
.kpi-label { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.kpi strong { font-size: 24px; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.kpi-sub { color: var(--muted); font-size: 12.5px; }
.kpi-sub b { color: var(--brand); font-weight: 800; }
.kpi-meter { height: 5px; margin-top: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.kpi-meter i { display: block; height: 100%; width: var(--w); border-radius: inherit; background: var(--brand); transform-origin: left; animation: grow 1.1s var(--ease) both 0.35s; }
.kpi-ring { flex-direction: row; align-items: center; gap: 14px; }
.kpi-ring > div { display: flex; flex-direction: column; gap: 2px; }
.pass-ring { flex: none; width: 64px; height: 64px; transform: rotate(-90deg); }
.pass-ring circle { fill: none; stroke-width: 7; }
.pr-track { stroke: var(--line-2); }
.pr-fill { stroke-linecap: round; stroke-dasharray: var(--c); stroke-dashoffset: var(--c); animation: ring 1.2s var(--ease) forwards 0.3s; }
.pr-fill.ok { stroke: var(--ok); }
.pr-fill.bad { stroke: var(--bad); }
@keyframes ring { to { stroke-dashoffset: var(--o); } }

.sr-card { padding: 18px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--panel-2); }
.sr-card-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.sr-card-head h4 { font-size: 15px; font-weight: 800; letter-spacing: -0.01em; }
.sr-legend { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 12px; }
.sr-legend i { width: 9px; height: 9px; border-radius: 3px; margin-left: 8px; }
.sr-legend i.ok { background: var(--ok); }
.sr-legend i.bad { background: var(--bad); }

.sr-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; margin-bottom: 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line-2); }
.sr-tab { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: 8px; background: transparent; color: var(--faint); font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.25s var(--ease); }
.sr-tab b { padding: 2px 7px; border-radius: 6px; background: var(--panel-3); color: var(--muted); font: 600 11.5px var(--mono); }
.sr-tab:hover { color: var(--ink); }
.sr-tab.active { background: var(--panel-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2); }
.sr-tab.active b { background: var(--brand-soft); color: var(--brand); }
.sr-pane { display: none; }
.sr-pane.active { display: grid; gap: 12px; animation: tabIn 0.35s var(--ease); }

.cx-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; }
.cx-card { padding: 16px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); }
.cx-label { display: block; margin-bottom: 8px; color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.cx-big { font: 800 40px/1 var(--mono); letter-spacing: -0.04em; }
.cx-good { color: var(--ok); }
.cx-ok { color: var(--warn); }
.cx-warn { color: var(--bad); }
.cx-name { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; font-weight: 700; }
.cx-verdict { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); font-size: 12.5px; font-weight: 700; }
.cx-verdict.good { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 30%, transparent); background: color-mix(in srgb, var(--ok) 8%, transparent); }
.cx-verdict.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: color-mix(in srgb, var(--warn) 8%, transparent); }
.cx-signals { display: grid; gap: 7px; margin: 14px 0 0; padding: 0; list-style: none; }
.cx-signals li { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 13px; }
.cx-signals i { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 7px; background: var(--panel-3); color: var(--brand); font-size: 12px; }
.cx-note { margin-top: 12px !important; color: var(--faint); font-size: 11.5px; line-height: 1.5; }

.growth { width: 100%; height: 150px; overflow: visible; }
.gc-axis { stroke: var(--line-2); stroke-width: 1; }
.gc-line { fill: none; stroke: var(--line-3); stroke-width: 1.4; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.2s var(--ease) forwards; animation-delay: calc(var(--i) * 70ms); vector-effect: non-scaling-stroke; }
.gc-line.is-you { stroke: var(--brand); stroke-width: 3; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.gc-legend { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.gc-legend span { padding: 2px 7px; border-radius: 6px; background: var(--panel-2); color: var(--faint); font: 500 11px var(--mono); }
.gc-legend span.is-you { background: var(--brand-soft); color: var(--brand); font-weight: 700; }

.dist-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.dist-beats { display: block; font-size: 15px; font-weight: 700; color: var(--muted); }
.dist-beats b { color: var(--brand); font-size: 28px; font-weight: 800; letter-spacing: -0.03em; }
.dist-sub { color: var(--faint); font-size: 12px; }
.dist-stats { display: flex; gap: 6px; }
.dist-stats span { display: flex; flex-direction: column; padding: 7px 10px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.dist-stats b { color: var(--ink); font: 700 13px var(--mono); text-transform: none; letter-spacing: 0; margin-top: 2px; }
.dist-plot { position: relative; height: 130px; padding-top: 22px; }
.dist-bars { display: flex; align-items: flex-end; gap: 3px; height: 100%; border-bottom: 1px solid var(--line-2); }
.dist-bars i { flex: 1; height: var(--h); border-radius: 4px 4px 0 0; background: var(--line-2); transform-origin: bottom; animation: rise 0.8s var(--ease) both; animation-delay: calc(var(--i) * 30ms); transition: filter 0.2s ease; }
.dist-bars i.is-slower { background: color-mix(in srgb, var(--brand) 22%, var(--panel-3)); }
.dist-bars i.is-you { background: var(--brand); box-shadow: none; }
.dist-bars i:hover { filter: brightness(1.3); }
@keyframes rise { from { transform: scaleY(0); } }
.dist-marker { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1.5px dashed var(--brand); transform: translateX(-50%); animation: tabIn 0.6s var(--ease) both 0.5s; }
.dist-marker span { position: absolute; top: -2px; left: 0; transform: translateX(-50%); padding: 2px 7px; border-radius: 6px; background: var(--brand); color: var(--brand-ink); font: 700 10.5px var(--mono); white-space: nowrap; }
.dist-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font: 500 11px var(--mono); }
.dist-empty { display: flex; align-items: center; gap: 12px; padding: 18px; border-radius: 12px; border: 1px dashed var(--line-2); color: var(--muted); font-size: 13px; }
.dist-empty i { font-size: 20px; color: var(--faint); }

.case-chart { margin-bottom: 14px; }
.cc-bars { display: flex; align-items: flex-end; gap: 4px; height: 80px; padding: 6px 0 0; border-bottom: 1px solid var(--line-2); }
.cc-bars i { flex: 1; max-width: 34px; height: var(--h); border-radius: 4px 4px 0 0; transform-origin: bottom; animation: rise 0.7s var(--ease) both; animation-delay: calc(var(--i) * 25ms); cursor: default; transition: filter 0.2s ease, transform 0.2s ease; }
.cc-bars i.ok { background: var(--ok); }
.cc-bars i.bad { background: var(--bad); }
.cc-bars i:hover { filter: brightness(1.25); }
.cc-axis { display: flex; justify-content: space-between; margin-top: 6px; color: var(--faint); font: 500 11px var(--mono); }

.submission-section-label { display: block; margin: 6px 0 10px; color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.submission-cases { display: grid; gap: 6px; }
.submission-cases.all-passed { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
.all-passed .submission-case-row { height: 36px; gap: 8px; padding: 0 10px; white-space: nowrap; }
.all-passed .submission-case-row strong, .all-passed .submission-case-row small { display: none; }
.all-passed .submission-case-row em { font-size: 11px; }
.submission-case { border-radius: 8px; border: 1px solid var(--line); background: var(--panel); overflow: hidden; }
.submission-case.failed { border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.submission-cases:not(.all-passed) .submission-case.passed { display: none; }
.submission-case-row { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 12px; border: 0; background: transparent; color: var(--ink); font: 600 13px "Manrope", sans-serif; text-align: left; cursor: pointer; }
.submission-case-row:disabled { cursor: default; }
.submission-case-row small { color: var(--faint); font-weight: 600; }
.submission-case-row em { margin-left: auto; color: var(--faint); font: 500 12px var(--mono); font-style: normal; }
.submission-case-row strong { font-size: 12px; }
.submission-case.passed strong { color: var(--ok); }
.submission-case.failed strong { color: var(--bad); }
.submission-case-row > i { color: var(--faint); transition: transform 0.25s var(--ease); }
.submission-case-row.open > i { transform: rotate(180deg); }
.submission-case-indicator { width: 8px; height: 8px; border-radius: 50%; }
.submission-case.passed .submission-case-indicator { background: var(--ok); }
.submission-case.failed .submission-case-indicator { background: var(--bad); box-shadow: none; }
.submission-case-details { display: none; }
.submission-case-details.open { display: grid; gap: 8px; padding: 0 12px 12px; animation: tabIn 0.3s var(--ease); }
.submission-case-details b { display: block; margin-bottom: 4px; color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.submission-case-details pre { margin: 0; padding: 9px 11px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line); font: 500 12.5px/1.55 var(--mono); white-space: pre-wrap; word-break: break-word; }
.submission-case-details pre.is-bad { border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.hidden-note { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

.sr-code .sr-card-head .copy-btn { margin-left: 0; }
.sr-code-meta { margin-left: auto; color: var(--faint); font: 500 12px var(--mono); }
.submitted-code { margin: 0; max-height: 420px; overflow: auto; padding: 12px 0; border-radius: 12px; background: var(--editor-bg); border: 1px solid var(--line); counter-reset: ln; }
.submitted-code code { display: block; font: 500 13px/1.7 var(--mono); color: var(--bb-code-text); }
.submitted-code .ln { display: block; padding-right: 16px; white-space: pre; }
.submitted-code .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 44px; padding-right: 16px; text-align: right; color: var(--bb-code-gutter); user-select: none; }

.sr-loading { display: grid; gap: 14px; max-width: 980px; margin: 0 auto; }
.sr-loading-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.skeleton-block.tall { height: 220px; }

/* legacy hooks still emitted by older code paths */
.submission-ack { display: none; }
.submission-pending, .pending-loader { display: none; }

/* ── 12. Submissions tab (history list) ────────────────────────── */
.subs { display: grid; gap: 14px; }
.subs-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ss-tile { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line); animation: tabIn 0.4s var(--ease) both; }
.ss-label { color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.ss-tile strong { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.ss-tile strong.ok { color: var(--ok); }
.ss-tile strong small { margin-left: 2px; color: var(--faint); font-size: 12px; font-weight: 600; }
.ss-meter { height: 4px; border-radius: 999px; background: var(--line); overflow: hidden; }
.ss-meter i { display: block; height: 100%; width: var(--w); background: var(--ok); border-radius: inherit; transform-origin: left; animation: grow 0.9s var(--ease) both 0.2s; }

.subs-head, .submission-row { display: grid; grid-template-columns: minmax(150px, 1.6fr) 0.9fr 0.9fr 0.9fr 0.8fr 20px; align-items: center; gap: 10px; }
.subs-head { padding: 0 14px; color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.subs-list { display: grid; border-radius: 12px; border: 1px solid var(--line-2); overflow: hidden; background: var(--panel); }
.submission-row {
  position: relative; min-height: 58px; padding: 8px 14px;
  border-top: 1px solid var(--line); cursor: pointer;
  transition: background 0.2s ease;
  animation: tabIn 0.4s var(--ease) both; animation-delay: calc(min(var(--i), 14) * 35ms);
}
.submission-row:first-child { border-top: 0; }
.submission-row::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; transform: scaleY(0); transition: transform 0.3s var(--ease); }
.submission-row.accepted::before { background: var(--ok); }
.submission-row.failed::before { background: var(--bad); }
.submission-row:hover, .submission-row:focus-visible { background: var(--panel-2); outline: none; }
.submission-row:hover::before, .submission-row:focus-visible::before, .submission-row.is-active::before { transform: scaleY(1); }
.submission-row.is-active { background: color-mix(in srgb, var(--brand) 8%, var(--panel)); }
.sr-status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sr-dot { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.submission-row.accepted .sr-dot { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.submission-row.failed .sr-dot { background: color-mix(in srgb, var(--bad) 13%, transparent); color: var(--bad); }
.sr-status-text { min-width: 0; display: flex; flex-direction: column; }
.status-text { font-size: 13.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.text-green { color: var(--ok); }
.text-red { color: var(--bad); }
.time-ago { color: var(--faint); font-size: 11.5px; }
.lang-badge { display: inline-block; padding: 3px 9px; border-radius: 7px; background: var(--panel-3); color: var(--muted); font: 600 11.5px var(--mono); }
.sr-metric { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); font: 500 12.5px var(--mono); white-space: nowrap; }
.sr-metric i { color: var(--faint); font-size: 12px; }
.sr-open { color: var(--faint); transition: transform 0.25s var(--ease), color 0.2s ease; }
.submission-row:hover .sr-open, .submission-row.is-active .sr-open { color: var(--brand); transform: translateX(3px); }
.subs-hint { display: flex; align-items: center; gap: 8px; color: var(--faint); font-size: 12.5px; }

/* ── 13. Editorial ─────────────────────────────────────────────── */
.editorial { display: grid; gap: 18px; }
.editorial-author-row { display: flex; align-items: center; gap: 12px; }
.editorial-logo-circle { width: 38px; height: 38px; border-radius: 8px; padding: 4px; background: var(--panel-2); border: 1px solid var(--line-2); object-fit: contain; }
.editorial-author-name { display: flex; align-items: center; gap: 6px; font-weight: 800; }
.editorial-verified { color: var(--brand); }
.editorial-date { color: var(--faint); font-size: 12px; }
.editorial-green-tag { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); font-size: 12px; font-weight: 800; }
.complexity-box { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.cbx { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 12px; background: var(--panel-2); border: 1px solid var(--line-2); }
.cbx-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-size: 17px; }
.cbx-icon.space { background: color-mix(in srgb, var(--blue) 14%, transparent); color: var(--blue); }
.cbx-label { display: block; color: var(--faint); font: 600 12px var(--bb-font-sans); letter-spacing: 0.01em; }
.cbx code { font: 800 18px var(--mono); color: var(--ink); }
.video-card { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); background: #000; }
.video-card iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.editorial-content { color: var(--ink); font-size: 15px; line-height: 1.75; }
.editorial-content h1, .editorial-content h2, .editorial-content h3 { margin: 22px 0 10px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.3; }
.editorial-content h2 { font-size: 19px; }
.editorial-content h3 { font-size: 16px; }
.editorial-content p { margin: 0 0 12px; }
.editorial-content ul, .editorial-content ol { margin: 0 0 12px; padding-left: 22px; }
.editorial-content li { margin: 4px 0; }
.editorial-content code { padding: 1px 6px; border-radius: 6px; background: var(--panel-3); font: 500 13px var(--mono); }
.editorial-content pre { margin: 0 0 14px; padding: 14px 16px; border-radius: 8px; background: var(--editor-bg); border: 1px solid var(--bb-code-line); color: var(--bb-code-text); overflow-x: auto; }
.editorial-content pre code { padding: 0; background: none; color: inherit; font-size: 13px; line-height: 1.7; }
.editorial-content blockquote { margin: 0 0 12px; padding: 10px 14px; border-left: 3px solid var(--brand); border-radius: 0 8px 8px 0; background: var(--brand-soft); color: var(--muted); }
.editorial-content img { max-width: 100%; border-radius: 12px; }
.editorial-content a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; }

/* ── 14. Drawer ────────────────────────────────────────────────── */
#drawer-backdrop { position: fixed; inset: 0; z-index: 90; background: var(--bb-overlay); opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s; }
#drawer-backdrop.open { opacity: 1; visibility: visible; }
#problem-list-drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  display: flex; flex-direction: column;
  width: min(440px, 92vw); background: var(--panel); border-right: 1px solid var(--line-2); box-shadow: var(--pop);
  transform: translateX(-102%); transition: transform 0.45s var(--ease);
}
#problem-list-drawer.open { transform: none; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; height: 56px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.drawer-title-wrap { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 800; }
.drawer-title-wrap i { color: var(--brand); }
#drawer-close { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); cursor: pointer; transition: all 0.2s ease; }
#drawer-close:hover { color: var(--ink); transform: rotate(90deg); }
#drawer-content { flex: 1; min-height: 0; overflow-y: auto; padding: 12px; }
.drawer-search { position: relative; margin-bottom: 10px; }
.drawer-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); }
#drawer-search-input { width: 100%; height: 40px; padding: 0 12px 0 36px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--ink); font: 400 14px var(--bb-font-sans); }
#drawer-search-input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.problems-list { display: grid; gap: 2px; }
.problem-row { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 10px; padding: 10px 10px; border-radius: 8px; font-size: 14px; transition: background 0.2s ease; animation: tabIn 0.35s var(--ease) both; animation-delay: calc(min(var(--i, 0), 16) * 18ms); }
.problem-row:hover { background: var(--panel-2); }
.prob-check { display: grid; place-items: center; color: var(--bb-accent); font-size: 15px; }  /* blue tick = solved; empty = not yet */
.prob-num-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.prob-num-title b { color: var(--faint); font-weight: 500; font-variant-numeric: tabular-nums; }
.prob-diff { font-size: 12px; font-weight: 600; }
.prob-diff.diff-easy { color: var(--easy); }
.prob-diff.diff-medium { color: var(--medium); }
.prob-diff.diff-hard { color: var(--hard); }

/* ── 15. Skeleton + empty states ───────────────────────────────── */
.skeleton { border-radius: 8px; background: linear-gradient(90deg, var(--panel-2) 0%, var(--panel-3) 50%, var(--panel-2) 100%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton-line { height: 12px; margin-bottom: 10px; }
.skeleton-line.h-tall { height: 22px; }
.skeleton-block { height: 90px; border-radius: 12px; }
.w-full { width: 100%; } .w-3-4 { width: 75%; } .w-1-2 { width: 50%; } .w-1-4 { width: 25%; }
.empty-state { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-rich { display: grid; justify-items: center; gap: 8px; padding: 48px 20px; }
.empty-rich strong { color: var(--ink); font-size: 16px; font-weight: 800; }
.empty-rich > span:last-child { max-width: 360px; color: var(--muted); font-size: 13.5px; }
.er-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 22px; margin-bottom: 4px; }

/* ── 16. Fullscreen ────────────────────────────────────────────── */
#right-panel.fullscreen { position: fixed; inset: 0; z-index: 80; padding: 10px; background: var(--bg); animation: tabIn 0.3s var(--ease); }

/* ── 17. Responsive ────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .cx-grid { grid-template-columns: 1fr; }
  .judge-stages { grid-template-columns: repeat(2, 1fr); }
  .stats-bar { grid-template-columns: repeat(3, 1fr); }
  .stat-votes { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  body.pd { overflow: auto; }
  #problem-page { height: auto; min-height: 100vh; overflow: visible; }
  #main-content { flex-direction: column; gap: 10px; }
  #left-panel { flex: none !important; max-width: none; min-width: 0; max-height: 70vh; }
  #resize-handle-vertical { display: none; }
  #right-panel { min-height: 90vh; }
  #top-navbar { grid-template-columns: auto 1fr auto; gap: 8px; }
  #btn-problem-list span, .nav-sep, .nav-step, .autosave-indicator { display: none; }
  .navbar-center { justify-content: center; }
  .subs-head { display: none; }
  .submission-row { grid-template-columns: 1fr auto auto 20px; }
  .submission-row > span:nth-child(2), .submission-row > span:nth-child(5) { display: none; }
  .subs-summary, .sr-kpis, .sr-loading-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  #btn-run, #btn-submit { min-width: 0; padding: 0 12px; }
  .nav-shuffle, #btn-theme-toggle { display: none; }
  .tab-btn span { display: none; }
  .sr-hero { flex-direction: column; align-items: flex-start; }
  .sr-when { align-items: flex-start; text-align: left; }
  .vb-stats { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  body.pd *, body.pd *::before, body.pd *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .gc-line { stroke-dashoffset: 0; }
  .pr-fill { stroke-dashoffset: var(--o); }
}

/* Like / dislike (problems:react). */
.stat-votes { flex-direction: row; align-items: center; gap: 6px; }
.vote-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
  border: 1px solid var(--line-2); border-radius: var(--bb-radius-sm); background: var(--panel); color: var(--muted);
  font: 600 13px var(--bb-font-sans); font-variant-numeric: tabular-nums; cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.vote-btn:hover { border-color: var(--line-3); color: var(--ink); }
.vote-btn.is-on { border-color: var(--bb-accent-line); background: var(--bb-accent-soft); color: var(--bb-accent-text); }
.vote-btn:disabled { opacity: .6; cursor: progress; }
