/* шрифт Inter, файлы лежат в static/fonts */
@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-cyrillic-wght-normal.woff2") format("woff2");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("fonts/inter-latin-wght-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+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* цвета: фирменный синий #025594, тёмный #023c5d, голубой #02aeff */
:root {
    --bg: #ffffff;
    --text: #37352f;
    --text-2: #4b4a46;
    --muted: #787774;
    --muted-2: #9b9a97;
    --line: #e9e9e7;
    --line-strong: #dcdcda;
    --grid-line: #b9c6d3;
    --surface: #f7f7f5;
    --card: #ffffff;
    --link: #025594;
    --accent: #025594;
    --accent-soft: #e6f1fa;
    --navy: #1f558e;
    --brand-dark: #023c5d;
    --brand-light: #02aeff;
    --side-bg: #fbfbfa;
    --side-text: #5f5e5b;
    --side-title: #37352f;
    --side-line: #e9e9e7;
    --side-hover: rgba(55, 53, 47, 0.07);
    --side-active-bg: #025594;
    --side-active-text: #ffffff;
    --connector: #c7c7c4;
    --ok-bg: #f1f9f4;
    --bad-bg: #fdf3f2;
    --flip-bg: rgba(255, 255, 255, 0.92);
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #191919;
    --text: #e6e6e4;
    --text-2: #c9c9c6;
    --muted: #9b9a97;
    --muted-2: #7c7b78;
    --line: #2f2f2f;
    --line-strong: #3a3a3a;
    --grid-line: #4a5663;
    --surface: #202020;
    --card: #202020;
    --link: #4db8ff;
    --accent: #4db8ff;
    --accent-soft: #0f2a3d;
    --side-bg: #1f1f1f;
    --side-text: #a3a29f;
    --side-title: #ececea;
    --side-line: #2b2b2b;
    --side-hover: rgba(255, 255, 255, 0.07);
    --side-active-bg: #e6e6e4;
    --side-active-text: #191919;
    --connector: #4a4a4a;
    --ok-bg: #16281e;
    --bad-bg: #2d1b1b;
    --flip-bg: rgba(32, 32, 32, 0.92);
}

/* основа */
body {
    margin: 0;
    font-family: "Inter", -apple-system, "Helvetica Neue", Arial, sans-serif;
    font-size: 16.5px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--link);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1 {
    margin: 0 0 28px;
    font-size: 56px;
    font-weight: 300;
    letter-spacing: -0.035em;
    line-height: 1.05;
    color: var(--text);
}

h2 {
    margin: 44px 0 14px;
    font-size: 23px;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.3;
}

h3 {
    margin: 32px 0 10px;
    font-size: 18px;
    font-weight: 600;
}

p {
    margin: 0 0 14px;
}

ul,
ol {
    margin: 0 0 16px;
    padding-left: 24px;
}

li {
    margin: 6px 0;
}

strong {
    font-weight: 650;
}

code {
    padding: 2px 6px;
    font-family: Menlo, Consolas, monospace;
    font-size: 0.88em;
    color: #b4442f;
    background: var(--surface);
    border-radius: 4px;
}

html[data-theme="dark"] code {
    color: #e08a75;
}

dt {
    margin-top: 16px;
    font-weight: 650;
}

dd {
    margin: 4px 0 0;
}

table {
    width: 100%;
    margin: 18px 0 22px;
    font-size: 14.5px;
    line-height: 1.5;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
}

th,
td {
    padding: 11px 16px;
    text-align: left;
    vertical-align: top;
    border: 0;
    border-bottom: 1px solid var(--line);
}

th {
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    background: var(--surface);
}

tbody tr:hover td {
    background: var(--surface);
}

tbody tr:last-child td {
    border-bottom: 0;
}

