/* jobs.gene-works.fi — site.css, стилевое направление «Ведомость» (A).
   Сделано ролью «веб-дизайнер» (шаг VD7b, 2026-09-27); ВВЕДЕНО на основной сайт 27.09.2026 по слову
   владельца («сначала вариант A, до конца»). Предыдущий облик — в истории дерева (scratchpad сессии, site.css.do-A).
   Замысел: Первым показан не итог, а бланк расчёта: строки «что → сколько → откуда и на какую дату», сверху вниз, как в расчётном листке.
   Собран механически: этот заголовок + :root направления + тёмная тема направления +
   всё содержимое живого assets/site.css ПОСЛЕ блока тёмной темы дословно + слой
   облика (раздел 20 в конце). Ни один селектор не переписан, ни одно имя класса не
   тронуто, gen/templates/base.html не меняется.
   Собрано из живого site.css sha256 d4cb7880f3ce17de66f53e777a99d9832e4abe36193cb54333a24389cd91ca5d — сверено 27.09.2026, сходится.
   Шрифты: GW-Ledger-Mono-Regular.ttf (51 КБ), GW-Ledger-Mono-Bold.ttf (52 КБ) — всего 104 КБ. Внешних запросов ноль, и CSP клиента (font-src 'self')
   другого и не пропустит. */

/* ============================================================ 0. шрифты
   Файлами в этом же комплекте, ни одного внешнего адреса. unicode-range посчитан из
   самого файла: знаков, которых в шрифте нет (в Noto нет ✓ U+2713, а site.css пишет его
   в .light--green::before), браузер у нашего файла не спрашивает и берёт у системного. */
@font-face {
  font-family: "GW Ledger Mono";
  src: url("/assets/fonts/GW-Ledger-Mono-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0218-0219, U+02BC, U+0400-045F, U+0490-0491, U+2010-2027, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2248, U+2260, U+2264-2265, U+25A0, U+25CB, U+25CF;
}
@font-face {
  font-family: "GW Ledger Mono";
  src: url("/assets/fonts/GW-Ledger-Mono-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0218-0219, U+02BC, U+0400-045F, U+0490-0491, U+2010-2027, U+2030, U+2032-2033, U+2039-203A, U+2044, U+20AC, U+2116, U+2122, U+2190-2193, U+2212, U+2248, U+2260, U+2264-2265, U+25A0, U+25CB, U+25CF;
}

/* ============================================================ 1. tokens */
:root {
  color-scheme: light dark;

  --font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: "GW Ledger Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* поверхности и текст */
  --bg: #EEF0F3;
  --surface: #FFFFFF;
  --surface-alt: #E3E7EC;
  --text: #14181D;
  --text-secondary: #4A525B;

  /* акцент */
  --accent: #12508E;
  --accent-hover: #0C3A69;
  --accent-contrast: #FFFFFF;
  --accent-soft: #DCE6F3;

  /* рамки */
  --border-control: #6C757F;
  --border-soft: #C4C9D0;

  /* светофор и встроенные состояния */
  --status-positive: #1B6742;
  --status-attention: #7A4405;
  --status-blocked: #A3211B;
  --status-unknown: #4A525B;
  --status-ai: #1F4E8C;
  --status-decide: #9A4A00;

  /* фокус */
  --focus: #14181D;

  /* шкала кегля */
  --text-small: 1rem;
  --text-body: 1.125rem;
  --text-lead: 1.25rem;
  --h3: 1.375rem;
  --h2: clamp(1.5rem, 2.6vw, 1.875rem);
  --h1: clamp(1.75rem, 4vw, 2.5rem);
  --result: clamp(1.75rem, 3.4vw, 2.5rem);
  --line-body: 1.5;
  --line-heading: 1.1;

  /* отступы */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;

  /* форма и мера */
  --radius-control: 3px;
  --radius-card: 4px;
  --control-min-height: 48px;
  --content-max: 1120px;
  --reading-max: 680px;

  --shadow: none;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14171A;
    --surface: #1C2024;
    --surface-alt: #242A2F;
    --text: #E8EBEF;
    --text-secondary: #A7AFB8;
    --accent: #8FB6E6;
    --accent-hover: #B4CDF0;
    --accent-contrast: #0D1520;
    --accent-soft: #1E2A39;
    --border-control: #8B949D;
    --border-soft: #323942;
    --status-positive: #74C79A;
    --status-attention: #D9AE6A;
    --status-blocked: #EE8B84;
    --status-unknown: #A7AFB8;
    --status-ai: #86B4EE;
    --status-decide: #E9A26A;
    --focus: #E8EBEF;
    --shadow: none;
  }
}

/* ============================================================ 2. base */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-body);
  line-height: var(--line-body);
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-variant-numeric: tabular-nums;
}

main { flex: 1 0 auto; }

h1, h2, h3, h4 {
  margin: 0 0 var(--space-3);
  line-height: var(--line-heading);
  font-weight: 650;
  letter-spacing: -0.01em;
  overflow-wrap: break-word;
}
h1 { font-size: var(--h1); }
h2 { font-size: var(--h2); margin-top: var(--space-8); }
h3 { font-size: var(--h3); }
h4 { font-size: var(--text-body); }
section > h2:first-child,
section > h3:first-child,
.card h3:first-child,
.modal__body > h2:first-child { margin-top: 0; }

p, ul, ol, dl { margin: 0 0 var(--space-4); max-width: var(--reading-max); }
li { margin-bottom: var(--space-1); }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { color: var(--accent-hover); }
strong { font-weight: 650; }
abbr[title] { text-decoration: underline dotted; }
code, kbd, samp {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--surface-alt);
  padding: 0 0.3em;
  border-radius: 4px;
}
hr { border: 0; border-top: 1px solid var(--border-soft); margin: var(--space-8) 0; }
img { max-width: 100%; height: auto; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

::selection { background: var(--accent-soft); color: var(--text); }

/* ============================================================ 3. layout */
.wrap {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 48em) { .wrap { padding: 0 var(--space-6); } }

.page { padding-top: var(--space-6); padding-bottom: var(--space-16); }

/* One-column reading flow. Every content section keeps the same rhythm; 40-48px on
   the phone, 64-96px on the desktop (Codex 3.3). */
.page > section,
.page > .note,
.page > .data-version,
.page > noscript { margin: 0 0 var(--space-12); }
.page > section:last-child { margin-bottom: 0; }
@media (min-width: 48em) {
  .page > section,
  .page > .note,
  .page > .data-version { margin-bottom: var(--space-16); }
}

.text > *:last-child, .trust > *:last-child, .cards > *:last-child,
.steps-section > *:last-child, .table-section > *:last-child { margin-bottom: 0; }

/* ============================================================ 4. utilities */
.visually-hidden, .hp-field, .gw-hp {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.muted, .sub, .meta, .optional { color: var(--text-secondary); }
.sub { font-size: var(--text-small); margin: var(--space-1) 0 0; }
.print-only { display: none; }

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100px;
  z-index: 100;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  padding: var(--space-3) var(--space-4);
  font-weight: 600;
  text-decoration: none;
  min-height: var(--control-min-height);
}
.skip-link:focus { top: var(--space-2); }

/* ============================================================ 5. header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow);
}
.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3);
  padding-bottom: var(--space-3);
}

/* Word mark "Gene-Works · Jobs in Finland": the name carries the brand, the sub-line
   says what the site is. No image, no logotype file. */
.wordmark {
  margin-right: auto;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 0.4em;
}
.wordmark__name { font-size: var(--h3); }
.wordmark__sep { color: var(--border-control); }
.wordmark__sub {
  font-size: var(--text-small);
  font-weight: 550;
  letter-spacing: 0;
  color: var(--text-secondary);
}
.wordmark:hover .wordmark__name { color: var(--accent); }

.nav-toggle {
  font: inherit;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
  padding: var(--space-2) var(--space-4);
  min-height: var(--control-min-height);
  cursor: pointer;
}
.nav-toggle:hover { border-color: var(--accent); color: var(--accent); }

.site-nav { flex-basis: 100%; display: none; }
.site-nav.is-open { display: block; }
.site-nav ul, .lang-switch ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--space-6);
}
.site-nav li, .lang-switch li { margin: 0; }
.site-nav a {
  display: inline-block;
  padding: var(--space-2) 0;
  min-height: var(--control-min-height);
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }

