/* DELOMANT Academy — визуальная основа прототипа (п. 3 ТЗ): тёмно-синий, зелёный, белый, светло-серый;
   логотип DELOMANT GROUP и шрифт IBM Plex Sans — как на корпоративном сайте. */

/* Шрифты — локально, без внешних CDN */
@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+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@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+0301, 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@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+0301, 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@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+0301, 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+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --navy: #10243e; --navy-2: #27405b; --green: #0f806d; --green-dark: #086a59; --green-soft: #e4f5ef; --mint: #6ed3ab;
  --ink: #172739; --muted: #5b6b78; --field: #82929e; --line: #e1e8ee; --bg: #f4f7f8; --white: #fff;
  --bad: #a8402d; --bad-soft: #fbecea; --warn: #8f5c10; --warn-soft: #fff7e6; --info: #2b6cb0; --info-soft: #eaf2fb;
  --radius: 14px;
  --sans: "IBM Plex Sans", Inter, "Segoe UI", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); font: 15px/1.55 var(--sans); color: var(--ink); }
a { color: var(--green-dark); }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid #2f9e86; outline-offset: 2px; }
h1 { margin: 0 0 6px; font-size: 27px; line-height: 1.2; font-weight: 600; color: var(--navy); }
h2 { margin: 0 0 12px; font-size: 21px; font-weight: 600; color: var(--navy); }
h3 { font-size: 16px; font-weight: 600; margin: 22px 0 8px; }
p { margin: 6px 0 12px; }
img { max-width: 100%; height: auto; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.nowrap { white-space: nowrap; }
.good { color: #128364; } .bad { color: var(--bad); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Шапка: логотип DELOMANT GROUP + «ACADEMY» */
.topbar { background: var(--navy); color: #fff; padding: 14px 26px; display: flex; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; line-height: 1; }
.brand:hover { color: #fff; }
.brand-logo { display: block; height: 38px; width: auto; }
.brand-tag { padding-left: 14px; border-left: 1px solid #56728a; }
.brand-tag b { display: block; font-weight: 600; font-size: 15px; letter-spacing: .16em; color: var(--mint); }
.brand-sub { display: block; margin-top: 4px; font-size: 11px; color: #c3d5e3; letter-spacing: .03em; }
.pill { background: var(--navy-2); border: 1px solid #56728a; padding: 5px 11px; border-radius: 999px; font-size: 11.5px; color: #fff; }
.topbar .spacer { flex: 1; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.userbox .who { text-align: right; line-height: 1.3; }
.userbox .who small { color: #c3d5e3; display: block; }
.linkbtn { background: none; border: 1px solid #56728a; color: #fff; border-radius: 8px; padding: 6px 11px; cursor: pointer; font: inherit; font-size: 13px; }
.linkbtn:hover { background: var(--navy-2); }
.burger { display: none; background: none; border: 0; color: #fff; font-size: 24px; cursor: pointer; padding: 0 4px; }

/* Раскладка */
.layout { max-width: 1240px; margin: 24px auto; padding: 0 18px; display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 18px; }
.layout.no-nav { grid-template-columns: minmax(0, 1fr); max-width: 980px; }
.panel { background: var(--white); border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 2px 8px #172d3e08; }
.sidebar { padding: 14px; align-self: start; position: sticky; top: 16px; }
.side-title { font-size: 11px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; margin: 14px 10px 6px; }
.side-title:first-child { margin-top: 4px; }
.nav { display: block; text-decoration: none; padding: 9px 12px; border-radius: 10px; font-weight: 600; color: #304356; margin: 2px 0; font-size: 14px; }
.nav:hover { background: #edf4f4; color: #304356; }
.nav.active { background: var(--green-soft); color: var(--green-dark); }
.content { padding: 26px 30px; min-height: 480px; min-width: 0; }
footer { margin: 10px auto 26px; text-align: center; font-size: 12px; color: var(--muted); padding: 0 15px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .actions { margin-top: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; color: var(--green); font-weight: 600; margin-bottom: 8px; }
.crumbs { font-size: 13px; margin-bottom: 10px; }
.crumbs a { text-decoration: underline; text-underline-offset: 2px; }

/* Карточки и сетки */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tile { border: 1px solid var(--line); border-radius: 12px; padding: 16px; background: #fff; min-width: 0; }
.tile > b, .tile > .tile-title { display: block; margin-bottom: 6px; font-weight: 600; color: var(--navy); }
.tile.link { text-decoration: none; color: inherit; transition: border-color .15s, box-shadow .15s; }
.tile.link:hover { border-color: #b7d9cf; box-shadow: 0 3px 10px #0f806d14; }
.stat { font-size: 30px; color: var(--navy); font-weight: 600; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 12.5px; margin-top: 4px; }
.stat-pair { font-size: 15px; font-weight: 600; color: var(--muted); }
.tile.tone-bad .stat { color: var(--bad); } .tile.tone-good .stat { color: #128364; } .tile.tone-warn .stat { color: var(--warn); }
.callout { background: #eff8f5; border-left: 4px solid var(--green); padding: 14px 17px; border-radius: 7px; margin: 14px 0; }
.warn { background: var(--warn-soft); border-left: 4px solid #c1862a; padding: 13px 15px; border-radius: 7px; font-size: 13.5px; margin: 12px 0; }
.empty { text-align: center; color: var(--muted); padding: 34px 16px; border: 1px dashed #cfdbe2; border-radius: 12px; background: #fafcfc; }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; }
.section { margin-top: 26px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; }

/* Рабочие алгоритмы — раскрывающиеся ситуации с нумерованными шагами (как в прототипе) */
.flow { margin: 10px 0; padding: 0; }
.flow > summary { font-weight: 600; cursor: pointer; padding: 15px 16px; color: var(--navy); list-style-position: inside; }
.flow > summary:hover { color: var(--green-dark); }
.flow[open] > summary { border-bottom: 1px solid var(--line); }
.flow .content-body { padding: 4px 16px 6px; }
.content-body ol.steps, .flow .content-body ol { list-style: none; counter-reset: step; padding: 0; margin: 0; }
.content-body ol.steps > li, .flow .content-body ol > li { counter-increment: step; display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.content-body ol.steps > li:last-child, .flow .content-body ol > li:last-child { border-bottom: 0; }
.content-body ol.steps > li::before, .flow .content-body ol > li::before {
  content: counter(step); background: var(--navy); color: #fff; border-radius: 8px; font-weight: 600; font-size: 13px;
  min-width: 26px; height: 26px; display: grid; place-items: center; flex: 0 0 auto;
}

/* Кнопки */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 0; border-radius: 9px; padding: 10px 16px; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; background: var(--green); color: #fff; text-decoration: none; line-height: 1.2; }
.btn:hover { background: var(--green-dark); color: #fff; }
.btn.secondary { background: #eaf1f3; color: var(--navy); }
.btn.secondary:hover { background: #dce8ec; color: var(--navy); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn.danger:hover { background: #f5d9d4; }
.btn.ghost { background: transparent; color: var(--green-dark); padding: 6px 8px; }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
form.inline { display: inline; }

/* Бейджи */
.badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-good { background: var(--green-soft); color: var(--green-dark); }
.badge-bad { background: var(--bad-soft); color: var(--bad); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-muted { background: #eef2f4; color: #5a6b78; }

/* Сообщения */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.msg { padding: 11px 14px; border-radius: 9px; margin-bottom: 8px; font-size: 14px; border: 1px solid transparent; }
.msg-success { background: var(--green-soft); color: var(--green-dark); border-color: #c7e9dd; }
.msg-error { background: var(--bad-soft); color: var(--bad); border-color: #f1cfc8; }
.msg-warning { background: var(--warn-soft); color: var(--warn); border-color: #f1dfb8; }
.msg-info { background: var(--info-soft); color: var(--info); border-color: #cfe0f4; }

/* Формы */
label, .label { font-size: 13px; font-weight: 600; display: block; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], input[type=date],
input[type=datetime-local], input[type=search], input[type=file], select, textarea {
  font: inherit; padding: 9px 12px; border: 1px solid var(--field); border-radius: 9px; background: #fff; width: 100%; color: var(--ink);
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; flex: 0 0 auto; accent-color: var(--green); }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; font-size: 14px; margin: 10px 0; }
.check input { margin-top: 1px; }
.helptext { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; font-weight: 400; }
.errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--bad); font-size: 13px; }
.field-error input, .field-error select, .field-error textarea { border-color: var(--bad); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-card { max-width: 860px; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px 14px; margin: 16px 0; }
legend { font-weight: 600; padding: 0 6px; font-size: 14px; }
.choices { max-height: 220px; overflow: auto; border: 1px solid #dfe7eb; border-radius: 9px; padding: 6px 10px; background: #fff; }
.choices > div > div, .choices label { font-weight: 400; margin: 4px 0; display: flex; gap: 8px; align-items: flex-start; font-size: 14px; }
.choices ul { list-style: none; margin: 0; padding: 0; }
.choices li label { margin: 4px 0; }
.choice-filter { margin-bottom: 6px; padding: 6px 10px !important; font-size: 13px !important; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 16px; padding: 12px; background: #f7fafb; border: 1px solid var(--line); border-radius: 12px; }
.filters > div { min-width: 140px; flex: 1 1 140px; }
.filters label { margin: 0 0 4px; font-size: 12px; }
.filters .btn { flex: 0 0 auto; }

/* Таблицы */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
td, th { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #f2f6f7; font-size: 12.5px; color: #3e5162; font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfc; }
th a.sort { color: inherit; text-decoration: none; }
td.num, th.num { text-align: right; white-space: nowrap; }
.content-body table { border: 1px solid var(--line); margin: 12px 0; }
.pagination { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; }

/* Прогресс и графики */
.bar { height: 9px; border-radius: 9px; background: #e7edf0; overflow: hidden; }
.bar > div { height: 100%; background: var(--green); transition: width .25s; }
.bar.bad > div { background: var(--bad); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 8px 4px 0; border-bottom: 1px solid var(--line); }
.chart .col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 18px; height: 100%; }
.chart .col div { width: 100%; max-width: 38px; background: var(--green); border-radius: 4px 4px 0 0; }
.chart .col.zero span { visibility: hidden; }
.chart .col span { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.chart-labels { display: flex; gap: 6px; font-size: 10.5px; color: var(--muted); padding: 4px; }
.chart-labels span { flex: 1; text-align: center; min-width: 18px; }

/* Учебные материалы */
.content-body { font-size: 15.5px; line-height: 1.65; overflow-wrap: anywhere; }
.content-body h2, .content-body h3 { margin-top: 22px; }
.content-body h2 { font-size: 18px; }
.content-body .grid { margin: 12px 0; }
.content-body .tile > b:first-child, .content-body .tile > strong:first-child { display: block; margin-bottom: 6px; color: var(--navy); }
.content-body .tile p { margin: 0; }
.content-body blockquote { border-left: 4px solid var(--line); margin: 12px 0; padding: 4px 16px; color: #43586b; }
.content-body img { border-radius: 10px; }
.video { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; margin: 16px 0; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pdf-frame { width: 100%; height: 640px; border: 1px solid var(--line); border-radius: 12px; }
.files { list-style: none; padding: 0; }
.files li { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin: 6px 0; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.module-list { list-style: none; padding: 0; margin: 0; }
.module-list li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.step { background: var(--navy); color: #fff; border-radius: 8px; font-weight: 600; min-width: 28px; height: 28px; display: grid; place-items: center; font-size: 13px; }
.step.done { background: var(--green); }
.course-cover { width: 100%; max-height: 220px; object-fit: cover; border-radius: 12px; margin-bottom: 14px; }

/* Тест */
.q { border: 1px solid var(--line); border-radius: 13px; padding: 18px; margin: 13px 0; scroll-margin-top: 80px; }
.q-head { font-size: 12px; font-weight: 600; color: var(--green); letter-spacing: .04em; }
.q-title { font-weight: 600; font-size: 16px; margin: 8px 0 11px; white-space: pre-line; }
.answer { padding: 10px 12px; border: 1px solid #dfe7eb; border-radius: 9px; display: flex; align-items: flex-start; gap: 10px; margin: 6px 0; cursor: pointer; font-size: 14.5px; font-weight: 400; }
.answer:has(input:checked) { border-color: #22866f; background: #f1faf6; }
.answer input { margin-top: 2px; }
.test-bar { position: sticky; top: 0; z-index: 5; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; display: flex; gap: 14px; align-items: center; flex-wrap: wrap; box-shadow: 0 2px 10px #172d3e10; }
.test-bar .bar { flex: 1; min-width: 120px; }
.timer { font-weight: 600; font-variant-numeric: tabular-nums; color: var(--navy); }
.timer.low { color: var(--bad); }
.save-state { font-size: 12px; color: var(--muted); }
.result-big { font-size: 44px; font-weight: 600; color: var(--navy); line-height: 1.1; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.rules li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.rules b { display: block; font-size: 20px; color: var(--navy); }
.row-ok td:first-child { border-left: 4px solid var(--green); }
.row-bad td:first-child { border-left: 4px solid var(--bad); }

/* Визуальный редактор */
.editor { border: 1px solid var(--field); border-radius: 10px; background: #fff; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--line); background: #f7fafb; border-radius: 10px 10px 0 0; position: sticky; top: 0; z-index: 2; }
.editor-toolbar button { border: 0; background: transparent; border-radius: 6px; padding: 5px 8px; cursor: pointer; font: inherit; font-size: 13px; color: var(--navy); min-width: 30px; }
.editor-toolbar button:hover { background: #e4edf0; }
.editor-toolbar .sep { width: 1px; background: var(--line); margin: 3px 4px; }
.editor-area { min-height: 260px; padding: 14px 16px; outline: none; }
.editor-area:focus { box-shadow: inset 0 0 0 2px #0f806d33; border-radius: 0 0 10px 10px; }
.editor textarea.editor-source { border: 0; border-radius: 0 0 10px 10px; min-height: 260px; font-family: var(--mono); font-size: 13px; }

/* Вход */
.auth-wrap { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 30px; }
.auth-card h1 { font-size: 22px; }
.auth-mark { display: block; width: 52px; height: 52px; margin-bottom: 14px; }

.temp-password { font-family: var(--mono); font-size: 26px; letter-spacing: .08em; background: #f2f6f7; padding: 14px 18px; border-radius: 10px; display: inline-block; user-select: all; }
/* Диалог подтверждения */
dialog.confirm { border: 0; border-radius: 14px; padding: 22px 24px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 18px 50px #10243e40; color: var(--ink); }
dialog.confirm::backdrop { background: #10243e66; }
dialog.confirm p { margin: 0 0 18px; font-size: 15px; }
dialog.confirm .actions { justify-content: flex-end; margin-top: 0; }

pre.log { background: #0f1c2c; color: #d6e2ec; padding: 14px; border-radius: 10px; overflow: auto; max-height: 420px; font-size: 12px; font-family: var(--mono); }

@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); margin-top: 12px; padding: 0 10px; }
  .sidebar { display: none; position: static; }
  .sidebar.open { display: block; }
  .burger { display: block; }
  .content { padding: 18px 16px; }
  .grid, .grid-3, .grid-4, .form-grid, .rules { grid-template-columns: minmax(0, 1fr); }
  .grid.stats { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 8px; }
  .grid.stats .tile { padding: 12px; }
  .grid.stats .stat { font-size: 24px; }
  .topbar { padding: 12px 14px; gap: 10px; }
  .brand-logo { height: 30px; }
  .pill, .brand-sub, .userbox .who { display: none; }
  h1 { font-size: 22px; }
  .pdf-frame { height: 420px; }
  .filters > div { flex-basis: 100%; }
}
@media (max-width: 420px) {
  .brand-tag { display: none; }
}

/* ---------- Движение ----------
   Фирменный акцент — каннелюры колонны из знака DELOMANT в шапке; блик по ним проходит один раз за сессию (класс .intro из app.js).
   Остальное — короткое появление контента и отклик на наведение. fill-mode: backwards, чтобы не перебивать :hover. */
.topbar { position: relative; isolation: isolate; overflow: hidden; }
.topbar::before, .topbar::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000 80%); mask-image: linear-gradient(90deg, transparent 30%, #000 80%);
}
.topbar::before {
  background: repeating-linear-gradient(90deg, transparent 0 10px, rgba(255, 255, 255, .06) 10px 11px, rgba(0, 0, 0, .16) 11px 12px, transparent 12px 20px);
}
.topbar::after { background: linear-gradient(100deg, transparent 42%, rgba(110, 211, 171, .22) 50%, transparent 58%); transform: translateX(-100%); }
.topbar.intro::after { animation: ac-sweep 1.8s .35s cubic-bezier(.45, 0, .2, 1) both; }
.topbar.intro .brand { animation: ac-fade .6s ease-out backwards; }

@keyframes ac-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes ac-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ac-grow { from { transform: scaleX(0); } to { transform: none; } }
@keyframes ac-sweep { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* Появление страницы: блоки контента по очереди */
.content > *, .auth-card { animation: ac-rise .32s cubic-bezier(.2, .7, .2, 1) backwards; }
.content > :nth-child(2) { animation-delay: .04s; }
.content > :nth-child(3) { animation-delay: .08s; }
.content > :nth-child(4) { animation-delay: .12s; }
.content > :nth-child(5) { animation-delay: .16s; }
.content > :nth-child(n+6) { animation-delay: .2s; }
.content .grid > .tile { animation: ac-rise .32s cubic-bezier(.2, .7, .2, 1) backwards; }
.content .grid > .tile:nth-child(1) { animation-delay: .1s; }
.content .grid > .tile:nth-child(2) { animation-delay: .14s; }
.content .grid > .tile:nth-child(3) { animation-delay: .18s; }
.content .grid > .tile:nth-child(4) { animation-delay: .22s; }
.content .grid > .tile:nth-child(5) { animation-delay: .26s; }
.content .grid > .tile:nth-child(n+6) { animation-delay: .3s; }

/* Шаги алгоритма появляются по порядку при раскрытии ситуации */
.flow[open] .content-body ol > li { animation: ac-rise .28s cubic-bezier(.2, .7, .2, 1) backwards; }
.flow[open] .content-body ol > li:nth-child(2) { animation-delay: .06s; }
.flow[open] .content-body ol > li:nth-child(3) { animation-delay: .12s; }
.flow[open] .content-body ol > li:nth-child(4) { animation-delay: .18s; }
.flow[open] .content-body ol > li:nth-child(n+5) { animation-delay: .24s; }
.flow > summary { transition: color .15s; }

/* Полосы результата заполняются при открытии (живой прогресс теста не трогаем) */
.bar > div:not(#progress) { transform-origin: left center; animation: ac-grow .7s .2s cubic-bezier(.2, .7, .2, 1) backwards; }

/* Отклик на наведение и нажатие */
.tile.link { transition: border-color .15s, box-shadow .15s, transform .15s; }
.tile.link:hover { transform: translateY(-2px); box-shadow: 0 8px 20px -10px #0f806d40; }
.btn { transition: background .15s, transform .1s, box-shadow .15s; }
.btn:hover { box-shadow: 0 6px 14px -8px #10243e66; }
.btn:active { transform: translateY(1px); box-shadow: none; }
.nav { transition: background .15s, color .15s, box-shadow .15s; }
.nav.active { box-shadow: inset 3px 0 0 var(--green); }
.answer { transition: border-color .15s, background .15s; }
.answer:hover { border-color: #b7d9cf; }
.linkbtn { transition: background .15s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .tile.link:hover, .btn:active { transform: none; }
}
