:root{
  --bg:#f4f6fb; --card:#ffffff; --card2:#eef2f8; --ink:#0f172a; --muted:#5b6478; --line:#d8deea;
  --accent:#2563eb; --accent2:#1d4ed8; --ok:#16a34a; --bad:#dc2626; --warn:#f59e0b; --blue:#2563eb;
  --road:#4b5563; --ground:#cfe8c4; --sky:#dbeafe; --glass:#a5c8f0; --skin:#f1c7a3;
  --shadow:0 2px 10px rgba(15,23,42,.08);
}
@media (prefers-color-scheme: dark){
  :root:not([data-theme="light"]){
    --bg:#0b1020; --card:#141b2e; --card2:#1c2540; --ink:#e7ecf7; --muted:#9aa5c0; --line:#2a3555;
    --accent:#60a5fa; --accent2:#3b82f6; --ok:#22c55e; --bad:#f87171; --warn:#fbbf24; --blue:#60a5fa;
    --road:#374151; --ground:#1f3b24; --sky:#172554; --glass:#3b5a85; --skin:#d8a985; --shadow:0 2px 12px rgba(0,0,0,.4);
  }
}
:root[data-theme="dark"]{
  --bg:#0b1020; --card:#141b2e; --card2:#1c2540; --ink:#e7ecf7; --muted:#9aa5c0; --line:#2a3555;
  --accent:#60a5fa; --accent2:#3b82f6; --ok:#22c55e; --bad:#f87171; --warn:#fbbf24; --blue:#60a5fa;
  --road:#374151; --ground:#1f3b24; --sky:#172554; --glass:#3b5a85; --skin:#d8a985; --shadow:0 2px 12px rgba(0,0,0,.4);
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:16px/1.55 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
a{color:var(--accent)}
button{font:inherit;cursor:pointer}
.top{position:sticky;top:0;z-index:10;display:flex;align-items:center;gap:12px;padding:10px 16px;background:var(--card);border-bottom:1px solid var(--line)}
.logo{display:flex;align-items:center;gap:8px;text-decoration:none;color:var(--ink);font-size:17px;white-space:nowrap}
.logo-i{font-size:22px}
.nav{display:flex;gap:4px;margin-left:auto;overflow-x:auto;min-width:0}
.grid>*,.filters>*{min-width:0}
.brand .nm{overflow-wrap:anywhere}
@media (max-width:420px){.nav a{padding:7px 8px;font-size:14px}.g3{grid-template-columns:1fr 1fr}.brand{padding:8px;gap:8px}.brand .badge{width:38px;height:38px;font-size:13px}}
.nav a{padding:7px 12px;border-radius:999px;text-decoration:none;color:var(--muted);font-weight:600;font-size:15px;white-space:nowrap}
.nav a.on{background:var(--card2);color:var(--ink)}
.icon-btn{border:1px solid var(--line);background:var(--card);color:var(--ink);width:36px;height:36px;border-radius:10px;flex:none}
main{max-width:980px;margin:0 auto;padding:18px 16px 40px;outline:none}
.foot{max-width:980px;margin:0 auto;padding:0 16px 90px;color:var(--muted);font-size:13px}
h1{font-size:clamp(26px,5vw,38px);line-height:1.15;margin:8px 0 10px}
h2{font-size:22px;margin:26px 0 12px}
h3{font-size:18px;margin:0 0 6px}
.lead{color:var(--muted);font-size:17px;margin:0 0 16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:var(--shadow)}
.grid{display:grid;gap:12px}
.g2{grid-template-columns:repeat(auto-fill,minmax(260px,1fr))}
.g3{grid-template-columns:repeat(auto-fill,minmax(150px,1fr))}
.hero{display:grid;gap:18px;grid-template-columns:1.1fr .9fr;align-items:center}
@media (max-width:760px){.hero{grid-template-columns:1fr}.logo span:last-child{display:none}}
.btn{display:inline-flex;align-items:center;gap:8px;padding:11px 18px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);text-decoration:none;font-weight:650}
.btn.pri{background:var(--accent2);border-color:var(--accent2);color:#fff}
.btn.sm{padding:7px 12px;font-size:14px}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.track{display:flex;flex-direction:column;gap:8px;text-decoration:none;color:var(--ink);border-left:6px solid var(--c)}
.track .ic{font-size:28px}
.bar{height:8px;border-radius:9px;background:var(--card2);overflow:hidden}
.bar i{display:block;height:100%;background:var(--ok);border-radius:9px}
.muted{color:var(--muted)}
.small{font-size:14px}
.chip{display:inline-block;padding:2px 9px;border-radius:999px;background:var(--card2);font-size:12.5px;font-weight:650;color:var(--muted)}
.chip.M{background:#fde7c7;color:#92400e}.chip.A{background:#d1fae5;color:#065f46}.chip.H{background:#dbeafe;color:#1e40af}.chip.E{background:#ede9fe;color:#5b21b6}
.mycar{display:flex;align-items:center;gap:12px;justify-content:space-between;flex-wrap:wrap}
.badge{width:46px;height:46px;border-radius:12px;display:grid;place-items:center;color:#fff;font-weight:800;font-size:16px;flex:none;letter-spacing:.5px}
.brand{display:flex;gap:10px;align-items:center;text-decoration:none;color:var(--ink);padding:10px}
.brand .nm{font-weight:700;line-height:1.2}
.brand .meta{font-size:12.5px;color:var(--muted)}
.filters{display:grid;gap:8px;grid-template-columns:2fr 1fr 1fr;margin-bottom:14px}
@media (max-width:640px){.filters{grid-template-columns:1fr 1fr}.filters input{grid-column:1/-1}}
input,select{font:inherit;padding:10px 12px;border-radius:12px;border:1px solid var(--line);background:var(--card);color:var(--ink);width:100%}
label.chk{display:flex;gap:6px;align-items:center;font-size:14px;color:var(--muted)}
label.chk input{width:auto}
.steps-list{display:flex;flex-direction:column;gap:8px}
.step-item{display:flex;gap:12px;align-items:center;text-decoration:none;color:var(--ink);padding:12px 14px}
.num{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--card2);font-weight:800;flex:none}
.num.done{background:var(--ok);color:#fff}
.crumbs{font-size:14px;color:var(--muted);margin-bottom:6px}
.crumbs a{color:var(--muted)}
.lesson{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
@media (max-width:820px){.lesson{grid-template-columns:1fr}}
.figure{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:10px;position:sticky;top:70px}
@media (max-width:820px){.figure{position:static}}
.figure figcaption{font-size:13px;color:var(--muted);text-align:center;padding-top:4px}
ol.do{padding:0;margin:0;list-style:none;counter-reset:s}
ol.do li{counter-increment:s;display:flex;gap:10px;padding:10px 0;border-bottom:1px dashed var(--line);cursor:pointer}
ol.do li::before{content:counter(s);flex:none;width:28px;height:28px;border-radius:50%;background:var(--accent2);color:#fff;display:grid;place-items:center;font-weight:800;font-size:14px;margin-top:1px}
ol.do li.ck{color:var(--muted);text-decoration:line-through}
ol.do li.ck::before{content:"✓";background:var(--ok)}
.box{border-radius:14px;padding:12px 14px;margin-top:12px;border:1px solid var(--line)}
.box h4{margin:0 0 6px;font-size:15px}
.box ul{margin:0;padding-left:20px}
.box.tip{background:color-mix(in srgb,var(--ok) 10%,var(--card))}
.box.err{background:color-mix(in srgb,var(--bad) 10%,var(--card))}
.box.brandbox{background:color-mix(in srgb,var(--accent) 12%,var(--card));border-color:var(--accent)}
.pager{display:flex;justify-content:space-between;gap:10px;margin-top:18px;flex-wrap:wrap}
.progress-top{display:flex;gap:4px;margin:8px 0 14px}
.progress-top a{flex:1;height:6px;border-radius:4px;background:var(--line)}
.progress-top a.done{background:var(--ok)}.progress-top a.cur{background:var(--accent)}
.sec{margin-top:14px}
.sec .ill{max-width:420px;display:block;margin:6px auto}
.empty{text-align:center;color:var(--muted);padding:30px}
.quiz-q{margin-bottom:14px}
.quiz-q button{display:block;width:100%;text-align:left;margin-top:6px;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--card);color:var(--ink)}
.quiz-q button.good{background:var(--ok);color:#fff;border-color:var(--ok)}
.quiz-q button.wrong{background:var(--bad);color:#fff;border-color:var(--bad)}
.install{position:fixed;right:16px;bottom:16px;z-index:20;padding:12px 18px;border-radius:999px;border:0;background:var(--accent2);color:#fff;font-weight:700;box-shadow:var(--shadow)}
.az{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 12px}
.az a{font-size:13px;padding:3px 8px;border-radius:7px;background:var(--card2);text-decoration:none;color:var(--ink);font-weight:700}
.letter{font-size:20px;font-weight:800;margin:18px 0 8px;color:var(--muted)}

/* ---------- Illustrations SVG ---------- */
.ill{width:100%;height:auto;display:block}
.ill .tx{fill:var(--ink);font-size:14px}
.ill .txs{fill:var(--ink);font-size:12px}
.ill .big{fill:var(--ink);font-size:24px;font-weight:800}
.ill .b{font-weight:700}
.ill .w{fill:#fff}
.ill .ac{fill:var(--accent)}
.ill text.ac{fill:var(--accent)}
.ill text.ok{fill:var(--ok)} .ill text.bad{fill:var(--bad)}
.ill .arh{fill:var(--ink)}
.ill .arr{fill:none;stroke:var(--ink);stroke-width:3;stroke-linecap:round}
.ill .arr.ac{stroke:var(--accent);fill:none}
.ill .arr.bad{stroke:var(--bad)}
.ill .arrw{fill:none;stroke:var(--warn);stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
.ill .bd{fill:var(--card2);stroke:var(--ink);stroke-width:2.5}
.ill .bd2{fill:var(--line);stroke:var(--muted);stroke-width:2}
.ill .glass{fill:var(--glass)}
.ill .ink{fill:var(--ink)}
.ill .mut{fill:var(--card2);stroke:var(--line);stroke-width:2}
.ill .floor{fill:var(--card2);stroke:var(--line);stroke-width:2}
.ill .stem{stroke:var(--muted);stroke-width:6;stroke-linecap:round}
.ill .pedal{fill:var(--card);stroke:var(--ink);stroke-width:3}
.ill .pedal.on,.ill .btn.on,.ill .knob.on{fill:var(--accent2);stroke:var(--accent2)}
.ill .btn{fill:var(--card);stroke:var(--ink);stroke-width:2.5}
.ill .knob{fill:var(--card);stroke:var(--ink);stroke-width:3}
.ill .knob.r{fill:color-mix(in srgb,var(--bad) 18%,var(--card))}
.ill .nknob{fill:var(--card);stroke:var(--muted);stroke-width:2;stroke-dasharray:4 3}
.ill .rest{fill:var(--line)}
.ill .shoe{fill:#334155;stroke:#0f172a;stroke-width:2;opacity:.85}
.ill .gate{fill:none;stroke:var(--muted);stroke-width:10;stroke-linecap:round}
.ill .zone{fill:color-mix(in srgb,var(--ok) 25%,transparent)}
.ill .curve{fill:none;stroke:var(--accent);stroke-width:4}
.ill .axis{stroke:var(--ink);stroke-width:2}
.ill .dial{fill:var(--card2);stroke:var(--ink);stroke-width:3}
.ill .band{fill:none;stroke-width:14}
.ill .band.ok{stroke:var(--ok)}.ill .band.bad{stroke:var(--bad)}
.ill .tick{stroke:var(--ink);stroke-width:3}
.ill .tickw{stroke:#e5e7eb;stroke-width:3}
.ill .needle{stroke:var(--bad);stroke-width:5;stroke-linecap:round}
.ill .keyhead{fill:var(--accent2)}
.ill .lever{stroke:var(--ink);stroke-width:12;stroke-linecap:round}
.ill .sep{stroke:var(--line);stroke-width:2;stroke-dasharray:6 6}
.ill .ring{fill:none;stroke:#fff;stroke-width:3}
.ill .wheel{fill:none;stroke:var(--ink);stroke-width:16}
.ill .spoke{stroke:var(--ink);stroke-width:12;stroke-linecap:round}
.ill .stalk{stroke:var(--muted);stroke-width:10;stroke-linecap:round}
.ill .screenbg{fill:#111827}
.ill .skin{fill:var(--skin)}
.ill .skin2{fill:color-mix(in srgb,var(--accent) 35%,var(--card))}
.ill .limb{fill:none;stroke:var(--skin);stroke-width:14;stroke-linecap:round;stroke-linejoin:round}
.ill .beltl{stroke:#111827;stroke-width:12;stroke-linecap:round}
.ill .road{fill:var(--road)}
.ill .lane{stroke:#f8fafc;stroke-width:4;stroke-dasharray:18 14}
.ill .laneY{stroke:#f8fafc;stroke-width:5}
.ill .edge{stroke:#f8fafc;stroke-width:4}
.ill .ground{fill:var(--ground)}
.ill .sky{fill:var(--sky)}
.ill .island{fill:var(--ground);stroke:#f8fafc;stroke-width:4}
.ill .stopline{stroke:#f8fafc;stroke-width:5;stroke-dasharray:8 6}
.ill .curb{fill:#9ca3af}
.ill .cone{fill:color-mix(in srgb,var(--ok) 35%,transparent)}
.ill .blind{fill:color-mix(in srgb,var(--bad) 65%,transparent)}
.ill .dash{fill:none;stroke:var(--accent);stroke-width:2;stroke-dasharray:6 6}
.ill .lamp{fill:#fde68a}.ill .rlamp{fill:#ef4444}
.ill .tyre{fill:#111827}.ill .hub{fill:#9ca3af}
.ill .lt{stroke:none}.ill .lt.bad{fill:#dc2626}.ill .lt.warn{fill:#f59e0b}.ill .lt.ok{fill:#16a34a}.ill .lt.blue{fill:#2563eb}
.ill .tri{fill:none;stroke:#dc2626;stroke-width:6;stroke-linejoin:round}
.ill .hot{fill:#f97316;stroke:#fff;stroke-width:3;cursor:pointer}
.ill .hot.on{fill:var(--accent2)}
.ill .hotn{fill:#fff;font-size:14px;font-weight:800;pointer-events:none}
.ill a:hover .hot{fill:var(--accent2)}
.box.ctlbox{background:color-mix(in srgb,#f97316 10%,var(--card))}
.chip.ctl{text-decoration:none;color:var(--ink);background:var(--card);border:1px solid var(--line);font-size:13px;padding:5px 10px}
@media (max-width:420px){.nav a{padding:7px 6px;font-size:13px}}
.ill .hose{fill:none;stroke:#111827;stroke-width:9;stroke-linecap:round}
.ill .cable{fill:none;stroke:var(--ink);stroke-width:6;stroke-linecap:round}
.ill .press{animation:press 1.6s ease-in-out infinite;transform-box:fill-box;transform-origin:50% 0}
@keyframes press{0%,100%{transform:translateY(0)}50%{transform:translateY(5px) scaleY(.96)}}
.ill .blink{animation:blink 1s steps(2) infinite}
@keyframes blink{50%{opacity:.15}}
@media (prefers-reduced-motion:reduce){.ill .press,.ill .blink{animation:none}}
