:root {
  color-scheme: light;
  font-family: system-ui, sans-serif;
  color: #152a35;
  background: #eef4f5;
  --dark: #10333d;
  --accent: #096660;
  --line: #c6d8db;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.site-header { background: var(--dark); color: #fff; padding: 1.1rem 1.25rem; }
.site-header div { max-width: 52rem; margin: auto; display: flex; gap: 1rem; align-items: baseline; }
.site-header span { color: #bcdbdd; font-size: .88rem; }
main { max-width: 52rem; margin: 2rem auto; padding: 0 1rem 2rem; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: clamp(1.25rem, 4vw, 2.25rem); box-shadow: 0 8px 25px #10333d0b; }
h1 { margin: 0 0 1rem; font-size: clamp(1.35rem, 3vw, 2rem); line-height: 1.45; }
p { line-height: 1.55; }
fieldset { border: 0; margin: 0; padding: 0; }
legend, label[for] { font-weight: 650; margin-bottom: .5rem; }
select, button { font: inherit; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: .55rem; padding: .65rem .9rem; }
select { display: block; margin: .45rem 0 1.5rem; width: min(24rem, 100%); }
button { cursor: pointer; }
button.primary { color: #fff; background: var(--accent); border-color: var(--accent); }
button:disabled { opacity: .45; cursor: default; }
button:not(:disabled):hover { box-shadow: 0 0 0 2px #12857a37; }
:focus-visible { outline: 3px solid #287f9a; outline-offset: 3px; }
.actions { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.2rem; }
.modes, #options { display: grid; gap: .55rem; }
.modes label, #options label { display: flex; gap: .7rem; align-items: baseline; border: 1px solid var(--line); padding: .75rem 1rem; border-radius: .6rem; cursor: pointer; line-height: 1.5; }
label:has(input:checked) { background: #e3f2ef; border-color: #81b9af !important; }
label:has(input:disabled) { cursor: default !important; }
input { accent-color: var(--accent); }
small { display: block; color: #3e5762; }
.status { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.status span { margin-inline-start: .75rem; color: #3e5762; font-size: .9rem; }
progress { grid-column: 1 / -1; width: 100%; height: .55rem; accent-color: var(--accent); }
time { font-variant-numeric: tabular-nums; color: #fff; background: var(--dark); border-radius: .4rem; padding: .35rem .6rem; }
.topic { font-size: .9rem; color: var(--accent); font-weight: 700; margin-top: 0; }
.nav { justify-content: space-between; }
.misc { justify-content: space-between; }
#feedback { margin-top: 1rem; background: #f0f7f6; border-inline-start: 3px solid var(--accent); padding: .75rem 1rem; }
#feedback[data-correct="false"] { background: #fff5ed; border-color: #a64a18; }
#feedback p, .review p { margin: .45rem 0; }
.review { display: grid; gap: .65rem; margin-top: 1rem; }
.review details { padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .65rem; background: white; }
summary { cursor: pointer; font-weight: 650; line-height: 1.5; }
.source { color: #345664; font-size: .9rem; }
#score { font-size: 1.3rem; font-weight: 700; }

#study { margin-bottom: 1.25rem; }
.study-chapters { margin: 1.25rem 0; }
.study-chapters details { background: #f6faf9; }
.study-chapters p { line-height: 1.7; }
.study-link { display: inline-block; color: #fff; background: var(--accent); border-radius: .55rem; padding: .65rem .9rem; text-decoration: none; }
#setup { scroll-margin-top: 1rem; }

#study { margin-bottom: 1.25rem; }
.study-chapters { margin: 1.25rem 0; }
.study-chapters details { background: #f6faf9; }
.study-chapters p { line-height: 1.7; }
.study-link { display: inline-block; color: #fff; background: var(--accent); border-radius: .55rem; padding: .65rem .9rem; text-decoration: none; }
#setup { scroll-margin-top: 1rem; }
