@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/ibm-plex-sans-cyrillic-600-normal.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-400-normal.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2199, U+2212, U+2215; }
@font-face { font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/ibm-plex-mono-cyrillic-500-normal.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  /* фирменная гамма: глубокий фиолетовый, яркий фиолетовый акцент, зелёный «Выше», красный «Ниже» */
  --bg: #16122e;
  --bg-2: #100c24;
  --surface: #1d1840;
  --surface-2: #251f4e;
  --surface-3: #30295f;
  --border: rgba(196, 181, 253, .10);
  --border-2: rgba(196, 181, 253, .20);
  --text: #f3f0ff;
  --muted: #b9b2dc;
  --faint: #9189bd;
  --accent: #8b6cff;
  --accent-2: #b4a0ff;
  --accent-ink: #ffffff;
  --accent-soft: #2a2257;
  --accent-line: rgba(139, 108, 255, .55);
  --up: #2fd79a;
  --up-soft: #15302d;
  --down: #ff5c6e;
  --danger: #ff5c6e;
  --danger-soft: #36193a;
  --ok: #2fd79a;
  --ok-soft: #15302d;
  --violet: #ffc35a;
  --chart-grid: rgba(196, 181, 253, .07);
  --chart-text: #9189bd;
  --shadow: 0 10px 30px rgba(8, 4, 30, .45);
  --radius: 14px;
  --radius-sm: 10px;
  --nav-h: 72px;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f6f4ff;
  --bg-2: #ebe6fd;
  --surface: #ffffff;
  --surface-2: #f2eeff;
  --surface-3: #e4ddfb;
  --border: rgba(52, 30, 120, .09);
  --border-2: rgba(52, 30, 120, .16);
  --text: #1b1533;
  --muted: #4f4775;
  --faint: #6c6496;
  --accent: #6a46f0;
  --accent-2: #5634dc;
  --accent-ink: #ffffff;
  --accent-soft: #eee8ff;
  --accent-line: rgba(106, 70, 240, .45);
  --up: #0f9f6e;
  --up-soft: #e5f6ef;
  --down: #e5394b;
  --ok: #0f9f6e;
  --ok-soft: #e5f6ef;
  --danger: #e5394b;
  --danger-soft: #fdeaec;
  --violet: #b45f06;
  --chart-grid: rgba(52, 30, 120, .07);
  --chart-text: #6c6496;
  --shadow: 0 10px 28px rgba(52, 30, 120, .10);
  color-scheme: light;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg-2); color: var(--text); }
body {
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; padding: 0; }
input { font: inherit; color: inherit; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i.sm { width: 16px; height: 16px; }
svg.i.lg { width: 22px; height: 22px; }
svg.i.xl { width: 32px; height: 32px; stroke-width: 1.25; }

.app {
  max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg);
  border-left: 1px solid var(--border); border-right: 1px solid var(--border);
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom));
}
@media (max-width: 560px) { .app { border: 0; } }

/* header */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.brand-name { font-weight: 500; line-height: 1.05; font-size: 16px; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 500; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--text); }
.icon-btn:active { background: var(--surface-2); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: var(--accent-soft); color: var(--accent); font-weight: 500; font-size: 14px;
}
.avatar.xl { width: 64px; height: 64px; font-size: 20px; }

main { padding: 22px 16px 24px; }
.view-enter { animation: fadeUp .32s var(--ease) both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

h1.title { font-size: 28px; line-height: 1.1; margin: 0; font-weight: 500; }
.subtitle { color: var(--muted); margin: 8px 0 0; }
.head-row { display: flex; align-items: flex-start; gap: 12px; justify-content: space-between; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 30px 0 14px; }
.section-title h2 { margin: 0; font-size: 20px; }
.link { color: var(--muted); font-weight: 500; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.link.accent { color: var(--accent); }
.eyebrow { font-size: 12px; color: var(--muted); font-weight: 500; }
.eyebrow.accent { color: var(--accent); }
.group-label { margin: 28px 0 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; border-radius: 6px;
  border: 1px solid var(--border-2); font-size: 12px; font-weight: 500; color: var(--text); white-space: nowrap;
}
.pill.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); background: var(--ok-soft); }
.pill.accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.pill.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, transparent); background: var(--danger-soft); }

/* cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 14px; }
.card.warm { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 18%, var(--border)); }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.stack > * + * { margin-top: 14px; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px;
  padding: 0 22px; border-radius: 10px; font-weight: 500; font-size: 15px; transition: transform .1s, opacity .2s;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { border: 1px solid var(--border-2); background: var(--surface); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.up { background: var(--up-soft); color: var(--up); border: 1px solid color-mix(in srgb, var(--up) 35%, transparent); }
.btn.down { background: var(--accent-soft); color: var(--down); border: 1px solid var(--accent-line); }
.btn-row { display: flex; gap: 10px; }
.btn-row > * { flex: 1; }

/* hero */

