/* Платформа родин — design system v3 (redesign v1, design/redesign-v1/).
   Warm neutral background, muted green action colour, Onest + IBM Plex Mono.
   Every colour, radius and size is a token below — change tokens, do not add parallel ones. */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/public/fonts/onest-cyrillic-ext.woff2) format("woff2"); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/public/fonts/onest-cyrillic.woff2) format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/public/fonts/onest-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 600; font-display: swap; src: url(/public/fonts/onest-latin.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: 400; font-display: swap; src: url(/public/fonts/plexmono-400-cyrillic.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: 400; font-display: swap; src: url(/public/fonts/plexmono-400-latin.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(/public/fonts/plexmono-500-cyrillic.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(/public/fonts/plexmono-500-latin.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 {
  /* colour (all pairs checked for WCAG 2.1 AA) */
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-2: #EAE7DF;
  --ink: #1A1C18;            /* 15.6:1 */
  --ink-soft: #3E423B;       /* body copy in leads and panels */
  --muted: #5E625B;          /* 5.7:1 on --bg */
  --line: #DAD6CC;
  --line-strong: #8A867C;    /* 3.3:1, non-text outlines */
  --brand: #3F6B52;          /* muted green; white on it 6.1:1 */
  --brand-hover: #355C46;
  --brand-soft: #E3EBE4;
  --brand-ink: #23402F;      /* text on --brand-soft */
  --ok: #2F5240; --ok-soft: #E3EBE4;
  --warn: #7A4E0E; --warn-soft: #F1E6D2;
  --err: #A3392F; --err-soft: #F6E3E0; --err-ink: #7A2A22;
  --info: #1F4A70; --info-soft: #E4EEF6;
  --focus: #2F6FD1;
  --scrim: rgba(26, 28, 24, .28);
  --shadow: 0 10px 40px rgba(26, 28, 24, .18);
  /* type */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --fs-base: 18px;
  --fs-small: 15px;
  --fs-display: clamp(36px, 5.6vw, 84px);
  --fs-h1: clamp(30px, 4.4vw, 60px);
  --fs-h2: clamp(28px, 3vw, 44px);
  --fs-h3: 22px;
  --fs-lead: clamp(18px, 1.6vw, 21px);
  /* shape & space */
  --r-pill: 999px;
  --r-card: 28px;
  --r-panel: 32px;
  --r-field: 20px;
  --gutter: clamp(16px, 4vw, 56px);
  --measure: 62ch;
  --t: 200ms ease;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; color: var(--ink); background: var(--bg); }
h1, h2, h3, .h1, .h2, .h3 { margin: 0; font-weight: 500; letter-spacing: -0.02em; }
h1, .h1 { font-size: var(--fs-h1); line-height: 1.06; letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.1; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
.display { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.03em; font-weight: 500; max-width: 15ch; }
p { margin: 0; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
mark { background: #F1E6D2; color: inherit; border-radius: 4px; padding: 0 2px; }
img, video { max-width: 100%; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.soft { color: var(--ink-soft); }
.small { font-size: var(--fs-small); }
.lead { font-size: var(--fs-lead); color: var(--ink-soft); max-width: 60ch; }
.kicker { font-family: var(--font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.label { font-family: var(--font-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.note { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--surface); padding: 12px 20px; border-radius: var(--r-pill); }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.ico-lg { width: 1.3em; height: 1.3em; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.main { padding-top: clamp(28px, 6vw, 80px); padding-bottom: 96px; min-height: 60vh; }
.col-760 { max-width: 760px; }
.col-880 { max-width: 880px; }
.stack { display: flex; flex-direction: column; gap: 22px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 40px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 20px; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.two-col { display: grid; gap: 28px 56px; align-items: start; }
@media (min-width: 1000px) { .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); } .two-col-wide { grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); } }
.section-gap { margin-top: clamp(56px, 8vw, 112px); }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 28px; } .mt-l { margin-top: 40px; }
.empty { color: var(--muted); padding: 20px 0; }
.inline-form { display: inline; margin: 0; }

/* ---------- prototype band, notices ---------- */
.proto-band { background: var(--ink); color: #ECEAE3; text-align: center; font-family: var(--font-mono); font-size: 12px; padding: 6px 12px; }
.notice-band { background: var(--brand-soft); color: var(--brand-ink); font-size: var(--fs-small); padding: 10px 0; }
.notice-band .container { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flash { padding: 16px 20px; border-radius: 20px; margin-bottom: 24px; display: flex; gap: 12px; align-items: flex-start; }
.flash-ok { background: var(--brand-soft); color: var(--brand-ink); }
.flash-err { background: var(--err-soft); color: var(--err-ink); }
.flash ul { margin: 8px 0 0; padding-left: 1.2em; }

/* ---------- pills: every action is a pill ---------- */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px; border-radius: var(--r-pill);
  border: 2px solid var(--ink); background: transparent; color: var(--ink);
  font: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer; transition: background var(--t), color var(--t), border-color var(--t);
  -webkit-tap-highlight-color: transparent;
}
.pill:hover { text-decoration: none; background: rgba(26, 28, 24, .05); }
.pill:active { transform: translateY(1px); }
.pill:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pill[disabled], .pill[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.pill-primary { background: var(--brand); border-color: var(--brand); color: #FFFFFF; font-size: 18px; padding: 0 30px; }
.pill-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.pill-secondary { }
.pill-tertiary { border: 1.5px solid var(--line-strong); font-weight: 400; }
.pill-tertiary:hover { background: var(--surface); }
.pill-dark { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.pill-dark:hover { background: #33362F; border-color: #33362F; }
.pill-danger { border: 1.5px solid var(--err); color: var(--err); }
.pill-danger:hover { background: var(--err-soft); }
.pill-light { background: var(--surface); border-color: var(--surface); color: var(--ink); }
.pill-disabled { border: 1.5px dashed var(--line-strong); color: var(--muted); background: transparent; font-weight: 500; cursor: not-allowed; }
.pill-md { min-height: 48px; padding: 0 24px; font-size: 16px; }
.pill-sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.pill-xs { min-height: 36px; padding: 0 14px; font-size: 14px; border-width: 1.5px; }
.pill-block { width: 100%; }
@media (max-width: 639px) { .pill-block-sm { width: 100%; } }
.ico-end { transition: transform var(--t); }
.pill:hover .ico-end { transform: translateX(3px); }
.pill-round { width: 48px; min-height: 48px; padding: 0; flex: 0 0 48px; }

/* answer option */
.pill-option {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 64px; padding: 12px 24px 12px 28px; border-radius: var(--r-pill);
  border: 2px solid var(--ink); background: var(--surface); color: var(--ink);
  font: inherit; font-size: 19px; font-weight: 500; line-height: 1.3; text-align: left; cursor: pointer;
}
.pill-option:hover { background: var(--brand-soft); }
.pill-option.is-chosen { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }

/* chips (filters) and tags */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: transparent; color: var(--ink); font: inherit; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.chip:hover { border-color: var(--ink); text-decoration: none; }
.chip-on, .chip[aria-pressed="true"], .chip[aria-current="true"], .chip[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.chip .count { font-family: var(--font-mono); font-size: 12px; opacity: .8; }
.chip button { border: 0; background: none; color: inherit; font-size: 18px; line-height: 1; cursor: pointer; padding: 0 0 0 2px; }
.tag { display: inline-flex; align-items: center; min-height: 28px; padding: 0 12px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--ink-soft); font-size: 14px; text-decoration: none; }
a.tag:hover { background: var(--line); text-decoration: none; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 6px; min-height: 26px; padding: 0 10px; border-radius: var(--r-pill); background: var(--surface-2); color: var(--muted); font-family: var(--font-mono); font-size: 12px; white-space: nowrap; vertical-align: middle; }
.badge .ico { width: 13px; height: 13px; }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-err { background: var(--err-soft); color: var(--err-ink); }
.badge-outline { background: transparent; border: 1px solid var(--line-strong); color: var(--ink); }
.badge-dark { background: var(--ink); color: #FFFFFF; }
.badge-demo { background: transparent; border: 1px dashed var(--line-strong); color: var(--muted); }
.badge-lg { min-height: 32px; padding: 0 14px; font-family: var(--font); font-size: 15px; font-weight: 500; }

/* cards & panels */
.card { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: clamp(20px, 2.4vw, 28px); }
.card-strong { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--r-panel); padding: 28px; }
.card-plain { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--r-card); padding: 22px 26px; display: flex; flex-direction: column; gap: 8px; }
.panel { border-radius: var(--r-panel); padding: clamp(22px, 3.5vw, 40px); }
.panel-warn { background: var(--warn-soft); }
.panel-info { background: var(--brand-soft); color: var(--brand-ink); }
.panel-dark { background: var(--ink); color: #FFFFFF; }
.panel-dark a { color: #FFFFFF; }
.panel-danger { border: 1.5px solid var(--err); border-radius: var(--r-card); padding: 24px; }
.strip { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 18px 18px 26px; border-radius: var(--r-panel); }
.strip > .grow { flex: 1 1 280px; min-width: 0; }
.strip-white { background: var(--surface); border: 1.5px solid var(--line); }
.strip-info { background: var(--brand-soft); color: var(--brand-ink); }
.strip-warn { background: var(--warn-soft); }

/* rows lists (Foam-style) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.rows > li, .rows > .rows-item { padding: 16px 0; border-bottom: 1px solid var(--line); }
.rows-num > li { display: flex; gap: 20px; align-items: baseline; }
.rows-num .num { flex: 0 0 32px; font-family: var(--font-mono); font-size: 14px; color: var(--muted); }
.dash-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.dash-list li { display: flex; gap: 14px; }
.dash-list li::before { content: "—"; font-family: var(--font-mono); color: var(--warn); flex: none; }
.check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; gap: 12px; }
.check-list li > .ico { color: var(--brand); margin-top: .2em; }
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; margin: 0; border-top: 1.5px solid var(--ink); }
.dl dt, .dl dd { padding: 12px 0; border-bottom: 1px solid var(--line); margin: 0; }
.dl dt { font-family: var(--font-mono); font-size: 13px; color: var(--muted); padding-right: 16px; }
.dl dd { overflow-wrap: anywhere; }

/* progress & step markers */
.progress-track { height: 6px; border-radius: var(--r-pill); background: var(--line); overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width 250ms ease; }
.progress-full { height: 6px; background: var(--line); }
.progress-full .progress-bar { border-radius: 0; }
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.segments span { height: 8px; border-radius: var(--r-pill); background: var(--line); }
.segments span.on { background: var(--brand); }
.segments span.cur { background: var(--ink); }
.mark { flex: 0 0 36px; height: 36px; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 14px; border: 1.5px solid var(--line-strong); color: var(--muted); }
.mark-done { background: var(--brand); border-color: var(--brand); color: #FFFFFF; }
.mark-cur { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.mark .ico { width: 18px; height: 18px; }

/* ---------- contact cards & rows ---------- */
.ccard { display: flex; flex-direction: column; gap: 12px; padding: 20px; border-radius: var(--r-card); border: 1.5px solid var(--line); background: var(--surface); }
.ccard-head { display: flex; flex-direction: column; gap: 4px; }
.ccard-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.ccard-name { font-weight: 600; font-size: 18px; line-height: 1.3; }
.ccard-desc { color: var(--muted); font-size: 15px; line-height: 1.4; }
.ccard-meta { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.cgroup { display: flex; flex-direction: column; gap: 6px; }
.cgroup-res { padding-top: 12px; border-top: 1px dashed var(--line); }
.cgroup-label { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.crow { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 6px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; }
.crow:hover { border-color: var(--ink); text-decoration: none; }
.crow .ico { color: var(--brand); }
.crow-val { font-family: var(--font-mono); font-size: 17px; font-weight: 500; white-space: nowrap; }
.crow-val.is-mail { font-size: 14px; font-weight: 400; white-space: normal; overflow-wrap: anywhere; }
.crow-note { margin-left: auto; font-size: 13px; color: var(--muted); text-align: right; }
.cres { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 16px 8px 18px; border-radius: 18px; background: var(--brand-soft); color: var(--ink); text-decoration: none; }
.cres:hover { text-decoration: none; background: #D6E2D8; }
.cres-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.cres-label { font-weight: 600; font-size: 16px; }
.cres-host { font-family: var(--font-mono); font-size: 12px; color: var(--ok); overflow-wrap: anywhere; }
.hotline { padding: 24px; border-radius: var(--r-card); border: 1.5px solid var(--line); background: var(--surface); display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); }
.hotline:hover { border-color: var(--ink); text-decoration: none; }
.hotline-num { font-family: var(--font-mono); font-size: 30px; font-weight: 500; letter-spacing: -0.02em; }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 16px; font-weight: 600; }
.field .hint { font-weight: 400; font-size: 15px; color: var(--muted); }
.field-error { color: var(--err); font-size: 15px; font-weight: 500; }
input[type=text], input[type=email], input[type=password], input[type=search], input[type=file], input:not([type]), select, textarea {
  font: inherit; font-size: 17px; font-weight: 400; width: 100%; min-height: 56px; padding: 12px 18px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-field); background: var(--surface); color: var(--ink);
}
textarea { min-height: 140px; line-height: 1.45; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 44px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
input[disabled] { background: var(--surface-2); color: var(--muted); }
.input-error { border-color: var(--err) !important; border-width: 2px !important; }
textarea.code { font-family: var(--font-mono); font-size: 13px; min-height: 520px; background: var(--ink); color: #E8E6DF; border-color: var(--ink); border-radius: 24px; padding: 20px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
legend { font-weight: 600; font-size: 16px; padding: 0; margin-bottom: 10px; }

/* checkbox / radio styled as in the mockup (real inputs, work without JS) */
.check { display: flex; align-items: flex-start; gap: 14px; min-height: 44px; padding: 10px 12px 10px 8px; border-radius: 16px; font-size: 17px; line-height: 1.45; cursor: pointer; font-weight: 400; }
.check:hover { background: rgba(26, 28, 24, .03); }
.check input, .check-card input { appearance: none; -webkit-appearance: none; flex: 0 0 24px; width: 24px; height: 24px; margin: 1px 0 0; border: 2px solid var(--brand); border-radius: 7px; background: var(--surface); display: inline-grid; place-content: center; cursor: pointer; }
.check input::after, .check-card input::after { content: ""; width: 12px; height: 7px; border: solid #FFFFFF; border-width: 0 0 2.5px 2.5px; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.check input:checked, .check-card input:checked { background: var(--brand); }
.check input:checked::after, .check-card input:checked::after { opacity: 1; }
.check input:focus-visible, .check-card input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.check-done input:checked + span { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--line-strong); }
.check-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; border-radius: 24px; border: 2px solid var(--ink); background: var(--surface); cursor: pointer; }
.check-card:has(input:checked) { background: var(--brand-soft); border-color: var(--brand); }
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.radio-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pills label { position: relative; }
.radio-pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.radio-pills span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-size: 16px; font-weight: 400; cursor: pointer; }
.radio-pills input:checked + span { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.radio-pills input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.radio-pills input:disabled + span { border-style: dashed; color: var(--muted); cursor: not-allowed; text-decoration: line-through; }
.switch { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-size: 16px; cursor: pointer; }
.switch:has(input:checked) { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
.switch input { appearance: none; margin: 0; width: 0; height: 0; }
.switch:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* big search field with the button inside */
.bigsearch { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 8px 0 24px; border-radius: var(--r-pill); border: 2px solid var(--ink); background: var(--surface); }
.bigsearch input { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; background: transparent; font-size: 18px; outline: none; }
.bigsearch:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.bigsearch .pill { min-height: 48px; }
.codefield { display: flex; align-items: center; gap: 10px; min-height: 64px; padding: 0 8px 0 24px; border-radius: var(--r-pill); background: var(--surface); border: 2px solid var(--ink); }
.codefield.is-error { border-color: var(--err); }
.codefield input { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; background: transparent; font-family: var(--font-mono); font-size: 20px; letter-spacing: .1em; outline: none; }
.codefield:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 32px 24px; border: 2px dashed var(--line-strong); border-radius: var(--r-card); background: var(--surface); text-align: center; cursor: pointer; }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { max-width: 100%; min-height: 0; border: 0; padding: 0; }
.file-row { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 8px 6px 18px; border-radius: 18px; background: var(--surface-2); }

/* ---------- header ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); }
.header-inner { display: flex; flex-direction: column; gap: 14px; padding-top: 16px; padding-bottom: 20px; }
.header-top { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 16px; }
.wordmark { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.wordmark-name { font-weight: 600; font-size: 21px; letter-spacing: -0.01em; line-height: 1.2; }
.wordmark-sub { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 399px) { .wordmark-sub { display: none; } }
@media (max-width: 559px) {
  /* Phones: logo and «Швидкий вихід» share the first row; the language switch follows. */
  .header-top .pill-dark { order: 1; padding: 0 16px; }
  .header-top .role-label { order: 2; }
  .header-top .lang-switch { order: 3; min-height: 36px; }
  .wordmark-name { font-size: 19px; }
}
.lang-switch { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); gap: 4px; }
.lang-switch a { color: var(--muted); text-decoration: none; padding: 10px 4px; }
.lang-switch a[aria-current="true"] { color: var(--ink); font-weight: 500; }
.role-label { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: var(--r-pill); background: var(--surface-2); font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; color: var(--ink-soft); }
.header-bottom { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.nav-main { flex: 0 1 auto; display: flex; flex-wrap: wrap; gap: 8px; }
.nav-link { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: 16px; font-weight: 500; white-space: nowrap; }
.nav-link:hover { border-color: var(--ink); text-decoration: none; }
.nav-link[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.nav-link.is-login { background: var(--surface); border: 2px solid var(--ink); font-weight: 600; }
.header-search { flex: 1 1 320px; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 6px 0 20px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); background: var(--surface); margin: 0; }
.header-search:focus-within { outline: 3px solid var(--focus); outline-offset: 2px; }
.header-search .ico { color: var(--muted); }
.header-search input { flex: 1; min-width: 0; min-height: 0; border: 0; padding: 0; background: transparent; font-size: 17px; outline: none; }
.header-search button { flex: 0 0 36px; height: 36px; border-radius: var(--r-pill); border: 0; background: var(--ink); color: #FFFFFF; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.header-search button .ico { color: #FFFFFF; width: 18px; height: 18px; }

/* ---------- footer & to-top ---------- */
.site-footer { border-top: 1.5px solid var(--ink); }
.footer-inner { display: flex; flex-direction: column; gap: 28px; padding-top: 36px; padding-bottom: 40px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-meta { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 32px; font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.footer-logos { display: inline-flex; align-items: center; gap: 14px; }
.footer-logos img { height: 24px; filter: grayscale(1); opacity: .8; }
.to-top { position: fixed; right: clamp(16px, 3vw, 40px); bottom: clamp(16px, 3vw, 40px); z-index: 40; display: inline-flex; align-items: center; gap: 8px; min-height: 52px; padding: 0 20px 0 16px; border-radius: var(--r-pill); border: 2px solid var(--ink); background: var(--surface); color: var(--ink); font: inherit; font-size: 16px; font-weight: 600; cursor: pointer; box-shadow: 0 6px 24px rgba(26, 28, 24, .12); }

/* ---------- home ---------- */
.hero { display: flex; flex-direction: column; gap: 22px; padding: clamp(12px, 4vw, 48px) 0 clamp(28px, 5vw, 64px); }
.entry { display: flex; flex-direction: column; gap: 16px; padding: 28px; border-radius: var(--r-panel); border: 2px solid var(--ink); background: var(--surface); color: var(--ink); text-decoration: none; }
.entry:hover { text-decoration: none; box-shadow: 0 0 0 2px var(--ink); }
.entry-title { font-size: clamp(26px, 2.4vw, 34px); font-weight: 600; line-height: 1.1; letter-spacing: -0.02em; }
.entry-lead { color: var(--muted); font-size: 17px; margin-bottom: 8px; }
.entry .pill { margin-top: auto; align-self: flex-start; min-height: 52px; padding: 0 26px; font-size: 17px; }
.how { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1.5px solid var(--ink); }
.how > div { padding: 22px 24px 22px 0; display: flex; flex-direction: column; gap: 6px; border-bottom: 1px solid var(--line); }
.how-k { font-family: var(--font-mono); font-size: 14px; color: var(--brand); }
.how-t { font-size: 22px; font-weight: 600; }
.scam-band { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 24px 48px; align-items: start; }
.scam-band h2 { display: flex; align-items: center; gap: 14px; font-weight: 600; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.05; }
.scam-band .big { font-size: clamp(20px, 1.8vw, 24px); font-weight: 500; line-height: 1.3; }

/* ---------- path ---------- */
.path-narrow { max-width: 760px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.path-ready { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 26px; }
.path-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.answer-list { display: flex; flex-direction: column; gap: 12px; }
.path-layout { display: flex; flex-wrap: wrap; gap: 28px 56px; align-items: flex-start; }
.path-aside { display: none; }
.path-article { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 26px; }
.path-mobile { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 1000px) {
  .path-aside { display: flex; flex: 1 1 280px; max-width: 360px; flex-direction: column; gap: 6px; position: sticky; top: 24px; }
  .path-mobile { display: none; }
}
.steprow { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 52px; padding: 8px 16px 8px 8px; border-radius: var(--r-pill); border: 2px solid transparent; color: var(--ink); text-decoration: none; font-size: 16px; line-height: 1.3; }
.steprow:hover { background: var(--surface); text-decoration: none; }
.steprow[aria-current="step"] { background: var(--surface); border-color: var(--ink); }
.neighbours { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.nb-prev { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 72px; padding: 12px 16px; border-radius: 24px; border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; }
.nb-prev:hover { border-color: var(--ink); text-decoration: none; }
.nb-label { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nb-title { font-size: 15px; font-weight: 500; line-height: 1.3; }
.nb-next { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; min-height: 72px; padding: 12px 4px 12px 8px; color: var(--muted); text-align: right; }
.nb-next .nb-title { font-weight: 400; color: var(--ink-soft); }
.steps-toggle > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 0 18px 0 22px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-size: 16px; font-weight: 600; cursor: pointer; }
.steps-toggle > summary::-webkit-details-marker { display: none; }
.steps-toggle[open] > summary .ico { transform: rotate(180deg); }
.steps-toggle-list { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: var(--r-card); background: var(--surface); border: 1.5px solid var(--line); }
.step-h1 { font-size: clamp(30px, 4vw, 56px); line-height: 1.06; letter-spacing: -0.03em; font-weight: 500; max-width: 18ch; margin-top: -8px; }
.sec { display: flex; flex-direction: column; gap: 6px; }
.sec p { color: var(--ink-soft); max-width: 60ch; }
.sec-what p { color: var(--ink); font-size: clamp(19px, 1.6vw, 22px); }
.sec-box { display: flex; flex-direction: column; gap: 4px; padding: 18px 24px; border-radius: 24px; background: var(--brand-soft); color: var(--brand-ink); max-width: 64ch; }
.sec-box .label { color: inherit; }
.sec-box p { color: inherit; }
.sec a.tel { white-space: nowrap; font-weight: 600; }
.step-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; padding-top: 14px; border-top: 1px solid var(--line); }
.step-actions form { margin: 0; }
.confirm-inline { padding: 24px; border-radius: var(--r-panel); background: var(--surface); border: 2px solid var(--ink); display: flex; flex-direction: column; gap: 14px; }

/* ---------- dialogs (sheet: right panel on desktop, bottom sheet on phones) ---------- */
dialog.sheet, dialog.confirm { border: 0; padding: 0; color: var(--ink); background: var(--bg); box-shadow: var(--shadow); }
dialog.sheet::backdrop, dialog.confirm::backdrop { background: var(--scrim); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
dialog.sheet { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(600px, 92vw); height: 100%; max-height: 100%; border-radius: var(--r-panel) 0 0 var(--r-panel); overflow-y: auto; }
@media (max-width: 999px) { dialog.sheet { inset: auto 0 0 0; width: 100%; max-width: 100%; height: auto; max-height: 88vh; border-radius: var(--r-panel) var(--r-panel) 0 0; } }
.sheet-body { padding: 40px 36px; display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 999px) { .sheet-body { padding: 24px 16px 32px; } }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.icon-btn { flex: 0 0 48px; width: 48px; height: 48px; border-radius: var(--r-pill); border: 2px solid var(--ink); background: var(--surface); color: var(--ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
dialog.confirm { width: min(520px, calc(100% - 32px)); border-radius: var(--r-panel); }
.confirm-body { padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; gap: 16px; }
.mini-card { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--surface); }

/* ---------- materials ---------- */
.mrows { border-top: 1.5px solid var(--ink); }
.mrow { display: flex; align-items: center; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mrow:hover { text-decoration: none; }
.mrow:hover .mrow-title { text-decoration: underline; }
.mrow-main { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; }
.mrow-type { flex: 0 0 180px; font-family: var(--font-mono); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.mrow-body { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.mrow-title { font-size: clamp(19px, 1.8vw, 25px); font-weight: 500; line-height: 1.25; }
.mrow-arrow { flex: 0 0 48px; width: 48px; height: 48px; border-radius: var(--r-pill); border: 2px solid var(--ink); display: inline-flex; align-items: center; justify-content: center; }
.mrow-locked .mrow-arrow { border-style: dashed; border-color: var(--line-strong); }
.status-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.status-row .grow { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* pdf viewer (pdf.js; native <object> without JS) */
.viewer { border-radius: var(--r-card); border: 1.5px solid var(--line); background: var(--surface); overflow: hidden; }
.viewer-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 12px 10px 20px; border-bottom: 1.5px solid var(--line); }
.viewer-bar .grow { flex: 1 1 200px; min-width: 0; font-family: var(--font-mono); font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.viewer-stage { background: var(--surface-2); padding: clamp(10px, 2vw, 24px); display: flex; justify-content: center; min-height: 360px; max-height: 80vh; overflow: auto; }
.viewer-stage canvas { display: block; max-width: 100%; height: auto; background: #FFFFFF; box-shadow: 0 2px 12px rgba(26, 28, 24, .12); }
.viewer-stage object { width: 100%; height: 72vh; border: 0; }
.viewer:fullscreen { border-radius: 0; display: flex; flex-direction: column; }
.viewer:fullscreen .viewer-stage { flex: 1; max-height: none; }

/* ---------- tab / side navigation (cabinet & admin) ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tab { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: 16px; }
.tab:hover { border-color: var(--ink); text-decoration: none; }
.tab[aria-current="page"] { background: var(--ink); border-color: var(--ink); color: #FFFFFF; }
.tab .count { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn); font-family: var(--font-mono); font-size: 11px; }
.tab[aria-current="page"] .count { background: #FFFFFF; color: var(--ink); }
.admin-layout { display: grid; gap: 28px; }
@media (min-width: 1000px) { .admin-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; align-items: start; } }
.admin-side { display: flex; flex-direction: column; gap: 6px; }
@media (min-width: 1000px) { .admin-side { position: sticky; top: 24px; } }
.whoami { display: flex; flex-direction: column; gap: 4px; padding: 18px 20px; border-radius: 24px; background: var(--surface); border: 1.5px solid var(--line); margin-bottom: 10px; overflow-wrap: anywhere; }
.side-link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-size: 16px; border: 1.5px solid transparent; }
.side-link:hover { background: var(--surface); text-decoration: none; }
.side-link[aria-current="page"] { background: var(--ink); color: #FFFFFF; }
.side-link .count { min-width: 26px; text-align: center; padding: 1px 8px; border-radius: var(--r-pill); background: var(--warn-soft); color: var(--warn); font-family: var(--font-mono); font-size: 12px; }
@media (max-width: 999px) { .admin-side nav { display: flex; flex-wrap: wrap; gap: 6px; } .admin-side .side-link { border-color: var(--line-strong); } }
.is-admin .pill { min-height: 44px; padding: 0 22px; font-size: 16px; }
.is-admin .pill-xs { min-height: 36px; padding: 0 14px; font-size: 14px; }
.is-admin .pill-primary { font-size: 16px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 12px; }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 20px; border-radius: 24px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.stat:hover { border-color: var(--ink); text-decoration: none; }
.stat.is-hot { border: 2px solid var(--ink); }
.stat-value { font-family: var(--font-mono); font-size: 34px; font-weight: 500; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 15px; }

/* ---------- the one table component (ui.table) ---------- */
.tbl-wrap { container-type: inline-size; }
.tbl { display: grid; width: 100%; }
.tbl .tr { display: grid; grid-template-columns: var(--cols); gap: 0 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tbl .tr-head { padding: 10px 0; border-bottom: 1.5px solid var(--ink); }
.tbl .th { font-family: var(--font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; text-align: left; }
.tbl .td { min-width: 0; overflow-wrap: anywhere; font-size: 16px; }
.tbl .td-date { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.tbl .td-actions { display: flex; flex-wrap: nowrap; justify-content: flex-end; gap: 6px; }
.tbl .td-actions form { margin: 0; display: inline-flex; gap: 6px; align-items: center; }
.tbl .td-two { display: flex; flex-direction: column; }
.tbl .sub { font-size: 14px; color: var(--muted); }
.tbl .th-label { display: none; }
.tbl-attention { --cols: 136px minmax(0, 1fr) 64px 48px; }
.tbl-apps { --cols: minmax(0, 1.4fr) minmax(0, 1.2fr) 136px 64px 170px; }
.tbl-history { --cols: 140px minmax(0, 1fr) minmax(0, 1.4fr); }
.tbl-users { --cols: minmax(0, 1.5fr) minmax(0, 1.3fr) 136px 64px 300px; }
.tbl-invites { --cols: minmax(0, 1.4fr) minmax(0, 1fr) 100px 136px 64px minmax(0, 1fr); }
.tbl-sections { --cols: minmax(0, 1fr) minmax(0, 2fr) 90px 130px; }
.tbl-audit { --cols: 140px minmax(0, 1fr) 170px minmax(0, 2fr); }
.tbl-mail { --cols: 200px minmax(0, 1fr) minmax(0, 2fr) 130px; }
@container (max-width: 760px) {
  .tbl .tr { grid-template-columns: 1fr; gap: 6px; padding: 16px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--surface); margin-bottom: 10px; }
  .tbl .tr-head { display: none; }
  .tbl .th-label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .tbl .td-actions { justify-content: flex-start; flex-wrap: wrap; }
}
@container (max-width: 820px) {
  .tbl-users .tr { grid-template-columns: 1fr; gap: 6px; padding: 16px; border: 1.5px solid var(--line); border-radius: 24px; background: var(--surface); margin-bottom: 10px; }
  .tbl-users .tr-head { display: none; }
  .tbl-users .th-label { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .tbl-users .td-actions { justify-content: flex-start; flex-wrap: wrap; }
}
.role-select { min-height: 40px; padding: 4px 36px 4px 14px; font-size: 15px; border-radius: var(--r-pill); width: auto; background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%; }

/* ---------- document pages (privacy, terms) ---------- */
.draft-band { background: var(--warn-soft); color: var(--warn); font-family: var(--font-mono); font-size: 13px; padding: 12px 20px; border-radius: var(--r-pill); }
.doc-layout { display: grid; gap: 28px 56px; align-items: start; }
@media (min-width: 1000px) { .doc-layout { grid-template-columns: 300px minmax(0, 1fr); } .doc-toc { position: sticky; top: 24px; } }
.doc-toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.doc-toc a { display: flex; gap: 12px; padding: 8px 12px; border-radius: 14px; text-decoration: none; }
.doc-toc a:hover { background: var(--surface-2); }
.doc-toc .num { font-family: var(--font-mono); font-size: 13px; color: var(--brand); flex: 0 0 24px; }
.doc-sec { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 0 16px; padding: 24px 0; border-bottom: 1px solid var(--line); }
.doc-sec .num { font-family: var(--font-mono); font-size: 14px; color: var(--brand); padding-top: 6px; }
.doc-sec h2 { font-size: clamp(22px, 2vw, 26px); font-weight: 600; margin-bottom: 10px; }
.doc-sec p { color: var(--ink-soft); max-width: 66ch; }


/* ---------- helpers used by page templates ---------- */
.label.warn, .kicker.warn { color: var(--warn); }
.label.ok { color: var(--ok); }
.label.on-dark { color: #C9D8CD; }
.on-dark-soft { color: #E6E4DD; }
.req { color: var(--err); }
.h2-big { font-size: clamp(20px, 1.9vw, 24px); line-height: 1.4; font-weight: 500; max-width: 40ch; }
.h3-light { font-size: 19px; font-weight: 600; line-height: 1.3; }
.panel-hero { border-radius: 40px; padding: clamp(28px, 5vw, 64px); }
.display-row { display: flex; align-items: center; gap: 18px; font-weight: 600; font-size: clamp(36px, 5.4vw, 80px); line-height: 1.02; letter-spacing: -0.03em; }
.display-row .ico { width: .8em; height: .8em; }
.panel-hero .h2-big { font-size: clamp(22px, 2.4vw, 32px); max-width: 28ch; }
.scam-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.scam-grid .card, .scam-grid .panel { border-radius: var(--r-panel); padding: clamp(24px, 3vw, 36px); }
.scam-grid .h3 { font-size: 28px; }
.pill-light.pill-tel, .pill-light { min-height: 64px; padding: 0 30px; gap: 14px; }
.pill-light .hotline-num { font-size: 30px; }
.pill-between { justify-content: space-between; font-weight: 400; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.kv-num { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv-num .num { flex: 0 0 24px; font-family: var(--font-mono); font-size: 13px; color: var(--brand); }
.rows-top { border-top: 1.5px solid var(--ink); }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin: 0; border-top: 1.5px solid var(--ink); }
.meta-grid > div { padding: 14px 16px 14px 0; border-bottom: 1px solid var(--line); }
.meta-grid dt { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.meta-grid dd { margin: 2px 0 0; font-size: 16px; }
.mini-row { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.mini-row:hover span:last-child { text-decoration: underline; }
.chip-sm { min-height: 36px; padding: 0 16px; font-size: 15px; }
.icon-btn-sm { flex: 0 0 44px; width: 44px; height: 44px; border-width: 1.5px; border-color: var(--line-strong); }
.icon-btn[disabled] { opacity: .4; cursor: not-allowed; }
.ico.is-filled { fill: currentColor; }
.auth-grid { display: grid; gap: 24px; align-items: stretch; }
@media (min-width: 900px) { .auth-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); } }
.auth-card { margin: 0 auto; }
.card-strong { padding: clamp(24px, 4vw, 48px); }
.gate { max-width: 640px; margin: clamp(16px, 6vw, 72px) auto; }
.gate-note { padding-top: 18px; border-top: 1px solid var(--line); }
.field.label-only { font-weight: 600; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #FFFFFF; padding: 12px 22px; border-radius: var(--r-pill); opacity: 0; pointer-events: none; transition: opacity var(--t), transform var(--t); z-index: 80; }
.toast.show { opacity: 1; transform: translateX(-50%); }

/* motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Cabinet (Cabinet.dc.html) ---------- */
.cab-head { align-items: flex-end; }
.cab-head h1 { font-size: clamp(34px, 5vw, 72px); max-width: none; }
.cab-head .badge-lg { background: #EAE7DF; color: var(--ink-soft); }
.cab-tabs { margin-top: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.h2-card { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; }
.big-note { font-size: 15px; }
.card-dashed { border: 2px dashed var(--line-strong); background: transparent; }
.grow-300 { flex: 1 1 300px; min-width: 0; }
.msg-date { flex: 0 0 64px; font-family: var(--font-mono); }
.status-row .badge-outline { border-width: 1.5px; }
.note-box { margin-top: 6px; padding: 10px 14px; border-radius: 14px; background: var(--warn-soft); font-size: 15px; }
.stages { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.stages li { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stages li > span:nth-child(2) { flex: 1 1 auto; }
.stages li:not(.is-done):not(.is-cur) > span:nth-child(2) { color: var(--muted); }
.stages .note { font-family: var(--font-mono); }
button.switch { background: transparent; color: var(--ink); font: inherit; }
button.switch[aria-checked="true"] { background: var(--ink); color: #FFFFFF; border-color: var(--ink); }
button.switch:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Admin panel (Admin.dc.html) ---------- */
.badge-mute { background: #EAE7DF; color: var(--ink-soft); }
.admin-main { min-width: 0; }
.admin-main > h1 { font-size: clamp(32px, 4vw, 56px); }
.admin-side hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; width: 100%; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link[aria-current="page"] .count { background: #FFFFFF; color: var(--ink); }
.col-560 { max-width: 560px; }
.form-row { display: flex; flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.form-row .field { flex: 1 1 220px; min-width: 0; }
.form-row > div { flex: 0 0 auto; }
.admin-search { flex: 0 0 auto; max-width: 560px; }
.msg-card { display: flex; flex-direction: column; gap: 8px; padding: 20px 24px; border-radius: var(--r-card); border: 1.5px solid var(--line); }
.msg-card.is-unread { background: var(--surface); border: 2px solid var(--ink); }
.msg-card p { margin: 0; }
.chip-edit { gap: 8px; padding-right: 6px; }
.chip-x { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: var(--r-pill); border: 0; background: transparent; color: inherit; cursor: pointer; }
.chip-x:hover { background: var(--err-soft); color: var(--err); }
.chip-x .ico { width: 14px; height: 14px; }
.panel-dark .field { color: #FFFFFF; }
.panel-dark input { background: #FFFFFF; color: var(--ink); }
.radio-pills-dark { border: 0; padding: 0; margin: 0; flex: 0 0 auto; flex-wrap: nowrap; }
.radio-pills-dark span { color: #FFFFFF; border-color: var(--line-strong); min-height: 48px; }
.radio-pills-dark input:checked + span { background: var(--brand); border-color: var(--brand); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
details.reveal > summary, details.inline-details > summary { list-style: none; display: inline-flex; cursor: pointer; }
details.reveal > summary::-webkit-details-marker, details.inline-details > summary::-webkit-details-marker { display: none; }
details.inline-details[open] { flex-basis: 100%; }
.history-details > summary { cursor: pointer; font-weight: 500; padding: 8px 0; }
.tbl-recent { --cols: minmax(0, 1.4fr) 140px minmax(0, 1fr); }
.tbl select { max-width: 100%; min-height: 40px; }
