/* Layout: a calm civic-service grid — one centred column (max 1120px), cards only for actionable objects (vacancies, forms).
   Palette: deep steppe teal as the action colour, Kazakh-flag gold reserved for social-enterprise / priority marks. */
:root {
  --bg: #f3f6f5;
  --surface: #ffffff;
  --surface-2: #e8efed;
  --ink: #12201e;
  --muted: #52625e;
  --line: #d3dcd9;
  --accent: #0b6e69;
  --accent-ink: #ffffff;
  --accent-soft: #d6ecea;
  --gold: #f2b705;
  --gold-ink: #3a2c00;
  --good: #1d7a3b;
  --warn: #9a5b00;
  --bad: #b3261e;
  --focus: #f2b705;

  --font-display: "Unbounded", "Golos Text", system-ui, sans-serif;
  --font-body: "Golos Text", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --scale: 1;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1615; --surface: #152120; --surface-2: #1c2b29; --ink: #e5eeeb; --muted: #9bb0ab;
    --line: #2a3b38; --accent: #4cc2b6; --accent-ink: #062120; --accent-soft: #173a37;
    --gold: #f5c443; --gold-ink: #2b2000; --good: #5fcf86; --warn: #f0b157; --bad: #ff8a80; --focus: #f5c443;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1615; --surface: #152120; --surface-2: #1c2b29; --ink: #e5eeeb; --muted: #9bb0ab;
  --line: #2a3b38; --accent: #4cc2b6; --accent-ink: #062120; --accent-soft: #173a37;
  --gold: #f5c443; --gold-ink: #2b2000; --good: #5fcf86; --warn: #f0b157; --bad: #ff8a80; --focus: #f5c443;
  color-scheme: dark;
}
/* Версия для слабовидящих: максимальный контраст, перекрывает обе темы */
:root[data-contrast="high"] {
  --bg: #ffffff; --surface: #ffffff; --surface-2: #ffffff; --ink: #000000; --muted: #000000;
  --line: #000000; --accent: #00006e; --accent-ink: #ffffff; --accent-soft: #ffffff;
  --gold: #000000; --gold-ink: #ffffff; --good: #005a00; --warn: #6b3a00; --bad: #a00000; --focus: #ff6a00;
  color-scheme: light;
}
:root[data-contrast="high"] * { box-shadow: none !important; }
:root[data-contrast="high"] .card, :root[data-contrast="high"] .chip, :root[data-contrast="high"] input,
:root[data-contrast="high"] select, :root[data-contrast="high"] textarea { border-width: 2px; }

* { box-sizing: border-box; }
html { font-size: calc(16px * var(--scale)); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--accent); text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.2; text-wrap: balance; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); font-weight: 700; }
h2 { font-size: clamp(1.3rem, 2.6vw, 1.75rem); font-weight: 700; }
h3 { font-size: 1.05rem; font-weight: 500; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; top: 8px; }

/* A11y bar */
.a11y-bar { background: var(--ink); color: var(--bg); font-size: 0.85rem; }
.a11y-inner { display: flex; align-items: center; gap: 6px; padding-block: 6px; flex-wrap: wrap; }
.a11y-label { margin-right: 4px; opacity: .85; }
.a11y-bar button {
  background: transparent; color: var(--bg); border: 1px solid color-mix(in srgb, var(--bg) 40%, transparent);
  border-radius: 6px; padding: 2px 10px; font: inherit; cursor: pointer; min-height: 30px;
}
.a11y-bar button[aria-pressed="true"] { background: var(--bg); color: var(--ink); }
.a11y-sep { flex: 1; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; }
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 21; background: var(--surface); }
.header-inner { display: flex; align-items: center; gap: 16px; padding-block: 12px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  width: 36px; height: 36px; display: grid; place-items: center; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-family: var(--font-display); font-size: .8rem; font-weight: 700;
  box-shadow: inset 0 -4px 0 var(--gold);
}
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.menu-btn { display: none; margin-left: auto; }
.nav { display: flex; gap: 4px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.nav a {
  text-decoration: none; color: var(--ink); padding: 8px 12px; border-radius: 8px; font-weight: 500;
}
.nav a:hover { background: var(--surface-2); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent); }
.nav .nav-user { color: var(--muted); font-size: .9rem; padding: 0 6px; }
@media (max-width: 760px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; width: 100%; flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
}

.demo-bar { background: var(--gold); color: var(--gold-ink); font-size: .9rem; }
.demo-bar .wrap { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding-block: 8px; }
.demo-bar select { width: auto; max-width: 100%; min-height: 36px; padding: 4px 10px; }

main { display: block; padding-block: 32px 64px; outline: none; }
main > .wrap { display: grid; gap: 32px; }

