/* Кабинет сотрудника. Образ — пропуск: на главной он крупный и яркий (тёмно-фиалковый, с защитной сеткой),
   всё остальное — тихое и ровное. Заголовки — Unbounded, текст — Manrope.
   Цвета по смыслу: фиалковый — действия, подсолнух — «ждёт вас», коралл — просрочено, бирюза — сделано.
   Без сборки: файл отдаётся как есть. */

@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("/fonts/manrope-cyrillic-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Manrope";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("/fonts/manrope-latin-wght-normal.woff2") format("woff2-variations");
    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: "Unbounded";
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url("/fonts/unbounded-cyrillic-wght-normal.woff2") format("woff2-variations");
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: "Unbounded";
    font-style: normal;
    font-display: swap;
    font-weight: 200 900;
    src: url("/fonts/unbounded-latin-wght-normal.woff2") format("woff2-variations");
    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 {
    --bg: #eceef6;
    --surface: #ffffff;
    --ink: #1a1838;
    --muted: #5d5f7a;
    --line: #dcdfeb;
    --accent: #5a3ff2;
    --accent-ink: #ffffff;
    --accent-soft: #ebe7ff;
    --signal: #ffc533;
    --signal-ink: #1a1838;
    --signal-soft: #fff3cf;
    --attention: #d63a2f;
    --attention-soft: #fde8e5;
    --ok: #0d8f72;
    --ok-soft: #dcf4ec;
    --mid: #e8a317;
    /* пропуск: свой тёмный фон в обеих темах */
    --pass: #221d4f;
    --pass-2: #3a2a8c;
    --pass-ink: #f4f2ff;
    --pass-muted: #b9b3e6;
    --radius-xl: 24px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 1px 2px rgb(26 24 56 / 0.06), 0 8px 24px -12px rgb(26 24 56 / 0.18);
    --shadow-pass: 0 2px 4px rgb(34 29 79 / 0.2), 0 24px 48px -20px rgb(58 42 140 / 0.55);
    --font-display: "Unbounded", "Manrope", system-ui, sans-serif;
    --ease: cubic-bezier(0.16, 1, 0.3, 1);
    color-scheme: light;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #121124;
        --surface: #1c1a33;
        --ink: #ecebf7;
        --muted: #a3a2c0;
        --line: #2e2c4a;
        --accent: #a596ff;
        --accent-ink: #15132b;
        --accent-soft: #2a2552;
        --signal: #ffcf5c;
        --signal-ink: #1a1838;
        --signal-soft: #3a3016;
        --attention: #ff8a7a;
        --attention-soft: #3d1f1f;
        --ok: #4fd1ad;
        --ok-soft: #143229;
        --mid: #f2c14e;
        --pass: #2a2366;
        --pass-2: #4632a8;
        --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 8px 24px -12px rgb(0 0 0 / 0.5);
        --shadow-pass: 0 2px 4px rgb(0 0 0 / 0.35), 0 24px 48px -20px rgb(0 0 0 / 0.7);
        color-scheme: dark;
    }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font: 400 17px/1.55 "Manrope", system-ui, sans-serif;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.2; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-family: var(--font-display); font-weight: 600; font-size: 1.6rem; letter-spacing: -0.02em; }