/* Languages are plain links, never a select (brief 14). */
.lang-switch { flex-basis: 100%; }
.lang-switch a {
  display: inline-block;
  padding: var(--space-2) 0;
  color: var(--text-secondary);
  font-size: var(--text-small);
  text-decoration: underline;
}
.lang-switch a[aria-current="true"] { color: var(--text); font-weight: 600; }
.lang-switch a:hover { color: var(--accent); }

@media (min-width: 60em) {
  .nav-toggle { display: none; }
  .site-nav { display: block; flex-basis: auto; }
  .lang-switch { flex-basis: auto; margin-left: var(--space-4); }
  .lang-switch ul { gap: 0 var(--space-4); }
}

.breadcrumbs { font-size: var(--text-small); color: var(--text-secondary); margin-bottom: var(--space-4); }
.breadcrumbs a { color: var(--text-secondary); }
.breadcrumbs a:hover { color: var(--accent); }
.byline { color: var(--text-secondary); font-size: var(--text-small); margin-top: calc(-1 * var(--space-2)); }

/* ============================================================ 6. footer */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: var(--text-small);
  margin-top: var(--space-16);
}
.footer-inner { padding-top: var(--space-8); padding-bottom: var(--space-8); }
.footer-company { color: var(--text); }
.footer-company strong { color: var(--text); }
.footer-heading {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin: var(--space-6) 0 var(--space-2);
}
.footer-links {
  list-style: none;
  padding: 0;
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}
.footer-links li { margin: 0; }
.footer-verify, .footer-note { max-width: var(--reading-max); }
.footer-copy { margin: var(--space-6) 0 0; }

/* ============================================================ 7. hero and prose blocks */
.hero {
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--border-soft);
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-small);
  font-weight: 650;
  color: var(--text-secondary);
  margin-bottom: var(--space-3);
}
.hero h1 { margin-bottom: var(--space-4); }
.lead { font-size: var(--text-lead); color: var(--text-secondary); }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.hero-actions .btn { flex: 1 1 16rem; }
@media (min-width: 40em) { .hero-actions .btn { flex: 0 0 auto; } }

/* ============================================================ 8. buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font: inherit;
  font-size: var(--text-body);
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  padding: var(--space-3) var(--space-6);
  min-height: var(--control-min-height);
  min-width: var(--control-min-height);
  color: var(--text);
  background: var(--surface);
  border: 2px solid var(--border-control);
  border-radius: var(--radius-control);
  cursor: pointer;
  overflow-wrap: break-word;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-contrast);
}
.btn--primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-contrast); }
/* Secondary: white surface, dark frame — must not read as disabled (Codex 3.3). */
.btn--secondary {
  background: var(--surface);
  border-color: var(--border-control);
  color: var(--text);
}
.btn--secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--accent);
  text-decoration: underline;
  padding-left: var(--space-2);
  padding-right: var(--space-2);
}
.btn--quiet:hover { color: var(--accent-hover); }
.btn--small { font-size: var(--text-small); padding: var(--space-2) var(--space-4); }
.btn--large { width: 100%; }
@media (min-width: 40em) { .btn--large { width: auto; } }
.btn[disabled], .btn[aria-disabled="true"] { opacity: 0.65; cursor: progress; }
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin: var(--space-4) 0 0; }

/* ============================================================ 9. cards, steps, FAQ, CTA */
.card-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 40em) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64em) { .card-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}
.card h3 { margin-bottom: var(--space-2); }
.card h3 a { color: var(--text); text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card p { margin: 0; color: var(--text-secondary); max-width: none; }
.card:has(h3 a):hover { border-color: var(--accent); }
.card:has(h3 a):hover h3 a { color: var(--accent); text-decoration: underline; }
.card:has(a:focus-visible) { outline: 3px solid var(--focus); outline-offset: 3px; }

/* fact card: figure or fact, then the explanation, then the date (Codex 3.3) */
.fact-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 48em) { .fact-grid { grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); } }
.fact {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-6);
}
.fact__value { font-size: var(--h3); font-weight: 650; margin: 0 0 var(--space-1); }
.fact__text { margin: 0 0 var(--space-2); max-width: none; }
.fact__date { margin: 0; font-size: var(--text-small); color: var(--text-secondary); }

.trust-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-width: none;
  display: grid;
  gap: var(--space-2) var(--space-6);
  grid-template-columns: 1fr;
}
.trust-list li { padding-left: 1.1em; position: relative; }
.trust-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.62em;
  width: 0.45em; height: 0.45em;
  border-radius: 50%;
  background: var(--accent);
}
@media (min-width: 48em) { .trust-list { grid-template-columns: repeat(2, 1fr); } }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; max-width: none; display: grid; gap: var(--space-6); }
.steps li { counter-increment: step; position: relative; padding-left: 3.5rem; margin: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 2.5rem; height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
}
.steps h3 { font-size: var(--text-lead); margin-bottom: var(--space-1); }
.steps p { margin: 0; color: var(--text-secondary); max-width: none; }
@media (min-width: 48em) { .steps { grid-template-columns: repeat(3, 1fr); } }

.faq > h2 { margin-bottom: var(--space-4); }
.faq-item { border-top: 1px solid var(--border-soft); padding: var(--space-4) 0; }
.faq-item h3 { font-size: var(--text-lead); margin-bottom: var(--space-2); }
.faq-item p:last-child { margin-bottom: 0; }

.cta-band {
  background: var(--accent-soft);
  border-radius: var(--radius-card);
  padding: var(--space-6);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-4);
}
.cta-band p { margin: 0; font-size: var(--text-lead); font-weight: 600; flex: 1 1 16rem; }

/* ============================================================ 10. tables */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  margin-bottom: var(--space-3);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
caption { text-align: left; padding: var(--space-3) var(--space-4); color: var(--text-secondary); font-size: var(--text-small); }
th, td {
  text-align: left;
  vertical-align: top;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-soft);
}
thead th { background: var(--surface-alt); font-weight: 650; }
tbody th { font-weight: 600; }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }
/* Money and hours right-aligned (Codex 3.3). */
td.num, th.num, .num { text-align: right; white-space: nowrap; }
.table-wrap table { min-width: 30rem; }          /* wide data tables may scroll inside the frame */
.table-section > p:last-child { margin-bottom: 0; }
.unit { font-weight: 450; color: var(--text-secondary); font-size: var(--text-small); display: block; }

/* ============================================================ 11. notes, disclaimer, badges */
.note {
  border-left: 3px solid var(--border-control);
  background: var(--surface);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  padding: var(--space-3) var(--space-4);
  color: var(--text-secondary);
  font-size: var(--text-small);
  max-width: var(--reading-max);
}
.note--info { border-left-color: var(--accent); }
.note--warning { border-left-color: var(--status-attention); }
.note p:last-child { margin-bottom: 0; }

/* The disclaimer is plain running text, always visible, never an accordion
   (PROEKT-RESHENIYA 1.15). A hairline above it is the only decoration. */
.disclaimer {
  max-width: var(--reading-max);
  color: var(--text);
  font-size: var(--text-body);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-4);
}

.data-version {
  font-size: var(--text-small);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-3);
  max-width: var(--reading-max);
}

/* Grey "For review" marker — never a green "approved" (Codex 3.3). */
.badge {
  display: inline-block;
  font-size: var(--text-small);
  font-weight: 650;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-control);
  /* not a pill: a long label wraps to three lines on a phone and the round ends cut into the text */
  border-radius: .9rem;
  line-height: 1.4;
  background: var(--surface-alt);
  color: var(--status-unknown);
}

/* ============================================================ 12. forms */
.calculator, .form-section {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-6);
}
@media (min-width: 48em) { .calculator, .form-section { padding: var(--space-8); } }
.calculator > h2:first-child, .form-section > h2:first-child { margin-top: 0; }
.calc-intro, .form-intro { color: var(--text-secondary); }

fieldset { border: 0; margin: 0 0 var(--space-6); padding: 0; min-width: 0; }
legend { padding: 0; }