blockquote {
    margin: 18px 0;
    padding: 12px 18px;
    background: var(--accent-soft);
    border-left: 4px solid var(--accent);
    border-radius: 0 8px 8px 0;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* подсказки в тексте, класс ставит app.js */
blockquote.warn {
    background: #fff4e5;
    border-left-color: #e5883a;
}

blockquote.tip {
    background: #e6f7f4;
    border-left-color: #12a594;
}

blockquote.example {
    background: var(--surface);
    border-left-color: var(--muted-2);
}

html[data-theme="dark"] blockquote.warn {
    background: #3a2a17;
}

html[data-theme="dark"] blockquote.tip {
    background: #123430;
}

hr {
    margin: 32px 0;
    border: 0;
    border-top: 1px solid var(--line-strong);
}

/* каркас */
.layout {
    display: flex;
    min-height: 100vh;
}

.page {
    flex: 1;
    min-width: 0;
}

header {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    padding: 14px 40px;
    font-size: 14px;
}

main {
    box-sizing: border-box;
    max-width: 1100px;
    padding: 36px 56px 110px;
}

main > p,
main > ul,
main > ol {
    max-width: 720px;
}

main:has(.doc) {
    max-width: 1180px;
}

main:has(.chart-wrap) {
    max-width: none;
    min-width: 0;
}

/* боковая панель */
nav {
    box-sizing: border-box;
    flex: 0 0 280px;
    height: 100vh;
    position: sticky;
    top: 0;
    overflow-y: auto;
    padding: 20px 10px 28px;
    background: var(--side-bg);
    border-right: 1px solid var(--side-line);
    font-size: 14px;
    line-height: 1.4;
}

.brand {
    display: block;
    margin: 0 0 18px;
    font-size: 17px;
    letter-spacing: -0.01em;
    line-height: 1.25;
    padding: 0;
    overflow: hidden;
    background: var(--navy);
    border-radius: 12px;
}

.brand:hover {
    text-decoration: none;
}

.brand img {
    display: block;
    width: 100%;
    height: auto;
}

.brand span {
    display: block;
    margin: 0;
    padding: 6px 14px 10px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
}

.search {
    margin: 0 0 14px;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul ul {
    margin: 1px 0 4px 17px;
    padding-left: 8px;
    border-left: 1px solid var(--side-line);
}

nav li {
    margin: 1px 0;
}

nav a {
    display: block;
    padding: 5px 10px;
    color: var(--side-text);
    border-radius: 999px;
}

nav a:hover {
    background: var(--side-hover);
    color: var(--side-title);
    text-decoration: none;
}

nav a.active {
    background: var(--side-active-bg);
    color: var(--side-active-text);
    font-weight: 500;
}

/* прочитанные страницы, отметку ставит app.js */
nav a.read::after {
    content: "\2713";
    margin-left: 6px;
    font-size: 12px;
    color: #12a594;
}

/* сворачиваемые разделы */
nav details > summary {
    position: relative;
    list-style: none;
    cursor: pointer;
}

nav details > summary::-webkit-details-marker {
    display: none;
}

nav details > summary::before {
    content: "";
    position: absolute;
    left: 6px;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -4px;
    border-right: 1.5px solid var(--muted-2);
    border-bottom: 1.5px solid var(--muted-2);
    transform: rotate(-45deg);
    transition: transform 0.15s;
}

nav details[open] > summary::before {
    transform: rotate(45deg);
}

nav li > a,
nav details > summary > a {
    margin-left: 18px;
}

nav > ul > li > a,
nav > ul > li > details > summary > a {
    font-weight: 600;
    color: var(--side-title);
}

nav > ul > li > a.active,
nav > ul > li > details > summary > a.active {
    color: var(--side-active-text);
}

/* поля поиска */
.search input,
.search-big input {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 12px;
    font: inherit;
    font-size: 14px;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.search input {
    padding-left: 16px;
    border-radius: 999px;
}

.search input:focus,
.search-big input:focus {
    outline: 2px solid var(--accent-soft);
    border-color: var(--accent);
}

/* кнопки */
.pill,
.theme-btn,
header a,
.read-btn,
.pager a,
.org-buttons button,
.fc-buttons button,
.quiz-submit {
    display: inline-block;
    padding: 7px 18px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    background: transparent;
    border: 1.5px solid var(--accent);
    border-radius: 999px;
    cursor: pointer;
}

.pill::after,
header a::after {
    content: " \2197";
}

.quiz-submit,
.search-big button,
.login button {
    color: #fff;
    background: var(--brand-light);
    border-color: var(--brand-light);
}

.pill:hover,
.theme-btn:hover,
header a:hover,
.read-btn:hover,
.pager a:hover,
.org-buttons button:hover,
.fc-buttons button:hover,
.quiz-submit:hover,
.read-btn.done {
    color: #fff;
    background: var(--accent);
    border-color: var(--accent);
    text-decoration: none;
}

.search-big button:hover,
.login button:hover {
    background: var(--accent);
    border-color: var(--accent);
}

/* в тёмной теме на светло-голубом заливе нужен тёмный текст */
html[data-theme="dark"] .pill:hover,
html[data-theme="dark"] .theme-btn:hover,
html[data-theme="dark"] header a:hover,
html[data-theme="dark"] .read-btn:hover,
html[data-theme="dark"] .pager a:hover,
html[data-theme="dark"] .org-buttons button:hover,
html[data-theme="dark"] .fc-buttons button:hover,
html[data-theme="dark"] .read-btn.done {
    color: #06222f;
}

/* кнопки в шапке тёмные */
.theme-btn,
header a {
    padding: 4px 14px;
    font-size: 13px;
    border-width: 1px;
    color: #fff;
    background: #1d1f26;
    border-color: #1d1f26;
}

html[data-theme="dark"] .theme-btn,
html[data-theme="dark"] header a {
    color: #191919;
    background: #e6e6e4;
    border-color: #e6e6e4;
}

.pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 40px;
}

/* страница раздела */
.doc {
    display: flex;
    align-items: flex-start;
    gap: 48px;
}

.doc-main {
    flex: 1;
    min-width: 0;
}

.crumbs {
    margin: 0 0 28px;
    font-size: 13px;
    color: var(--muted);
}

.crumbs a {
    display: inline-block;
    padding: 4px 16px;
    margin: 0 6px 0 0;
    font-size: 15px;
    color: var(--text);
    border: 1px solid var(--text);
    border-radius: 999px;
}

.crumbs a:hover {
    color: #fff;
    background: var(--text);
    text-decoration: none;
}

html[data-theme="dark"] .crumbs a:hover {
    color: var(--bg);
}

.text > p,
.text > ul,
.text > ol {
    max-width: 720px;
}

.text h2 {
    margin: 40px 0 12px;
    font-size: 26px;
    font-weight: 600;
    color: var(--brand-dark);
}

html[data-theme="dark"] .text h2 {
    color: var(--text);
}

.text h3 {
    font-size: 19px;
}

.text p,
.text li {
    font-size: 17px;
}

.text li {
    margin: 4px 0;
}

.empty {
    padding: 16px 20px;
    color: var(--muted);
    background: var(--surface);
    border: 1px dashed var(--line-strong);
    border-radius: 10px;
}

.subsections {
    margin-top: 16px;
    padding-left: 20px;
}

.subsections li {
    padding: 2px 0;
}

.read-btn {
    margin: 36px 0 0;
}

.pager {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid var(--line);
}

.pager a {
    max-width: 48%;
    border-radius: 24px;
}

.pager small {
    display: block;
    font-size: 12px;
    color: var(--muted);
}

.pager .next {
    margin-left: auto;
    text-align: right;
}

/* оглавление справа, наполняет app.js */
.toc {
    flex: 0 0 200px;
    position: sticky;
    top: 24px;
    font-size: 13px;
    line-height: 1.4;
}

.toc[hidden] {
    display: none;
}

.toc p {
    margin: 0 0 8px;
    font-weight: 600;
    color: var(--muted);
}

.toc ul {
    margin: 0;
    padding: 0;
    list-style: none;
    border-left: 2px solid var(--line);
}

.toc li {
    margin: 0;
}

.toc li.sub {
    padding-left: 12px;
}

.toc a {
    display: block;
    padding: 4px 12px;
    margin-left: -2px;
    color: var(--muted);
    border-left: 2px solid transparent;
}

.toc li.sub a {
    padding-left: 14px;
}

.toc a:hover {
    color: var(--text);
    text-decoration: none;
}

.toc a.on {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 600;
}

/* чек-лист, пункты делает app.js */
.task {
    list-style: none;
    margin-left: -24px;
}

.task label {
    display: block;
    padding: 10px 14px;
    cursor: pointer;
    border: 1px solid var(--line);
    border-radius: 8px;
}

.task label:hover {
    background: var(--surface);
}

.task input {
    margin-right: 10px;
    width: 17px;
    height: 17px;
    vertical-align: -3px;
    accent-color: #12a594;
}

.task:has(input:checked) label {
    color: var(--muted);
    text-decoration: line-through;
    background: var(--surface);
}

.progress {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 720px;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--muted);
}

.progress-line {
    flex: 1;
    height: 8px;
    background: var(--line);
    border-radius: 4px;
    overflow: hidden;
}

.progress-line div {
    width: 0;
    height: 100%;
    background: #12a594;
    transition: width 0.2s;
}

/* главная */
.display {
    margin: 24px 0 28px;
    font-size: 72px;
    letter-spacing: -0.04em;
    line-height: 1.02;
}

.lead {
    max-width: 640px;
    margin: 0 0 28px;
    font-size: 20px;
    line-height: 1.55;
    color: var(--muted);
}

.band {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 12px 0 64px;
    color: #fff;
    background: var(--navy);
    border-radius: 32px;
    overflow: hidden;
}

.band-text {
    padding: 48px 52px;
}

.band h2 {
    margin: 0 0 28px;
    font-size: 34px;
    font-weight: 300;
    line-height: 1.2;
    color: #fff;
}

.band ol {
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: n;
}

.band li {
    margin: 0;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    counter-increment: n;
}

.band li:first-child {
    padding-top: 0;
}

.band li::before {
    content: "0" counter(n);
    display: inline-block;
    width: 36px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

.band a {
    font-size: 18px;
    color: #fff;
}

.band a::after {
    content: " \2197";
}

.band a:hover {
    color: var(--brand-light);
    text-decoration: none;
}

.band img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.section-title {
    margin: 0;
    padding-bottom: 20px;
    font-size: 40px;
    font-weight: 300;
    letter-spacing: -0.03em;
    border-bottom: 2px solid var(--accent);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.home-card {
    padding: 28px 28px 24px 0;
    border-bottom: 1px solid var(--grid-line);
}

.home-card:nth-child(3n+2),
.home-card:nth-child(3n) {
    padding-left: 28px;
    border-left: 1px solid var(--grid-line);
}

.home-card h2 {
    margin: 0 0 14px;
    font-size: 22px;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.home-card h2 a {
    color: var(--accent);
}

.home-card ul {
    margin: 0;
    padding-left: 0;
    list-style: none;
    font-size: 14px;
}

.home-card li {
    margin: 4px 0;
}

.home-card li a {
    color: var(--muted);
}

.home-card li a:hover {
    color: var(--link);
}

/* оргструктура */
.hint {
    margin: 0 0 12px;
    font-size: 14px;
    color: var(--muted);
}

.org-buttons {
    margin: 0 0 20px;
}

.chart-wrap {
    overflow-x: auto;
    padding-bottom: 24px;
}

/* дерево слева направо */
.h-tree {
    list-style: none;
    margin: 0;
    padding: 0;
}

.h-row {
    display: flex;
    align-items: center;
}

.h-children {
    position: relative;
    margin-left: 36px;
}

.h-children::before {
    content: "";
    position: absolute;
    left: -36px;
    top: 50%;
    width: 36px;
    border-top: 2px solid var(--connector);
}

.h-children > .h-tree > li {
    position: relative;
    padding: 6px 0 6px 36px;
}

.h-children > .h-tree > li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 36px;
    border-top: 2px solid var(--connector);
}

.h-children > .h-tree > li::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    border-left: 2px solid var(--connector);
}

.h-children > .h-tree > li:first-child::after {
    top: 50%;
}

.h-children > .h-tree > li:last-child::after {
    bottom: 50%;
}

.h-children > .h-tree > li:only-child::after {
    display: none;
}

/* цвета департаментов */
.c0 { --accent: #4b5563; --tint: #eef0f3; }
.c1 { --accent: #2f6fe4; --tint: #e7f0ff; }
.c2 { --accent: #12a594; --tint: #e0f6f3; }
.c3 { --accent: #e5883a; --tint: #fdf0e1; }
.c4 { --accent: #8b5cf6; --tint: #f0eaff; }
.c5 { --accent: #d9488a; --tint: #fde8f1; }

html[data-theme="dark"] .c0 { --tint: #2a2d33; }
html[data-theme="dark"] .c1 { --tint: #1c2a47; }
html[data-theme="dark"] .c2 { --tint: #123430; }
html[data-theme="dark"] .c3 { --tint: #3a2a17; }
html[data-theme="dark"] .c4 { --tint: #2b2347; }
html[data-theme="dark"] .c5 { --tint: #3d1f2f; }

.node {
    position: relative;
    box-sizing: border-box;
    min-width: 170px;
    max-width: 280px;
    background: var(--card);
    border: 1px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    font-size: 14px;
    overflow: hidden;
}

.node[open] {
    max-width: none;
}

.node > summary {
    display: block;
    padding: 10px 14px;
    list-style: none;
    font-weight: 600;
    color: #fff;
    background: var(--accent);
    cursor: pointer;
}

.node > summary::-webkit-details-marker {
    display: none;
}

.node > summary::before {
    content: "\25B8";
    margin-right: 6px;
    color: #fff;
}

.node[open] > summary::before {
    content: "\25BE";
}

.node > summary:hover {
    filter: brightness(1.08);
}

.node-body {
    padding: 12px;
}

/* стрелка у рамки */
.h-children .node::after {
    content: "";
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 9px solid var(--connector);
}

.heads {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/* карточка руководителя, переворачивается */
.card {
    width: 148px;
    height: 222px;
    perspective: 900px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.card.flipped .card-inner {
    transform: rotateY(180deg);
}

.card-front,
.card-back {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    padding: 12px;
    border-radius: 10px;
    background: var(--card);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    backface-visibility: hidden;
    overflow: auto;
}

.card-front {
    border-top: 4px solid var(--accent);
}

.card-back {
    font-size: 14px;
    background: var(--tint);
    transform: rotateY(180deg);
}

.card-back p {
    margin: 6px 0;
}

.card:hover .card-front {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.card-front img,
.no-photo {
    width: 100%;
    height: 112px;
    border-radius: 6px;
}

.card-front img {
    object-fit: cover;
}

.no-photo {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
    background: var(--accent);
}

.card-name {
    margin: 10px 0 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    color: var(--text);
}

.card-job {
    margin: 2px 0 0;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
    color: var(--muted);
}

.muted {
    color: var(--muted-2);
}

.flip {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    width: 26px;
    height: 26px;
    padding: 0;
    font-size: 16px;
    line-height: 1;
    color: var(--text-2);
    background: var(--flip-bg);
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    cursor: pointer;
}

.flip:hover {
    background: var(--card);
    border-color: var(--accent);
}

.staff-title {
    margin: 12px 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
}

.staff {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 240px;
    overflow: auto;
    font-size: 13px;
}

.staff li {
    padding: 2px 0;
}

/* флеш-карты */
.fc-box {
    max-width: 640px;
}

.fc-card {
    height: 260px;
    perspective: 900px;
    cursor: pointer;
}

.fc-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
}

.fc-card.flipped .fc-inner {
    transform: rotateY(180deg);
}

.fc-face {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 20px;
    line-height: 1.4;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    background: var(--card);
    backface-visibility: hidden;
    overflow: auto;
}

.fc-back {
    font-size: 17px;
    background: var(--surface);
    transform: rotateY(180deg);
}

.fc-count {
    margin: 14px 0 8px;
    font-size: 14px;
    color: var(--muted);
}

.fc-buttons button {
    margin-right: 8px;
}

/* тест */
.quiz-result {
    padding: 14px 18px;
    font-size: 20px;
    font-weight: 600;
    color: var(--accent);
    background: var(--accent-soft);
    border-radius: 10px;
}

.quiz-q {
    max-width: 760px;
    margin: 16px 0;
    padding: 18px 20px;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(2, 60, 93, 0.06);
}

.quiz-q.ok {
    border-color: #3f8f5f;
    border-left-color: #12a594;
    background: var(--ok-bg);
}

.quiz-q.bad {
    border-color: #c0524f;
    border-left-color: #d9484a;
    background: var(--bad-bg);
}

.quiz-title {
    margin: 0 0 10px;
    font-weight: 600;
}

.quiz-opt {
    display: block;
    margin: 6px 0;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    cursor: pointer;
}

.quiz-opt:hover,
.quiz-opt:has(input:checked) {
    background: var(--accent-soft);
    border-color: var(--accent);
}

.quiz-opt input {
    margin-right: 8px;
    accent-color: var(--accent);
}

.quiz-exp {
    margin: 10px 0 0;
    font-size: 14px;
    color: var(--text-2);
}

/* поиск */
.search-big {
    display: flex;
    gap: 8px;
    max-width: 560px;
    margin-bottom: 8px;
}

.search-big input {
    font-size: 16px;
}

.search-big button {
    padding: 0 20px;
    font: inherit;
    font-weight: 600;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.found {
    padding: 0;
    list-style: none;
    max-width: 720px;
}

.found li {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.found p {
    margin: 4px 0 0;
    font-size: 14px;
    color: var(--muted);
}

/* вход */
.login-page {
    background: var(--surface);
}

.login {
    box-sizing: border-box;
    max-width: 360px;
    margin: 12vh auto 0;
    padding: 32px;
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(2, 60, 93, 0.08);
}

.login h1 {
    margin: 0 0 18px;
    font-size: 26px;
}

.login-logo {
    display: block;
    width: 100%;
    margin: 0 0 22px;
    border-radius: 10px;
}

.login label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--muted);
}

.login input {
    box-sizing: border-box;
    width: 100%;
    margin: 0 0 14px;
    padding: 9px 12px;
    font: inherit;
    color: var(--text);
    background: var(--card);
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.login button {
    width: 100%;
    padding: 10px;
    font: inherit;
    font-weight: 600;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.error {
    color: #d9484a;
}

.login .hint {
    margin: 0 0 14px;
    font-size: 14px;
    color: var(--muted);
}

/* nda */
.login.nda {
    max-width: 720px;
    margin-top: 6vh;
}

.nda-text {
    max-height: 50vh;
    margin-bottom: 16px;
    padding: 12px 16px;
    overflow-y: auto;
    font-size: 14px;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
}

.login .nda-agree {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    color: var(--text);
    font-size: 15px;
}

.login .nda-agree input {
    width: auto;
    margin: 0;
}

/* узкие экраны */
@media (max-width: 900px) {
    .display {
        font-size: 48px;
    }

    .band {
        grid-template-columns: 1fr;
    }

    .band img {
        min-height: 0;
        height: 240px;
    }

    .home-grid {
        grid-template-columns: 1fr;
    }

    .home-card:nth-child(n) {
        padding-left: 0;
        border-left: 0;
    }
}