h2 { font-size: 1.2rem; font-weight: 800; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.nums { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- значки ---------- */
.ic { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; stroke-width: 1.8; }
h1 .ic { width: 0.95em; height: 0.95em; margin-right: 0.5rem; color: var(--accent); vertical-align: -0.1em; }
.btn .ic { width: 1.1em; height: 1.1em; }

/* ---------- каркас ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); }
.top-inner { max-width: 60rem; margin: 0 auto; padding: 0.7rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
    letter-spacing: -0.01em; color: var(--ink); text-decoration: none; margin-right: auto; white-space: nowrap; }
.brand-mark {
    width: 2rem; height: 2rem; border-radius: 10px; display: grid; place-items: center; position: relative;
    background: linear-gradient(140deg, var(--pass-2), var(--pass)); color: var(--pass-ink); font-weight: 700; font-size: 0.95rem;
}
/* та же «прорезь», что у пропуска */
.brand-mark::before { content: ""; position: absolute; top: 3px; left: 50%; width: 0.6rem; height: 0.18rem; margin-left: -0.3rem;
    border-radius: 9px; background: var(--bg); }
.nav { display: flex; gap: 0.15rem; background: var(--surface); padding: 0.25rem; border-radius: 999px; box-shadow: var(--shadow); }
.nav a { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--muted); text-decoration: none; padding: 0.45rem 0.8rem;
    border-radius: 999px; font-weight: 700; font-size: 0.92rem; white-space: nowrap; transition: color 0.15s, background-color 0.15s; }
.nav a .ic { width: 1.05rem; height: 1.05rem; }
.nav a:hover { color: var(--ink); background: var(--bg); }
.nav a[aria-current="page"] { background: var(--ink); color: var(--surface); }
.logout { margin: 0; }
.logout button { display: inline-flex; align-items: center; gap: 0.35rem; background: none; border: 0; color: var(--muted);
    font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer; padding: 0.45rem 0.5rem; border-radius: 999px; }
.logout button:hover { color: var(--ink); background: var(--surface); }

main { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 6.5rem; }
.page-head { margin: 0.75rem 0 1.5rem; }
.page-head p { margin-top: 0.5rem; color: var(--muted); max-width: 38rem; }
.back { display: inline-flex; align-items: center; gap: 0.3rem; margin-bottom: 1rem; font-size: 0.95rem; font-weight: 600; text-decoration: none; }
.back::before { content: "‹"; font-size: 1.3em; line-height: 1; margin-top: -0.1em; }
.back:hover { text-decoration: underline; }

@media (min-width: 721px) and (max-width: 1000px) {
    .nav a span, .logout button span { display: none; }
    .nav a { padding: 0.5rem 0.65rem; }
}
/* на телефоне меню — внизу экрана, под большим пальцем */
@media (max-width: 720px) {
    /* размытие фона делает шапку «рамкой» для fixed-меню — на телефоне шапка обычная */
    .top { position: static; backdrop-filter: none; -webkit-backdrop-filter: none; background: none; }
    .top-inner { padding: 0.6rem 1rem; }
    .nav {
        position: fixed; left: 0.6rem; right: 0.6rem; bottom: calc(0.6rem + env(safe-area-inset-bottom)); z-index: 10;
        justify-content: space-around; padding: 0.3rem; border-radius: 20px;
        box-shadow: 0 10px 30px -10px rgb(26 24 56 / 0.35), 0 0 0 1px var(--line);
    }
    .nav a { flex: 1; flex-direction: column; gap: 0.15rem; font-size: 0.7rem; padding: 0.45rem 0.2rem; text-align: center;
        white-space: normal; line-height: 1.15; border-radius: 14px; }
    .nav a .ic { width: 1.35rem; height: 1.35rem; }
    .logout button span { display: none; }
    h1 { font-size: 1.35rem; }
}

/* ---------- блоки ---------- */
.panel { background: var(--surface); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); }
.stack > * + * { margin-top: 1rem; }
.stack > input[type="hidden"] + * { margin-top: 0; }
.stack-lg > * + * { margin-top: 2rem; }
.notice { display: flex; gap: 0.6rem; align-items: center; background: var(--accent-soft); border-radius: var(--radius-sm);
    padding: 0.75rem 1rem; margin-bottom: 1.25rem; font-weight: 600; }
.notice .ic { color: var(--accent); }
.error-box { background: var(--attention-soft); border-left: 4px solid var(--attention); border-radius: var(--radius-sm);
    padding: 0.75rem 1rem; margin-bottom: 1.25rem; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 0.75rem; }
.section-head a { font-weight: 700; text-decoration: none; }
.section-head a:hover { text-decoration: underline; }

