/* Платформа родин — design system v2 (package №1).
   Light, calm, typographic. One screen — one main action. Mobile first (checked at 360px).
   All colours, radii and spacing are tokens below — change them here, not in components. */

@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; }

:root {
  /* colour */
  --bg: #fafaf7;
  --surface: #ffffff;
  --surface-2: #f2f1ec;
  --ink: #16181d;
  --muted: #5a606b;           /* 6.0:1 on --bg */
  --line: #dddcd4;
  --line-strong: #8e9097;     /* control outlines, 3.2:1 on --bg (WCAG non-text) */
  --brand: #24425f;           /* 10.4:1 on white */
  --brand-hover: #2f5679;
  --brand-soft: #e6edf3;
  --accent: #b08a2e;          /* small marks only, e.g. «Перевірено» */
  --ok: #24653f;  --ok-soft: #e3f0e7;
  --warn: #7a5200; --warn-soft: #faf1dc;
  --err: #a12f2f; --err-soft: #f8e5e3;  /* red = errors and destructive actions only */
  --info: #2f5f8a; --info-soft: #e5eef6;
  --focus: #2f6fd1;
  /* type */
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fs-base: 18px;
  --fs-small: 15px;
  --fs-h1: 32px;
  --fs-h2: 24px;
  --fs-h3: 19px;
  --fs-display: 34px;
  /* shape & space */
  --r-pill: 999px;
  --r-card: 20px;
  --r-input: 14px;
  --s1: 8px; --s2: 16px; --s3: 24px; --s4: 40px; --s5: 64px;
  --measure: 66ch;
  --t: 200ms ease;
}
@media (min-width: 900px) {
  :root { --fs-h1: 40px; --fs-h2: 28px; --fs-display: 52px; }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body { margin: 0; font-family: var(--font); font-size: var(--fs-base); line-height: 1.5; color: var(--ink); background: var(--bg); font-weight: 400; }
h1, h2, h3, .h2, .h3 { font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; margin: 0 0 var(--s2); }
h1 { font-size: var(--fs-h1); }
h2, .h2 { font-size: var(--fs-h2); }
h3, .h3 { font-size: var(--fs-h3); }
p { margin: 0 0 var(--s2); }
a { color: var(--brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 600; }
mark { background: #f6e3a8; color: inherit; border-radius: 3px; padding: 0 2px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s2) 0; }
img { max-width: 100%; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-small); }
.lead { font-size: 20px; color: var(--ink); max-width: var(--measure); }
.kicker { font-size: var(--fs-small); color: var(--muted); letter-spacing: .02em; margin-bottom: var(--s1); }
.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: 3px; border-radius: 6px; }
.ico { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.18em; }
.ico-lg { width: 1.4em; height: 1.4em; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.main { padding-top: var(--s4); padding-bottom: var(--s5); min-height: 60vh; }
.narrow { max-width: 640px; }
.prose { max-width: var(--measure); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li { margin-bottom: 6px; }
.block { margin-top: var(--s5); }
.block-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); flex-wrap: wrap; margin-bottom: var(--s2); }
.block-head h1, .block-head h2 { margin: 0; }
.page-head { margin-bottom: var(--s3); }
.split { display: grid; gap: var(--s3); }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.empty { color: var(--muted); padding: var(--s3) 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: var(--s3); align-items: center; }
.actions-stack { flex-direction: column; align-items: stretch; }
@media (min-width: 640px) { .actions-stack { flex-direction: row; align-items: center; } }
.inline-form { display: inline; margin: 0; }

/* ---------- prototype band & notices ---------- */
.proto-band { background: var(--ink); color: #eceae3; text-align: center; font-size: 13px; padding: 6px 12px; }
.notice-band { background: var(--info-soft); font-size: var(--fs-small); padding: 8px 0; }
.notice-band .container { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.flash { padding: 14px 18px; border-radius: var(--r-input); margin-bottom: var(--s3); }
.flash-ok { background: var(--ok-soft); color: var(--ok); }
.flash-err { background: var(--err-soft); color: var(--err); }
.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: .5em;
  min-height: 52px; padding: 14px 28px; border-radius: var(--r-pill);
  border: 2px solid var(--brand); background: transparent; color: var(--brand);
  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;
}
@media (min-width: 640px) { .pill { min-height: 48px; } }
.pill:hover { text-decoration: none; background: var(--brand-soft); }
.pill:active { transform: translateY(1px); }
.pill:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: var(--r-pill); }
.pill[disabled], .pill[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
.pill-primary { background: var(--brand); color: #fff; }
.pill-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: #fff; }
.pill-secondary { }
.pill-tertiary { border-color: var(--line-strong); color: var(--ink); border-width: 1.5px; }
.pill-tertiary:hover { background: var(--surface-2); }
.pill-quiet { border: 1.5px solid var(--line); color: var(--ink); background: var(--surface); }
.pill-quiet:hover { border-color: var(--line-strong); background: var(--surface); }
.pill-danger { border-color: var(--err); color: var(--err); }
.pill-danger:hover { background: var(--err-soft); }
.pill-sm { min-height: 40px; padding: 8px 18px; font-size: 16px; }
.pill-xs { min-height: 32px; padding: 4px 14px; font-size: 14px; border-width: 1.5px; }
.pill-block { width: 100%; }
@media (max-width: 639px) { .pill-block-sm { width: 100%; } }
.ico-end { margin-left: 2px; transition: transform var(--t); }
.pill:hover .ico-end { transform: translateX(3px); }
.pill-exit { background: var(--ink); border-color: var(--ink); color: #fff; }
.pill-exit:hover { background: #33363e; border-color: #33363e; color: #fff; }
.pill-answer { justify-content: space-between; text-align: left; border-color: var(--line-strong); border-width: 2px; color: var(--ink); background: var(--surface); padding: 16px 24px; min-height: 60px; font-weight: 400; font-size: 18px; }
.pill-answer:hover { border-color: var(--brand); background: var(--surface); }
.pill-answer.is-chosen, .pill-tertiary.is-chosen { border-color: var(--brand); background: var(--brand-soft); font-weight: 600; }

/* chips: filters & tags (small pills, Foam-style) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: var(--s2) 0; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 4px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); color: var(--ink); text-decoration: none; font-size: 15px; background: var(--surface); }
.chip:hover { border-color: var(--brand); text-decoration: none; }
.chip-on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-sm { min-height: 30px; padding: 2px 12px; font-size: 14px; }
.chips-quiet .chip { border-color: var(--line); }
.chip-edit button { border: 0; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 0 0 4px; }

/* badges */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; background: var(--surface-2); color: var(--ink); white-space: nowrap; vertical-align: middle; }
.badge .ico { width: 14px; height: 14px; }
.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); }
.badge-demo { background: transparent; border: 1.5px dashed var(--accent); color: #6b5212; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; min-width: 0; }
.mark { width: 36px; height: 36px; flex: none; }
.wordmark-text { display: none; font-weight: 600; font-size: 16px; line-height: 1.15; }
.wordmark-text small { display: block; font-weight: 400; font-size: 13px; color: var(--muted); }
@media (min-width: 420px) { .wordmark-text { display: block; } .wordmark-text small { display: none; } }
@media (min-width: 1320px) { .wordmark-text small { display: block; } }
.nav-main { display: none; }
.nav-link { white-space: nowrap; color: var(--ink); text-decoration: none; padding: 10px 14px; border-radius: var(--r-pill); font-weight: 400; }
.nav-link:hover { background: var(--surface-2); }
.nav-link.active { font-weight: 600; background: var(--surface-2); }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-actions .pill span { display: none; }
.header-actions .pill-exit span { display: inline; }
.header-actions .pill-sm { padding: 8px 14px; }
@media (min-width: 640px) { .header-actions .pill span { display: inline; } }
@media (max-width: 639px) {
  /* On phones the quick exit is pinned bottom-right so it is always one tap away. */
  .header-actions .pill-exit { position: fixed; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 40; min-height: 48px; padding: 10px 18px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
  .site-footer { padding-bottom: 96px; }
  .header-row { gap: 8px; min-height: 60px; }
}
.menu-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; }
.header-search { display: flex; align-items: center; position: relative; }
.header-search input { width: 0; padding: 0; border: 0; opacity: 0; transition: width var(--t), opacity var(--t); height: 44px; border-radius: var(--r-pill); font: inherit; font-size: 16px; background: var(--surface); }
.header-search.open input { width: min(46vw, 260px); padding: 0 16px; border: 1.5px solid var(--line-strong); opacity: 1; margin-right: 6px; }
.header-search button { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line-strong); background: var(--surface); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.mnav { border-top: 1px solid var(--line); background: var(--bg); padding: 12px 0 20px; }
.mnav .container { display: flex; flex-direction: column; gap: 4px; }
.mnav .nav-link { padding: 14px 16px; font-size: 19px; }
.mnav-foot { padding: 12px 16px 0; }
@media (min-width: 1180px) {
  .nav-main { display: flex; gap: 2px; }
  .menu-toggle, .mnav { display: none !important; }
  .header-search input { width: 200px; padding: 0 44px 0 16px; border: 1.5px solid var(--line-strong); opacity: 1; }
  .header-search button { position: absolute; right: 0; border-color: transparent; background: transparent; }
  .header-row { gap: 16px; }
}
.lang-switch { display: inline-flex; gap: 4px; }
.lang-link { display: inline-flex; align-items: center; min-height: 36px; padding: 4px 12px; border-radius: var(--r-pill); border: 1.5px solid var(--line); text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; }
.lang-link.active { border-color: var(--ink); color: var(--ink); }
.lang-inline a { margin: 0 4px; }

@media (min-width: 760px) and (max-width: 1179px) {
  .header-search input { width: 220px; padding: 0 44px 0 16px; border: 1.5px solid var(--line-strong); opacity: 1; }
  .header-search button { position: absolute; right: 0; border-color: transparent; background: transparent; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { font-size: var(--fs-small); color: var(--muted); margin-bottom: var(--s3); display: flex; flex-wrap: wrap; gap: 6px; }
.crumbs a { color: var(--muted); }
.crumb-sep { color: var(--line-strong); }

/* ---------- home ---------- */
.hero { padding: var(--s2) 0 var(--s3); max-width: 820px; }
.display { font-size: var(--fs-display); line-height: 1.08; letter-spacing: -0.02em; margin-bottom: var(--s4); }
.hero-note { color: var(--muted); font-size: var(--fs-small); margin-top: var(--s2); }
.situation-list { display: flex; flex-direction: column; gap: 12px; }
.situation {
  display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 28px;
  background: var(--surface); border: 2px solid var(--line-strong); color: var(--ink); text-decoration: none;
  transition: border-color var(--t), background var(--t);
}
.situation:hover { border-color: var(--brand); text-decoration: none; }
.situation:focus-visible { border-radius: 28px; }
.situation-ico { display: inline-flex; width: 48px; height: 48px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); }
.situation-ico .ico { width: 24px; height: 24px; }
.situation-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.situation-text strong { font-size: 20px; }
.situation-text span { color: var(--muted); font-size: 16px; }
.situation-arrow { width: 24px; height: 24px; flex: none; color: var(--brand); transition: transform var(--t); }
@media (max-width: 419px) { .situation-ico { display: none; } .situation { padding: 16px 18px; border-radius: 22px; } .situation-text strong { font-size: 19px; } }
.situation:hover .situation-arrow { transform: translateX(4px); }
@media (min-width: 900px) { .situation { padding: 22px 28px; } .situation-text strong { font-size: 22px; } }
.continue { background: var(--brand-soft); border-radius: var(--r-card); padding: var(--s3); margin-bottom: var(--s3); }
.continue-label { font-weight: 600; }

.big-search label { display: block; margin-bottom: 12px; }
.big-search-row { display: flex; gap: 10px; flex-wrap: wrap; }
.big-search-row input { flex: 1 1 260px; min-width: 0; }
.big-search.compact { margin-bottom: var(--s1); }

.tile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (min-width: 760px) { .tile-grid { grid-template-columns: repeat(3, 1fr); } }
.tile { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); text-decoration: none; color: var(--ink); transition: border-color var(--t); }
.tile:hover { border-color: var(--brand); text-decoration: none; }
.tile-icon { color: var(--brand); }
.tile-name { font-weight: 600; font-size: 17px; line-height: 1.25; }
.tile-count { color: var(--muted); font-size: 14px; }
.sec-ico { width: 26px; height: 26px; }
.sec-ico-lg { width: 36px; height: 36px; color: var(--brand); }
.sec-ico-sm { width: 18px; height: 18px; vertical-align: -3px; }
.title-ico { display: flex; align-items: center; gap: 12px; }

/* callouts & panels */
.callout { background: var(--surface-2); border-radius: var(--r-card); padding: 20px 22px; margin: var(--s2) 0; }
.callout > :last-child { margin-bottom: 0; }
.callout h2, .callout h3 { display: flex; align-items: center; gap: 8px; }
.callout-warn { background: var(--warn-soft); }
.callout-soft { background: var(--brand-soft); }
.callout-demo { background: transparent; border: 1.5px dashed var(--accent); }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: var(--s3); }
.panel-soft { background: var(--surface-2); border-color: transparent; }
.panel-status { text-align: left; }
.panel.is-read { opacity: .75; }
.check-list { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.check-list li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.check-list li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: currentColor; opacity: .55; }
.plain-list { list-style: none; padding: 0; }
.plain-list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.plain-list.bullets li { display: list-item; list-style: disc; margin-left: 1.2em; border: 0; padding: 2px 0; }
.dl { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); font-size: var(--fs-small); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.dl-compact { font-size: var(--fs-small); }

/* ---------- forms ---------- */
.form { display: flex; flex-direction: column; gap: 20px; margin: var(--s3) 0; }
.form-narrow { max-width: 560px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.hint { font-weight: 400; color: var(--muted); font-size: var(--fs-small); }
input[type=text], input[type=email], input[type=password], input[type=search], input:not([type]), select, textarea {
  font: inherit; font-size: 18px; width: 100%; padding: 12px 16px; min-height: 52px;
  border: 1.5px solid var(--line-strong); border-radius: var(--r-input); background: var(--surface); color: var(--ink);
}
input[type=search] { border-radius: var(--r-pill); padding: 12px 20px; }
textarea { min-height: 120px; line-height: 1.45; }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; min-height: 480px; }
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); }
.check { flex-direction: row !important; align-items: flex-start; gap: 12px !important; font-weight: 400 !important; }
.check input { width: 24px; height: 24px; min-height: 0; flex: none; margin: 2px 0 0; accent-color: var(--brand); }
.check-card { border: 1.5px solid var(--line); border-radius: var(--r-input); padding: 16px; background: var(--surface); }
fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
legend { font-weight: 600; margin-bottom: 8px; padding: 0; }
.consents { border-top: 1px solid var(--line); padding-top: 18px; }
.reveal { border-left: 3px solid var(--brand-soft); padding-left: 16px; }
.reveal[hidden] { display: none; }
.form-inline { flex-direction: row; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin: var(--s2) 0; }
.form-inline label { flex: 1 1 200px; }
.filters { margin-bottom: var(--s2); }
.filter-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; }
.select-label { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-small); color: var(--muted); }
.select-label select { min-width: 220px; }
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--r-card); padding: var(--s3); text-align: center; background: var(--surface); }
.dropzone.dragover { border-color: var(--brand); background: var(--brand-soft); }
.dropzone input { margin: 0 auto 8px; max-width: 100%; }
.dropzone-file { font-weight: 600; color: var(--ok); }

