/* Miru: local assets, system typography, no external requests. */
:root {
  color-scheme: dark;
  --bg: #0d0e14;
  --surface: #15161f;
  --surface-raised: #1b1c28;
  --surface-hover: #232432;
  --border: #2c2d3c;
  --text: #f3f2f8;
  --muted: #b2b0c4;
  --faint: #9390a8;
  --magenta: #e20074;
  --pink: #ff80bf;
  --purple: #ac90ff;
  --green: #74e0b6;
  --red: #ff9ca9;
  --radius: 18px;
  --shadow: 0 12px 32px #0002;
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at 90% 0%, #70245214, transparent 45%); pointer-events: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button, summary { cursor: pointer; }
button { color: inherit; }
button:disabled, input:disabled, select:disabled, textarea:disabled { opacity: .48; cursor: not-allowed; }
:focus-visible { outline: 3px solid #ff92cd; outline-offset: 4px; }
[hidden] { display: none !important; }
::selection { background: #8b245f; color: #fff; }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { color: var(--text); line-height: 1.25; font-weight: 650; overflow-wrap: anywhere; }
h1 { font-size: clamp(1.85rem, 3.2vw, 2.6rem); letter-spacing: -.045em; margin-bottom: 10px; }
h2 { font-size: 1.35rem; letter-spacing: -.025em; margin-bottom: 12px; }
h3 { font-size: 1.1rem; margin-bottom: 10px; }
h4 { font-size: 1rem; }
p { margin-bottom: 16px; }
small { font-size: .58em; }
.muted, .page-heading p, .lead, .card-description { color: var(--muted); }
.eyebrow { color: var(--pink); font-size: .7rem; font-weight: 750; letter-spacing: .15em; margin-bottom: 10px; }
.accent-dot { color: var(--magenta); }
.lead { font-size: 1.1rem; line-height: 1.8; }
.preserve-lines { white-space: pre-line; overflow-wrap: anywhere; }
.explanation-text { white-space: pre-wrap; overflow-wrap: anywhere; text-align: left; }
.review-explanation { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); min-width: 0; }
.badge.learning { color: #d1bfff; background: #ac90ff16; border: 1px solid #ac90ff45; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 16px; top: -100px; z-index: 100; padding: 12px 20px; border-radius: 8px; background: white; color: #15161f; }
.skip-link:focus { top: 16px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 254px; background: #11121a; border-right: 1px solid var(--border); padding: 32px 20px 24px; display: flex; flex-direction: column; z-index: 20; overflow-y: auto; }
.brand { display: flex; gap: 12px; align-items: center; font-size: 1.8rem; line-height: 1; font-weight: 750; letter-spacing: -.06em; width: fit-content; }
.brand-mark { display: grid; place-content: center; position: relative; width: 44px; height: 44px; border-radius: 13px; background: linear-gradient(140deg, #ee1687, #ac0062); font-size: 1.9rem; color: #fff; letter-spacing: -.1em; box-shadow: 0 6px 24px #e2007429; }
.brand-mark span { position: absolute; bottom: 8px; right: 7px; color: #fff; font-size: 1rem; }
.brand-sub { display: block; letter-spacing: .23em; font-weight: 600; font-size: .51rem; color: var(--muted); margin: 7px 0 0 2px; }
.workspace-label { margin: 48px 12px 14px; font-size: .64rem; color: var(--faint); letter-spacing: .15em; font-weight: 700; }
.nav-links { display: flex; flex-direction: column; gap: 7px; }
.nav-links a { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: 10px; color: var(--muted); font-size: .89rem; font-weight: 550; border: 1px solid transparent; }
.nav-links a > span { width: 20px; text-align: center; font-size: 1.2rem; color: var(--faint); }
.nav-links a:hover { color: var(--text); background: var(--surface-raised); }
.nav-links a[aria-current="page"] { color: #ffb1d9; background: linear-gradient(100deg, #e2007425, #e200740c); border-color: #e2007438; }
.nav-links a[aria-current="page"] > span { color: #ff80bf; }
.nav-section { font-size: .64rem; color: var(--faint); letter-spacing: .15em; margin: 28px 12px 5px; font-weight: 700; }
.sidebar-bottom { margin-top: auto; padding: 30px 8px 0; }
.profile { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--border); padding-top: 22px; margin-bottom: 14px; }
.avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: #5b325b; color: #ffcbeb; flex-shrink: 0; font-weight: 700; }
.profile > div { min-width: 0; }
.profile strong { display: block; font-size: .83rem; overflow-wrap: anywhere; }
.profile div > span { display: block; font-size: .73rem; color: var(--faint); }
.account-link { display: inline-block; font-size: .78rem; color: var(--muted); margin-bottom: 14px; }
.account-link:hover { color: var(--pink); text-decoration: underline; }
.mobile-nav { display: none; }
.mobile-account { margin: 16px 13px 0; }
.main-shell { margin-left: 254px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar { display: flex; justify-content: space-between; gap: 20px; padding: 21px 40px; border-bottom: 1px solid #ffffff07; color: var(--faint); font-size: .76rem; }
.environment { display: flex; align-items: center; gap: 8px; }
.environment > span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px #74e0b633; }
main { width: 100%; max-width: 1500px; padding: 36px 40px 48px; margin: 0 auto; flex: 1; }
main:focus { outline: none; }
.footer { display: flex; justify-content: space-between; gap: 16px; padding: 18px 40px; border-top: 1px solid #ffffff08; color: var(--faint); font-size: .72rem; }
.footer span span { margin: 0 8px; color: var(--pink); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 30px; }
.page-heading p { margin-bottom: 0; max-width: 780px; }
.page-heading .eyebrow { color: var(--pink); margin-bottom: 10px; }
.page-heading > div { min-width: 0; }
.page-heading > .button, .page-heading > .badge { flex-shrink: 0; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 44px; padding: 11px 19px; border-radius: 10px; border: 1px solid transparent; font-size: .85rem; font-weight: 650; text-align: center; line-height: 1.4; transition: background-color .16s, border-color .16s, box-shadow .16s; }
.button.primary { background: #d5006d; color: #fff; border-color: #ed258c; box-shadow: 0 4px 20px #e200741c; }
.button.primary:hover:not(:disabled) { background: #e20074; box-shadow: 0 5px 24px #e2007438; }
.button.secondary { background: #252333; border-color: #42384f; color: #eee8fa; }
.button.secondary:hover:not(:disabled) { background: #342940; border-color: #8e5d8c; }
.button.ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.button.ghost:hover:not(:disabled) { background: var(--surface-hover); color: var(--text); }
.button.light { background: #f8edf5; color: #32182f; }
.button.light:hover { background: #fff; }
.button.danger-outline { background: #ff8a9b0a; color: var(--red); border-color: #ff8a9b55; }
.button.danger-outline:hover { background: #ff8a9b1c; }
.button.small { min-height: 36px; padding: 8px 12px; font-size: .78rem; }
.full { width: 100%; }
.text-link, .back-link { color: #f497c9; font-size: .83rem; font-weight: 600; }
.text-link:hover, .back-link:hover { color: #ffc5e6; text-decoration: underline; text-underline-offset: 4px; }
.back-link { display: inline-block; margin-bottom: 20px; }
.panel { padding: 26px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); min-width: 0; margin-bottom: 24px; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 22px; }
.section-heading h2, .section-heading h3, .section-heading p:last-child { margin-bottom: 0; }
.section-heading .eyebrow { margin-bottom: 7px; }
.badge { display: inline-flex; gap: 5px; align-items: center; padding: 4px 10px; border-radius: 7px; font-size: .69rem; font-weight: 650; line-height: 1.6; width: fit-content; }
.badge.accent { color: #ff9ed0; background: #e200741c; border: 1px solid #e2007430; }
.badge.neutral { color: #c7c1d9; background: #a19bb315; border: 1px solid #a19bb328; }
.badge.positive { color: #8beac4; background: #41c28d16; border: 1px solid #41c28d30; }
.badge.negative { color: #ffabb5; background: #ff7a8d13; border: 1px solid #ff7a8d30; }
.hero { position: relative; padding: 33px 36px; margin-bottom: 26px; min-height: 280px; border: 1px solid #5d2e614d; border-radius: 20px; overflow: hidden; display: flex; background: radial-gradient(ellipse at 80% 80%, #4b24565c, transparent 65%), linear-gradient(115deg, #25182a, #201b30 70%, #241b38); }
.hero > div:first-child { position: relative; z-index: 1; max-width: 66%; }
.hero h2 { font-size: clamp(1.7rem, 2.5vw, 2.2rem); margin: 16px 0 12px; letter-spacing: -.04em; }
.hero p { color: #c0b0c9; max-width: 480px; font-size: .91rem; }
.hero-art { position: absolute; right: 4%; top: 0; bottom: 0; width: 33%; display: grid; place-items: center; }
.orbit { position: absolute; height: 235px; width: 235px; border: 1px solid #be63b34d; border-radius: 50%; transform: rotate(-30deg) scaleX(.65); }
.orbit-two { transform: rotate(40deg) scaleX(.65); border-color: #ad93ff66; }
.hero-glyph { font-size: 8rem; font-weight: 300; color: #dba6ea; text-shadow: 0 0 80px #e20074a6; transform: translateY(-8px); }
.art-label { position: absolute; bottom: 24px; font-size: .55rem; letter-spacing: .23em; color: #b399c5; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-bottom: 26px; }
.stat-card { display: flex; align-items: flex-start; gap: 16px; padding: 24px 20px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); min-width: 0; }
.stat-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; flex-shrink: 0; }
.pink { color: var(--pink); background: #e200741a; }
.violet { color: var(--purple); background: #9b7cf51a; }
.mint { color: var(--green); background: #74e0b615; }
.stat-card p { font-size: .79rem; color: var(--muted); margin-bottom: 8px; }
.stat-card strong { display: block; font-size: 2.2rem; letter-spacing: -.05em; line-height: 1.1; margin-bottom: 10px; }
.stat-card div > span { display: block; font-size: .67rem; color: var(--faint); }
.resume-item { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 0; border-top: 1px solid var(--border); }
.resume-item h3 { margin-bottom: 5px; }
.resume-item p { margin: 0; color: var(--muted); font-size: .8rem; }
.chart-panel > p { font-size: .8rem; }
.chart-list { display: flex; flex-direction: column; gap: 18px; padding: 8px 0 20px; }
.chart-row { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(80px, 2fr) 68px; align-items: center; gap: 18px; }
.chart-label { min-width: 0; }
.chart-label strong { display: block; font-size: .83rem; overflow-wrap: anywhere; }
.chart-label span { display: block; font-size: .69rem; color: var(--faint); }
.chart-value { font-size: .83rem; text-align: right; color: #e5d3fb; font-variant-numeric: tabular-nums; }
progress { appearance: none; -webkit-appearance: none; border: 0; background: #272433; border-radius: 20px; overflow: hidden; height: 9px; width: 100%; accent-color: var(--magenta); }
progress::-webkit-progress-bar { background: #272433; border-radius: 20px; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #c90067, #b293f7); border-radius: 20px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #c90067, #b293f7); border-radius: 20px; }
summary { color: #ddd3eb; font-size: .85rem; padding: 8px 0; }
summary:hover { color: var(--pink); }
.chart-data { border-top: 1px solid var(--border); padding-top: 10px; }
.table-scroll { width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .83rem; }
th { font-weight: 600; color: var(--muted); font-size: .71rem; letter-spacing: .02em; }
td, th { padding: 16px 14px; border-bottom: 1px solid #ffffff09; vertical-align: middle; }
td:first-child, th:first-child { padding-left: 0; }
td:last-child, th:last-child { padding-right: 0; }
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody tr:hover { background: #ffffff02; }
td { min-width: 100px; }
td strong { font-weight: 600; }
td .text-link { white-space: nowrap; }
.cell-sub { display: block; color: var(--faint); font-size: .7rem; margin-top: 4px; }
.empty-state { text-align: center; padding: 35px 20px; }
.empty-state p { color: var(--muted); max-width: 520px; margin: 0 auto; font-size: .88rem; }
.empty-icon { display: grid; place-items: center; width: 54px; height: 54px; margin: 0 auto 18px; border-radius: 16px; color: var(--purple); background: #a28af314; font-size: 2rem; }
.empty-action { display: flex; justify-content: center; padding-bottom: 20px; }
.notice { padding: 15px 18px; border-radius: 12px; font-size: .85rem; line-height: 1.75; border: 1px solid; margin-bottom: 24px; overflow-wrap: anywhere; }
.notice.info { background: #b18bf20a; color: #d0c1e5; border-color: #b18bf22b; }
.notice.success { background: #74e0b60c; color: #abefd4; border-color: #74e0b635; }
.notice.danger { background: #ff9ca90a; color: #ffc1c9; border-color: #ff9ca936; }
.notice strong { display: block; }
.flash-stack { margin-bottom: 24px; }
.flash-stack .notice:last-child { margin-bottom: 0; }
.form-stack { display: flex; flex-direction: column; gap: 22px; margin-top: 24px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
label, .field > label { font-size: .83rem; font-weight: 600; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, select { width: 100%; min-height: 46px; color: var(--text); background: #101119; border: 1px solid #373646; border-radius: 9px; padding: 11px 13px; transition: border-color .15s; }
input:hover:not(:disabled), textarea:hover:not(:disabled), select:hover:not(:disabled) { border-color: #696079; }
input:focus, textarea:focus, select:focus { border-color: #f376b6 !important; }
textarea { resize: vertical; line-height: 1.65; }
select { padding-right: 30px; }
input[type="checkbox"], input[type="radio"] { width: 19px; height: 19px; accent-color: #e20074; flex-shrink: 0; cursor: pointer; margin: 0; }
input[type="number"] { font-variant-numeric: tabular-nums; }
.field-hint { color: var(--faint); font-size: .74rem; line-height: 1.65; font-weight: 400; }
.optional { color: var(--faint); font-size: .74rem; margin-left: 6px; font-weight: 400; }
.check-line { display: flex; align-items: flex-start; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; }
.check-line input { margin-top: 3px; }
.check-line .field-hint { display: block; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.form-stack > .notice { margin-bottom: 0; }
.narrow { max-width: 680px; }
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, 1fr); gap: 24px; align-items: start; }
.test-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.test-card { display: flex; flex-direction: column; padding: 24px; margin: 0; }
.test-card h2 { font-size: 1.2rem; margin-top: 20px; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.test-icon { width: 42px; height: 42px; border: 1px solid #ac90ff25; border-radius: 12px; color: #c3aaf9; background: #ac90ff0b; display: grid; place-items: center; font-size: 1.4rem; }
.card-description { font-size: .83rem; white-space: pre-line; overflow-wrap: anywhere; }
.test-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: auto 0 20px; padding-top: 10px; }
dt { font-size: .72rem; color: var(--faint); }
dd { margin: 5px 0 0; font-weight: 600; font-size: .94rem; }
.version-note { color: var(--faint); font-size: .72rem; margin-bottom: 18px; }
.card-footer { margin-top: auto; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; border-top: 1px solid var(--border); padding-top: 18px; }
.card-footer .muted, .test-card > .muted { font-size: .76rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto; }
.editor-fieldset, .answer-fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.span-full { grid-column: 1 / -1; }
.question-section { margin-top: 34px; }
.question-section > .muted { font-size: .8rem; }
.count-label { color: var(--faint); font-size: 1rem; font-weight: 400; }
.question-fields { display: grid; grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); gap: 20px; margin-bottom: 24px; align-items: start; }
.answers-heading { display: flex; justify-content: space-between; gap: 15px; align-items: center; font-size: .83rem; margin-bottom: 14px; }
.editor-answers { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.editor-answer { display: flex; align-items: center; gap: 12px; padding: 12px; background: #11121a; border-radius: 12px; border: 1px solid #ffffff09; }
.answer-index { font-size: .8rem; color: var(--faint); width: 18px; text-align: center; flex-shrink: 0; }
.editor-answer .answer-text { min-width: 0; flex: 1; background: #191923 !important; }
.correct-toggle { display: inline-flex; align-items: center; gap: 7px; padding: 8px; font-size: .76rem; font-weight: 400; color: var(--muted); cursor: pointer; }
.correct-toggle:has(input:checked) { color: var(--green); }
.icon-button { display: grid; place-items: center; width: 36px; height: 36px; flex-shrink: 0; border: 1px solid var(--border); background: transparent; color: var(--muted); border-radius: 8px; font-size: 1.5rem; }
.icon-button:hover:not(:disabled) { color: var(--red); background: #ff9ca90d; }
.editor-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 22px; padding: 24px; border: 1px solid #ac90ff33; border-radius: 16px; background: #1e1928; margin-bottom: 24px; }
.editor-actions p { font-size: .78rem; color: var(--muted); margin: 5px 0 0; }
.editor-actions strong { font-size: .94rem; }
.archive-form { max-width: 720px; padding-top: 16px; margin-top: 20px; border-top: 1px solid var(--border); }
.archive-form summary { color: var(--red); }
.archive-form p { color: var(--muted); font-size: .83rem; }
.version-details { margin-top: 20px; border-top: 1px solid var(--border); padding-top: 10px; }
.version-details .notice { margin-top: 16px; }
.history-question { border-top: 1px solid var(--border); padding: 24px 0 0; }
.history-question h4 { white-space: pre-line; margin-bottom: 8px; }
.start-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.detail-list { margin: 24px 0; }
.detail-list > div { display: flex; justify-content: space-between; align-items: baseline; gap: 22px; border-bottom: 1px solid #ffffff09; padding: 14px 0; }
.detail-list dd { margin-top: 0; font-size: .85rem; text-align: right; }
.detail-list dt { font-size: .8rem; }
.start-grid .notice { margin-bottom: 0; }
.start-action { background: radial-gradient(ellipse at 100% 0, #e2007410, transparent 80%), var(--surface); }
.start-action > .badge { margin-bottom: 20px; }
.start-action h2 { font-size: 1.65rem; line-height: 1.4; }
.attempt-shell { max-width: 880px; margin: 0 auto; }
.attempt-progress { padding: 8px 0 24px; }
.attempt-progress > div { display: flex; justify-content: space-between; gap: 20px; font-size: .83rem; margin-bottom: 12px; }
.attempt-progress > div > span { color: var(--muted); }
.question-panel { padding: 32px; }
.answer-fieldset legend { font-size: clamp(1.2rem, 2vw, 1.65rem); letter-spacing: -.02em; font-weight: 650; line-height: 1.5; white-space: pre-line; overflow-wrap: anywhere; padding: 0; margin-bottom: 12px; }
.attempt-form { margin-top: 22px; }
.answer-fieldset > p { font-size: .83rem; margin-bottom: 24px; }
.answer-options { display: flex; flex-direction: column; gap: 14px; }
.answer-option { display: flex; align-items: center; gap: 14px; border: 1px solid #3c374b; border-radius: 12px; background: #191821; padding: 18px; cursor: pointer; font-size: .95rem; font-weight: 400; }
.answer-option:hover { border-color: #9b6f9e; background: #211c2a; }
.answer-option:has(input:checked) { border-color: #f05ba5; background: #e2007410; box-shadow: inset 3px 0 #e20074; }
.answer-option:has(input:focus-visible) { outline: 3px solid #ff92cd; outline-offset: 3px; }
.option-letter { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 7px; border: 1px solid var(--border); font-size: .74rem; color: var(--muted); flex-shrink: 0; }
.option-text { white-space: pre-line; overflow-wrap: anywhere; min-width: 0; }
.attempt-actions { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 26px; margin-top: 28px; border-top: 1px solid var(--border); }
.attempt-actions p { max-width: 360px; margin: 0; }
.attempt-actions .button { flex-shrink: 0; }
.attempt-footnote { text-align: center; color: var(--faint); font-size: .75rem; }
.filter-form { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.filter-form .field { flex: 2; min-width: 180px; }
.filter-form .version-filter { flex: 1; }
.filter-form .field-hint { margin-bottom: -2px; }
.filter-form > .button { margin-bottom: 1px; }
.result-hero { display: flex; align-items: center; gap: 48px; padding: 34px; border-radius: 18px; border: 1px solid; margin-bottom: 24px; background: var(--surface); }
.result-passed { border-color: #74e0b636; background: radial-gradient(ellipse at 0% 50%, #74e0b612, transparent 60%), var(--surface); }
.result-failed { border-color: #b18bf23d; background: radial-gradient(ellipse at 0% 50%, #b18bf212, transparent 60%), var(--surface); }
.result-number { min-width: 180px; text-align: center; }
.result-number strong { display: block; font-size: clamp(3rem, 5vw, 4.5rem); font-weight: 700; line-height: 1.2; letter-spacing: -.06em; color: var(--purple); }
.result-passed .result-number strong { color: var(--green); }
.result-number > span { font-size: .83rem; color: var(--muted); }
.result-hero h2 { margin-top: 14px; font-size: 1.7rem; }
.result-hero p { font-size: .87rem; margin-bottom: 10px; }
.result-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin: 0 0 18px; }
.result-meta dd { font-size: .88rem; }
.review-heading { margin-top: 34px; }
.review-heading > span { font-size: .76rem; }
.review-card h3 { font-size: 1.15rem; line-height: 1.6; white-space: pre-line; }
.answer-review-list { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.answer-review-list li { display: flex; gap: 12px; align-items: center; border: 1px solid var(--border); padding: 14px 16px; border-radius: 10px; background: #11121a; font-size: .86rem; }
.answer-review-list .is-correct { border-color: #74e0b63d; background: #74e0b609; }
.answer-review-list .is-incorrect { border-color: #ff9ca936; background: #ff9ca907; }
.answer-review-list li > .badge { margin-left: auto; flex-shrink: 0; }
.answer-review-icon { font-size: 1.15rem; color: var(--faint); flex-shrink: 0; }
.is-correct .answer-review-icon { color: var(--green); }
.is-incorrect .answer-review-icon { color: var(--red); }
.review-answer-text { flex: 1; white-space: pre-line; overflow-wrap: anywhere; min-width: 0; }
.answer-badges { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.guest .main-shell { margin-left: 0; }
.guest main { max-width: 1320px; display: flex; flex-direction: column; justify-content: center; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .9fr); gap: 90px; align-items: center; min-height: calc(100vh - 160px); }
.login-story { display: flex; flex-direction: column; align-self: stretch; justify-content: space-between; padding: 30px 0; gap: 55px; }
.login-story h1 { font-size: clamp(2.8rem, 4.8vw, 4.8rem); line-height: 1.13; margin: 20px 0; }
.gradient-text { color: #ff97cf; background: linear-gradient(90deg, #ff83c1, #bca2ff); background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.login-story .lead { max-width: 490px; font-size: 1.1rem; }
.story-features { display: flex; flex-direction: column; gap: 14px; margin-top: 32px; font-size: .88rem; color: #d4c9de; }
.story-features b { color: var(--pink); font-size: .68rem; margin-right: 12px; border: 1px solid #e2007438; border-radius: 6px; padding: 4px 6px; }
.login-story > p { font-size: .75rem; margin: 0; }
.login-panel { padding: 40px; background: radial-gradient(ellipse at 100% 0, #e2007410, transparent 65%), var(--surface); border-color: #443044; }
.login-panel h2 { font-size: 1.7rem; }
.login-panel > p { font-size: .87rem; }
.login-panel .form-stack { margin-top: 32px; }
.login-help { color: var(--faint); font-size: .76rem !important; margin: 24px 0 0; text-align: center; }
.error-page { text-align: center; padding: 60px 20px; max-width: 780px; margin: auto; }
.error-code { color: #e20074; display: block; font-size: 7rem; letter-spacing: -.08em; font-weight: 800; opacity: .8; line-height: 1.2; margin-bottom: 20px; }
.error-page .form-actions { justify-content: center; margin: 28px 0; }
@media (min-width: 1700px) { main { padding-top: 48px; } }
@media (max-width: 1250px) {
  .sidebar { width: 224px; padding-left: 14px; padding-right: 14px; }
  .main-shell { margin-left: 224px; }
  main { padding: 28px; }
  .topbar, .footer { padding-left: 28px; padding-right: 28px; }
  .stats-grid { gap: 14px; }
  .stat-card { padding: 18px 16px; gap: 12px; }
  .stat-icon { width: 32px; height: 32px; font-size: 1.1rem; }
  .test-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-grid > section:last-child { max-width: 680px; width: 100%; }
  .login-layout { gap: 50px; }
  .question-fields { grid-template-columns: minmax(0, 1fr); }
  .result-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { position: static; width: 100%; display: grid; grid-template-columns: 1fr auto; padding: 18px 24px; border-right: 0; border-bottom: 1px solid var(--border); overflow: visible; gap: 16px; }
  .brand { font-size: 1.6rem; }
  .brand-mark { width: 38px; height: 38px; }
  .workspace-label, .desktop-nav { display: none; }
  .mobile-nav { display: block; grid-column: 1 / -1; grid-row: 2; }
  .mobile-nav > summary { border: 1px solid var(--border); padding: 10px 14px; border-radius: 9px; }
  .mobile-nav .nav-links { padding-top: 14px; }
  .mobile-nav .nav-section { margin-top: 14px; }
  .sidebar-bottom { padding: 0; display: flex; align-items: center; gap: 12px; margin: 0; }
  .profile { border: 0; padding: 0; margin: 0; }
  .profile div, .sidebar-bottom .account-link { display: none; }
  .sidebar-bottom form .button { width: auto; }
  .sidebar-bottom::before { content: none; }
  .main-shell { margin-left: 0; }
  .topbar { display: none; }
  main { padding-top: 32px; }
  .page-heading { align-items: flex-start; }
  .start-grid { grid-template-columns: 1fr; }
  .start-grid > .panel { margin-bottom: 0; }
  .start-grid { margin-bottom: 24px; }
  .question-fields { grid-template-columns: minmax(0, 2fr) minmax(220px, 1fr); }
  .login-layout { gap: 32px; }
  .login-panel { padding: 28px; }
}
@media (max-width: 680px) {
  :root { font-size: 14px; }
  .sidebar { padding: 16px 18px; }
  .sidebar-bottom .profile { display: none; }
  main { padding: 26px 18px 36px; }
  .footer { padding: 18px; font-size: .65rem; }
  .page-heading { flex-direction: column; gap: 18px; margin-bottom: 24px; }
  h1 { font-size: 2rem; }
  .hero { padding: 28px 24px; min-height: 260px; }
  .hero > div:first-child { max-width: 100%; }
  .hero-art { opacity: .15; right: -40px; width: 60%; }
  .hero h2 { font-size: 1.8rem; }
  .hero .art-label { display: none; }
  .hero p { max-width: 90%; }
  .stats-grid { grid-template-columns: 1fr; gap: 12px; }
  .stat-card { padding: 18px 20px; align-items: center; }
  .stat-icon { width: 42px; height: 42px; }
  .stat-card > div { display: grid; grid-template-columns: 1fr auto; gap: 0 18px; align-items: center; width: 100%; }
  .stat-card p { grid-row: 1; margin-bottom: 4px; }
  .stat-card strong { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 1.9rem; }
  .stat-card div > span { grid-column: 1; }
  .panel { padding: 20px; border-radius: 14px; }
  .section-heading { gap: 12px; flex-wrap: wrap; }
  .resume-item { align-items: flex-start; flex-direction: column; gap: 12px; }
  .chart-row { grid-template-columns: minmax(0, 1fr) 65px; gap: 8px 14px; }
  .chart-row .chart-label { grid-column: 1 / -1; }
  .chart-row progress { grid-column: 1; }
  .test-grid { grid-template-columns: 1fr; }
  .form-grid, .question-fields { grid-template-columns: 1fr; }
  .editor-answer { display: grid; grid-template-columns: 18px minmax(0, 1fr) 36px; padding: 10px; gap: 10px; }
  .editor-answer .answer-text { grid-column: 2 / -1; grid-row: 1; }
  .editor-answer .correct-toggle { grid-column: 2; grid-row: 2; padding-left: 0; }
  .editor-answer .remove-answer { grid-column: 3; grid-row: 2; }
  .answers-heading { flex-direction: column; align-items: flex-start; gap: 4px; }
  .editor-actions { padding: 20px; }
  .editor-actions > .form-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .answer-option { padding: 15px 12px; gap: 10px; }
  .option-letter { display: none; }
  .attempt-actions { flex-direction: column; align-items: stretch; gap: 16px; }
  .attempt-progress > div { font-size: .79rem; }
  .result-hero { flex-direction: column; text-align: center; gap: 24px; padding: 28px 22px; }
  .result-hero .badge { margin-inline: auto; }
  .result-number strong { font-size: 4rem; }
  .result-meta { gap: 20px 16px; }
  .result-meta dd { overflow-wrap: anywhere; }
  .answer-review-list li { flex-wrap: wrap; padding: 12px; }
  .answer-badges { width: 100%; justify-content: flex-start; padding-left: 25px; }
  .filter-form { align-items: stretch; }
  .filter-form .field { flex: 1 1 100%; }
  .filter-form .button { flex: 1; }
  .login-layout { grid-template-columns: 1fr; gap: 28px; min-height: auto; }
  .login-story { padding: 0; gap: 32px; }
  .login-story h1 { font-size: 2.8rem; }
  .story-features, .login-story > p { display: none; }
  .login-story .lead { font-size: .95rem; margin-bottom: 0; }
  .login-panel { margin-bottom: 0; padding: 26px; }
  .guest main { padding-top: 28px; }
  .error-page { padding: 30px 0; }
  .error-code { font-size: 5rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media (forced-colors: active) {
  .button, .badge, .panel, .answer-option, .notice { border: 1px solid CanvasText; }
  .gradient-text { -webkit-text-fill-color: currentColor; }
  .hero-art { display: none; }
  progress { forced-color-adjust: auto; }
}
@media print {
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .footer, .back-link, .button, .skip-link { display: none !important; }
  .main-shell { margin: 0; }
  main { padding: 0; max-width: none; }
  .panel, .result-hero { background: white !important; color: #111; box-shadow: none; break-inside: avoid; }
  h1, h2, h3, h4, p, dt, dd, .muted, .eyebrow, .badge, .result-number strong { color: #111 !important; }
}