/* строки списка: одна линия — одна вещь; весь список — одна карточка */
.rows { list-style: none; margin: 0; padding: 0.25rem 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.rows > li + li { border-top: 1px solid var(--line); }
.row { display: flex; align-items: baseline; gap: 1rem; padding: 0.9rem 1.1rem; color: inherit; text-decoration: none; }
a.row { transition: background-color 0.15s; }
a.row:hover { background: color-mix(in srgb, var(--accent-soft) 55%, transparent); }
a.row:hover .row-title { color: var(--accent); }
.rows > li:first-child a.row { border-radius: var(--radius) var(--radius) 0 0; }
.rows > li:last-child a.row { border-radius: 0 0 var(--radius) var(--radius); }
.rows > li:only-child a.row { border-radius: var(--radius); }
.row-title { font-weight: 700; }
.row-main { flex: 1; min-width: 0; }
.row-side { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.snippet { color: var(--muted); font-size: 0.95rem; margin-top: 0.2rem; }
.snippet mark { background: var(--signal-soft); color: inherit; border-radius: 3px; padding: 0 0.15em; box-shadow: inset 0 -2px 0 var(--signal); }
.tag-attention { color: var(--attention); font-weight: 700; }
.tag-ok { color: var(--ok); font-weight: 700; display: inline-flex; align-items: center; gap: 0.3rem; }
.tag-wait { color: var(--muted); font-weight: 600; display: inline-flex; align-items: center; gap: 0.35rem; }

/* ================= главная: пропуск ================= */
.pass {
    position: relative; overflow: hidden; isolation: isolate;
    padding: 2.1rem 1.5rem 1.4rem; border-radius: var(--radius-xl);
    color: var(--pass-ink); box-shadow: var(--shadow-pass);
    background:
        radial-gradient(120% 90% at 100% 0%, rgb(255 197 51 / 0.22), transparent 55%),
        linear-gradient(150deg, var(--pass-2) 0%, var(--pass) 62%);
}
/* защитная сетка, как на настоящем пропуске */
.pass::before {
    content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0.16;
    background:
        repeating-radial-gradient(circle at 115% 120%, transparent 0 14px, rgb(255 255 255 / 0.55) 14px 15px),
        repeating-linear-gradient(-35deg, transparent 0 9px, rgb(255 255 255 / 0.25) 9px 10px);
    -webkit-mask-image: linear-gradient(200deg, #000 10%, transparent 75%);
    mask-image: linear-gradient(200deg, #000 10%, transparent 75%);
}
/* прорезь под ленту */
.pass::after {
    content: ""; position: absolute; top: 0.75rem; left: 50%; width: 3.6rem; height: 0.55rem; margin-left: -1.8rem;
    border-radius: 99px; background: var(--bg); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.25);
}
.pass-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-size: 0.85rem; font-weight: 700; }
.pass-kicker { display: inline-flex; align-items: center; gap: 0.45rem; color: var(--signal); }
.pass-kicker .ic { width: 1.25rem; height: 1.25rem; }
.pass-org { color: var(--pass-muted); font-weight: 600; text-align: right; }
.pass-main { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-top: 1.6rem; }
.pass-who { min-width: 0; }
.hello { font-family: var(--font-display); font-size: clamp(2.1rem, 8vw, 3.4rem); font-weight: 700; letter-spacing: -0.035em;
    line-height: 1; overflow-wrap: anywhere; }
.pass-role { color: var(--pass-muted); margin-top: 0.6rem; font-weight: 500; }
.pass-photo {
    flex: none; width: 4.6rem; height: 5.4rem; border-radius: 14px; display: grid; place-items: center;
    font-family: var(--font-display); font-weight: 600; font-size: 1.45rem; letter-spacing: -0.02em;
    background: rgb(255 255 255 / 0.1); border: 1.5px solid rgb(255 255 255 / 0.28); color: var(--pass-ink);
}
.pass-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem;
    margin-top: 1.4rem; padding-top: 1rem; border-top: 1px dashed rgb(255 255 255 / 0.28); }
.stamp {
    display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 800; font-size: 0.9rem;
    background: var(--signal); color: var(--signal-ink); padding: 0.3rem 0.8rem; border-radius: 999px;
}
.pass-since { color: var(--pass-muted); font-size: 0.85rem; }
@media (max-width: 480px) {
    .pass { padding: 2rem 1.15rem 1.2rem; }
    .pass-photo { width: 3.6rem; height: 4.3rem; font-size: 1.15rem; }
    .pass-org { display: none; }
}
/* один выразительный момент: пропуск выезжает, как из держателя */
@media (prefers-reduced-motion: no-preference) {
    .pass { animation: pass-in 0.7s var(--ease) both; transform-origin: 50% 0; }
}
@keyframes pass-in { from { opacity: 0.001; transform: translateY(-14px) rotate(-1.2deg); } to { opacity: 1; transform: none; } }

/* что ждёт: значок + текст, тон по важности */
.waiting { display: flex; flex-direction: column; gap: 0.5rem; }
.waiting a {
    display: flex; align-items: center; gap: 0.85rem; padding: 0.7rem 1rem 0.7rem 0.75rem; border-radius: var(--radius);
    color: var(--ink); text-decoration: none; font-weight: 700; transition: transform 0.15s var(--ease), box-shadow 0.15s;
}
.waiting a::after { content: "›"; margin-left: auto; font-size: 1.4rem; line-height: 1; color: currentColor; opacity: 0.45; }
.waiting a:hover { transform: translateX(3px); }
.waiting-icon { width: 2.3rem; height: 2.3rem; border-radius: 11px; display: grid; place-items: center; flex: none; }
.waiting a.tone-attention { background: var(--signal); color: var(--signal-ink); }
.waiting a.tone-attention .waiting-icon { background: rgb(255 255 255 / 0.55); }
.waiting a.tone-calm { background: var(--accent-soft); }
.waiting a.tone-calm .waiting-icon { background: var(--surface); color: var(--accent); }
.waiting a.tone-quiet { background: var(--surface); box-shadow: var(--shadow); font-weight: 600; }
.waiting a.tone-quiet .waiting-icon { background: var(--bg); color: var(--muted); }

/* адаптация на главной: кольцо прогресса */
.plan-card { display: grid; grid-template-columns: auto 1fr; gap: 1.25rem; align-items: start; }
.plan-body { min-width: 0; }
.plan-ring { position: relative; width: 4.75rem; height: 4.75rem; }
.plan-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--accent-soft); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--accent); stroke-width: 8; stroke-linecap: round; }
.plan-ring > span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-weight: 600; font-size: 0.95rem; }
.rows.compact { margin-top: 0.75rem; background: none; box-shadow: none; padding: 0; border-radius: 0; border-top: 1px solid var(--line); }
.rows.compact .row { padding: 0.65rem 0.1rem; }
.rows.compact a.row, .rows.compact > li a.row { background: none; border-radius: 0; }
@media (max-width: 480px) { .plan-card { grid-template-columns: 1fr; } }