.field { margin-bottom: var(--space-6); max-width: var(--reading-max); }
.field > label, .field > legend, .field > .label, fieldset.field > legend {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-2);
}
.field--static { display: block; }
.field--static .label { display: inline; font-weight: 600; margin-right: var(--space-2); }
.field--inline { margin: var(--space-2) 0 var(--space-4) var(--space-8); }
.field--inline > label { display: block; font-weight: 550; }

input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="month"], input[type="date"], input[type="url"], input[type="search"],
select, textarea {
  font: inherit;
  width: 100%;
  min-height: var(--control-min-height);
  padding: var(--space-3) var(--space-4);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-control);
}
input[type="number"] { width: 8rem; font-variant-numeric: tabular-nums; }
select { appearance: auto; }
textarea { resize: vertical; min-height: 8rem; }
input:hover, select:hover, textarea:hover { border-color: var(--text-secondary); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[disabled], select[disabled], textarea[disabled] { background: var(--surface-alt); color: var(--text-secondary); }
::placeholder { color: var(--text-secondary); opacity: 1; }

/* label above, hint below, error below the hint; a placeholder never replaces a label */
.help { color: var(--text-secondary); font-size: var(--text-small); margin: var(--space-2) 0 0; max-width: var(--reading-max); }
.field-error {
  color: var(--status-blocked);
  font-size: var(--text-small);
  font-weight: 600;
  margin: var(--space-2) 0 0;
}
.field-error::before { content: "× "; }
.req { color: var(--status-blocked); font-weight: 700; }
.optional { font-weight: 450; font-size: var(--text-small); }

.field--invalid > label,
.field--invalid > legend { color: var(--status-blocked); }
.field--invalid input, .field--invalid select, .field--invalid textarea,
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--status-blocked);
  border-width: 2px;
}

/* answer card: real radio or checkbox, the whole line is the label, selection is
   shown by the frame and by the control's own mark (Codex 3.3) */
.radio, .field--check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  padding: var(--space-3) var(--space-4);
  min-height: var(--control-min-height);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
}
.radio label, .field--check label { font-weight: 450; margin: 0; flex: 1; }
input[type="radio"], input[type="checkbox"] {
  width: 1.375rem; height: 1.375rem;
  margin: 0.15rem 0 0;
  flex: none;
  accent-color: var(--accent);
}
.radio:hover, .field--check:hover { border-color: var(--border-control); }
.radio:has(input:checked), .field--check:has(input:checked) {
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px);
}
.radio:has(input:focus-visible), .field--check:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
/* the card carries the ring; the control keeps its own only where :has() is unsupported */
.radio:has(input:focus-visible) input:focus-visible,
.field--check:has(input:focus-visible) input:focus-visible { outline: none; }
.field--radios .help, .field--radios .field-error { margin-top: var(--space-3); }
.field--radios .field--inline { margin-left: var(--space-8); }

/* status lines of a form */
.form-status {
  border-left: 3px solid var(--border-control);
  background: var(--surface-alt);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  padding: var(--space-3) var(--space-4);
  max-width: var(--reading-max);
}
.form-status.is-error, .form-status--error { border-left-color: var(--status-blocked); }
.form-status.is-ok, .form-status--ok { border-left-color: var(--status-positive); }

.form-summary {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--status-attention);
  background: var(--surface);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  max-width: var(--reading-max);
}
.form-summary--error { border-left-color: var(--status-blocked); }
.form-summary--info { border-left-color: var(--accent); }
.form-summary h2, .form-summary h3 { font-size: var(--text-lead); margin: 0 0 var(--space-2); }
.form-summary ul, .form-summary ol { margin-bottom: 0; }

.form-thanks {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--status-positive);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--surface);
  padding: var(--space-6);
}
.form-thanks__title, .form-thanks h2, .form-thanks h3 { margin-top: 0; }
.form-thanks__id {
  font-family: var(--mono);
  font-size: var(--text-lead);
  font-weight: 650;
  letter-spacing: 0.02em;
  margin: var(--space-4) 0;
}
.form-thanks__steps { margin: 0 0 var(--space-4); padding-left: 1.4em; }
.form-thanks__note { color: var(--text-secondary); }
.form-thanks__small { font-size: var(--text-small); color: var(--text-secondary); margin-bottom: 0; }

.free-line, .promise { color: var(--text-secondary); font-size: var(--text-small); margin-top: var(--space-4); }
.lead-form { max-width: var(--reading-max); }
.lead-form--compact .field { margin-bottom: var(--space-4); }
/* honeypot: the wrapper is off-screen (.hp-field/.gw-hp above), the input never shows */
.hp { display: none; }
.docs-request {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-soft);
}
.docs-request h3 { margin-bottom: var(--space-2); }

/* ============================================================ 13. calculator: steps */
.calc-form > p:last-child, .calc-form > fieldset:last-child { margin-bottom: 0; }

/* Step indicator (assets/calc-ui.js builds ol.calc-progress > li.calc-progress__item,
   the item text already carries "1. Short name"). The current step is also named in the
   visible step title and in .calc-step-label[aria-live], and a finished step gets a tick,
   so the state never rests on colour alone. */
.calc-steps { margin: 0 0 var(--space-6); }
.calc-progress {
  list-style: none;
  margin: 0 0 var(--space-3);
  padding: 0;
  max-width: none;
  display: grid;
  gap: var(--space-2);
}
@media (min-width: 40em) { .calc-progress { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: var(--space-4); } }
.calc-progress__item {
  margin: 0;
  padding: var(--space-3) 0 0;
  border-top: 3px solid var(--border-soft);
  color: var(--text-secondary);
  font-size: var(--text-small);
}
.calc-progress__item.is-done { border-top-color: var(--accent); }
.calc-progress__item.is-done::after { content: " \2713"; font-weight: 700; color: var(--accent); }
.calc-progress__item.is-current,
.calc-progress__item[aria-current="step"] {
  border-top-color: var(--accent);
  border-top-width: 4px;
  color: var(--text);
  font-weight: 650;
}
/* "Step 2 of 3" spoken to screen readers and shown to everyone */
.calc-step-label { margin: 0; color: var(--text-secondary); font-size: var(--text-small); }

/* per-step error summary (role="alert", focused before the fields) */
.form-errors {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--status-blocked);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--surface);
  padding: var(--space-3) var(--space-4);
  margin: 0 0 var(--space-4);
  max-width: var(--reading-max);
}
.form-errors[hidden] { display: none; }
.form-errors ul, .form-errors ol, .form-errors p:last-child { margin-bottom: 0; }

/* answers so far, on the last step, each with an Edit button */
.calc-summary { margin: 0 0 var(--space-6); }
.calc-summary h4 { margin-bottom: var(--space-2); }
.calc-summary__list { margin: 0; max-width: var(--reading-max); }
.calc-summary__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--border-soft);
}
.calc-summary__row dt { flex: 1 1 12rem; color: var(--text-secondary); font-size: var(--text-small); }
.calc-summary__row dd { flex: 1 1 14rem; margin: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); align-items: baseline; }
.calc-summary__row dd > span { font-weight: 600; }

/* a button that behaves like a link ("Edit", "go to step"): inline target, so 36 px tall
   instead of the 48 px of a real button (WCAG 2.5.8 asks for 24 px) */
.link {
  font: inherit;
  color: var(--accent);
  background: none;
  border: 0;
  padding: var(--space-1) var(--space-2);
  min-height: 2.25rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
  cursor: pointer;
}
.link:hover { color: var(--accent-hover); }

/* one step of the form; hidden steps keep their values */
.calc-step { margin: 0 0 var(--space-6); }
.calc-step[hidden] { display: none; }
.calc-step__title { font-size: var(--text-lead); margin-bottom: var(--space-4); }
.calc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-soft);
}
.calc-nav .btn--primary { order: 2; }
@media (max-width: 39.99em) { .calc-nav .btn { flex: 1 1 100%; } }

/* ============================================================ 14. calculator: result */
.calc-result { margin-top: var(--space-8); border-top: 2px solid var(--accent); padding-top: var(--space-6); }
.calc-result > h2:first-child { margin-top: 0; }
.calc-result[hidden] { display: none; }

