:root {
  color-scheme: dark;
  font: 15px/1.7 Tahoma, Arial, sans-serif;
  color: #e7ecef;
  background: #11181e;
  --line: #33424b;
  --panel: #1a242b;
  --muted: #b7c5cd;
  --accent: #8be2c7;
}
* { box-sizing: border-box; }
body { margin: 0; }
header, main { max-width: 1440px; margin: auto; padding: 24px clamp(14px, 4vw, 52px); }
header { display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.brand { display: flex; flex-wrap: wrap; align-items: baseline; gap: 16px; }
.brand strong { font: 700 26px Arial, sans-serif; }
.brand span, small, .hint, .empty { color: var(--muted); }
#state, .topic { color: var(--accent); }
.controls { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; padding-bottom: 18px; }
.controls label { display: grid; gap: 4px; }
.controls .check { display: flex; align-items: center; min-height: 42px; }
input, button { font: inherit; }
input[type=password], button {
  border-radius: 8px; padding: 8px 13px; min-height: 42px;
  border: 1px solid var(--line); background: var(--panel); color: inherit;
}
input[type=checkbox] { accent-color: var(--accent); }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
#start:not(:disabled) { background: var(--accent); color: #0e2720; border-color: var(--accent); font-weight: bold; }
.downloads { display: flex; gap: 8px; }
.hint { width: 100%; margin: 0; font-size: .88rem; }
#notice { color: #ffcb98; overflow-wrap: anywhere; }
.workspace { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
aside { display: grid; gap: 16px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; padding: 18px; }
h1, h2, h3 { margin: 0 0 8px; line-height: 1.5; }
h1 { font-size: 1.28rem; display: flex; justify-content: space-between; }
h2 { font-size: 1.08rem; }
h3 { font-size: .9rem; color: var(--muted); }
p, ul { margin: 0 0 12px; }
ul { padding-inline-start: 22px; }
ul:empty::before { content: '—'; color: var(--muted); }
#captions { height: 65vh; min-height: 300px; overflow: auto; padding-inline-end: 8px; }
article { padding: 12px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
article p:last-child { margin-bottom: 0; }
time { color: var(--muted); display: block; font-size: .8rem; }
[dir=ltr] { font-family: Arial, sans-serif; }
.question { color: var(--accent); font-size: 1.02rem; }
@media (max-width: 760px) {
  .workspace { grid-template-columns: 1fr; }
  #captions { height: 47vh; }
}
