@font-face { font-family: Nunito; font-weight: 400; font-display: swap; src: url(/fonts/nunito-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 700; font-display: swap; src: url(/fonts/nunito-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: Nunito; font-weight: 800; font-display: swap; src: url(/fonts/nunito-latin-800-normal.woff2) format("woff2"); }

:root {
  --ink: #1F2547; --muted: #5A6185; --line: #DDE1F0; --bg: #F7F8FD; --card: #fff;
  --brand: #3B3FD8; --brand-2: #2A2DB0; --spark: #FFC83D; --orange: #FF8A3D;
  --good: #1E9E68; --good-bg: #E3F7EE; --bad: #D64541; --bad-bg: #FDECEA; --tip-bg: #FFF6DA;
  --l0: #E6E8F2; --l1: #C9CEF0; --l2: #8F97F0; --l3: #4C55E6; --l4: #F5A623;
  --radius: 16px; --shadow: 0 1px 2px rgba(31,37,71,.06), 0 6px 20px rgba(31,37,71,.06);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Nunito, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 17px; line-height: 1.5; }
a { color: var(--brand); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); font-weight: 800; }
h2 { font-size: 1.4rem; font-weight: 800; }
h3 { font-size: 1.1rem; font-weight: 800; }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 12px; top: 12px; background: #fff; padding: 8px 12px; z-index: 9; }

.top { display: flex; align-items: center; gap: 18px; padding: 10px 24px; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 1.3rem; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { text-decoration: none; color: var(--ink); font-weight: 700; padding: 6px 12px; border-radius: 10px; }
.nav a:hover, .nav a.on { background: #EEF0FD; color: var(--brand); }
.who { display: flex; align-items: center; gap: 8px; }
.who select { border: 1px solid var(--line); border-radius: 10px; padding: 6px 10px; background: #fff; font-weight: 700; max-width: 180px; }
main { max-width: 1080px; margin: 0 auto; padding: 28px 24px 60px; outline: none; }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 22px 24px; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--line); background: #fff; }
.foot nav { display: flex; gap: 16px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; padding: 11px 20px; font-weight: 800; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; min-height: 46px; }
.btn:hover { background: var(--brand-2); }
.btn.ghost { background: #fff; color: var(--brand); border: 2px solid #D4D7FA; }
.btn.ghost:hover { background: #F2F3FF; }
.btn.spark { background: var(--spark); color: var(--ink); }
.btn.small { padding: 6px 12px; min-height: 36px; font-size: .92rem; }
.btn[disabled] { opacity: .5; cursor: default; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.muted { color: var(--muted); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.crumbs { font-size: .92rem; margin-bottom: 10px; color: var(--muted); } .crumbs a { color: var(--muted); }

.hero { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: center; margin-bottom: 34px; }
.hero p { font-size: 1.15rem; color: var(--muted); max-width: 36em; }
.hero .art { background: linear-gradient(135deg, #3B3FD8, #7B5CF5); border-radius: 24px; padding: 22px; color: #fff; }
.hero .art svg { background: #fff; border-radius: 12px; max-width: 100%; height: auto; }
.gradecard { display: block; text-decoration: none; color: var(--ink); border-radius: var(--radius); padding: 20px; background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); transition: transform .12s; }
.gradecard:hover { transform: translateY(-2px); border-color: #C5C9F5; }
.gradecard .big { font-size: 2.2rem; font-weight: 800; color: var(--brand); line-height: 1; }
.gradecard h3 { margin: 8px 0 4px; }
.bar { height: 10px; background: var(--l0); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--l3), var(--l4)); border-radius: 99px; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 30px 0; }
.steps3 .card b { display: block; font-size: 1.05rem; margin-bottom: 4px; }

.unit { margin-bottom: 18px; }
.unit header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.skills { list-style: none; padding: 0; margin: 12px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.skills a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; font-weight: 700; }
.skills a:hover { border-color: #B9BEF5; background: #FAFAFF; }
.lv { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--l0); border: 2px solid #CFD3E6; }
.lv1 { background: var(--l1); border-color: var(--l1); } .lv2 { background: var(--l2); border-color: var(--l2); }
.lv3 { background: var(--l3); border-color: var(--l3); } .lv4 { background: var(--l4); border-color: #D88A0B; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); } .legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend .lv { width: 16px; height: 16px; border-radius: 5px; }

.tabs { display: flex; gap: 6px; margin: 14px 0 18px; border-bottom: 2px solid var(--line); }
.tabs button { background: none; border: 0; padding: 10px 18px; font-weight: 800; cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; color: var(--muted); }
.tabs button.on { color: var(--brand); border-color: var(--brand); }
.lesson > * { margin-bottom: 16px; }
.lesson .text { font-size: 1.12rem; }
.lesson figure { margin: 0; text-align: center; } .lesson figcaption { color: var(--muted); font-size: .95rem; }
.lesson .example { border-left: 5px solid var(--brand); }
.lesson .example ol { margin: 8px 0; padding-left: 22px; }
.lesson .tip { background: var(--tip-bg); border-radius: 12px; padding: 14px 16px; }
svg.vis { max-width: 100%; height: auto; }

.practice { max-width: 760px; margin: 0 auto; }
.dots { display: flex; gap: 8px; margin-bottom: 14px; }
.dots i { width: 16px; height: 16px; border-radius: 50%; background: var(--l0); }
.dots i.ok { background: var(--good); } .dots i.miss { background: var(--orange); } .dots i.now { box-shadow: 0 0 0 3px #B9BEF5; }
.q { font-size: 1.35rem; font-weight: 700; margin-bottom: 14px; }
.qvis { margin: 6px 0 18px; overflow-x: auto; }
.answer { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.answer input { font-size: 1.4rem; font-weight: 800; padding: 10px 14px; border: 2px solid #C8CCE3; border-radius: 12px; width: 190px; background: #fff; }
.answer input:focus { border-color: var(--brand); outline: none; }
.answer label { font-weight: 800; }
.choices { display: flex; flex-wrap: wrap; gap: 10px; }
.choices button { font-size: 1.2rem; font-weight: 800; padding: 12px 20px; min-width: 64px; border-radius: 12px; border: 2px solid #C8CCE3; background: #fff; cursor: pointer; }
.choices button.sel { border-color: var(--brand); background: #EEF0FD; }
.choices button svg { display: block; }
.feedback { margin-top: 16px; border-radius: 12px; padding: 12px 16px; font-weight: 700; }
.feedback.good { background: var(--good-bg); color: #13704A; } .feedback.bad { background: var(--bad-bg); color: #9E2C29; }
.feedback.hint { background: var(--tip-bg); color: #6B4E00; font-weight: 600; }
.feedback .explain { font-weight: 600; color: var(--ink); margin-top: 6px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.summary { text-align: center; }
.summary .score { font-size: 3rem; font-weight: 800; color: var(--brand); }
.summary .lvbig { display: inline-flex; align-items: center; gap: 10px; font-size: 1.2rem; font-weight: 800; }
.summary .lvbig .lv { width: 34px; height: 34px; }

form.stack { display: grid; gap: 12px; max-width: 420px; }
form.stack label { font-weight: 700; display: grid; gap: 4px; }
form.stack input[type=email], form.stack input[type=password], form.stack input[type=text] { padding: 10px 12px; border: 2px solid #C8CCE3; border-radius: 10px; background: #fff; }
form.stack .check { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; }
.err { color: var(--bad); font-weight: 700; min-height: 1.2em; }
.kids { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: 1.2rem; flex: none; }
.prose { max-width: 760px; } .prose h2 { margin-top: 1.4em; }
table.prog { width: 100%; border-collapse: collapse; } table.prog td, table.prog th { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }

.nav a { white-space: nowrap; }
@media (max-width: 900px) {
  .top { padding: 8px 16px; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
  .nav { order: 3; flex-basis: 100%; overflow-x: auto; }
  .nav a { padding: 4px 10px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  main { padding: 18px 16px 48px; }
  .hero, .steps3 { grid-template-columns: 1fr; }
  .q { font-size: 1.2rem; }
  .answer input { width: 150px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