.calc-status {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--status-unknown);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--surface);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-6);
}
.calc-status h3 { font-size: var(--text-lead); margin-top: 0; }
.calc-status p:last-child { margin-bottom: 0; }

.calc-row { padding: var(--space-4) 0; border-bottom: 1px solid var(--border-soft); }
/* calc-ui.js writes one row per result line: calc-row--group, --rates, --shift,
   --supplement, --gross, --deductions, --net, --conditional, --raise, --notes,
   --work-right, --disclaimer, --version, plus calc-status for a manual-assessment answer.
   All share the row frame below; only rows that need a different frame are listed again. */
.calc-row--group, .calc-row--rates, .calc-row--shift, .calc-row--supplement,
.calc-row--gross, .calc-row--deductions, .calc-row--notes { border-bottom: 1px solid var(--border-soft); }
.calc-row > h3 {
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  font-weight: 650;
  margin-bottom: var(--space-2);
}
.calc-row .value {
  font-size: var(--h3);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.calc-row ul { margin: var(--space-2) 0 0; padding-left: 1.3em; }
.calc-row p:last-child, .calc-row ul:last-child { margin-bottom: 0; }
.calc-row--net {
  background: var(--accent-soft);
  border-bottom: 0;
  border-radius: var(--radius-card);
  margin: var(--space-4) 0;
  padding: var(--space-6);
}
.calc-row--net .value { font-size: var(--result); line-height: var(--line-heading); }
.calc-row--disclaimer, .calc-row--conditional, .calc-row--raise, .calc-row--version, .calc-row--work-right { border-bottom: 0; }
.calc-row--version { padding-bottom: 0; }
.calc-row .disclaimer, .calc-row .data-version { border-top: 0; padding-top: 0; }

.deductions { list-style: none; padding: 0; margin: 0; max-width: var(--reading-max); }
.deductions li {
  display: flex;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) 0;
  border-bottom: 1px dotted var(--border-soft);
  margin: 0;
}
.deductions li > span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }

.calc-details { margin-top: var(--space-3); }
.calc-details summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: var(--space-2) 0; min-height: var(--control-min-height); }
.calc-details summary:hover { color: var(--accent-hover); }
.calc-details ul { margin-top: var(--space-2); }

.raise-group { margin-bottom: var(--space-4); }
.raise-group h4 { margin: 0 0 var(--space-1); font-size: var(--text-body); }
.raise-group ul { margin: 0; }
.calc-actions { margin-top: var(--space-6); }
.calc-actions .sub { margin-top: var(--space-2); }

/* Two pay-group columns side by side. Fixed layout plus a small type step keep the
   table inside 320 px, so it never scrolls sideways (PROEKT-RESHENIYA 1.15). */
.calc-table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
  margin: 0 0 var(--space-4);
}
.table-wrap .calc-table { min-width: 0; }
.calc-table th, .calc-table td {
  padding: var(--space-2) var(--space-2);
  border-bottom: 1px solid var(--border-soft);
  overflow-wrap: break-word;
  hyphens: auto;
}
.calc-table thead th { background: var(--surface-alt); text-align: right; font-size: var(--text-small); }
.calc-table thead th:first-child { text-align: left; }
.calc-table tbody th { text-align: left; font-weight: 600; font-size: var(--text-small); color: var(--text-secondary); }
.calc-table td { text-align: right; white-space: nowrap; }
.calc-table tbody tr:last-child th, .calc-table tbody tr:last-child td { border-bottom: 0; }
/* fixed layout takes the column widths from the first row: label column wide enough for
   two words per line, the two group columns wide enough for "3 116.80 EUR" without wrapping */
.calc-table col.calc-table__label { width: 44%; }
.calc-table thead th:first-child, .calc-table tbody th { width: 42%; }
.calc-table tfoot th, .calc-table tfoot td,
.calc-table tr.is-total th, .calc-table tr.is-total td,
table tr.is-total th, table tr.is-total td { font-weight: 700; border-top: 2px solid var(--border-control); }
/* one <tbody> per block (pay, deductions, net): a visible seam between them */
.calc-table tbody + tbody th, .calc-table tbody + tbody td { border-top: 1px solid var(--border-control); }
@media (max-width: 26em) {
  .calc-table { font-size: 0.875rem; }
  .calc-table th, .calc-table td { padding: var(--space-2) var(--space-1); }
  .calc-table thead th:first-child, .calc-table tbody th { width: 38%; }
}

/* two take-home scenarios (20 % / 35 %), each line labelled as an example */
.calc-scenarios { list-style: none; padding: 0; margin: var(--space-2) 0 0; max-width: var(--reading-max); font-variant-numeric: tabular-nums; }
.calc-scenarios li { padding: var(--space-1) 0; border-bottom: 1px dotted var(--border-soft); margin: 0; }
.calc-scenarios li:last-child { border-bottom: 0; }

/* "a separate tax check is needed" — no net figure is shown at all */
.calc-status--tax { border-left-color: var(--status-attention); }
.calc-status h4 { margin-top: 0; font-size: var(--text-body); }

/* answers changed after the last calculation: figures stay, but they are marked as old */
.calc-stale {
  margin: 0 0 var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-left: 3px solid var(--status-attention);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--surface-alt);
  font-weight: 600;
  max-width: var(--reading-max);
}
.calc-result.is-stale { border-top-color: var(--status-attention); }
.calc-result.is-stale .value { color: var(--text-secondary); }

/* snapshot of the calculation attached to the profile form (assets/forms.js) */
.calc-attached {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  background: var(--surface-alt);
  padding: var(--space-4);
  margin-bottom: var(--space-6);
  max-width: var(--reading-max);
}
.calc-attached__title { font-size: var(--text-body); font-weight: 650; margin: 0 0 var(--space-2); }
.calc-attached p:last-child, .calc-attached dl:last-child { margin-bottom: 0; }

/* ============================================================ 15. traffic light */
/* Four states, each with its own glyph and its own word next to it: colour is never the
   only carrier of meaning (Codex 3.3, WCAG 2.1 AA 1.4.1). The glyph is decorative
   (aria-hidden in the markup); the state is always written out in .requirement-state,
   the legend or the cell text. */
.light {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 1.5rem; height: 1.5rem;
  margin-top: 0.15rem;
  border: 2px solid var(--status-unknown);
  border-radius: 50%;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  color: var(--status-unknown);
  background: var(--surface);
}
.light::before { content: "\2014"; }                        /* — not checked */
.light--green { border-color: var(--status-positive); color: var(--accent-contrast); background: var(--status-positive); }
.light--green::before { content: "\2713"; }                 /* ✓ checked */
.light--yellow { border-color: var(--status-attention); color: var(--status-attention); }
.light--yellow::before { content: "!"; }                    /* ! action needed */
.light--red { border-color: var(--status-blocked); color: var(--status-blocked); }
.light--red::before { content: "\00D7"; }                   /* × requirement not met */
.light--grey { border-color: var(--status-unknown); color: var(--status-unknown); }
.light--grey::before { content: "\2014"; }
.light--ai_ok { border-color: var(--status-ai); color: var(--status-ai); }
.light--ai_ok::before { content: "\2713"; }                 /* ✓ checked by code or AI, not signed: outline only */
.light--human { border-color: var(--status-decide); color: var(--status-decide); }
.light--human::before { content: "?"; }                     /* ? a person decides */
.light--n_a { border-color: var(--status-unknown); color: var(--status-unknown); opacity: .6; }
.dossier-code { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 1.8rem; letter-spacing: .25em; font-weight: 700; margin: .25rem 0; }
.light--n_a::before { content: "\2013"; text-decoration: line-through; }   /* – not applicable */

/* inline status text (same four states, word + glyph) */
.status { display: inline-flex; align-items: baseline; gap: 0.4em; font-weight: 600; }
.status::before { content: "\2014"; color: var(--status-unknown); font-weight: 700; }
.status--positive::before, .status--ok::before { content: "\2713"; color: var(--status-positive); }
.status--attention::before, .status--warn::before { content: "!"; color: var(--status-attention); }
.status--blocked::before, .status--bad::before { content: "\00D7"; color: var(--status-blocked); }
.status--unknown::before, .status--none::before { content: "\2014"; color: var(--status-unknown); }