/* свежие материалы: плитки с цветом раздела */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.75rem; }
.tile {
    position: relative; display: flex; flex-direction: column; gap: 0.5rem; padding: 1.1rem 1rem 1rem; border-radius: var(--radius);
    background: var(--surface); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; overflow: hidden;
    transition: transform 0.2s var(--ease), box-shadow 0.2s;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: hsl(var(--hue) 70% 58%); }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow), 0 0 0 2px hsl(var(--hue) 70% 58% / 0.5); }
.tile-cat { font-size: 0.8rem; font-weight: 700; color: hsl(var(--hue) 55% 38%); }
@media (prefers-color-scheme: dark) { .tile-cat { color: hsl(var(--hue) 70% 74%); } }
.tile-title { font-weight: 700; line-height: 1.3; }
.dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: hsl(var(--hue, 250) 70% 58%); display: inline-block; flex: none; }
.row-side.cat { display: inline-flex; align-items: center; gap: 0.4rem; }

/* пустые экраны */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 0.75rem; padding: 2.5rem 1rem;
    border: 2px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty-icon { width: 3.4rem; height: 3.4rem; border-radius: 18px; display: grid; place-items: center; background: var(--accent-soft);
    color: var(--accent); transform: rotate(-6deg); }
.empty-icon .ic { width: 1.6rem; height: 1.6rem; transform: rotate(6deg); }
.empty p { max-width: 28rem; }

/* ---------- формы ---------- */
label.field { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.hint { color: var(--muted); font-size: 0.875rem; margin-top: 0.4rem; }
input[type="text"], input[type="search"], textarea, select {
    width: 100%; font: inherit; color: var(--ink); background: var(--surface);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm); padding: 0.7rem 0.85rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 0.75; }
input:hover, textarea:hover, select:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); }
input:focus, textarea:focus, select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { min-height: 7rem; resize: vertical; display: block; }
.code-input { font-family: var(--font-display); font-size: 1.6rem; font-weight: 500; letter-spacing: 0.3em; text-align: center;
    font-variant-numeric: tabular-nums; max-width: 15rem; padding-left: 1.1rem; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
    font: inherit; font-weight: 800; background: var(--accent); color: var(--accent-ink);
    border: 0; border-radius: var(--radius-sm); padding: 0.72rem 1.25rem; cursor: pointer; text-decoration: none;
    box-shadow: 0 1px 0 rgb(255 255 255 / 0.2) inset, 0 6px 16px -8px color-mix(in srgb, var(--accent) 80%, transparent);
    transition: transform 0.12s var(--ease), filter 0.15s;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-quiet { background: var(--surface); color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--line); }