/* stat tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px; display: flex; gap: 12px; align-items: center; min-width: 0; }
.tile-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex: none; }
.tile-ico.accent { background: var(--accent-soft); color: var(--accent); }
.tile-num { font-size: 24px; font-weight: 500; line-height: 1.1; }
.tile-num small { font-size: 13px; color: var(--muted); font-weight: 600; }
.tile-label { color: var(--muted); font-size: 13px; line-height: 1.3; }

/* module cards */
.mod {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 18px;
}
.mod + .mod { margin-top: 12px; }
.mod.next { background: var(--accent-soft); border-color: var(--accent-line); }
.mod.done, .mod.open { background: var(--surface); }
.mod.locked .mod-title { color: color-mix(in srgb, var(--text) 75%, transparent); }
.mod-num {
  width: 52px; height: 52px; border-radius: 10px; display: grid; place-items: center; flex: none;
  font-weight: 500; font-size: 20px; background: var(--surface-3); color: var(--muted);
}
.mod.next .mod-num { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.mod.done .mod-num, .mod.open .mod-num { background: var(--ok-soft); color: var(--ok); }
.mod-body { flex: 1; min-width: 0; }
.mod-label { font-size: 12px; font-weight: 500; color: var(--muted); }
.mod-title { font-weight: 500; font-size: 16px; margin: 3px 0 6px; line-height: 1.25; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 13px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.mod-end { color: var(--muted); flex: none; }
.mod.next .mod-end { color: var(--text); }

/* lists */
.row { display: flex; align-items: center; gap: 14px; padding: 15px 0; border-bottom: 1px solid var(--border); width: 100%; text-align: left; }
.row:last-child { border-bottom: 0; }
.row-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-3); color: var(--muted); flex: none; font-weight: 500; font-size: 13px; }
.row-ico.ok { background: var(--ok-soft); color: var(--ok); }
.row-ico.accent { background: var(--accent-soft); color: var(--accent); }
.row-main { flex: 1; min-width: 0; }
.row-title { font-weight: 500; }
.row-sub { color: var(--muted); font-size: 13px; }

/* progress */
.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width .5s ease; }
.segs { display: flex; gap: 6px; }
.segs i { flex: 1; height: 4px; border-radius: 4px; background: var(--surface-3); }
.segs i.on { background: var(--accent); }

/* lesson */
.crumbs { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-weight: 500; font-size: 14px; margin-bottom: 18px; }
.lesson h1 { font-size: 24px; line-height: 1.15; margin: 14px 0 6px; }
.lesson p { margin: 0 0 14px; color: color-mix(in srgb, var(--text) 88%, transparent); }
.lesson h3 { margin: 24px 0 10px; font-size: 18px; }
.lesson ul, .lesson ol { margin: 0 0 16px; padding-left: 0; list-style: none; counter-reset: n; }
.lesson li { position: relative; padding: 0 0 8px 22px; color: color-mix(in srgb, var(--text) 88%, transparent); }
.lesson ul li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.lesson ol li { counter-increment: n; padding-left: 30px; }
.lesson ol li::before { content: counter(n); position: absolute; left: 0; top: 1px; width: 21px; height: 21px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-size: 12px; font-weight: 500; display: grid; place-items: center; }
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 10px; margin: 0 0 16px; font-size: 14px; }
.callout svg { margin-top: 2px; }
.callout.tip { background: var(--ok-soft); color: color-mix(in srgb, var(--text) 90%, transparent); }
.callout.tip svg { color: var(--ok); }
.callout.warn { background: var(--danger-soft); }
.callout.warn svg { color: var(--danger); }
.formula { font-family: var(--mono); font-size: 14px; background: var(--surface-2); border: 1px dashed var(--border-2); padding: 12px 14px; border-radius: 12px; margin: 0 0 16px; }
.example { border-left: 3px solid var(--accent); background: var(--surface); padding: 12px 14px; border-radius: 0 12px 12px 0; margin: 0 0 16px; font-size: 14px; }
.chart-fig { margin: 4px 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
.chart-fig canvas { width: 100%; height: 210px; display: block; }
.chart-fig figcaption { color: var(--muted); font-size: 13px; padding: 8px 6px 2px; }
.sticky-actions {
  position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); z-index: 5; margin-top: 18px;
  display: flex; gap: 10px; padding: 10px; border-radius: 10px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--border);
}