/* ============================================================ 16. cabinet (worker / client view) */
.cabinet { margin-top: var(--space-4); }
.cabinet-loading { color: var(--text-secondary); }
.cabinet-body > h2:first-child, .cabinet-body > h3:first-child { margin-top: 0; }
.cabinet-body section { margin-bottom: var(--space-8); }
.cabinet-anon {
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  background: var(--surface);
  padding: var(--space-4) var(--space-6);
  max-width: var(--reading-max);
}
.cabinet-form { max-width: 28rem; }

/* fact list: label on the left, value on the right, one pair per row */
.facts { display: grid; gap: 0; margin: 0 0 var(--space-6); max-width: var(--reading-max); }
.facts dt {
  font-size: var(--text-small);
  color: var(--text-secondary);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-soft);
}
.facts dd { margin: 0 0 var(--space-3); padding-bottom: var(--space-3); font-weight: 600; }
@media (min-width: 40em) {
  .facts { grid-template-columns: minmax(10rem, 40%) 1fr; column-gap: var(--space-6); }
  .facts dt { grid-column: 1; }
  .facts dd { grid-column: 2; padding-top: var(--space-3); border-top: 1px solid var(--border-soft); }
}

.requirements { list-style: none; padding: 0; margin: 0 0 var(--space-6); max-width: var(--reading-max); }
.requirements > li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  padding: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
}
.requirement { background: var(--surface); }
.requirement--red { border-left: 3px solid var(--status-blocked); }
.requirement--yellow { border-left: 3px solid var(--status-attention); }
.requirement--green { border-left: 3px solid var(--status-positive); }
.requirement--grey { border-left: 3px solid var(--status-unknown); }
.requirement--ai_ok { border-left: 3px solid var(--status-ai); }
.requirement--human { border-left: 3px solid var(--status-decide); }
.requirement--n_a { border-left: 3px solid var(--status-unknown); opacity: .75; }
.requirement-name { font-weight: 650; margin: 0; }
.requirement-state { margin: 0; color: var(--text-secondary); font-size: var(--text-small); }
.requirements .sub { margin-top: var(--space-1); }

.legend { list-style: none; padding: 0; margin: 0 0 var(--space-6); max-width: var(--reading-max); display: grid; gap: var(--space-2); }
.legend li { display: flex; align-items: flex-start; gap: var(--space-3); margin: 0; }

.worker-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-6);
  margin-bottom: var(--space-3);
}
.worker-card h3 { font-size: var(--text-lead); margin-bottom: var(--space-1); }
.worker-card p:last-child { margin-bottom: 0; }

/* pay statement (ledger): one row per pay period, figures right-aligned and
   tabular; eleven columns do scroll inside .table-wrap on a phone */
table.ledger { font-size: var(--text-small); min-width: 46rem; }
.ledger th, .ledger td { padding: var(--space-2) var(--space-3); }
.ledger thead th { white-space: nowrap; text-align: right; }
.ledger thead th:first-child, .ledger tbody th { text-align: left; }
.ledger tbody th { white-space: nowrap; font-weight: 600; }
.ledger td { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.ledger td:last-child { text-align: left; }
.ledger tfoot th, .ledger tfoot td { font-weight: 700; border-top: 2px solid var(--border-control); }

/* ============================================================ 17. documents, history, package modal */
/* worker view: what still has to be produced, one line per document, traffic light + words */
.documents, .gaps { list-style: none; padding: 0; margin: 0 0 var(--space-6); max-width: var(--reading-max); }
.documents > li, .gaps > li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin: 0 0 var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
}
.document--red { border-left: 3px solid var(--status-blocked); }
.document--yellow { border-left: 3px solid var(--status-attention); }
.document--green { border-left: 3px solid var(--status-positive); }
.document--grey { border-left: 3px solid var(--status-unknown); }
.document--ai_ok { border-left: 3px solid var(--status-ai); }
.document--human { border-left: 3px solid var(--status-decide); }
.document--n_a { border-left: 3px solid var(--status-unknown); opacity: .75; }
.document-name { font-weight: 650; margin: 0; }
.document .sub, .documents .sub { margin-top: var(--space-1); }

/* history of an application: a numbered list of dated steps */
.history { list-style: none; counter-reset: hist; padding: 0; margin: 0 0 var(--space-6); max-width: var(--reading-max); }
.history > li {
  counter-increment: hist;
  position: relative;
  margin: 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-8);
  border-bottom: 1px solid var(--border-soft);
}
.history > li::before {
  content: counter(hist) ".";
  position: absolute;
  left: 0;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}
.history > li:last-child { border-bottom: 0; }

/* Package view (client -> "answer for the labour inspectorate"). assets/cabinet.js builds
   .modal (the overlay, click closes) > .modal__dialog[role=dialog] > .modal__title +
   .modal__body + .modal__actions. Printing rules in section 18. */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-4);
  overflow-y: auto;
  background: rgba(16, 35, 27, .55);
}
.modal__dialog {
  width: min(56rem, 100%);
  max-height: calc(100vh - 2 * var(--space-12));
  /* iPhone Safari: 100vh is the height with the toolbars hidden, so the dialog's buttons ended under the bottom
     toolbar; dvh is the height actually visible (owner's phone check, 28.09.2026) */
  max-height: calc(100dvh - 2 * var(--space-6));
  margin: var(--space-6) 0;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
}
.modal__dialog:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.modal__title {
  margin: 0;
  padding: var(--space-4) var(--space-6);
  border-bottom: 1px solid var(--border-soft);
  font-size: var(--text-lead);
}
.modal__body { padding: var(--space-6); overflow-y: auto; }
.modal__body > *:last-child { margin-bottom: 0; }
.modal__body h3 { font-size: var(--text-lead); }
.modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--border-soft);
  background: var(--surface-alt);
}

/* the statement itself: plain text as delivered, wrapped, never reflowed by us */
.pack-text {
  margin: 0 0 var(--space-4);
  padding: var(--space-4);
  max-width: none;
  background: var(--surface-alt);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-control);
  font-family: var(--mono);
  font-size: var(--text-small);
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  overflow-x: auto;
}