.btn-quiet:hover { box-shadow: inset 0 0 0 1.5px var(--accent); filter: none; }
.btn-small { padding: 0.4rem 0.8rem; font-size: 0.875rem; }
.field-error { color: var(--attention); font-size: 0.9rem; font-weight: 600; margin-top: 0.4rem; }
.search { display: flex; gap: 0.5rem; }
.search input { flex: 1; min-width: 0; }
@media (max-width: 420px) { .search .btn { padding: 0.72rem 0.9rem; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.85rem; }
.chips a { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.3rem 0.8rem; border-radius: 999px;
    background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; color: var(--ink);
    font-size: 0.9rem; font-weight: 600; }
.chips a:hover { box-shadow: inset 0 0 0 1.5px var(--accent); }
.chips a[aria-current="true"] { background: var(--ink); color: var(--surface); box-shadow: none; }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 1.25rem; }
.pager a { font-weight: 700; }

/* ---------- вход: пустой пропуск ждёт вашего имени ---------- */
.login {
    position: relative; max-width: 27rem; margin: 9vh auto 0; padding: 2.6rem 1.6rem 1.8rem;
    border-radius: var(--radius-xl); box-shadow: var(--shadow-pass);
    background: linear-gradient(var(--pass-2) 0 0.5rem, var(--surface) 0.5rem);
}
.login::before {
    content: ""; position: absolute; top: 1.1rem; left: 50%; width: 3.6rem; height: 0.55rem; margin-left: -1.8rem;
    border-radius: 99px; background: var(--bg); box-shadow: inset 0 1px 2px rgb(0 0 0 / 0.15);
}
.login h1 { margin-bottom: 0.6rem; font-size: 1.55rem; }
.login .lead { color: var(--muted); margin-bottom: 1.5rem; }
.login .btn { width: 100%; }
@media (max-width: 480px) { .login { margin-top: 4vh; padding: 2.4rem 1.2rem 1.5rem; } }

/* ---------- статья ---------- */
article.panel { padding: 1.6rem 1.5rem; }
@media (max-width: 480px) { article.panel { padding: 1.25rem 1.1rem; } }
.article { line-height: 1.7; }
.article h2 { margin: 1.75rem 0 0.5rem; }
.article h3 { margin: 1.25rem 0 0.4rem; }
.article p, .article ul, .article ol { margin: 0.6rem 0; }
.article ul, .article ol { padding-left: 1.4rem; }
.article li + li { margin-top: 0.25rem; }
.article li::marker { color: var(--accent); font-weight: 700; }
.article code { background: var(--accent-soft); padding: 0.1em 0.35em; border-radius: 4px; font-size: 0.92em; }
.article blockquote { margin: 1rem 0; padding: 0.6rem 1rem; border-left: 4px solid var(--signal); background: var(--signal-soft); border-radius: 0 8px 8px 0; }
.article table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.article th, .article td { border: 1px solid var(--line); padding: 0.4rem 0.6rem; text-align: left; }
.read-box { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px dashed var(--line); }
.read-box form { margin: 0; }
.read-mark { margin-left: 0.6rem; }

/* ---------- адаптация: сводка, люди, периоды, шаги-путь ---------- */
.summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 0.5rem; }
.summary-num { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; line-height: 1; letter-spacing: -0.03em; }
.people { display: flex; flex-wrap: wrap; gap: 0.75rem 1.5rem; font-size: 0.95rem; }
.person { display: inline-flex; align-items: center; gap: 0.6rem; line-height: 1.25; font-weight: 600; }
.person .small { font-weight: 500; }
.avatar { width: 2.4rem; height: 2.4rem; border-radius: 12px; display: grid; place-items: center; font-weight: 800;
    background: var(--accent-soft); color: var(--accent); }