/* quiz */
.opt {
  width: 100%; text-align: left; padding: 16px 18px; border-radius: 10px; border: 1px solid var(--border-2);
  background: var(--surface); font-weight: 600; display: flex; gap: 12px; align-items: center; transition: background .2s, border-color .2s;
}
.opt + .opt { margin-top: 10px; }
.opt .k { width: 28px; height: 28px; border-radius: 8px; background: var(--surface-3); display: grid; place-items: center; font-size: 13px; font-weight: 500; flex: none; }
.opt.right { border-color: var(--ok); background: var(--ok-soft); }
.opt.right .k { background: var(--ok); color: #0d1a14; }
.opt.wrong { border-color: var(--danger); background: var(--danger-soft); }
.opt.wrong .k { background: var(--danger); color: #fff; }
.opt[disabled] { cursor: default; }
.explain { margin-top: 14px; padding: 14px 16px; border-radius: 10px; background: var(--surface-2); color: var(--muted); font-size: 14px; }
.score-ring { width: 150px; height: 150px; margin: 8px auto 18px; position: relative; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 32px; }

/* trainer */
.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; margin: 18px -16px 0; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--border-2); font-size: 14px; font-weight: 600; background: var(--surface); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
.chart-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 16px; }
.chart-card canvas { width: 100%; height: 300px; display: block; }
.chart-head { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 10px; font-size: 13px; color: var(--muted); font-weight: 500; }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--surface-3); }
.dots i.on { background: var(--accent); }
.verdict { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 12px; margin-top: 14px; }
.verdict.ok { background: var(--ok-soft); }
.verdict.bad { background: var(--danger-soft); }
.verdict .big { font-size: 18px; font-weight: 500; }
.verdict p { margin: 4px 0 0; color: color-mix(in srgb, var(--text) 85%, transparent); font-size: 14px; }

/* glossary */
.search { display: flex; align-items: center; gap: 12px; padding: 0 16px; height: 56px; border-radius: 12px; border: 1px solid var(--border-2); background: var(--surface); margin-top: 22px; }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; }
.search input::placeholder { color: var(--faint); }
.term { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.term + .term { margin-top: 12px; }
.term-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.term-head b { font-size: 18px; }
.term .en { color: var(--accent); font-size: 13px; font-weight: 500; }
.term p { margin: 8px 0 10px; color: var(--muted); font-size: 14px; }
.term-foot { display: flex; align-items: center; justify-content: space-between; }
.term-cat { font-size: 12px; font-weight: 500; color: var(--faint); }
.term-foot .link { font-size: 13px; }
mark { background: color-mix(in srgb, var(--accent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.empty { text-align: center; color: var(--muted); padding: 40px 10px; }

/* locked */
.locked-card { text-align: center; padding: 34px 22px; }
.locked-card .lock-ico { width: 56px; height: 56px; border-radius: 12px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.locked-card h3 { font-size: 24px; margin: 10px 0; }
.locked-card p { max-width: 340px; margin: 0 auto 22px; }

/* segmented */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { padding: 12px 8px; border-radius: 12px; border: 1px solid var(--border-2); font-weight: 500; font-size: 14px; display: flex; gap: 8px; justify-content: center; align-items: center; background: var(--surface); }
.seg button.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

/* sheet */
.sheet-bg { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade .2s; }
.sheet { width: 100%; max-width: 560px; background: var(--surface); border-radius: 12px 16px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); animation: slideUp .3s var(--ease); border-top: 1px solid var(--border); }
.sheet h3 { margin: 6px 0 8px; font-size: 20px; }
.sheet p { color: var(--muted); margin: 0 0 18px; }
.field { width: 100%; height: 52px; border-radius: 10px; border: 1px solid var(--border-2); background: var(--surface-2); padding: 0 16px; font-size: 16px; outline: none; text-transform: uppercase; }
.field:focus { border-color: var(--accent); }
@keyframes fade { from { opacity: 0; } }
@keyframes slideUp { from { transform: translateY(40px); opacity: .4; } }

.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 24px); transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 10px; font-weight: 500; font-size: 14px; z-index: 60; animation: fadeUp .25s; max-width: 90vw; }

/* bottom nav */
.nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 560px; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr); height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border);
}
.nav button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; font-size: 12px; font-weight: 500; color: var(--muted); }
.nav button.on { color: var(--text); }
.nav button.on svg { color: var(--accent); }
footer { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--border); font-size: 12px; color: var(--faint); }
footer p { margin: 6px 0 0; }

.stairs { width: 100%; height: 150px; margin: 18px 0 10px; }
.loader { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }
.spin { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-3); border-top-color: var(--accent); animation: rot 0.8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
.user-row .pill { font-size: 12px; padding: 4px 9px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.code-box { font-family: var(--mono); font-size: 20px; font-weight: 500; text-align: center; padding: 16px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--accent-line); color: var(--accent); margin: 12px 0; user-select: all; }

/* тренажёр: демо-счёт и статистика */
.switch { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; color: var(--muted); }
.switch i { width: 34px; height: 20px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; }
.switch i::after { content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch.on { color: var(--accent); }
.switch.on i { background: var(--accent); }
.switch.on i::after { transform: translateX(14px); }
.hint-bar { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); font-size: 14px; }
.hint-bar svg { color: var(--accent); }
.trade-line { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; font-size: 14px; color: var(--muted); }
.trade-line b { color: var(--text); font-size: 16px; }
.trade-line.pos b { color: var(--ok); }
.trade-line.neg b { color: var(--danger); }
.brow { padding: 9px 0; }
.brow-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 7px; }
.brow-top b { white-space: nowrap; }
.bar.thin { height: 6px; }
.flabel { display: block; margin: 16px 0 8px; font-size: 12px; font-weight: 500; color: var(--muted); }
.sheet .seg { grid-auto-columns: minmax(0, 1fr); }
.sheet .seg button { padding: 11px 4px; font-size: 13px; }
button.tile { font: inherit; color: inherit; }