/* ---------- auth ---------- */
.auth-grid { display: grid; gap: var(--s3); }
@media (min-width: 860px) { .auth-grid { grid-template-columns: 1.1fr .9fr; align-items: start; } }

/* ---------- path ---------- */
.path-shell { max-width: 680px; margin: 0 auto; }
.path-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: var(--s3); }
.path-screen { animation: rise var(--t); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.progress { margin-bottom: var(--s4); }
.progress-label { font-size: var(--fs-small); color: var(--muted); margin-bottom: 8px; }
.progress-track { height: 8px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.progress-bar { height: 100%; background: var(--brand); border-radius: var(--r-pill); transition: width 250ms ease; }
.question legend { margin-bottom: var(--s2); }
.question legend h1 { margin: 0; }
.answer-list { display: flex; flex-direction: column; gap: 12px; margin-top: var(--s3); }
.how-list { padding-left: 1.3em; margin: var(--s3) 0; }
.how-list li { margin-bottom: 10px; }
.step h1 { margin-bottom: var(--s3); }
.step-sec { padding: var(--s2) 0; border-top: 1px solid var(--line); }
.step-sec p { margin: 0; max-width: var(--measure); }
.step-sec-label { font-size: 14px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.step-sec-where p, .step-sec-docs p { font-size: 17px; }
.step-sec a.tel { white-space: nowrap; font-weight: 600; }
.step-contacts { margin-top: var(--s3); }
.step-actions { display: flex; flex-direction: column; gap: 12px; margin: var(--s4) 0 var(--s3); }
.step-actions form { margin: 0; }
.steps-overview { margin-top: var(--s4); border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface); padding: 6px 20px; }
.steps-overview summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style-position: inside; }
.steps-overview ol, .steps-plain { padding-left: 1.4em; margin: 0 0 var(--s2); }
.steps-overview li, .steps-plain li { padding: 6px 0; }
.steps-overview li a, .steps-plain li a { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.steps-overview li.is-done a, .steps-plain li.is-done a { color: var(--muted); }
.steps-overview li.is-current a { font-weight: 600; }
.is-done .ico { color: var(--ok); }
.started-list { list-style: none; padding: 0; margin: 0 0 var(--s2); }
.started-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.started-list li div { display: flex; flex-direction: column; }
.answers-summary { list-style: none; padding: 0; }
.answers-summary li { padding: 12px 0; border-bottom: 1px solid var(--line); }

/* ---------- materials ---------- */
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 680px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid { grid-template-columns: repeat(3, 1fr); } .card-grid-2 { grid-template-columns: repeat(2, 1fr); } }
.mcard { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.mcard-type { font-size: 14px; color: var(--muted); margin: 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mcard-title { margin: 0; font-size: 19px; }
.mcard-title a { color: var(--ink); text-decoration: none; }
.mcard-title a:hover { text-decoration: underline; }
.mcard-desc { color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 16px; }
.mcard-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mcard .pill { align-self: flex-start; margin-top: auto; }
.mcard-locked { background: var(--surface-2); }
.material h1 { max-width: 30ch; }
.pdf-frame { margin-top: var(--s3); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; background: var(--surface); }
.pdf-frame object { display: block; }

/* ---------- contacts ---------- */
.contact-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .contact-grid { grid-template-columns: repeat(2, 1fr); } .contact-grid-1 { grid-template-columns: 1fr; } }
.contact-card { padding: 22px; border-radius: var(--r-card); background: var(--surface); border: 1px solid var(--line); }
.contact-card h3 { margin-bottom: 8px; }
.contact-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; min-height: 4px; }
.contact-list { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-direction: column; gap: 4px; }
.contact-link { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; font-weight: 600; text-decoration: none; overflow-wrap: anywhere; }
.contact-link:hover span { text-decoration: underline; }
.contact-link .ico { color: var(--brand); }

/* ---------- search results ---------- */
.result-list { list-style: none; padding: 0; }
.result-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.result-list a { font-weight: 600; font-size: 18px; }
.snippet { color: var(--muted); font-size: 16px; margin: 6px 0 0; }

/* ---------- side layout (cabinet & admin) ---------- */
.side-layout { display: grid; gap: var(--s3); }
.side-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
.side-user { display: none; }
.side-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; white-space: nowrap; min-height: 40px; padding: 6px 16px; border-radius: var(--r-pill); border: 1.5px solid var(--line); color: var(--ink); text-decoration: none; background: var(--surface); font-size: 16px; }
.side-link.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.side-link .count { background: var(--warn-soft); color: var(--warn); border-radius: var(--r-pill); padding: 0 8px; font-size: 13px; font-weight: 600; }
.side-nav hr { display: none; }
.side-logout { white-space: nowrap; }
@media (min-width: 960px) {
  .side-layout { grid-template-columns: 250px minmax(0, 1fr); gap: var(--s4); align-items: start; }
  .side-nav { flex-direction: column; overflow: visible; position: sticky; top: 92px; }
  .side-user { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; font-size: 15px; overflow-wrap: anywhere; }
  .side-user span { color: var(--muted); }
  .side-user .badge { align-self: flex-start; margin-top: 6px; color: var(--ink); }
  .side-link { border-color: transparent; background: transparent; }
  .side-link:hover { background: var(--surface-2); }
  .side-nav hr { display: block; width: 100%; }
  .side-logout { margin-top: 8px; align-self: flex-start; }
}
.side-content { min-width: 0; }
.danger-zone { border-top: 1px solid var(--line); padding-top: var(--s3); }

