:root {
  --bg: #f6f7f9; --card: #fff; --text: #1b1f24; --muted: #5f6b7a; --line: #dde2e8;
  --accent: #1f5fbf; --accent-2: #174a96; --ok: #1d7a46; --err: #b3261e;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #111418; --card: #1a1e24; --text: #e7eaee; --muted: #9aa5b1; --line: #2c333c; --accent: #6ea2f0; --accent-2: #8fb8f5; --ok: #5cc98a; --err: #f08a82; }
}
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); }
main { max-width: 960px; margin: 0 auto; padding: 24px 16px 64px; }
.top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; gap: 8px; }
.top nav { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; text-decoration: none; color: var(--text); }
.subnav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 20px; }
.subnav a { padding: 6px 12px; border-radius: 6px; text-decoration: none; color: var(--muted); }
.subnav a.on { background: var(--accent); color: #fff; }
.card, .report { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px; margin-bottom: 20px; }
h1 { font-size: 1.6rem; margin: 0 0 16px; } h2 { font-size: 1.25rem; margin: 0 0 8px; } h3 { font-size: 1rem; margin: 0 0 6px; }
.muted { color: var(--muted); }
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 16px; border: 1px solid; }
.flash.ok { color: var(--ok); border-color: var(--ok); } .flash.err { color: var(--err); border-color: var(--err); }
label { display: block; font-weight: 600; margin: 12px 0 4px; }
label.check { font-weight: 400; display: flex; gap: 8px; align-items: flex-start; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=url], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text); font: inherit; }
textarea { min-height: 100px; font-family: ui-monospace, Menlo, monospace; font-size: 14px; }
textarea.prose { font-family: inherit; font-size: inherit; }
button, .btn { display: inline-block; background: var(--accent); color: #fff; border: 0; padding: 9px 16px; border-radius: 6px; font: inherit; cursor: pointer; text-decoration: none; margin-top: 14px; }
button:hover, .btn:hover { background: var(--accent-2); }
button.secondary, .btn.secondary { background: transparent; color: var(--accent); border: 1px solid var(--accent); }
button.danger { background: var(--err); }
button.link { background: none; color: var(--accent); padding: 0; margin: 0; }
form.inline { display: inline; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 14px; }
.table-wrap { overflow-x: auto; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 16px 0; }
.metric { border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.metric span { display: block; font-size: 13px; color: var(--muted); }
.metric strong { font-size: 1.2rem; }
.video-wrap { position: relative; padding-top: 56.25%; margin: 12px 0; border-radius: 8px; overflow: hidden; background: #000; }
.video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video { width: 100%; border-radius: 8px; margin: 12px 0; }
.chart-box { position: relative; height: 280px; margin: 16px 0; }
.notes { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.question { background: var(--card); border: 2px solid var(--accent); border-radius: 10px; padding: 20px; }
.question .prompt { font-size: 1.15rem; font-weight: 600; margin-bottom: 8px; }
.options label { font-weight: 400; display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; margin: 6px 0; cursor: pointer; }
.options input[type=number] { width: 70px; }
.scale { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.scale label { flex: 1; min-width: 44px; justify-content: center; }
.progress { height: 6px; background: var(--line); border-radius: 3px; margin: 8px 0 20px; overflow: hidden; }
.progress div { height: 100%; background: var(--accent); }
.item-list { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.item-list a { display: inline-block; min-width: 32px; text-align: center; padding: 4px 8px; border: 1px solid var(--line); border-radius: 6px; text-decoration: none; font-size: 14px; }
.item-list a.done { background: var(--ok); color: #fff; border-color: var(--ok); }
.item-list a.cur { outline: 2px solid var(--accent); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 13px; border: 1px solid var(--line); }
.pill.live { color: var(--ok); border-color: var(--ok); }
.auth { max-width: 420px; margin: 40px auto; }