.lang-btn { width: auto; padding: 0 10px; font-weight: 500; font-size: 13px; }
textarea.field { height: auto; min-height: 110px; padding: 14px 16px; text-transform: none; resize: vertical; line-height: 1.45; font: inherit; color: inherit; }
.funnel-step { padding: 8px 0; }
.funnel-step .brow-top small { margin-left: 6px; }
.check { display: flex; gap: 10px; align-items: center; font-size: 14px; font-weight: 600; margin-top: 12px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* режимы, скорость, статистика, достижения, админ-путь */
.tile.col { flex-direction: column; align-items: flex-start; gap: 2px; }
.seg.modes button { font-size: 13px; padding: 11px 4px; }
.timer { height: 6px; background: var(--surface-3); border-radius: 6px; overflow: hidden; margin: 2px 4px 12px; }
.timer i { display: block; height: 100%; width: 100%; background: var(--ok); border-radius: 6px; }
.timer i.hot { background: var(--danger); }
.speed-score { text-align: right; line-height: 1.1; }
.speed-score b { display: block; font-size: 32px; color: var(--accent); }
.speed-score span { font-size: 12px; color: var(--muted); font-weight: 500; }
.wl { display: flex; align-items: center; gap: 22px; }
.wl-legend > div { display: flex; align-items: center; gap: 8px; font-size: 15px; margin: 4px 0; }
.wl-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ach-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.ach { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--surface-2); opacity: .75; }
.ach.on { opacity: 1; background: var(--accent-soft); border-color: var(--accent-line); }
.ach-ico { font-size: 24px; line-height: 1; filter: grayscale(1); }
.ach.on .ach-ico { filter: none; }
.ach-t { font-weight: 500; margin-top: 8px; font-size: 14px; }
.ach-d { color: var(--muted); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.ach-at { color: var(--accent); font-size: 12px; font-weight: 500; margin-top: 8px; }
details.fold { padding: 16px 18px; }
details.fold > summary, .mrow > summary, .fold-inline > summary { list-style: none; cursor: pointer; }
details.fold > summary::-webkit-details-marker, .mrow > summary::-webkit-details-marker, .fold-inline > summary::-webkit-details-marker { display: none; }
details.fold > summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
details.fold > summary h3 { margin: 0; font-size: 16px; }
details.fold > summary::after { content: "›"; font-size: 20px; color: var(--muted); transition: transform .2s; margin-left: 8px; }
details.fold[open] > summary::after { transform: rotate(90deg); }
details.fold[open] > summary { margin-bottom: 10px; }
.fold-inline > summary { color: var(--accent); font-weight: 500; font-size: 14px; margin-top: 12px; }
.mrow { border-top: 1px solid var(--border); }
.mrow > summary { display: flex; align-items: center; gap: 10px; padding: 11px 0; font-size: 14px; }
.mrow-st { flex: none; width: 22px; text-align: center; }
.mrow-t { flex: 1; min-width: 0; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mrow-v { flex: none; color: var(--muted); font-size: 13px; font-weight: 500; }
.mrow-body { padding: 0 0 12px 32px; }
.lrow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; font-size: 13px; border-bottom: 1px dashed var(--border); }
.lrow:last-child { border-bottom: 0; }
.lrow b { font-weight: 500; white-space: nowrap; text-align: right; }
.lrow.warn, .lrow.warn b { color: var(--danger); }
.dtable { font-size: 13px; }
.dtable > div { display: grid; grid-template-columns: 0.8fr 1.6fr 0.8fr 1.1fr; gap: 8px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.dtable .dh { color: var(--muted); font-weight: 500; font-size: 12px; }
a.btn { text-decoration: none; color: inherit; }

/* значки, заявки, график дня, настройки */
.ach-ico { filter: none !important; }
.badge { display: block; }
.badge.locked { filter: grayscale(1) opacity(.55); }
.idbox { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); font-size: 14px; border: 1px dashed var(--border-2); }
.idbox b { user-select: all; }
.req-list { margin-top: 14px; }
.req-item { padding: 10px 0; border-top: 1px solid var(--border); font-size: 14px; }
.req-reply { margin-top: 6px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); }
.crowd { margin-top: 12px; }
.crowd-bar { height: 10px; border-radius: 10px; background: var(--down); overflow: hidden; }
.crowd-bar i { display: block; height: 100%; background: var(--up); }
.crowd-legend { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 500; color: var(--muted); margin-top: 6px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 14px; font-size: 14px; cursor: pointer; }
.toggle input { display: none; }
.toggle i { flex: none; width: 44px; height: 26px; border-radius: 99px; background: var(--surface-3); position: relative; transition: background .2s; }
.toggle i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + i { background: var(--accent); }
.toggle input:checked + i::after { transform: translateX(18px); }
.optrow { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.optrow input[type=radio] { width: 20px; height: 20px; accent-color: var(--ok); flex: none; }
.atabs { margin-top: 14px; }
.atabs b { background: var(--danger); color: #fff; border-radius: 99px; padding: 0 6px; font-size: 12px; margin-left: 4px; }
.atabs b:empty { display: none; }
.sticky-save { position: sticky; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px); margin-top: 18px; z-index: 5; box-shadow: var(--shadow); }
.lrow.me { color: var(--accent); font-weight: 500; }
select.field { appearance: auto; }
.daily .verdict p { font-size: 14px; }

/* ---------- доступ, онбординг, тренажёр (v2) ---------- */
.access-card { border-color: var(--accent-line); background: var(--accent-soft); }
.warn-card { border-color: var(--danger); background: var(--danger-soft); }
.steps { margin: 14px 0 4px; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; color: var(--muted); }
.steps b { color: var(--text); }
.po-id { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); font-size: 13px; }
.po-id b { font-size: 16px; color: var(--text); }
.row.is-locked { opacity: .55; }
.tease { font-weight: 500; color: var(--text); margin: 6px 0 4px; }
.acct-bar { display: flex; align-items: center; gap: 10px; width: 100%; margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); border: 1px solid var(--border-2); background: var(--surface); font-size: 14px; text-align: left; color: var(--muted); }
.acct-bar span:first-of-type { flex: 1; }
.acct-bar b { color: var(--text); }
.acct-bar .accent { color: var(--accent); font-weight: 500; }
.range { width: 100%; margin: 10px 0 2px; accent-color: var(--accent); height: 28px; }
.range-scale { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.level-pick { display: flex; align-items: center; gap: 14px; width: 100%; margin: 0; text-align: left; }
.level-pick:active { transform: scale(.99); }

/* ---------- подтверждение аккаунта ---------- */
.verify-row { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 16px; padding: 16px; border-radius: var(--radius); border: 1px solid var(--accent-line); background: var(--surface); text-align: left; }
.verify-row.ok { border-color: var(--border); }
.verify-ico { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.verify-row.ok .verify-ico { background: var(--ok-soft); color: var(--ok); }
.verify-main { flex: 1; display: grid; gap: 2px; min-width: 0; }
.verify-main b { font-size: 15px; }
.verify-main small { color: var(--muted); font-size: 13px; }
.vsteps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 20px 0 6px; position: relative; }
.vstep { display: grid; justify-items: start; gap: 6px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface); }
.vstep i { font-style: normal; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 500; border: 1.5px solid var(--border-2); color: var(--muted); }
.vstep b { font-size: 14px; }
.vstep small { font-size: 12px; color: var(--faint); }
.vstep.done i { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.vstep.done b { color: var(--ok); }
.vstep.now { border-color: var(--accent-line); background: var(--accent-soft); }
.vstep.now i { border-color: var(--accent); color: var(--accent); }
.vstep.now b { color: var(--accent); }
.vcard { padding-top: 20px; }
.vblock { display: flex; gap: 14px; padding: 4px 0 18px; }
.vblock + .vblock { border-top: 1px dashed var(--border); padding-top: 18px; }
.vnum { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; font-weight: 500; font-size: 13px; background: var(--text); color: var(--bg); }
.vblock h3 { margin: 2px 0 6px; font-size: 16px; }
.vblock p { font-size: 14px; }
/* ---------- правка текстов ---------- */
.te-bar { position: fixed; left: 50%; transform: translateX(-50%); top: 10px; z-index: 60; display: flex; gap: 12px; align-items: center; padding: 8px 8px 8px 16px; border-radius: 999px; background: var(--text); color: var(--bg); font-size: 13px; font-weight: 500; box-shadow: var(--shadow); }
.te-bar button { padding: 7px 14px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 500; }
body.text-edit main :is(h1, h2, h3, p, b, small, span, button, li, label, div.eyebrow):hover { outline: 1.5px dashed var(--accent); outline-offset: 2px; cursor: text; }

.fig { margin: 18px 0; padding: 14px 12px 10px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.fig-svg { display: block; width: 100%; height: auto; }
.fig figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- дизайн v3: тетрадь трейдера ----------
   Поверхности графитовые, оранжевый — только главное действие, выбор и пометки на графике.
   Фирменная деталь — «ценник уровня» (.tag): моно-метка с чёрточкой, как подпись цены на шкале. */
body { font-size: 15px; line-height: 1.55; font-feature-settings: "tnum" 1; }
.top { padding: 12px 16px; background: color-mix(in srgb, var(--bg) 92%, transparent); }
.brand { gap: 10px; }
.brand-name { font-weight: 600; font-size: 16px; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--muted); font-weight: 400; line-height: 1.2; }
.icon-btn { border-radius: 10px; color: var(--muted); }
.lang-btn { font-family: var(--mono); font-weight: 500; font-size: 13px; }
.avatar { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); font-weight: 500; }
main { padding: 24px 16px; }