/* ============================================================ 18. print */
@media print {
  :root {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --surface-alt: #FFFFFF;
    --text: #000000;
    --text-secondary: #333333;
    --accent: #00443C;
    --accent-soft: #FFFFFF;
    --border-soft: #999999;
    --border-control: #666666;
    --shadow: none;
  }
  body { background: #FFFFFF; color: #000000; font-size: 11pt; }
  .site-header, .site-footer, .skip-link, .nav-toggle, .site-nav, .lang-switch,
  .btn, .calc-actions, .cta-band, .modal__actions, .no-print { display: none !important; }
  .print-only { display: block; }
  .page { padding: 0; }
  .card, .fact, .calculator, .form-section, .worker-card, .requirements > li { border-color: #999999; }
  .calc-result, .calc-row, .fact, .card, .requirements > li, tr, .modal__body { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  a { color: #000000; }
  .table-wrap { overflow: visible; border-color: #999999; }
  .table-wrap table, table.ledger { min-width: 0; font-size: 9pt; }

  /* An open package view is the whole printout: the page behind it is dropped and the
     overlay becomes an ordinary block. (assets/cabinet.js also prints the statement text
     on its own through a blank iframe, which does not depend on this stylesheet.) */
  body:has(.modal) > *:not(.modal) { display: none !important; }
  .modal {
    position: static;
    inset: auto;
    display: block;
    padding: 0;
    overflow: visible;
    background: none;
  }
  .modal__dialog {
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    border: 0;
    box-shadow: none;
    display: block;
  }
  .modal__title { padding: 0 0 var(--space-3); }
  .modal__body { padding: 0; overflow: visible; }
  .pack-text { border: 0; padding: 0; background: none; font-size: 9pt; }
}

/* ============================================================ 19. motion */
@media (prefers-reduced-motion: no-preference) {
  .site-nav a, .btn, .card, .radio, .field--check, .nav-toggle {
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
  }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============================================================ 20. облик «Ведомость» */
/* Бланк расчёта. Цифры моноширинные и табличные везде, где стоит значение; лист без тени;
   единственное усиление в таблице — линия над итогом. Классы те же, разметка та же. */

/* 20.1 цифры бланка. Стек кончается системным моноширинным: знаки светофора (\2713 ✓) в наш
   файл не входят (unicode-range выше), и браузер берёт их у системы, а не рисует пустое место. */
.calc-table, .calc-table th, .calc-table td,
.deductions, .deductions li, .calc-scenarios,
table.ledger, .ledger th, .ledger td,
.facts dd, .calc-row .value, .calc-summary__row dd > span,
td.num, th.num, .num, .unit, .fact__value, .data-version, .form-thanks__id {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
}

/* 20.2 лист документа: почти прямые углы, ни одной тени */
.site-header { box-shadow: none; border-bottom: 1px solid var(--border-control); }
.card, .fact, .calculator, .form-section, .worker-card, .calc-attached,
.form-thanks, .table-wrap, .modal__dialog { box-shadow: none; }
.btn, .nav-toggle, .radio, .field--check,
input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
input[type="month"], input[type="date"], input[type="url"], input[type="search"],
select, textarea { border-radius: 2px; }

/* 20.3 строка бланка: линейка вместо рамки, подпись не капителью */
.calc-row { padding: var(--space-3) 0; }
.calc-row > h3 { text-transform: none; letter-spacing: 0.01em; font-weight: 650; }
.calc-row--net {
  background: transparent;
  border-radius: 0;
  border-top: 2px solid var(--text);
  margin: var(--space-2) 0 0;
  padding: var(--space-4) 0 var(--space-3);
}
.calc-row--net .value { font-size: var(--result); }
.deductions li { border-bottom: 1px solid var(--border-soft); }

/* 20.4 итог таблицы — то самое единственное усиление */
.calc-table tfoot th, .calc-table tfoot td,
.calc-table tr.is-total th, .calc-table tr.is-total td,
table tr.is-total th, table tr.is-total td,
.ledger tfoot th, .ledger tfoot td { border-top: 2px solid var(--text); }
.calc-table thead th, .ledger thead th, thead th { background: var(--surface-alt); }

/* 20.5 оговорка и «чего в цифре нет» — строка бланка, а не подпись под ним */
.disclaimer { border-top: 1px solid var(--text); color: var(--text); }
.calc-row--disclaimer { border-bottom: 0; }

/* 20.6 шапка документа, а не плакат */
.hero { padding-bottom: var(--space-6); }
.eyebrow { letter-spacing: 0.1em; }
.lead { color: var(--text); }
.cta-band {
  background: var(--surface);
  border: 1px solid var(--border-control);
  border-radius: 2px;
}
.cta-band p { font-weight: 650; }

/* 20.7 тач-цель встроенной кнопки «изменить»: 36 px клиента → 44 px.
   WCAG 2.5.8 просит 24, телефонная проверка сессии datacenters мерит 44; шире — безопаснее. */
.link { min-height: 2.75rem; }

/* 20.8 строка бланка «период · источник, проверено» под каждой строкой результата.
   Добавлено сессией datacenters 27.09.2026 при вводе направления (пункт 3 README направлений:
   «полная строка бланка» — это разметка calc-ui.js, не облик). Класс новый, единственный сверх 139.
   Пишется тем же шрифтом, что и подписи, а не цифрами: это подпись под значением, а не значение. */
.calc-ledger {
  font-family: var(--font);
  font-size: var(--text-small);
  color: var(--text-secondary);
  border-top: 1px solid var(--border-soft);
  padding-top: var(--space-1);
  margin-top: var(--space-2);
}
.calc-ledger a { color: inherit; }

/* 20.10 illustrations (blocks of type image, ZS-V3-03): inline SVG from assets/illustrations/, styled by gw-illustrations.css */
.illustration { margin: 1.5rem 0; }
.illustration svg { display: block; width: 100%; height: auto; max-width: 1120px; }
.illustration .illustration__mobile { display: none; }
@media (max-width: 1079px) { .illustration .illustration__wide { display: none; } .illustration .illustration__mobile { display: block; } }
.illustration figcaption { font-size: .9rem; color: var(--text-secondary, #4A525B); margin-top: .5rem; }

/* 20.11 hero with a scene (image / image_mobile in the hero block): dark overlay, light text; the photo is decorative */
.hero--image { position: relative; isolation: isolate; color: #fff; padding: clamp(2.5rem, 6vw, 5rem) var(--space-5); margin: 0 calc(-1 * var(--space-5)) var(--space-6); min-height: 24rem; display: flex; align-items: flex-end; border-bottom: 0; overflow: hidden; }
.hero--image .hero__media, .hero--image .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; margin: 0; }
.hero--image::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(10,16,24,.82) 0%, rgba(10,16,24,.62) 55%, rgba(10,16,24,.28) 100%); }
.hero--image .hero__content { max-width: 40rem; }
.hero--image .eyebrow, .hero--image .lead { color: rgba(255,255,255,.86); }
.hero--image h1 { color: #fff; text-wrap: balance; }
.hero--image .btn--secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.7); }
@media (max-width: 47.99em) { .hero--image { min-height: 30rem; align-items: flex-end; } .hero--image::before { background: linear-gradient(180deg, rgba(10,16,24,.15) 0%, rgba(10,16,24,.78) 55%, rgba(10,16,24,.9) 100%); } }

/* 20.12 compact header: one row of menu items on wide screens, quieter language row */
@media (min-width: 60em) {
  .site-nav ul { gap: 0 var(--space-4); }
  .site-nav a { font-size: 0.95rem; padding: var(--space-1) 0; min-height: 0; }
  .lang-switch a { font-size: 0.8rem; padding: 0 0 var(--space-1); }
  .header-inner { padding-top: var(--space-2); padding-bottom: var(--space-2); }
}
.illustration--photo img { width: 100%; height: auto; border-radius: 4px; display: block; }

/* 20.13 card pictograms, collapsible FAQ, note kinds, dark band */
.card--icon { padding-top: var(--space-5); }
.card__icon { color: var(--accent); display: block; margin-bottom: var(--space-3); }
.faq-item > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) 0; }
.faq-item > summary::-webkit-details-marker { display: none; }
.faq-item > summary::before { content: "+"; font-weight: 700; color: var(--accent); width: 1.25rem; flex: 0 0 auto; text-align: center; }
.faq-item[open] > summary::before { content: "\2212"; }
.faq-item > summary h3 { margin: 0; font-size: 1.05rem; }
.faq-item > p { margin: 0 0 var(--space-4) 1.95rem; }
@media print { .faq-item { display: block; } .faq-item > p { display: block; } }
.note--version { background: transparent; border-left: 0; border-top: 1px solid var(--border-soft); padding: var(--space-2) 0; font-size: var(--text-small); color: var(--text-secondary); }
.note--warning { border-left-color: var(--status-attention); background: color-mix(in srgb, var(--status-attention) 8%, var(--surface)); }
.cta-band { background: #14202E; color: #fff; border: 0; border-radius: 4px; padding: var(--space-6) var(--space-5); }
.cta-band p { color: rgba(255,255,255,.9); }
.cta-band .btn--primary { background: #fff; color: #14202E; border-color: #fff; }

/* 20.14 folded tables (table blocks with collapsible: true): open on wide screens, closed on a phone */
.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: var(--space-3); }
.fold > summary::-webkit-details-marker { display: none; }
.fold > summary h2 { margin: 0; }
.fold > summary::after { content: "\25BE"; color: var(--accent); margin-left: auto; font-size: 1.2rem; }
.fold[open] > summary::after { content: "\25B4"; }
@media (min-width: 48em) { .fold > summary::after { display: none; } .fold > summary { cursor: default; } }
.wordmark__mark { color: var(--accent); vertical-align: -6px; margin-right: .5rem; }

/* 20.15 two legs: the header switch and the footer columns */
.site-nav .nav-switch { margin-left: auto; }
.site-nav .nav-switch a { color: var(--accent); border: 1px solid var(--accent); border-radius: 999px; padding: .15rem .8rem; font-weight: 600; }
.site-nav .nav-switch a:hover { background: var(--accent); color: #fff; }
.footer-legs { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4) var(--space-8); margin: var(--space-5) 0; }
@media (max-width: 40em) { .footer-legs { grid-template-columns: 1fr; } }

/* 20.16 the two legs made visible (owner, 28.09.2026): tabs «For companies | For workers» above the header,
   and the workers' leg in the orange of the workwear. html[data-leg] is set by the generator per page. */
:root { --space-5: 20px; }   /* 20.11–20.15 used it and it was never defined: hero text sat on the image edge */
.page > section.hero--image { padding: clamp(2rem, 5vw, 4.5rem) clamp(1.25rem, 4vw, 3rem); border-radius: var(--radius-card); }
.leg-tabs { background: #101A26; }
.leg-tabs__inner { display: flex; gap: 4px; padding-top: 8px; }
.leg-tab {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 9px 22px 10px; min-height: 44px;
  color: rgba(255,255,255,.82); text-decoration: none; font-weight: 650; font-size: .98rem; letter-spacing: .01em;
  border-radius: 8px 8px 0 0; border-top: 3px solid transparent;
}
.leg-tab:hover { color: #fff; background: rgba(255,255,255,.09); }
.leg-tab:focus-visible { outline: 3px solid #fff; outline-offset: -3px; }
.leg-tab.is-active { background: var(--surface); color: var(--text); }
.leg-tab.is-active:hover { color: var(--text); }
.leg-tab--companies.is-active { border-top-color: #12508E; }
.leg-tab--workers.is-active { border-top-color: #D05A12; }
@media (max-width: 40em) { .leg-tab { flex: 1 1 50%; padding: 11px 8px 12px; } }
.site-nav .nav-switch { display: none; }
html[data-leg="workers"] { --accent: #B4430C; --accent-hover: #8F3508; --accent-contrast: #FFFFFF; --accent-soft: #F8E3D6; }
@media (prefers-color-scheme: dark) {
  .leg-tabs { background: #0A0F15; }
  html[data-leg="workers"] { --accent: #F59A5B; --accent-hover: #F8B98C; --accent-contrast: #1A0F08; --accent-soft: #3A2417; }
}

/* 20.17 — the companies' sub-line ("Workforce · Subcontracting · Compliance") is longer than the workers'
   ("Jobs in Finland"): on a phone it broke after the dot. There it takes its own line, without the dot. */
@media (max-width: 40em) {
  html[data-leg="companies"] .wordmark__sep { display: none; }
  html[data-leg="companies"] .wordmark__sub { flex-basis: 100%; }
}

/* 20.18 — the companies page, about half as long (owner 28.09.2026): folds closed on every width, the process as one
   graphic row, print-only lines, the sample badge and the button row under a short text block. */
.fold.fold--closed > summary { cursor: pointer; padding-block: var(--space-3); border-bottom: 1px solid var(--border); }
.fold.fold--closed > summary::after { display: inline-block; }
.fold.fold--closed[open] > summary { border-bottom-color: transparent; margin-bottom: var(--space-3); }
.fold.fold--closed > summary:hover h2 { color: var(--accent); }
.fold.fold--closed > summary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* the enquiry form is folded too: its heading reads as the button it is */
#form-company > .fold--closed > summary { background: var(--accent); color: var(--accent-contrast); border: 0;
  border-radius: var(--radius-control); padding: .9rem 1.2rem; }
#form-company > .fold--closed > summary h2 { color: inherit; font-size: 1.25rem; }
#form-company > .fold--closed > summary:hover h2 { color: inherit; }
#form-company > .fold--closed > summary::after { color: inherit; }
#form-company > .fold--closed > summary:hover { background: var(--accent-hover); }

.process-row-section { margin-block: var(--space-6); }
.process-row { list-style: none; margin: 0; padding: 0; max-width: none; display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-4); }
.process-row__step { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: .35rem; padding: 1rem .5rem; margin: 0; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); }
.process-row__icon { width: 40px; height: 40px; color: var(--accent); }
.process-row__title { font-weight: 800; letter-spacing: .04em; font-size: .95rem; color: var(--text); }
.process-row__text { font-size: var(--text-small); color: var(--text-secondary); line-height: 1.35; }
/* Finnish and Estonian compounds are longer than a third of a phone screen: let them break (hyphenated where the
   browser knows the language) instead of spilling out of the card */
.process-row__title, .process-row__text { overflow-wrap: anywhere; hyphens: auto; -webkit-hyphens: auto; }
.process-row__step:not(:last-child)::after { content: "\2192"; position: absolute; top: 50%; right: -14px;
  transform: translateY(-50%); color: var(--accent); font-weight: 800; font-size: 1.4rem; line-height: 1; z-index: 1; }
@media (max-width: 47.99em) {
  .process-row { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3) var(--space-4); }
  .process-row__step { padding: .75rem .35rem; }
  .process-row__step:nth-child(3)::after { content: none; }
  .process-row__icon { width: 32px; height: 32px; }
  .process-row__title { font-size: .78rem; }
  .process-row__text { font-size: .8rem; }
}

@media screen { .note--print { display: none; } }

.badge.badge--demo { display: inline-block; background: #FFF1CC; color: #4D3800; border: 1px solid #E2BD55;
  padding: .35rem .75rem; border-radius: .9rem; line-height: 1.4; font-weight: 650; }   /* wraps on a phone: not a pill */
.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-4); }
@media (prefers-color-scheme: dark) {
  .badge.badge--demo { background: #3A2F12; color: #F2D98C; border-color: #6E5A22; }
}

/* 20.19 — accessibility pass 28.09.2026 (axe, WCAG 2.2 AA): a not-applicable requirement used opacity .75 on the whole
   row — its text fell to 4.15:1; the row is muted by its colour marker only, the text keeps full contrast. A scrolling
   table is a focusable region now: it shows where the keyboard is. */
.requirement--n_a { opacity: 1; }
.requirement--n_a .requirement-name { color: var(--text-secondary); }
.table-wrap:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* 20.20 — "On this page" on a trade page (ZS-10): the H2 sections of the page, built by the generator; open on a wide
   screen, one folded line on a phone. */
.toc { margin-block: var(--space-6); background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: var(--space-4) var(--space-6); }
.toc .fold > summary h2 { font-size: 1.1rem; margin: 0; }
.toc__list { margin: var(--space-3) 0 0; padding-left: 1.4em; max-width: none; columns: 2; column-gap: var(--space-8); }
.toc__list li { break-inside: avoid; margin-bottom: .35rem; }
@media (max-width: 47.99em) { .toc { padding: var(--space-3) var(--space-4); } .toc__list { columns: 1; } }

/* 20.21 — the web designer's phone review (28.09.2026, obzor-telefon): on a phone only the core of a page stays open.
   The desktop version the owner approved does not change — every rule below is phone-only, except the word breaking. */
/* P1: long Finnish and Estonian words broke out of the screen (h1 on /fi/for-companies/, chain steps at 768 px) */
h1, h2, h3, .eyebrow { overflow-wrap: anywhere; }
/* hyphenation only where words are long compounds (fi, et): on a phone Russian and Polish headings came out as
   «срав-нение с классифика-цией» (owner's phone check, 28.09.2026 evening) */
:lang(fi) :is(h1, h2, h3, .eyebrow), :lang(et) :is(h1, h2, h3, .eyebrow) { hyphens: auto; -webkit-hyphens: auto; }

.lang-drop { position: relative; }
.lang-drop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
  min-height: var(--control-min-height); padding: var(--space-2) var(--space-3); border: 1px solid var(--border-control);
  border-radius: var(--radius-control); background: var(--surface); color: var(--text); font-weight: 600;
  font-size: var(--text-small); }
.lang-drop > summary::-webkit-details-marker { display: none; }
.lang-drop > summary::after { content: "\25BE"; color: var(--accent); }
.lang-drop > ul { position: absolute; left: 0; right: auto; top: calc(100% + 4px); max-width: calc(100vw - 2rem); z-index: 30; display: flex; flex-direction: column;
  gap: 0; min-width: 11rem; padding: var(--space-2) var(--space-4); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: 0 8px 24px rgba(0, 0, 0, .14); }
.lang-drop > ul a { display: block; padding: var(--space-2) 0; min-height: 40px; }
@media (min-width: 48em) { .lang-drop { display: none; } }

@media (max-width: 47.99em) {
  /* header: languages in a drop-down next to the menu button; the sub-line under the name on one short line */
  .lang-list { display: none; }
  .lang-switch { flex-basis: auto; order: 2; margin-left: var(--space-2); }
  .nav-toggle { order: 3; }
  .site-nav { order: 4; }
  .wordmark__sub { font-size: .72rem; }

  .illustration--no-phone { display: none; }

  /* ten trade cards → a compact list: title and arrow; the description is on the trade page */
  .cards--compact-phone .card-grid { grid-template-columns: 1fr; gap: 0; border: 1px solid var(--border);
    border-radius: var(--radius-card); overflow: hidden; }
  .cards--compact-phone .card { margin: 0; padding: .75rem .9rem; border: 0; border-bottom: 1px solid var(--border);
    border-radius: 0; box-shadow: none; display: flex; align-items: center; gap: .6rem; }
  .cards--compact-phone .card:last-child { border-bottom: 0; }
  .cards--compact-phone .card p { display: none; }
  .cards--compact-phone .card h3 { margin: 0; font-size: 1rem; flex: 1; }
  .cards--compact-phone .card__icon { width: 26px; height: 26px; flex: none; margin: 0; }

  /* a form folded on a phone opens from a button-like heading */
  .form-section > .fold:not(.fold--closed):not([open]) > summary { background: var(--accent); color: var(--accent-contrast);
    border-radius: var(--radius-control); padding: .9rem 1.1rem; }
  .form-section > .fold:not(.fold--closed):not([open]) > summary h2 { color: inherit; font-size: 1.15rem; }
  .form-section > .fold:not(.fold--closed):not([open]) > summary::after { color: inherit; }

  /* notes that follow each other read as one block */
  .note + .note, .data-version + .note, .note + .data-version { margin-top: .35rem; }

  /* a wide table becomes a card per row: labels from the column headings, no sideways scrolling */
  .table-section--cards table, .table-section--cards tbody, .table-section--cards tr,
  .table-section--cards th, .table-section--cards td { display: block; width: auto; }
  .table-section--cards thead { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
  .table-section--cards .table-wrap { overflow: visible; border: 0; }
  .table-section--cards tr { border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface);
    padding: .6rem .85rem; margin-bottom: .6rem; }
  .table-section--cards th[scope="row"] { font-size: 1.02rem; padding: 0 0 .3rem; border: 0; background: none; }
  .table-section--cards td { padding: .15rem 0; border: 0; }
  .table-section--cards td[data-label]::before { content: attr(data-label) ": "; font-weight: 650; color: var(--text-secondary); }
  .help--wide-only { display: none; }
}

/* 20.22 — the client page on a phone (cabinet.js PHONE): a worker is one tappable line with the counts of states; open
   items first; the verified ones and each requirement's description behind a tap; the legend folded. */
.worker-card--fold > summary { list-style: none; cursor: pointer; display: flex; flex-wrap: wrap; align-items: center;
  gap: .35rem .75rem; padding: .15rem 0; }
.worker-card--fold > summary::-webkit-details-marker { display: none; }
.worker-card--fold > summary::after { content: "\25BE"; margin-left: auto; color: var(--accent); font-size: 1.1rem; }
.worker-card--fold[open] > summary::after { content: "\25B4"; }
.worker-card--fold[open] > summary { margin-bottom: .4rem; }
.worker-card__title { font-weight: 700; font-size: 1.02rem; }
.state-chips { display: inline-flex; flex-wrap: wrap; gap: .3rem .7rem; }
.state-chip { display: inline-flex; align-items: center; gap: .25rem; font-weight: 650; font-size: .92rem; }
.req-rest { margin-top: .5rem; }
.req-rest > summary, .legend-fold > summary { cursor: pointer; color: var(--accent); font-weight: 600; padding: .4rem 0;
  min-height: 40px; }
.legend-fold > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; }
.legend-fold > summary::-webkit-details-marker { display: none; }
.legend-fold > summary::after { content: "\25BE"; }
.legend-fold[open] > summary::after { content: "\25B4"; }
.legend-fold > summary h3 { margin: 0; color: var(--text); }
.req-more > summary { cursor: pointer; color: var(--accent); font-size: var(--text-small); padding: .15rem 0; }
@media (max-width: 47.99em) {
  /* the site cards: the data table's own min-width (30rem) kept the stacked rows wider than the phone */
  .table-section--cards .table-wrap table { min-width: 0; width: 100%; }
  .table-section--cards td, .table-section--cards th { overflow-wrap: anywhere; }
}
/* the site cards: columns past the fourth open by their heading on a phone; on a wide screen they read as plain cells */
@media (min-width: 48em) { .cell-fold > summary { display: none; } }
@media (max-width: 47.99em) {
  .cell-fold > summary { list-style: none; cursor: pointer; color: var(--accent); font-weight: 600; padding: .3rem 0;
    min-height: 36px; display: flex; align-items: center; }
  .cell-fold > summary::-webkit-details-marker { display: none; }
  .cell-fold > summary::after { content: " \25BE"; margin-left: .3rem; }
  .cell-fold[open] > summary::after { content: " \25B4"; }
  .table-section--cards td:has(> .cell-fold) { padding: 0; }
}
@media (max-width: 47.99em) {
  /* the notes under the calculator: one compact block instead of three tall boxes (review: −1 screen) */
  .page > .note, .page > .disclaimer, .page > .data-version { padding: .55rem .75rem; font-size: .88rem; line-height: 1.45; }
  .page > .note + .note, .page > .note + .disclaimer, .page > .disclaimer + .note, .page > .data-version + .note { margin-top: .3rem; }
}

/* 20.23 — phone header and compact list fixes after the first look (28.09.2026). The language drop-down opens
   to the right (left: 0 in 20.21): it sits at the left edge of the two-row phone header, and a panel anchored on
   its right edge opened off the screen — the owner's iPhone screenshot, 28.09.2026 evening. the language list stayed under the
   drop-down (.lang-switch ul outranked .lang-list); the header now is two rows — the name, then language and menu; the
   arrow of a compact trade row sits on the right (the card link keeps its full-card ::after). */
.lang-switch .lang-drop > ul { flex-direction: column; flex-wrap: nowrap; gap: 0; }
@media (max-width: 47.99em) {
  .lang-switch .lang-list { display: none; }
  .header-inner { row-gap: var(--space-2); }
  .wordmark { flex-basis: 100%; }
  .lang-switch { order: 2; margin-left: 0; }
  .nav-toggle { order: 3; margin-left: auto; }
  .cards--compact-phone .card::after { content: "\2192"; color: var(--accent); font-weight: 700; margin-left: auto; }
}
/* 20.24 — a table as one tappable line per row on a phone (sites): the table for a wide screen, the lines for a phone */
.table-cards { display: none; }
@media (max-width: 47.99em) {
  .table-section--rows .table-wrap { display: none; }
  .table-section--rows .table-cards { display: block; border: 1px solid var(--border); border-radius: var(--radius-card);
    overflow: hidden; background: var(--surface); }
  .table-card { border-bottom: 1px solid var(--border); }
  .table-card:last-child { border-bottom: 0; }
  .table-card > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto;
    gap: .1rem .6rem; padding: .7rem .9rem; min-height: 44px; }
  .table-card > summary::-webkit-details-marker { display: none; }
  .table-card > summary::after { content: "\25BE"; color: var(--accent); grid-column: 2; grid-row: 1 / span 2;
    align-self: center; }
  .table-card[open] > summary::after { content: "\25B4"; }
  .table-card__title { font-weight: 700; }
  .table-card__sub { grid-column: 1; color: var(--text-secondary); font-size: var(--text-small); }
  .table-card__body { margin: 0; padding: 0 .9rem .8rem; }
  .table-card__body dt { font-weight: 650; color: var(--text-secondary); font-size: var(--text-small); margin-top: .5rem; }
  .table-card__body dd { margin: .1rem 0 0; overflow-wrap: anywhere; }
}

/* 20.25 — phone check with taps (tests/mobil_audit.py, 28.09.2026): a long Finnish word in a button
   («tilaajavastuuasiakirjat») stuck 6 px out of the hero in style C at 360 px — a button may break a word */
@media (max-width: 47.99em) { .btn { overflow-wrap: anywhere; } }
