/* veritas.kg redesign, first piece (#180). Tokens from design/design-system/project/tokens.json. */

@font-face { font-family: "Geist"; src: url("fonts/geist-latin.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "Geist"; src: url("fonts/geist-cyrillic.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; src: url("fonts/pt-serif-latin-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "PT Serif"; src: url("fonts/pt-serif-latin-700.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: "PT Serif"; src: url("fonts/pt-serif-cyrillic-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "PT Serif"; src: url("fonts/pt-serif-cyrillic-700.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

:root {
  --r-sm: 6px; --r: 10px; --r-lg: 12px;
  --bg: #f5f3ee;
  --surface: #ffffff;
  --surface-2: #faf9f6;
  --surface-3: #ecebe6;
  --line: #e3dfd6;
  --line-strong: #cfc9bc;
  --text: #1f2a3c;
  --muted: #596476;
  --ink: #13213a;
  --navy-800: #13213a;
  --navy-700: #202e46;
  --navy-600: #33486b;
  --accent: #506e35;
  --accent-strong: #3f5829;
  --accent-soft: #eef2e7;
  --accent-line: #cbd8bb;
  --red: #a8322a;
  --font-ui: "Geist", "Segoe UI", Roboto, Arial, sans-serif;
  --font-doc: "PT Serif", Georgia, "Times New Roman", serif;
  --wrap: 1120px;
  --gutter: 16px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1a2d;
    --surface: #13213a;
    --surface-2: #101c31;
    --surface-3: #202e46;
    --line: #2a3a56;
    --line-strong: #41547a;
    --text: #e8ebf1;
    --muted: #a9b3c4;
    --ink: #ffffff;
    --navy-800: #e8ebf1;
    --navy-700: #d5dbe6;
    --navy-600: #9fb4d8;
    --accent: #9bbb7a;
    --accent-strong: #b7d19a;
    --accent-soft: #1d2d24;
    --accent-line: #3d5a33;
    --red: #f0a59e;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1a2d;
  --surface: #13213a;
  --surface-2: #101c31;
  --surface-3: #202e46;
  --line: #2a3a56;
  --line-strong: #41547a;
  --text: #e8ebf1;
  --muted: #a9b3c4;
  --ink: #ffffff;
  --navy-800: #e8ebf1;
  --navy-700: #d5dbe6;
  --navy-600: #9fb4d8;
  --accent: #9bbb7a;
  --accent-strong: #b7d19a;
  --accent-soft: #1d2d24;
  --accent-line: #3d5a33;
  --red: #f0a59e;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.6 var(--font-ui);
}
img { max-width: 100%; display: block; }
a { color: var(--navy-600); }
a:hover { color: var(--accent-strong); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Draft strip: the mock is not published */
.draft {
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent-line);
  color: var(--accent-strong);
  font-size: 0.875rem;
  padding: 6px 0;
}

/* Header */
.top { background: var(--surface); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; flex-wrap: wrap; }
.brand { display: inline-flex; color: var(--ink); }
.brand img { height: 22px; width: auto; }
.nav { display: flex; gap: 20px; flex-wrap: wrap; margin-left: auto; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 0; min-height: 44px; display: inline-flex; align-items: center; }
.nav a[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent); }
.nav a:hover { color: var(--accent-strong); }
.lang { display: flex; gap: 12px; font-size: 0.875rem; }
.lang [aria-current="true"] { color: var(--ink); font-weight: 600; }
.lang span:not([aria-current]) { color: var(--faint, var(--muted)); }
.phone { color: var(--text); text-decoration: none; font-variant-numeric: tabular-nums; }

/* Sections */
main section { padding: 56px 0; border-top: 1px solid var(--line); }
main section:first-child { border-top: 0; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0; }
h1 { font: 700 2.25rem/1.15 var(--font-doc); letter-spacing: -0.01em; max-width: 26ch; }
h2 { font: 700 1.625rem/1.25 var(--font-doc); margin-bottom: 16px; }
h3 { font: 600 1.0625rem/1.35 var(--font-ui); margin-bottom: 8px; }
.lead { font-size: 1.125rem; color: var(--muted); max-width: 60ch; margin: 20px 0 0; }
.prose { font: 400 1.0625rem/1.7 var(--font-doc); max-width: 68ch; }
.prose p { margin: 0 0 16px; }
.hero .actions { margin-top: 28px; display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.hero .actions a.text-link { min-height: 44px; display: inline-flex; align-items: center; }

/* Cards and grid */
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin-top: 24px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.card p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.card a.more { display: inline-block; margin-top: 12px; min-height: 44px; line-height: 44px; }

/* Lists */
.facts { list-style: none; padding: 0; margin: 24px 0 0; border-top: 1px solid var(--line); }
.facts li { padding: 14px 0; border-bottom: 1px solid var(--line); color: var(--text); }

/* Form */
.request { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; max-width: 640px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 600; font-size: 0.9375rem; color: var(--ink); }
.field .hint { color: var(--muted); font-size: 0.875rem; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  font: 400 1rem/1.5 var(--font-ui);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 12px;
  min-height: 44px;
  width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9375rem; }
.check input { width: 20px; height: 20px; min-width: 20px; margin-top: 3px; accent-color: var(--accent); }
.btn {
  font: 600 1rem/1 var(--font-ui);
  background: var(--navy-800);
  color: var(--surface);
  border: 0;
  border-radius: var(--r);
  min-height: 44px;
  padding: 0 20px;
  cursor: pointer;
}
.btn:hover { background: var(--navy-700); }
.btn-accent { background: var(--accent); color: #ffffff; }
.btn-accent:hover { background: var(--accent-strong); }
:root[data-theme="dark"] .btn-accent, .btn-accent-dark { color: #0e1a2d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-accent { color: #0e1a2d; } }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: 0.875rem; }
.site-footer .wrap { display: flex; gap: 16px 24px; flex-wrap: wrap; justify-content: space-between; }

/* Phone and wide layouts */
@media (min-width: 720px) {
  h1 { font-size: 2.75rem; }
  .grid.three { grid-template-columns: repeat(3, 1fr); }
  .grid.two { grid-template-columns: repeat(2, 1fr); }
  .menu-toggle { display: none; }
}
@media (max-width: 719px) {
  main section { padding: 40px 0; }
  .nav { margin-left: 0; gap: 4px 16px; width: 100%; }
  .top .wrap { gap: 12px; }
  .phone { margin-left: auto; font-size: 0.875rem; }
}

/* Header extras: staff sign-in and language links, 44px tap targets */
.top-end { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.staff { color: var(--navy-600); font-size: 0.9375rem; font-weight: 600; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.staff:hover { color: var(--accent-strong); }
.lang a { color: var(--muted); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px; }
.lang a:hover { color: var(--accent-strong); }
.lang [aria-current="true"] { color: var(--ink); font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
a.btn { display: inline-flex; align-items: center; text-decoration: none; color: var(--surface); }
a.btn-accent { color: #ffffff; }
:root[data-theme="dark"] a.btn-accent { color: #0e1a2d; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) a.btn-accent { color: #0e1a2d; } }

/* Tax section: sub-navigation, notes, tables, worked examples */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); }
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 20px; }
.subnav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text); text-decoration: none; font-size: 0.9375rem; }
.subnav a:hover { color: var(--accent-strong); }
.subnav a[aria-current="page"] { color: var(--accent-strong); box-shadow: inset 0 -2px 0 var(--accent); }
.notice { border: 1px solid var(--accent-line); border-radius: var(--r); background: var(--accent-soft); padding: 12px 16px; margin: 24px 0 0; font-size: 0.9375rem; max-width: 68ch; color: var(--text); }
.tag { display: inline-block; font-size: 0.8125rem; font-weight: 600; color: var(--accent-strong); background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--r-sm); padding: 1px 8px; margin-left: 8px; vertical-align: middle; }
.tag.at-start { margin-left: 0; }
.table { width: 100%; border-collapse: collapse; margin-top: 24px; font-size: 0.9375rem; }
.table th, .table td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-weight: 600; color: var(--ink); border-bottom-color: var(--line-strong); }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 0; }
.muted { color: var(--muted); }
.kv { margin: 24px 0 0; border-top: 1px solid var(--line); }
.kv div { display: grid; grid-template-columns: 1fr; gap: 2px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv dt { color: var(--muted); font-size: 0.9375rem; }
.kv dd { margin: 0; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.result { margin-top: 32px; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-lg); padding: 24px; max-width: 720px; }
.result h2 { font-size: 1.25rem; margin-bottom: 8px; }
.result p { margin: 0 0 12px; }
.steps { list-style: none; margin: 24px 0 0; padding: 0; counter-reset: step; }
.steps li { position: relative; padding: 14px 0 14px 44px; border-bottom: 1px solid var(--line); }
.steps li::before { counter-increment: step; content: counter(step); position: absolute; left: 0; top: 14px; width: 28px; height: 28px; border-radius: 50%; background: var(--surface-3); color: var(--ink); font-weight: 600; font-size: 0.875rem; display: flex; align-items: center; justify-content: center; }
.steps .answer { display: block; color: var(--muted); font-size: 0.9375rem; margin-top: 4px; }
.block-h { margin-top: 40px; }
.links-list { margin: 16px 0 0; padding-left: 20px; }
.links-list li { margin-bottom: 8px; }
.cta-band { padding: 40px 0; }
.cta-band .wrap { display: flex; gap: 16px 24px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.cta-band p { margin: 0; color: var(--muted); }
@media (min-width: 720px) {
  .kv div { grid-template-columns: 280px 1fr; }
}
@media (max-width: 719px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table td { border: 0; padding: 4px 0; text-align: left !important; white-space: normal; }
  .table td::before { content: attr(data-label); display: block; font-size: 0.8125rem; color: var(--muted); }
  .table .num { text-align: left; }
  .subnav ul { gap: 0 16px; }
  .top-end { gap: 12px 16px; width: 100%; }
  .phone { margin-left: 0; }
}

/* Site pages on the app base: page shell, forms, tool, rows, deadlines */
.page { padding-top: 48px; padding-bottom: 56px; }
.page.narrow, .narrow { max-width: 760px; }
.block { padding-top: 48px; padding-bottom: 48px; }
.split, .split-text, .hero-grid { display: grid; gap: 32px; grid-template-columns: 1fr; }
.split-text { margin-top: 40px; }
.hero { padding: 56px 0 40px; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts div { padding: 14px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.facts dt { color: var(--muted); font-size: 0.9375rem; }
.facts dd { margin: 0; }
.big { font: 700 2.5rem/1 var(--font-doc); color: var(--ink); font-variant-numeric: tabular-nums; }
.brand-name { font: 700 1.125rem/1 var(--font-doc); color: var(--ink); }
.top .brand { min-height: 44px; align-items: center; text-decoration: none; }
.top nav.lang { display: flex; }
.hint { color: var(--muted); font-size: 0.875rem; margin: 8px 0 0; }
.err { color: var(--red); font-size: 0.875rem; margin: 4px 0 0; }
.err[hidden] { display: none; }
[aria-invalid="true"] { border-color: var(--red); }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; gap: 12px 20px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.field-row { display: grid; gap: 16px; grid-template-columns: 1fr; }
.options, .actions { display: flex; flex-wrap: wrap; gap: 12px; }
.option { display: flex; gap: 10px; align-items: center; min-height: 44px; }
.tool-form label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.tool-input { display: flex; gap: 12px; flex-wrap: wrap; }
.tool-input input { flex: 1 1 160px; width: auto; font-variant-numeric: tabular-nums; }
.figures { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-strong); }
.figures li { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.figures .fv { font: 700 1.75rem/1 var(--font-ui); font-variant-numeric: tabular-nums; color: var(--ink); white-space: nowrap; }
.figures .best .fv { color: var(--accent-strong); }
.na { color: var(--muted); font-size: 1rem; font-weight: 400; }
.rows { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.row-item { padding: 20px 0; border-bottom: 1px solid var(--line); display: grid; gap: 4px 32px; grid-template-columns: 1fr; }
.row-item h3, .row-item p { margin: 0; }
.row-item p { color: var(--muted); }
.row-item a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
.plain { list-style: none; padding-left: 0; }
.deadlines { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line-strong); }
.deadlines li { display: grid; grid-template-columns: 72px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.deadlines .when { display: flex; flex-direction: column; }
.deadlines .day { font: 700 2rem/1 var(--font-doc); color: var(--ink); font-variant-numeric: tabular-nums; }
.deadlines .mon { color: var(--muted); font-size: 0.875rem; }
.deadlines h3 { margin: 0 0 4px; }
.deadlines p { margin: 0; color: var(--muted); font-size: 0.9375rem; }
.deadlines li.next .day { color: var(--accent-strong); }
.asked { color: var(--muted); }
.question { font: 700 1.5rem/1.3 var(--font-doc); color: var(--ink); margin: 24px 0 16px; }
.result.ok { border-color: var(--accent); }
.result.warn { border-color: var(--red); }
.ok-msg { color: var(--accent-strong); font-weight: 600; }
.cta-band { border-top: 1px solid var(--line); background: var(--surface); }
.cta-band h2 { margin: 0 0 4px; font-size: 1.375rem; }
@media (min-width: 720px) {
  .split, .split-text { grid-template-columns: 1fr 1fr; gap: 56px; }
  .hero-grid { grid-template-columns: 1.6fr 1fr; gap: 64px; align-items: end; }
  .field-row { grid-template-columns: 1fr 1fr; }
  .kv div { grid-template-columns: 160px 1fr; }
  .row-item { grid-template-columns: 1fr 1.4fr; align-items: baseline; }
}

/* Design pass: sticky compact header, one-row sub-navigation, quiet motion */
.draft { font-size: 0.8125rem; padding: 4px 0; line-height: 1.4; }
.top { position: sticky; top: 0; z-index: 5; }
.top .wrap { min-height: 56px; gap: 8px 24px; flex-wrap: nowrap; }
.nav { flex-wrap: nowrap; gap: 4px 20px; }
.top-end { flex-wrap: nowrap; gap: 8px 16px; width: auto; }
.top-end .phone { display: none; }
h1 { font-size: 2rem; max-width: 22ch; text-wrap: balance; }
.hero h1 { font-size: 2.25rem; }
.lead { text-wrap: pretty; }
.subnav .wrap { overflow-x: auto; scrollbar-width: thin; }
.subnav ul { flex-wrap: nowrap; white-space: nowrap; }
.big { font-size: 3rem; letter-spacing: -0.02em; }
.figures .fv { font-size: 2rem; letter-spacing: -0.01em; }
a, .btn { transition: color .15s ease, background-color .15s ease; }
@media (min-width: 720px) {
  h1 { font-size: 2.75rem; }
  .hero h1 { font-size: 3.5rem; }
  .hero { padding: 88px 0 64px; }
  .top-end .phone { display: inline; }
}
@media (max-width: 719px) {
  .top .wrap { flex-wrap: wrap; padding-top: 4px; padding-bottom: 4px; min-height: 0; }
  .nav { order: 3; width: 100%; margin-left: 0; gap: 0 20px; overflow-x: auto; }
  .top-end { margin-left: auto; width: auto; }
  .hero { padding: 36px 0 24px; }
  .brand img { height: 20px; }
  .staff { font-size: 0.875rem; }
  .figures .fv { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

select { font: 400 1rem/1.5 var(--font-ui); color: var(--text); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r); padding: 10px 12px; min-height: 44px; width: 100%; }
.page .request { margin-top: 24px; }
.page .notice { max-width: 720px; }
.table caption { text-align: left; font: 600 1.0625rem/1.3 var(--font-ui); color: var(--ink); padding: 0 0 4px; caption-side: top; }
.hero h1 { font-size: 2.25rem; max-width: 20ch; }
@media (min-width: 720px) { .hero h1 { font-size: 3rem; } }

.deadlines li { grid-template-columns: 88px 1fr auto; align-items: start; }
.deadlines .btn { white-space: nowrap; align-self: center; }
.deadlines .mon { white-space: nowrap; }
.split > *, .split-text > * { border-top: 0; padding: 0; }
main .split section, main .split-text section, main section.cta-band { border-top: 0; }
main section.cta-band { padding: 40px 0; border-top: 1px solid var(--line); }
@media (max-width: 719px) {
  .deadlines li { grid-template-columns: 72px 1fr; }
  .deadlines .mon { white-space: normal; }  /* «декабря 2026» is wider than the column: two lines, not over the text */
  .deadlines .btn { grid-column: 2; justify-self: start; }
}

@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .brand img { filter: invert(1); } }
:root[data-theme="dark"] .brand img { filter: invert(1); }