h1.title { font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
.subtitle { color: var(--muted); margin: 8px 0 0; max-width: 34rem; }
.section-title { margin: 32px 0 12px; }
.section-title h2 { font-size: 20px; font-weight: 500; }
.eyebrow { font-size: 13px; color: var(--muted); font-weight: 500; }
.eyebrow.accent { color: var(--muted); }
.group-label { margin: 32px 0 12px; font-size: 13px; color: var(--muted); font-weight: 500; }
.card { padding: 20px; }
.card + .card { margin-top: 12px; }
.card h3 { font-size: 18px; font-weight: 500; }
.card.warm, .access-card { background: var(--surface); border-color: var(--border); }
.access-card { box-shadow: inset 3px 0 0 var(--accent); }
.pill { font-family: var(--mono); font-weight: 400; color: var(--muted); border-color: var(--border-2); }
.pill.accent { color: var(--text); background: var(--surface-2); border-color: var(--border-2); }
.pill.ok, .pill.danger { background: transparent; }
.link { font-weight: 500; }

/* кнопки: главная — акцент, остальные — поверхность с хайрлайном */
.btn { min-height: 48px; padding: 0 20px; border-radius: 10px; font-weight: 500; gap: 8px;
  transition: transform .15s var(--ease), background-color .15s var(--ease), border-color .15s var(--ease), opacity .15s; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: var(--surface-2); border: 1px solid var(--border-2); }
.btn.up { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.btn.down { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-2); }
.btn.up svg { color: var(--up); } .btn.down svg { color: var(--down); }

/* ценник уровня */
.tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; font-weight: 500; line-height: 16px;
  color: var(--text); padding: 2px 6px 2px 0; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--border-2); white-space: nowrap; }