/* ---------- admin (denser) ---------- */
.is-admin .pill { min-height: 40px; padding: 8px 20px; font-size: 16px; }
.is-admin .pill-xs { min-height: 32px; padding: 4px 12px; font-size: 14px; }
.is-admin h1 { font-size: 30px; }
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }
.stat { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--r-card); border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; }
.stat:hover { border-color: var(--brand); }
.stat-value { font-size: 32px; font-weight: 600; }
.stat-label { color: var(--muted); font-size: 15px; }
.table { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--surface); border-radius: var(--r-card); overflow: hidden; border: 1px solid var(--line); }
.table th { text-align: left; font-size: 14px; color: var(--muted); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
.td-actions { white-space: normal; }
.td-actions > *, .td-actions form { margin: 2px 4px 2px 0; display: inline-flex; vertical-align: middle; }
.role-form { gap: 6px; align-items: center; }
.role-form select { min-height: 36px; padding: 4px 10px; font-size: 15px; width: auto; }
.inline-details summary { list-style: none; }
.inline-details summary::-webkit-details-marker { display: none; }
.inline-details[open] { display: block; width: 100%; }
.inline-details .form { margin: 8px 0; }
@media (max-width: 759px) {
  .rtable, .rtable tbody, .rtable tr, .rtable td { display: block; width: 100%; }
  .rtable thead { display: none; }
  .rtable { border: 0; background: transparent; }
  .rtable tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 10px 6px; margin-bottom: 12px; }
  .rtable td { border: 0; padding: 6px 12px; }
  .rtable td[data-label]::before { content: attr(data-label); display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
}
.mod-card { margin-bottom: var(--s3); }
.mod-actions { display: flex; flex-direction: column; gap: 4px; }
.pdf-details summary { list-style: none; margin: 12px 0; }
.pdf-details summary::-webkit-details-marker { display: none; }
.history { padding-left: 1.2em; }
.history li { margin-bottom: 6px; }
.structure-row { align-items: center; }
.structure-name { flex: 0 0 240px; display: flex; align-items: center; gap: 8px; font-weight: 600; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s4) 0; font-size: var(--fs-small); color: var(--muted); }
.footer-grid { display: grid; gap: var(--s2); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
.footer-links a { color: var(--ink); }
.footer-credits { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer-logos { display: inline-flex; align-items: center; gap: 10px; }
.logo-t4p { height: 26px; }
.logo-uwa { height: 26px; }
.footer-note { margin: 0; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: var(--r-pill); opacity: 0; pointer-events: none; transition: opacity var(--t), transform var(--t); z-index: 50; }
.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; }
}
