:root {
  --paper: #F3F4F1; --surface: #FFFFFF; --surface-2: #EAEBE7; --zone: #E6EBE2;
  --ink: #14171C; --ink-2: #3B4149; --muted: #646C76; --faint: #9AA2AB;
  --line: #D9DBD5; --line-2: #C2C5BE;
  --acc: #D2342A; --acc-soft: #FBE8E5; --acc-line: #F0B0A8; --on-acc: #FFFFFF; --deep: #15181C; --amber: #E8B13A; --claude: #D97757;
  --red: #D2342A; --warn: #8A5A14;
  --shadow: 0 1px 2px rgba(20,23,28,.05), 0 8px 28px rgba(20,23,28,.06);
  --r: 4px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0E1113; --surface: #171B1E; --surface-2: #1F2428; --zone: #161D1A;
    --ink: #E9EBE7; --ink-2: #BCC2C4; --muted: #949B9E; --faint: #6B7276;
    --line: #2A3034; --line-2: #3A4146;
    --acc: #FF6F60; --acc-soft: #2A1513; --acc-line: #5A2722; --on-acc: #0E1113; --deep: #0A0C0D;
    --red: #FF6F60; --warn: #D4A657;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 28px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; background: var(--paper); color: var(--ink); font: 400 16px/1.55 "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--acc); text-decoration: none; }
h1, h2, h3 { font-family: Unbounded, "Golos Text", sans-serif; font-weight: 700; letter-spacing: -.01em; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 19px; }
h3 { font-size: 13px; }
code { font: 500 .88em ui-monospace, Menlo, monospace; background: var(--surface-2); padding: .15em .4em; border-radius: 4px; word-break: break-all; }
.muted { color: var(--muted); } .small { font-size: 13.5px; } .mt { margin-top: 28px; }
.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 24px; }
.warn { color: var(--warn); }

/* шапка */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 86%, transparent); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line); }
.top-in { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.top-in.wide, main.wide { max-width: 1320px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font: 700 15px Unbounded, sans-serif; }
.brand-mark { color: var(--acc); display: flex; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a, .linklike { color: var(--ink-2); font: 500 15px "Golos Text", sans-serif; padding: 8px 12px; border-radius: 4px; background: none; border: 0; cursor: pointer; }
.nav a.on { color: var(--ink); background: var(--surface-2); }
.nav a:hover, .linklike:hover { color: var(--ink); }
.nav form { margin: 0; }
main { max-width: 1080px; margin: 0 auto; padding: 36px 20px 80px; }

/* кнопки и поля */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--acc); color: var(--on-acc); border: 1px solid transparent; border-radius: 2px; padding: 13px 22px; font: 600 15.5px "Golos Text", sans-serif; cursor: pointer; transition: transform .15s, filter .15s, background .15s; text-align: center; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink-2); filter: none; }
.btn.light { background: #fff; color: #14171C; }
.btn.tiny { padding: 7px 13px; font-size: 14px; border-radius: 2px; }
.btn.danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.linklike.danger { color: var(--red); font-size: 13px; padding: 0; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }
.stack { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.field i { font-style: normal; font-weight: 400; }
input, select, textarea { width: 100%; font: 400 16px "Golos Text", sans-serif; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; padding: 11px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--acc); box-shadow: 0 0 0 3px var(--acc-soft); }
input[type=file] { padding: 9px; font-size: 14px; }
textarea { resize: vertical; line-height: 1.5; }
textarea.mono { font: 14px/1.6 ui-monospace, Menlo, monospace; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--acc); flex: none; }
.prefix { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 4px; background: var(--surface); overflow: hidden; }
.prefix span { padding-left: 14px; color: var(--muted); }
.prefix input { border: 0; padding-left: 2px; box-shadow: none !important; }