.tag::before { content: ""; width: 8px; height: 1px; background: var(--accent); margin-left: -1px; }

/* герой: учебный график — единственное яркое место главной */
.hero { margin-top: 24px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); overflow: hidden; }
.hero-body { padding: 24px 20px 4px; }
.hero h2 { font-size: 24px; line-height: 1.2; font-weight: 500; margin: 0 0 8px; }
.hero p { margin: 0 0 20px; color: var(--muted); font-size: 14px; max-width: 30rem; }
.hero-chart { margin: 20px 0 0; padding: 0 8px 12px; border-top: 1px solid var(--border);
  background-image: linear-gradient(var(--chart-grid) 1px, transparent 1px), linear-gradient(90deg, var(--chart-grid) 1px, transparent 1px);
  background-size: 16px 16px; }
.hero-chart canvas { display: block; width: 100%; height: 230px; }
.hero-chart figcaption { display: flex; align-items: center; gap: 8px; padding: 4px 8px 0; font-size: 13px; color: var(--muted); }

/* строка цифр вместо четырёх плиток */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.stat { padding: 16px 12px; min-width: 0; }
.stat + .stat { border-left: 1px solid var(--border); }
.stat-num { font-family: var(--mono); font-size: 20px; font-weight: 500; line-height: 1.2; white-space: nowrap; }
.stat-num small { font-size: 12px; color: var(--muted); font-weight: 400; }
.stat-label { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.3; }
@media (max-width: 360px) { .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--border); } }
.tile { border-radius: 12px; }
.tile-ico, .tile-ico.accent { background: var(--surface-2); color: var(--muted); border-radius: 10px; width: 40px; height: 40px; }
.tile-num { font-family: var(--mono); font-size: 20px; font-weight: 500; }

/* модули */
.mod { gap: 16px; padding: 16px; background: var(--surface); border-radius: 14px;
  transition: background-color .15s var(--ease), border-color .15s var(--ease); }