.period { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; color: var(--muted); margin: 2rem 0 0.5rem; letter-spacing: -0.01em; }
.steps { list-style: none; margin: 0; padding: 0; position: relative; }
/* линия пути — через все шаги периода */
.steps::before { content: ""; position: absolute; left: 0.83rem; top: 1.4rem; bottom: 1.4rem; width: 2px; background: var(--line); border-radius: 2px; }
.step { position: relative; padding: 0.9rem 0 0.9rem 2.8rem; }
.step + .step { border-top: 1px solid var(--line); }
.step.is-done .step-title { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line); text-decoration-thickness: 2px; }
.step-title { font-weight: 700; }
.step-meta { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; font-size: 0.875rem; color: var(--muted); margin-top: 0.2rem; }
.step-meta .ic { width: 0.95em; height: 0.95em; margin-right: 0.2rem; }
.step-desc { font-size: 0.95rem; margin-top: 0.35rem; white-space: pre-line; }
.step form { margin-top: 0.6rem; }
.step-dot {
    position: absolute; left: 0; top: 0.95rem; width: 1.7rem; height: 1.7rem; border-radius: 50%;
    display: grid; place-items: center; border: 2px solid var(--line); background: var(--bg); color: var(--muted);
}
.step-dot .ic { width: 0.95rem; height: 0.95rem; stroke-width: 2.4; }
.step.is-done .step-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.step.is-late .step-dot { border-color: var(--attention); background: var(--attention-soft); }
.step.is-meeting:not(.is-done) .step-dot { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.step:target { background: linear-gradient(90deg, var(--signal-soft), transparent 80%); border-radius: var(--radius-sm); }

/* ---------- опрос ---------- */
.q { border: 0; margin: 0; padding: 0; min-width: 0; }
/* legend по умолчанию садится на рамку fieldset — делаем его обычным заголовком блока */
.q legend { float: left; width: 100%; font-weight: 800; font-size: 1.05rem; padding: 0; margin-bottom: 0.8rem; }
.q legend + * { clear: both; }
.q + .q { margin-top: 2rem; padding-top: 1.6rem; border-top: 1px dashed var(--line); }
.scale { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 0.3rem; }
.scale.five { grid-template-columns: repeat(5, minmax(0, 1fr)); max-width: 20rem; }
.scale label { position: relative; }
.scale input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.scale span {
    display: block; text-align: center; padding: 0.6rem 0; border-radius: var(--radius-sm);
    background: var(--bg); border: 1.5px solid transparent; font-weight: 800; font-variant-numeric: tabular-nums;
    transition: transform 0.12s var(--ease), background-color 0.15s;
}
.scale label:hover span { border-color: var(--accent); }
.scale input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.scale input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
/* выбранная оценка — цветом, как читают eNPS; до выбора — нейтрально, чтобы не подсказывать */
.scale input:checked + span.v-low { background: var(--attention); border-color: var(--attention); color: #fff; }
.scale input:checked + span.v-mid { background: var(--mid); border-color: var(--mid); color: #1a1838; }
.scale input:checked + span.v-high { background: var(--ok); border-color: var(--ok); color: #fff; }
.scale-ends { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); margin-top: 0.4rem; }
.scale.five + .scale-ends { max-width: 20rem; }
.choices { display: flex; flex-direction: column; gap: 0.4rem; }
.choices label { display: flex; gap: 0.65rem; align-items: center; padding: 0.65rem 0.85rem; border: 1.5px solid var(--line);
    border-radius: var(--radius-sm); cursor: pointer; font-weight: 600; transition: border-color 0.15s, background-color 0.15s; }
.choices label:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.choices label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choices input { accent-color: var(--accent); width: 1.1rem; height: 1.1rem; margin: 0; flex: none; }
@media (max-width: 420px) {
    .scale { grid-template-columns: repeat(6, minmax(0, 1fr)); }
    .scale + .scale-ends { display: none; }
}

/* ---------- вопросы ---------- */
.qa + .qa { margin-top: 0.75rem; }
.qa-q { white-space: pre-line; font-weight: 700; }
.qa-answer { margin-top: 0.85rem; padding: 0.75rem 1rem; border-radius: 4px var(--radius-sm) var(--radius-sm) var(--radius-sm);
    background: var(--accent-soft); white-space: pre-line; }
.qa-answer .small { font-weight: 700; color: var(--accent); margin-bottom: 0.2rem; }