/* Buttons & forms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 8px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }
.btn.secondary { background: transparent; color: var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.danger { background: transparent; color: var(--bad); border-color: var(--bad); }
.btn.small { min-height: 36px; padding: 6px 12px; font-size: .9rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; filter: none; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

label { font-weight: 500; }
.field { display: grid; gap: 6px; min-width: 0; }
.field .hint { color: var(--muted); font-size: .88rem; font-weight: 400; }
input[type="text"], input[type="email"], input[type="password"], input[type="search"], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 96px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin: 0; min-width: 0; }
legend { font-weight: 600; padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; cursor: pointer; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }

.chip-select { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-select label {
  border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 400; font-size: .92rem;
  background: var(--surface);
}
.chip-select input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.chip-select input:checked + span { font-weight: 600; }
.chip-select label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-select label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Cards & content */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card > * + * { margin-top: 12px; }
.section-head { display: grid; gap: 8px; max-width: 70ch; }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 65ch; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; color: var(--accent); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.chip {
  display: inline-flex; align-items: center; gap: 4px; border-radius: 999px; padding: 2px 10px; font-size: .82rem;
  border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); white-space: nowrap;
}
.chip.ok { border-color: var(--good); color: var(--good); background: transparent; }
.chip.miss { border-color: var(--bad); color: var(--bad); background: transparent; border-style: dashed; }
.chip.gold { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); font-weight: 600; }
.chip.gov { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

.pill { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: .8rem; font-weight: 600; }
.pill.sent { background: var(--surface-2); color: var(--muted); }
.pill.invited { background: var(--accent-soft); color: var(--accent); }
.pill.hired { background: var(--good); color: var(--surface); }
.pill.rejected { background: transparent; color: var(--bad); border: 1px solid var(--bad); }

/* Hero */
.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 32px; align-items: center; padding-block: 16px 8px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin-top: 16px; }
.hero .btn-row { margin-top: 24px; }
.hero-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: grid; gap: 12px; }
.hero-panel .match-demo { display: grid; gap: 10px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; } }

.role-card h3 { display: flex; align-items: center; gap: 10px; }
.role-card ul { margin: 0; padding-left: 1.1em; color: var(--muted); display: grid; gap: 4px; }
.role-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.role-icon svg { width: 20px; height: 20px; }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: step; }
.steps li { list-style: none; border-top: 3px solid var(--accent); padding-top: 12px; display: grid; gap: 6px; }
.steps li::before { counter-increment: step; content: "Шаг " counter(step); font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.steps { padding: 0; margin: 0; }
@media (max-width: 700px) { .steps { grid-template-columns: 1fr; } }

.band { background: var(--surface); border-block: 1px solid var(--line); }
.band .wrap { padding-block: 28px; display: grid; gap: 20px; }

/* Vacancies */
.toolbar { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 12px; align-items: end; }
@media (max-width: 800px) { .toolbar { grid-template-columns: 1fr 1fr; } .toolbar .field:first-child { grid-column: 1 / -1; } }
.job { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; }
.job-main { display: grid; gap: 8px; min-width: 0; }
.job-title { font-family: var(--font-body); font-weight: 700; font-size: 1.12rem; }
.job-org { color: var(--muted); font-size: .92rem; }
.job-side { display: grid; gap: 10px; justify-items: end; align-content: start; min-width: 140px; }
@media (max-width: 600px) { .job { grid-template-columns: 1fr; } .job-side { justify-items: start; } }
.match { display: grid; gap: 4px; justify-items: end; }
.match-num { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.match-bar { width: 120px; height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.match-bar i { display: block; height: 100%; background: var(--accent); }
.why { color: var(--muted); font-size: .88rem; }
.list { display: grid; gap: 12px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .93rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .05em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* KPI */
.kpi { display: grid; gap: 6px; align-content: start; }
.kpi-value { font-family: var(--font-display); font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-label { font-weight: 600; }
.kpi-note { color: var(--muted); font-size: .85rem; }
.kpi.state-good { border-top: 4px solid var(--good); }
.kpi.state-warn { border-top: 4px solid var(--warn); }
.kpi.state-none { border-top: 4px solid var(--line); }
.bars { display: grid; gap: 10px; }
.bar-row { display: grid; grid-template-columns: minmax(120px, 220px) minmax(0, 1fr) 48px; gap: 10px; align-items: center; font-size: .92rem; }
.bar-track { height: 14px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: var(--accent); border-radius: 4px; }
.bar-row .num { text-align: right; font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr 48px; } .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; } }

/* SUS */
.sus-item { display: grid; gap: 8px; padding-block: 12px; border-bottom: 1px solid var(--line); }
.likert { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.likert label { display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: var(--surface); }
.likert input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.likert label:has(input:checked) { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 700; }
.likert label:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.likert .end { color: var(--muted); font-size: .82rem; }

.notice { border-left: 4px solid var(--accent); background: var(--accent-soft); padding: 12px 16px; border-radius: 0 8px 8px 0; }
.notice.warn { border-color: var(--warn); background: var(--surface-2); }
.empty { color: var(--muted); padding: 24px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

.diagram { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 14px; align-items: center; }
.diagram .core { background: var(--accent); color: var(--accent-ink); border-radius: 14px; padding: 20px; text-align: center; display: grid; gap: 6px; }
.diagram .core strong { font-family: var(--font-display); font-size: 1.1rem; }
.diagram .side { display: grid; gap: 10px; }
.diagram .node { border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: .92rem; }
.diagram .node b { display: block; }
@media (max-width: 760px) { .diagram { grid-template-columns: 1fr; } }

.site-footer { border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: .9rem; }
.footer-inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px)); }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

.toast {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 10px; z-index: 60; max-width: calc(100% - 32px);
}
.toast.err { background: var(--bad); color: #fff; }
.loading { color: var(--muted); padding: 40px 0; }
.mono { font-family: var(--font-mono); font-size: .85rem; }
pre.json { background: var(--surface-2); padding: 12px; border-radius: 8px; overflow: auto; max-height: 280px; font-family: var(--font-mono); font-size: .8rem; }