.mod + .mod { margin-top: 8px; }
.mod.next { background: var(--surface); border-color: var(--accent-line); }
.mod.locked { background: transparent; }
.mod-num { width: 44px; height: 44px; border-radius: 10px; font-family: var(--mono); font-size: 16px; font-weight: 500;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }
.mod.next .mod-num { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.mod.done .mod-num, .mod.open .mod-num { background: var(--surface-2); color: var(--ok); }
.mod-label { font-size: 12px; color: var(--muted); font-weight: 400; }
.mod.next .mod-label { color: var(--accent); }
.mod-title { font-weight: 500; font-size: 16px; margin: 2px 0 4px; }
.meta { gap: 4px 12px; font-size: 13px; }
.meta svg.i.sm { width: 14px; height: 14px; }

/* списки, уроки, тесты */
.row { padding: 12px 0; gap: 12px; }
.row-ico { border-radius: 10px; background: var(--surface-2); font-family: var(--mono); font-weight: 500; }
.row-ico.ok, .row-ico.accent { background: var(--surface-2); }
.row-ico.accent { color: var(--accent); }
.row-title { font-weight: 500; }
.lesson h1 { font-size: 24px; font-weight: 500; line-height: 1.2; }
.lesson h3 { font-size: 18px; font-weight: 500; margin: 32px 0 8px; }
.lesson p, .lesson li { color: color-mix(in srgb, var(--text) 90%, transparent); }
.lesson ul li::before { top: 11px; width: 5px; height: 5px; background: var(--faint); }
.lesson ol li::before { border-radius: 4px; background: var(--surface-2); color: var(--muted); font-family: var(--mono); font-weight: 500; border: 1px solid var(--border); }
.callout { border-radius: 10px; font-size: 14px; border: 1px solid var(--border); }
.callout.tip { background: var(--surface); }
.callout.warn { background: var(--surface); box-shadow: inset 3px 0 0 var(--danger); }
.example { border-left: 2px solid var(--accent); border-radius: 0 10px 10px 0; font-size: 14px; }
.formula { border-style: solid; border-color: var(--border-2); border-radius: 10px; }
.chart-fig, .fig { border-radius: 12px; }
.opt { border-radius: 10px; font-weight: 400; padding: 14px 16px; }
.opt .k { border-radius: 6px; font-family: var(--mono); font-weight: 500; background: var(--surface-2); border: 1px solid var(--border); }
.verdict { border-radius: 12px; border: 1px solid var(--border); background: var(--surface); }
.verdict.ok { background: var(--surface); box-shadow: inset 3px 0 0 var(--ok); }
.verdict.bad { background: var(--surface); box-shadow: inset 3px 0 0 var(--danger); }
.verdict .big { font-size: 16px; font-weight: 500; }
.v-ico { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); }
.verdict.ok .v-ico { color: var(--ok); } .verdict.bad .v-ico { color: var(--danger); }
.big-ico { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.lvl-ico { flex: none; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
.score-ring b { font-family: var(--mono); font-weight: 500; font-size: 32px; }
.chip { border-radius: 10px; font-weight: 400; padding: 8px 14px; }
.chip.on { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }
.seg button { border-radius: 10px; font-weight: 400; }
.seg button.on { background: var(--surface-3); color: var(--text); border-color: var(--border-2); }
.chart-card { border-radius: 14px; }
.chart-head { font-family: var(--mono); font-weight: 400; font-size: 12px; }
.term { border-radius: 12px; padding: 16px; }
.term-head b { font-size: 16px; font-weight: 500; }
.term .en { color: var(--muted); font-family: var(--mono); font-weight: 400; font-size: 12px; }
.term-cat { font-size: 12px; font-weight: 400; }
.search { height: 48px; border-radius: 10px; }
.field { border-radius: 10px; height: 48px; }
.sheet { border-radius: 16px 16px 0 0; }
.sheet h3 { font-size: 20px; font-weight: 500; }
.toast { border-radius: 10px; font-weight: 500; }
.sticky-actions { border-radius: 14px; }
.kv dd { font-weight: 500; font-family: var(--mono); font-size: 13px; }
.speed-score b { font-family: var(--mono); font-weight: 500; font-size: 32px; color: var(--text); }
.acct-bar b, .trade-line b, .brow-top b, .po-id b, .lrow b { font-family: var(--mono); font-weight: 500; }
.ach { border-radius: 12px; }
.ach.on { background: var(--surface); border-color: var(--border-2); }
.ach-at { color: var(--muted); font-family: var(--mono); font-weight: 400; }
.vstep { border-radius: 10px; }
.vstep i { font-family: var(--mono); font-weight: 500; }
.vstep.now { background: var(--surface); }
.vstep.done b, .vstep.now b { color: var(--text); }
.verify-row { border-radius: 14px; }
.verify-ico, .verify-row.ok .verify-ico { background: var(--surface-2); border-radius: 10px; }
.vnum { border-radius: 6px; font-family: var(--mono); }
.te-bar { border-radius: 12px; font-weight: 500; }
.te-bar button { border-radius: 8px; font-weight: 500; }
.code-box { font-family: var(--mono); font-weight: 500; border-radius: 10px; border-style: solid; }

/* нижняя навигация */
.nav { background: color-mix(in srgb, var(--bg) 94%, transparent); }
.nav button { font-size: 12px; font-weight: 400; gap: 4px; transition: color .15s var(--ease); }
.nav button.on { color: var(--text); font-weight: 500; }
footer { margin-top: 32px; padding-top: 20px; }
.tiles { gap: 8px; }
.tile.col { padding: 14px 12px; }
.tile-num { font-family: var(--sans); font-size: 18px; white-space: nowrap; }
.tile-num small { font-size: 12px; }

/* фон: спокойный переход в одном фиолетовом тоне, карточки чуть светлее фона */
.app { background: linear-gradient(180deg, #1c1640 0%, var(--bg) 340px); }
:root[data-theme="light"] .app { background: linear-gradient(180deg, #ece6ff 0%, var(--bg) 340px); }
.btn.primary { box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset; }
.btn.primary:hover { background: var(--accent-2); }
:root:not([data-theme="light"]) .btn.primary:hover { background: #9a7fff; }

/* ===== главная v4: шапка, большой блок, плитки 2×2, карточки модулей ===== */
.home-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.time-pill { flex: none; margin-top: 6px; gap: 6px; padding: 6px 12px; font-size: 13px; color: var(--text); background: transparent; border: 1px solid var(--border-2); }
.hero2 { position: relative; background: linear-gradient(135deg, var(--surface) 0%, color-mix(in srgb, var(--accent) 14%, var(--surface)) 100%); border-color: var(--border-2); }
.hero2 .hero-body { padding: 24px 22px 8px; position: relative; z-index: 1; }
.hero2 .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11.5px; font-weight: 600; }
.hero2 h2 { font-size: 30px; line-height: 1.1; font-weight: 600; margin: 10px 0 10px; letter-spacing: -.01em; }
.hero2 p { font-size: 15px; }
.hero2 .btn.primary { padding: 14px 22px; font-weight: 600; }
.hero2 .hero-chart { position: relative; border-top: 0; margin: 4px 0 0; padding: 0 0 4px; }
.hero2 .hero-chart canvas { height: 190px; }
.hero-tag, .hero-step { position: absolute; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: .06em; text-transform: uppercase; }
.hero-tag { top: 4px; right: 16px; }
.hero-step { bottom: 12px; right: 16px; }
@media (min-width: 520px) {
  .hero2 { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
  .hero2 .hero-body { padding: 28px 8px 28px 24px; }
  .hero2 .hero-chart { margin: 0; display: flex; align-items: flex-end; }
  .hero2 .hero-chart canvas { height: 100%; min-height: 230px; }
}
.home-tiles { margin-top: 12px; gap: 10px; }
.home-tiles .tile { padding: 16px 14px; background: var(--surface); }
.home-tiles .tile-ico { background: var(--ok-soft); color: var(--ok); border-radius: 12px; width: 44px; height: 44px; }
.home-tiles .tile-ico.accent { background: var(--accent-soft); color: var(--accent-2); }
.home-tiles .tile-num { font-size: 22px; font-weight: 600; }
.home-tiles .tile-label { font-size: 13px; }

.mod { padding: 18px 16px; border-radius: 16px; }
.mod-label { text-transform: uppercase; letter-spacing: .06em; font-size: 11.5px; font-weight: 600; color: var(--faint); }
.mod.next { background: color-mix(in srgb, var(--accent) 12%, var(--surface)); border-color: var(--accent); }
.mod.next .mod-label { color: var(--accent-2); }
.mod.next .mod-num { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent-2); }
.mod-title { font-size: 17px; font-weight: 600; margin: 4px 0 6px; }
.mod.locked { background: var(--surface); }
.mod.locked .mod-title { color: var(--muted); }
.mod-num { width: 48px; height: 48px; font-size: 18px; font-weight: 600; }
.mod-bar { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: 10px; max-width: 260px; overflow: hidden; }
.mod-bar i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.group-label { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 600; color: var(--muted); }
.home-head { flex-wrap: wrap; }
.home-head > div { flex: 1 1 220px; }
.time-pill { font-family: var(--sans); font-weight: 500; }

/* доступ в три шага, рекомендованная биржа */
.chip.rec { display: inline-flex; align-items: center; gap: 6px; }
.rec-cup { color: #f2c14e; display: inline-flex; }
.rec-note { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.rec-note .ico, .rec-note svg { color: #f2c14e; }
.site-alt { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; margin-top: 12px; }
.site-alt .verify-main { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.site-alt small { color: var(--faint); font-size: 13px; }

/* достижения v2: цветные значки по группам, ранги по форме */
.badge { display: block; overflow: visible; filter: drop-shadow(0 4px 8px rgba(10, 4, 40, .35)); }
.badge.locked { filter: grayscale(1) brightness(.75) opacity(.45); }
.ach-strip { display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; margin-top: 16px; }
.ach-stack { display: flex; flex: none; }
.ach-stack .badge + .badge { margin-left: -14px; }
.ach-strip-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ach-strip-main small { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ach2-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ach2 { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px 14px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); text-align: center; }
.ach2.on { border-color: var(--border-2); }
.ach2-t { font-size: 12.5px; line-height: 1.25; font-weight: 500; }
.ach2-s { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.ach2 .bar { width: 70%; margin-top: 2px; }
.ach-sheet { text-align: center; }
.ach-big { display: flex; justify-content: center; margin: 8px 0 4px; }
.ach-big.on .badge { animation: achPop .7s var(--ease, ease) both; }
.ach-sheet.fresh .ach-big .badge { filter: drop-shadow(0 10px 30px rgba(139, 108, 255, .45)); }
.ach-rank { display: inline-block; font-size: 12px; font-family: var(--mono); padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-2); color: var(--muted); }
.ach-rank.r-gold, .ach-rank.r-legend { color: #f2c14e; border-color: rgba(242, 193, 78, .4); }
@keyframes achPop { 0% { transform: scale(.4) rotate(-12deg); opacity: 0; } 60% { transform: scale(1.08) rotate(3deg); opacity: 1; } 100% { transform: none; } }