.flash { max-width: 520px; margin: 16px auto -8px; padding: 12px 18px; border-radius: 4px; background: var(--acc-soft); color: var(--ink); border: 1px solid var(--acc-line); text-align: center; font-weight: 500; animation: fadeout 6s forwards; }
.flash.err { background: color-mix(in srgb, var(--red) 12%, var(--surface)); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
@keyframes fadeout { 85% { opacity: 1; } 100% { opacity: 0; } }

/* вход */
.auth-bg { background: radial-gradient(1200px 600px at 20% -10%, var(--acc-soft), transparent 60%), var(--paper); }
.auth-card { max-width: 440px; margin: 7vh auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 40px 36px; box-shadow: var(--shadow); }
.auth-card h1 { font-size: 26px; }
.auth-card .btn { width: 100%; }

/* мои курсы */
.hello h1 { margin-bottom: 8px; }
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 22px; }
.course-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20,23,28,.06), 0 18px 40px rgba(20,23,28,.12); }
.cover { aspect-ratio: 16 / 8; background-size: cover; background-position: center; position: relative; }
.cover .tag { position: absolute; top: 12px; left: 12px; }
.cc-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.cc-body h2 { font-size: 18px; margin: 0; }
.cc-body p { margin: 0; }
.cc-foot { margin-top: auto; padding-top: 14px; display: grid; gap: 8px; }
.bar { height: 6px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--acc); border-radius: 99px; transition: width .4s; }
.bar.light { background: rgba(255,255,255,.22); } .bar.light i { background: #fff; }
.tag { display: inline-block; font: 600 11.5px "Golos Text", sans-serif; text-transform: uppercase; letter-spacing: .04em; padding: 4px 8px; border-radius: 4px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.cover .tag { background: rgba(0,0,0,.45); color: #fff; }
.empty { text-align: center; padding: 60px 20px; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); }
.empty.small { padding: 24px; }

/* курс */
.course-hero { margin: -36px calc(50% - 50vw) 0; padding: 56px 20px 64px; background-size: cover; background-position: center; color: #fff; position: relative; border-radius: 0; overflow: hidden; }
.course-hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,13,.25), rgba(10,14,13,.72)); }
.hero-in { position: relative; max-width: 1040px; margin: 0 auto; }
.course-hero .back { color: rgba(255,255,255,.8); }
.course-hero h1 { font-size: clamp(30px, 5vw, 52px); margin: 20px 0 10px; max-width: 760px; }
.hero-sub { font-size: 19px; opacity: .88; margin: 0 0 28px; max-width: 640px; }
.hero-row { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.hero-progress { display: grid; gap: 6px; min-width: 200px; font-size: 14px; opacity: .9; }
.back { display: inline-flex; align-items: center; gap: 6px; font-size: 14.5px; font-weight: 500; color: var(--muted); margin-bottom: 14px; }
.back:hover { color: var(--ink); }
.course-desc { margin: 36px 0 0; }
.modules { display: grid; gap: 18px; margin-top: 36px; }
.module { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px 24px 14px; box-shadow: var(--shadow); }
.module > header { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.module > header h2 { margin: 0; flex: 1; font-size: 18px; }
.module > header .small { display: flex; align-items: center; gap: 6px; }
.mnum { font: 700 13px Unbounded, sans-serif; color: var(--acc); background: var(--acc-soft); border-radius: 4px; padding: 7px 9px; flex: none; }
.module.locked { opacity: .62; box-shadow: none; }
.lesson-list { list-style: none; margin: 0; padding: 0; }
.lesson-list li a, .row-locked { display: flex; align-items: center; gap: 14px; padding: 12px 8px; border-top: 1px solid var(--line); color: var(--ink); border-radius: 0; transition: background .15s; }
.lesson-list li:first-child a, .lesson-list li:first-child .row-locked { border-top: 0; }
.lesson-list li a:hover { background: var(--zone); border-radius: 4px; }
.lt { flex: 1; }
.dot { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-2); display: grid; place-items: center; flex: none; color: var(--on-acc); }
a.done .dot { background: var(--acc); border-color: var(--acc); }
.row-locked { color: var(--muted); }
.row-locked .dot { border: 0; color: var(--faint); }

/* урок */
.lesson-page main { padding-top: 0; }
.lesson-layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 40px; align-items: start; }
.side { position: sticky; top: 64px; max-height: calc(100vh - 64px); overflow: auto; padding: 28px 4px 40px 0; }
.side .back { margin-bottom: 16px; color: var(--ink); font-weight: 600; }
.side-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.side-progress .bar { flex: 1; }
.side-mod h3 { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 11.5px; margin: 20px 0 6px 10px; }
.side-mod ol { list-style: none; margin: 0; padding: 0; }
.side-mod a, .side-mod .row-locked { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 4px; color: var(--ink-2); font-size: 14.5px; line-height: 1.35; border: 0; }
.side-mod a:hover { background: var(--surface-2); }
.side-mod a.cur { background: var(--acc-soft); color: var(--ink); font-weight: 600; }
.side-mod .dot { width: 20px; height: 20px; }
.side-mod .dot svg { width: 13px; height: 13px; }
.side-toggle { display: none; }
.lesson { padding: 32px 0 0; max-width: 860px; }
.crumb { margin: 0 0 8px; font-weight: 500; }
.lesson h1 { margin-bottom: 24px; }
.video { position: relative; aspect-ratio: 16 / 9; border-radius: 4px; overflow: hidden; background: #000; box-shadow: var(--shadow); margin-bottom: 32px; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video.small { border-radius: 4px; margin: 0; }
.prose { font-size: 17.5px; line-height: 1.7; color: var(--ink); }
.prose h2 { font-size: 22px; margin: 1.6em 0 .6em; } .prose h3 { font-size: 17px; margin: 1.4em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1em; }
.prose li { margin: .3em 0; }
.prose blockquote { margin: 1.2em 0; padding: 14px 20px; background: var(--acc-soft); border-left: 4px solid var(--acc); border-radius: 0; }
.prose blockquote p:last-child { margin: 0; }
.prose img { max-width: 100%; border-radius: 4px; }
.prose pre { background: var(--surface-2); padding: 16px; border-radius: 4px; overflow: auto; font-size: 14px; }
.prose pre code { background: none; padding: 0; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.files { margin-top: 36px; display: grid; gap: 10px; }
.file { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; color: var(--ink); font-weight: 500; }
.file:hover { border-color: var(--acc); }
.file span:nth-child(2) { flex: 1; }
.hw { margin-top: 40px; padding: 26px; background: var(--zone); border-radius: 4px; }
.hw .prose { font-size: 16.5px; }
.hw textarea { background: var(--surface); }
.hw-item { background: var(--surface); border-radius: 4px; padding: 16px; margin-bottom: 14px; }
.hw-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.hw-answer { white-space: pre-wrap; overflow-wrap: anywhere; }
.hw-fb { margin-top: 12px; padding: 12px 14px; border-radius: 4px; background: var(--acc-soft); white-space: pre-wrap; }
.hw-fb b { display: block; font-size: 13px; margin-bottom: 4px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--line); }
.lesson-nav form { margin: 0; }
.done-btn { color: var(--acc); }

.pill { display: inline-block; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: var(--acc-soft); color: var(--acc); }
.pill.err, .pill.redo { background: color-mix(in srgb, var(--red) 13%, transparent); color: var(--red); }
.pill.new { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill.soft { background: var(--zone); color: var(--ink-2); font-weight: 500; }

/* админка */
.admin h1 { font-size: 28px; }
.tabs { display: flex; gap: 4px; margin: 0 0 28px; padding: 5px; background: var(--surface-2); border-radius: 4px; width: fit-content; max-width: 100%; overflow-x: auto; }
.tabs a { padding: 8px 16px; border-radius: 4px; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tabs a.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.count { background: var(--red); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 12px; }
.seg { display: flex; gap: 6px; flex-wrap: wrap; } .seg a { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); font-size: 14px; } .seg a.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 22px 24px; margin-bottom: 20px; }
.panel.narrow { max-width: 640px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.panel .row-between { margin-bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 18px 20px; display: grid; gap: 2px; }
.stat b { font: 700 30px Unbounded, sans-serif; } .stat span { color: var(--muted); font-size: 14px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; } .grid2.tight { gap: 14px; }
.grid-course { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 20px; align-items: start; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checks li { padding-left: 26px; position: relative; } .checks li::before { content: ""; position: absolute; left: 0; top: 6px; width: 12px; height: 12px; border-radius: 50%; }
.checks li.ok::before { background: var(--acc); } .checks li.no::before { background: var(--warn); }
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.tbl th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 12px 16px; background: var(--surface-2); }
.tbl td { padding: 13px 16px; border-top: 1px solid var(--line); vertical-align: top; }
.tbl a { color: var(--ink); }
.adm-mod { border: 1px solid var(--line); border-radius: 4px; padding: 14px; margin-bottom: 14px; background: var(--paper); }
.adm-mod-head { display: flex; align-items: center; gap: 10px; }
.adm-mod-head form { margin: 0; }
.inline-edit { display: flex; align-items: center; gap: 10px; flex: 1; }
.inline-edit input { font-weight: 600; background: transparent; border-color: transparent; padding: 7px 10px; }
.inline-edit input:hover { border-color: var(--line-2); }
.mv { display: flex; flex-direction: column; margin: 0; }
.mv button { background: none; border: 0; padding: 1px 4px; color: var(--faint); cursor: pointer; line-height: 0; }
.mv button:hover { color: var(--ink); }
.adm-lessons { list-style: none; padding: 0; margin: 8px 0 8px 4px; }
.adm-lessons li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 4px; }
.adm-lessons li:hover { background: var(--surface); }
.adm-lessons a { color: var(--ink); flex: 1; }
.add-row { display: flex; gap: 8px; margin-top: 8px; }
.add-row input, .add-row select { padding: 8px 12px; font-size: 15px; }
.add-row.big { margin-top: 16px; } .add-row.big input { padding: 12px 14px; }
.tariff { display: grid; gap: 12px; border: 1px solid var(--line); border-radius: 4px; padding: 16px; margin-bottom: 14px; }
.tariff-top { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mod-checks { display: grid; gap: 8px; padding: 10px 14px; background: var(--paper); border-radius: 4px; }
.danger-zone { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.file-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.file-row a { flex: 1; display: flex; align-items: center; gap: 8px; color: var(--ink); overflow-wrap: anywhere; }
.file-row form { margin: 0; }
.enr { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.enr > div { flex: 1; display: grid; gap: 6px; }
.copy { display: flex; gap: 8px; margin-bottom: 12px; } .copy input { font-size: 13px; }
.search input { min-width: 280px; }
.add-student summary { cursor: pointer; } .add-student[open] summary { margin-bottom: 16px; }
.hw-review { display: grid; gap: 12px; }
.hw-review .hw-answer { background: var(--paper); padding: 14px; border-radius: 4px; }

@media (max-width: 960px) {
  .grid-course, .grid2 { grid-template-columns: 1fr; }
  .lesson-layout { grid-template-columns: 1fr; gap: 0; }
  .side { display: none; position: static; max-height: none; padding: 16px 0 0; }
  .side.open { display: block; }
  .side-toggle { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 4px; padding: 7px 12px; font: 500 14px "Golos Text", sans-serif; color: var(--ink); margin-bottom: 18px; cursor: pointer; }
  .lesson { padding-top: 20px; }
}
@media (max-width: 640px) {
  main { padding: 24px 16px 60px; }
  .top-in { padding: 10px 16px; }
  .brand span:last-child { display: none; }
  .course-hero { margin: -24px calc(50% - 50vw) 0; padding: 32px 16px 40px; border-radius: 0; }
  .auth-card { padding: 30px 22px; margin-top: 4vh; }
  .module { padding: 18px 16px 10px; }
  .prose { font-size: 16.5px; }
  .video { border-radius: 4px; margin-left: -4px; margin-right: -4px; }
  .lesson-nav { flex-direction: column-reverse; } .lesson-nav .btn { width: 100%; }
  .tariff-top { grid-template-columns: 1fr; }
  .tbl { display: block; overflow-x: auto; }
  .search input { min-width: 0; }
  .add-row { flex-wrap: wrap; }
  .hw { padding: 18px; }
}
.hw .btn, .hw-review .btn { justify-self: start; }
.add-row .btn { white-space: nowrap; flex: none; }

/* грейд ученика */
.rank { display: grid; gap: 2px; margin-top: 26px; max-width: 640px; }
.rank-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; }
.rank b { font: 700 20px Unbounded, sans-serif; }
.rank-line { font-size: 15px; opacity: .88; }
.rank-line i { font-style: normal; opacity: .75; }
.rank.light { color: #fff; }

/* ROI: сколько курс уже сэкономил */
.roi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 24px; margin: 0 0 28px; box-shadow: var(--shadow); }
.roi.ask { display: flex; gap: 20px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; border: 1px dashed var(--acc-line); background: var(--acc-soft); }
.roi.ask h2 { margin-bottom: 4px; }
.roi.ask p { margin: 0; max-width: 460px; }
.roi-form { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.roi-form input { width: 150px; }
.roi-nums { display: flex; gap: 36px; flex-wrap: wrap; }
.roi-nums div { display: grid; }
.roi-nums b { font: 700 clamp(28px, 4.6vw, 44px) Unbounded, sans-serif; color: var(--acc); letter-spacing: -.02em; }
.roi-nums span { color: var(--muted); font-size: 14px; }
.roi-line { font-weight: 600; margin: 14px 0 6px; font-size: 17px; }
.roi-edit summary { cursor: pointer; list-style: none; }
.roi-edit summary::-webkit-details-marker { display: none; }
.roi-edit summary:hover { color: var(--ink); }
.roi-edit form { margin-top: 10px; }
.roi-edit input { width: 140px; }
.course-roi { margin-top: 28px; }

/* реплика после урока: плашка сверху, конфетти рисует app.js */
.flash.win { pointer-events: none; position: fixed; left: 50%; top: 76px; transform: translateX(-50%); z-index: 50; width: min(560px, calc(100% - 32px)); margin: 0;
  background: var(--ink); color: var(--paper); border: 0; box-shadow: 0 12px 40px rgba(0,0,0,.25); font-size: 16px; padding: 16px 22px;
  animation: winIn .45s cubic-bezier(.2,1.4,.4,1), fadeout 7s forwards; }
.flash.win.final { background: var(--acc); color: var(--on-acc); font-size: 18px; }
@keyframes winIn { from { transform: translate(-50%, -24px) scale(.96); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 49; }
@media (prefers-reduced-motion: reduce) { .flash.win { animation: fadeout 7s forwards; } .confetti { display: none; } }

/* ===== Почерк лендинга: капс, красная рукопись, моно-подписи, штампы ===== */
.caps { text-transform: uppercase; letter-spacing: -.03em; line-height: 1.02; }
.hand { font-family: Caveat, cursive; font-weight: 700; color: var(--acc); font-size: 30px; line-height: 1; display: inline-block; transform: rotate(-4deg); transform-origin: left center; }
.hand.big { font-size: clamp(36px, 6vw, 58px); transform: rotate(-6deg); }
.lbl { display: block; font: 600 11px "IBM Plex Mono", monospace; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 10px; }
.lbl.red { color: var(--acc); font-weight: 700; }
.mono { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.u { text-decoration: underline; text-decoration-color: var(--acc); text-decoration-thickness: 3px; text-underline-offset: 6px; text-decoration-skip-ink: none; }
.stamp { display: inline-block; font: 700 11px "IBM Plex Mono", monospace; letter-spacing: .12em; text-transform: uppercase; color: var(--acc);
  border: 2px solid var(--acc); padding: 3px 8px; border-radius: 2px; transform: rotate(-5deg); white-space: nowrap; }
.stamp.ok { color: #2E8B57; border-color: #2E8B57; }
.art { display: block; height: auto; }

/* вход */
.auth-card { border-radius: 4px; }
.auth-card h1 { font-size: clamp(24px, 4.4vw, 32px); margin-bottom: 6px; }
.auth-card .hand.big { margin: 14px 0 20px 6px; }
.auth-art .art { width: 120px; margin: -6px 0 14px; }
.auth-art .smoke { animation: smoke 3.4s ease-in-out infinite; transform-origin: 112px 40px; }
@keyframes smoke { 50% { transform: translateY(-3px) skewX(-6deg); opacity: .6; } }

/* приветствие */
.hello h1 { font-size: clamp(30px, 6vw, 64px); margin-bottom: 0; }
.hello .hand.big { margin: 2px 0 14px 4px; }
.empty .art { width: 130px; margin: 0 auto 12px; }
.empty .hand { margin: -2px 0 12px; }

/* обложка курса */
.course-hero h1 { font-size: clamp(30px, 6vw, 68px); margin-bottom: 0; }
.course-hero .hero-hand { color: #FF6F60; margin: 0 0 20px 8px; }
.rank .hand.big { color: #FF6F60; font-size: clamp(30px, 5vw, 46px); margin: 2px 0 6px; transform-origin: left center; }
.rank .lbl { color: rgba(255,255,255,.65); margin: 0; }
.rank b.hand { font-weight: 700; }

/* деньги: тёмная плашка, как блок «0 подрядчиков» на лендинге */
.roi.dark { background: var(--deep); color: #E8EAE7; border: 0; position: relative; overflow: hidden; }
.roi.dark .roi-nums b { color: #FF6F60; }
.roi.dark .roi-nums span, .roi.dark .muted { color: #B4BAB9; }
.roi.dark .roi-line { color: #fff; }
.roi.dark .roi-edit summary:hover { color: #fff; }
.roi.dark .lbl.red { color: #FF6F60; }
.roi-art { position: absolute; right: 22px; top: 18px; display: grid; justify-items: center; gap: 0; }
.roi-art .art { width: 56px; height: 74px; }
.roi-art .hand { color: #FF6F60; font-size: 26px; }
.roi.dark:has(.roi-art) .roi-nums, .roi.dark:has(.roi-art) .roi-line { padding-right: 110px; }
.roi.ask { background: var(--surface); border: 2px solid var(--acc); border-radius: 4px; }
.roi.ask .hand { margin-top: 8px; font-size: 26px; }

/* бегунок до Порше и Хамовников */
.runner { background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 24px 24px 18px; margin: 0 0 20px; }
.runner h2 { font-size: clamp(20px, 3vw, 28px); line-height: 1.2; margin-bottom: 8px; }
.track { position: relative; height: 236px; margin: 10px 6px 6px 0; }
.stop { position: absolute; top: 0; transform: translateX(-50%); width: 132px; text-align: center; display: grid; justify-items: center; gap: 2px; opacity: .45; filter: grayscale(1); transition: opacity .3s, filter .3s; }
.stop.last { transform: translateX(-100%); }
.stop.got { opacity: 1; filter: none; }
.stop-art { height: 74px; display: grid; align-items: end; }
.stop-art .art { height: 66px; width: auto; max-width: 92px; }
.stop b { font-size: 12.5px; line-height: 1.2; }
.stop span { font-size: 12.5px; line-height: 1.3; color: var(--ink-2); }
.stop:not(.got) span { color: var(--muted); }
.rail { position: absolute; left: 0; right: 0; bottom: 30px; height: 6px; background: var(--surface-2); border-radius: 99px; }
.rail i { display: block; height: 100%; background: var(--acc); border-radius: 99px; }
.rail::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 14px, var(--paper) 14px 22px); opacity: .5; border-radius: 99px; }
.car { position: absolute; bottom: 30px; transform: translate(-50%, 2px); width: 92px; transition: left .8s cubic-bezier(.2,.8,.2,1); }
.runner-line { font-weight: 600; margin: 4px 0 2px; }

/* перекуры между модулями */
.perekur { display: flex; align-items: center; justify-content: center; gap: 12px; margin: -2px 0; }
.perekur .art { width: 64px; }
.perekur .hand { font-size: 26px; color: var(--muted); }
.side-perekur { display: grid; justify-items: center; margin: 24px 0 4px; opacity: .85; }
.side-perekur .art { width: 70px; }
.side-perekur .hand { font-size: 22px; color: var(--muted); }
.module .stamp { margin-left: 6px; }
.module.locked { background: repeating-linear-gradient(-45deg, var(--surface) 0 14px, var(--paper) 14px 28px); }

/* урок */
.lesson-hand { display: block; text-align: right; margin: 30px 8px -14px 0; transform: rotate(-3deg); transform-origin: right center; }
.hw-head .stamp { margin-left: 8px; }

@media (max-width: 640px) {
  .track { height: 156px; }
  .stop { width: 62px; }
  .stop:nth-child(3) { left: 65% !important; } /* на узком экране «Порше» иначе налезает на «Хамовники» */
  .stop-art { height: 58px; }
  .stop-art .art { height: 50px; max-width: 68px; }
  .stop b { font-size: 11px; }
  .stop span { display: none; }
  .car { width: 70px; }
  .roi-art { position: static; justify-items: start; grid-auto-flow: column; align-items: center; gap: 10px; margin-bottom: 8px; }
  .roi.dark:has(.roi-art) .roi-nums, .roi.dark:has(.roi-art) .roi-line { padding-right: 0; }
  .perekur .hand { font-size: 22px; }
}
/* на тёмной плашке чёрные контуры рисунков становятся светлыми */
.roi.dark .art [stroke="#15181C"] { stroke: #E8EAE7; }
.roi.dark .art [fill="#15181C"] { fill: #E8EAE7; }

.roi.dark .roi-nums .done b { color: #fff; }
.roi.dark .roi-nums span { max-width: 26ch; }
