:root {
  --ink:#10183e; --muted:#545c71; --blue:#3448e5; --blue-dark:#2638c6;
  --line:#e1e5ed; --soft:#eef2ff; --surface:#fff; --bg:#fff; --on-blue:#fff;
  --green:#17674e; --green-soft:#e5f4ee; --red:#b3261e; --red-soft:#fdecea;
  --amber:#805300; --amber-soft:#fff4dc; --radius:12px;
  color-scheme:light; font-family:Manrope,system-ui,sans-serif;
}
@media(prefers-color-scheme:dark) {
  :root {
    --ink:#e7eaf6; --muted:#a3aac0; --blue:#7d8bff; --blue-dark:#6475f3;
    --line:#2a3150; --soft:#1b2246; --surface:#141a33; --bg:#0e1328;
    --green:#5fd0a6; --green-soft:#12352b; --red:#ff8a80; --red-soft:#3a1714;
    --amber:#f2c46b; --amber-soft:#3a2c0c; --on-blue:#0e1328; color-scheme:dark;
  }
  .tabs a[aria-current=page],.btn.primary { color:#0e1328; }
  .skip:focus { background:var(--bg); }
}
* { box-sizing:border-box; }
html { scroll-behavior:smooth; scrollbar-color:var(--line) var(--bg); }
body { margin:0; color:var(--ink); background:var(--bg); font-size:16px; line-height:1.6; font-synthesis:none; accent-color:var(--blue); }
::selection { background:#d9e0ff; color:var(--ink); }
h1,h2,h3 { margin:0; letter-spacing:-.025em; line-height:1.25; text-wrap:balance; }
h1 { font-size:clamp(1.8rem,3vw,2.2rem); } h2 { font-size:1.45rem; } h3 { font-size:1.12rem; }
p { margin:0 0 1rem; } a { color:var(--blue); text-underline-offset:3px; }
button,input,textarea,select { font:inherit; color:inherit; } button,a,input,textarea,summary,select { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; } :focus-visible { outline:3px solid var(--blue); outline-offset:3px; }
sup,sub { font-size:.75em; line-height:0; } .muted { color:var(--muted); } .num { font-variant-numeric:tabular-nums; }
.skip { position:absolute; left:-9999px; }.skip:focus { left:12px; top:12px; z-index:50; background:#fff; padding:10px; }
.topbar { position:sticky; top:0; z-index:10; min-height:72px; display:flex; align-items:center; gap:20px; padding:14px 28px; background:var(--bg); border-bottom:1px solid var(--line); }
.brand { display:flex; align-items:center; gap:12px; text-decoration:none; color:var(--ink); font-weight:800; font-size:1.45rem; letter-spacing:-.03em; line-height:1.2; }.brand svg { width:38px; height:28px; color:var(--blue); flex:none; }
.meta { margin-left:auto; color:var(--muted); font-weight:600; font-size:.95rem; }
.btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; padding:9px 16px; border:1px solid var(--line); border-radius:8px; background:var(--surface); color:var(--ink); font-size:.95rem; font-weight:700; text-decoration:none; min-height:44px; }
.btn:hover { border-color:var(--blue); }.btn.primary { background:var(--blue); border-color:var(--blue); color:var(--on-blue); }.btn.primary:hover { background:var(--blue-dark); }.btn:disabled { opacity:.55; cursor:default; border-color:var(--line); }
.layout { display:grid; grid-template-columns:215px minmax(0,1fr); min-height:calc(100vh - 72px); }
.sidebar { position:sticky; top:72px; height:calc(100vh - 72px); border-right:1px solid var(--line); padding:24px 12px; display:flex; flex-direction:column; gap:12px; }
.sidebar h2 { font-size:1rem; padding:0 8px; }.sidebar .sub { font-size:.875rem; color:var(--muted); padding:0 8px; margin:0; }
.qlist { list-style:none; margin:0; padding:0; overflow-y:auto; flex:1; min-height:0; }
.qlist a { display:grid; grid-template-columns:34px 1fr; gap:5px; padding:10px 8px; border-radius:8px; text-decoration:none; color:var(--ink); font-size:.9rem; line-height:1.4; }
.qlist .code { font-weight:800; }.qlist a:hover { background:var(--soft); }.qlist a[aria-current=page] { background:var(--soft); color:var(--blue); font-weight:700; }.qlist .reviewed { color:var(--green); }
.side-foot { border-top:1px solid var(--line); padding:16px 8px 0; font-size:.875rem; }.side-foot p { margin:6px 0 0; color:var(--muted); }.side-foot progress { display:block; width:100%; height:8px; border:0; border-radius:9px; margin:12px 0; overflow:hidden; background:var(--line); }.side-foot progress::-webkit-progress-bar { background:var(--line); }.side-foot progress::-webkit-progress-value { background:var(--blue); }.side-foot progress::-moz-progress-bar { background:var(--blue); }
.main { min-width:0; width:100%; max-width:1220px; padding:30px 40px 60px; }
.tabs { display:flex; flex-wrap:wrap; gap:10px; padding-bottom:18px; border-bottom:1px solid var(--line); }
.tabs a { padding:8px 15px; border:1px solid var(--line); border-radius:8px; text-decoration:none; color:var(--ink); font-weight:700; font-size:.95rem; min-height:44px; }.tabs a:hover { border-color:var(--blue); }.tabs a[aria-current=page] { background:var(--blue); border-color:var(--blue); color:var(--on-blue); }
.picker { display:flex; align-items:center; flex-wrap:wrap; gap:12px; padding:20px 0; border-bottom:1px solid var(--line); }.picker label { font-size:.9rem; font-weight:700; }.picker select { min-width:0; flex:1 1 230px; max-width:430px; padding:11px 38px 11px 12px; border:1px solid var(--line); border-radius:8px; background:var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23545c71' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") right 12px center/16px no-repeat; appearance:none; font-size:.95rem; font-weight:600; }.picker .nav { display:flex; gap:8px; margin-left:auto; }
.q-head { padding:30px 0 0; }.q-meta { margin:8px 0 22px; color:var(--muted); font-size:.9rem; }.statement { max-width:75ch; font-size:1.06rem; margin-bottom:25px; }.statement p:last-child { margin-bottom:0; }
.practice { max-width:900px; }.practice fieldset { padding:0; margin:0; border:0; }.practice legend { font-weight:800; margin:0 0 14px; font-size:1.1rem; }
.options { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:18px; }.option { position:relative; display:flex; gap:12px; align-items:flex-start; border:1px solid var(--line); border-radius:10px; padding:16px; cursor:pointer; line-height:1.5; }.option:hover { border-color:var(--blue); }.option:has(input:checked) { border-color:var(--blue); background:var(--soft); }.option input { flex:none; width:18px; height:18px; margin:3px 0 0; }.option .letter { font-weight:800; }.option span { min-width:0; }.option.correct { border-color:var(--green); background:var(--green-soft); }
.actions { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }.feedback { margin:16px 0 0; padding:14px 16px; border-radius:8px; font-weight:600; }.feedback.success { color:var(--green); background:var(--green-soft); }.feedback.error { color:var(--red); background:var(--red-soft); }.feedback.neutral { color:var(--amber); background:var(--amber-soft); }.feedback:empty { display:none; }
.notes-label { display:block; font-weight:800; margin-bottom:8px; }.notes { display:block; width:100%; min-height:150px; resize:vertical; border:1px solid var(--line); border-radius:10px; padding:14px; background:var(--surface); caret-color:var(--blue); }.notes-hint { color:var(--muted); font-size:.875rem; margin:8px 0 0; }
.solution { margin-top:30px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }.solution summary { cursor:pointer; padding:20px 0; font-size:1.1rem; font-weight:800; color:var(--blue); }.solution-body { padding:0 0 24px; max-width:900px; }.answer-result { padding:20px; background:var(--soft); border-radius:var(--radius); font-weight:700; font-size:1.06rem; margin-bottom:20px; }.answer-result p:last-child { margin-bottom:0; }
.steps { margin:0; padding-left:24px; max-width:75ch; }.steps li { padding-left:7px; margin-bottom:15px; }.steps li:last-child { margin-bottom:0; }.note { background:var(--amber-soft); color:var(--amber); border-radius:9px; padding:16px 18px; margin:20px 0 0; }.note p:last-child { margin-bottom:0; }.review-row { display:flex; gap:16px; align-items:center; flex-wrap:wrap; margin-top:24px; }.review-row p { margin:0; font-size:.875rem; color:var(--muted); }.btn[aria-pressed=true] { background:var(--green-soft); color:var(--green); border-color:var(--green); }
.figure { margin:24px 0 0; padding:20px; background:var(--soft); border-radius:var(--radius); max-width:760px; }.figure h3 { margin-bottom:14px; }.figure svg { width:100%; height:auto; display:block; overflow:visible; }.figure svg text { font:15px Manrope,system-ui,sans-serif; fill:var(--ink); }.figure svg .small { font-size:13px; }.figure svg .grid { stroke:#cdd3e8; stroke-width:1; }.figure svg .axis { stroke:var(--muted); stroke-width:1.4; }.figure svg .line { stroke:var(--blue); stroke-width:3; fill:none; }.figure svg .green { stroke:var(--green); }.figure figcaption { color:var(--muted); font-size:.9rem; margin-top:10px; }.table-wrap { overflow-x:auto; }table { border-collapse:collapse; width:100%; font-variant-numeric:tabular-nums; }th,td { padding:10px 14px; border-bottom:1px solid var(--line); text-align:left; }th { font-weight:800; }.figure table { font-size:.95rem; }
.help { padding-top:30px; max-width:900px; }.help h1 { margin-bottom:14px; }.help h2 { margin:32px 0 14px; }.help h3 { margin:24px 0 10px; }.help li { margin-bottom:10px; }.downloads { list-style:none; padding:0; }.downloads li { padding:15px 0; border-bottom:1px solid var(--line); display:flex; gap:16px; justify-content:space-between; align-items:center; }.downloads li span { color:var(--muted); font-size:.9rem; }.storage-message { color:var(--amber); font-size:.875rem; margin-top:10px; }
#print-document { display:none; }.noscript { padding:20px; }
@media(max-width:1100px) { .topbar { padding-inline:22px; gap:14px; }.meta { display:none; }.topbar #print { margin-left:auto; }.main { padding:25px; }.layout { grid-template-columns:195px minmax(0,1fr); }.tabs { gap:8px; }.tabs a { padding:8px 12px; }.options { grid-template-columns:1fr; } }
@media(max-width:760px) { .topbar { position:static; padding:15px 18px; flex-wrap:wrap; gap:12px; }.brand { font-size:1.3rem; }.brand svg { width:30px; }.topbar #print { font-size:.875rem; padding:7px 10px; }.layout { display:flex; flex-direction:column; }.sidebar { position:static; height:auto; border-right:0; border-bottom:1px solid var(--line); padding:15px 18px; gap:8px; }.sidebar h2 { font-size:.95rem; padding:0; }.sidebar .sub { padding:0; }.qlist { display:flex; gap:7px; overflow-x:auto; flex:none; padding:3px 0; }.qlist li { flex:none; }.qlist a { display:block; padding:8px 13px; border:1px solid var(--line); min-width:44px; text-align:center; }.qlist .item-title { display:none; }.side-foot { padding:10px 0 0; display:flex; gap:12px; align-items:center; border:0; }.side-foot progress { width:75px; margin:0; }.side-foot p { display:none; }.side-foot strong { font-size:.875rem; }.main { padding:20px 18px 40px; }.tabs { gap:8px; padding-bottom:15px; }.tabs a { font-size:.875rem; padding:8px 10px; flex:1 1 auto; text-align:center; }.picker { padding:16px 0; gap:10px; }.picker label { display:none; }.picker select { max-width:none; flex-basis:100%; }.picker .nav { width:100%; justify-content:space-between; }.q-head { padding-top:24px; }.q-meta { margin-bottom:18px; }.statement { font-size:1rem; }.option { padding:14px; }.figure { padding:12px; overflow-x:auto; }.figure svg { min-width:520px; }.figure svg text { font-size:15px; }.downloads li { align-items:flex-start; flex-direction:column; gap:5px; }.review-row .btn { width:100%; }.answer-result { padding:16px; }.solution summary { padding:18px 0; } }
@media(prefers-reduced-motion:reduce) { html { scroll-behavior:auto; } }
@media print {
  :root { --ink:#10183e; --muted:#545c71; --blue:#3448e5; --blue-dark:#2638c6; --line:#e1e5ed; --soft:#eef2ff; --surface:#fff; --bg:#fff; --green:#17674e; --amber:#805300; --amber-soft:#fff4dc; --on-blue:#fff; color-scheme:light; }
  @page { size:A4; margin:17mm; }
  body { font-size:10.5pt; color:#10183e; }
  .topbar,.layout,.noscript { display:none!important; }
  #print-document { display:block; }
  #print-document h1 { font-size:24pt; margin-bottom:8mm; }
  #print-document h2 { font-size:18pt; margin:8mm 0 5mm; break-after:avoid; }
  #print-document article { padding:5mm 0 7mm; border-bottom:1px solid #ddd; }
  #print-document h3 { font-size:13pt; margin-bottom:3mm; break-after:avoid; }
  #print-document .answer-result { padding:3mm; margin:3mm 0; background:#eef2ff; }
  #print-document .figure { max-width:130mm; padding:3mm; break-inside:avoid; }
  #print-document .figure svg { max-height:70mm; min-width:0; }
  #print-document li { margin-bottom:2mm; }
  #print-document .print-meta { color:#545c71; font-size:9pt; }
}
