/* Leafwrit portal, style 07 «Строгий», layout «Рабочее место» (owner choice 28.10.2026).
   Colours, type, radii and shadows come only from tokens.css. Inter Tight only; no serif anywhere.
   Text always fills its column: no max-width on paragraphs. */

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--layout-topbar) + var(--space-16)); }
html:has(.cookie-dialog[open]), html.nav-open { overflow: hidden; }
body { margin: 0; font: var(--type-body); color: var(--color-text); background: var(--color-canvas); -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
svg.icon { flex: none; width: var(--icon-default); height: var(--icon-default); vertical-align: -0.2em; }
h1, h2, h3 { margin: 0; letter-spacing: -0.015em; text-wrap: pretty; color: var(--color-text); }
h1 { font: var(--type-display); letter-spacing: -0.025em; }
h2 { font: var(--type-screen-title); }
h3 { font: var(--type-section-title); }
p { margin: 0 0 var(--space-16); }
strong, b { font-weight: 600; }
small, .small { font: var(--type-caption); color: var(--color-text-secondary); }
a { color: var(--color-accent-text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--color-text); }
:focus-visible { outline: var(--interaction-focus-width) solid var(--color-focus); outline-offset: 2px; border-radius: var(--radius-input); }
code, pre, kbd, samp { font-family: inherit; }
pre { overflow-x: auto; padding: var(--space-16); border-radius: var(--radius-input); background: var(--color-surface-muted); }
blockquote { margin: var(--space-24) 0; padding: var(--space-4) 0 var(--space-4) var(--space-20); box-shadow: var(--shadow-accent-left); color: var(--color-text-muted); }
hr { border: 0; border-top: 1px solid var(--color-border); margin: var(--space-32) 0; }
.skip { position: absolute; left: -10000px; top: var(--space-8); z-index: 200; padding: var(--space-8) var(--space-12); background: var(--color-surface); color: var(--color-text); border-radius: var(--radius-input); }
.skip:focus { left: var(--space-16); }
.dot { display: inline-block; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--color-accent); }
.eyebrow { font: var(--type-label); color: var(--color-text-secondary); margin: 0 0 var(--space-4); }
.wordmark { font: var(--type-wordmark); letter-spacing: -0.02em; }
.brand { display: inline-flex; align-items: center; gap: var(--space-8); color: var(--color-text); text-decoration: none; }
.brand img { display: block; border-radius: 6px; }

/* ---------- buttons ---------- */
.button { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-8); min-height: var(--interaction-desktop-height); padding: var(--space-8) var(--space-16); border: 0; border-radius: var(--radius-button); background: var(--color-primary); color: var(--color-on-primary); font: var(--type-button); text-decoration: none; text-align: center; cursor: pointer; box-shadow: var(--shadow-button); transition: background-color .15s, transform .08s; }
.button:hover { background: var(--color-primary-hover); color: var(--color-on-primary); }
.button:active { transform: scale(0.97); }
.button:disabled, .button[aria-disabled="true"] { background: var(--color-disabled-background); color: var(--color-disabled-text); cursor: not-allowed; transform: none; }
.button svg.icon { width: var(--icon-small); height: var(--icon-small); }
.button.secondary, .fill-secondary, .cookie-choice + .cookie-choice { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-card); font-weight: 500; }
.button.secondary:hover, .fill-secondary:hover, .cookie-choice + .cookie-choice:hover { background: var(--color-hover); color: var(--color-text); }
.button.ghost { background: transparent; color: var(--color-text); box-shadow: var(--shadow-flat); font-weight: 500; }
.button.ghost:hover { background: var(--color-hover); }
.count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--color-hover); color: var(--color-text-muted); font: var(--type-tab); font-variant-numeric: tabular-nums; }

/* ---------- layout: sidebar + column ---------- */
.layout { display: grid; grid-template-columns: var(--layout-sidebar) minmax(0, 1fr); min-height: 100vh; }
.site-header { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: var(--space-16); padding: var(--space-16) var(--space-12) var(--space-24); background: var(--color-sidebar); box-shadow: var(--shadow-line-right); z-index: 40; }
.nav-top { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-8); }
.nav-close, .nav-close-wide { display: none; }
.nav-close { place-items: center; width: var(--interaction-min-target); height: var(--interaction-min-target); border-radius: var(--radius-button); color: var(--color-text); }
.nav-close:hover { background: var(--color-hover); }
.site-col { min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 1024px) { .layout.no-country { grid-template-columns: minmax(0, 1fr); } .layout.no-country .site-header { display: none; } .layout.no-country .top-brand { display: inline-flex; } }
.site-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-16); min-height: var(--layout-topbar); padding: var(--space-8) var(--layout-gutter); background: var(--color-header-background); box-shadow: var(--shadow-line-bottom); }
.top-brand { display: none; }
.top-actions { display: flex; align-items: center; gap: var(--space-8); margin-left: auto; flex: none; }
.top-actions .button { min-height: 36px; padding: var(--space-4) var(--space-12); }
.top-catalogue { padding: 6px var(--space-12); border-radius: var(--radius-input); color: var(--color-text); text-decoration: none; white-space: nowrap;
  font: var(--type-label); font-weight: 500; }
.top-catalogue:hover { background: var(--color-hover); }
/* Active state is a mark on the text itself: a boxed look made the link read as a button on catalogue pages only. */
.top-catalogue[aria-current] { font-weight: 600; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.menu-button { display: none; }
.shell { width: 100%; }
main.shell { flex: 1; padding: var(--space-32) var(--layout-gutter) var(--space-64); }

/* country switcher */
.country-switcher { position: relative; }
.country-switcher summary { list-style: none; display: flex; align-items: center; gap: var(--space-8); min-height: var(--interaction-desktop-height); padding: var(--space-8) var(--space-12); border-radius: var(--radius-button); background: var(--color-surface); box-shadow: var(--shadow-card); font: var(--type-label); cursor: pointer; }
.country-switcher summary::-webkit-details-marker { display: none; }
.country-switcher summary span { flex: 1; min-width: 0; }
.country-switcher summary .chevron { color: var(--color-text-secondary); transition: transform .15s; }
.country-switcher[open] summary .chevron, details[open] > summary .chevron { transform: rotate(180deg); }
.country-switcher ul { list-style: none; margin: var(--space-8) 0 0; padding: var(--space-4); max-height: 50vh; overflow-y: auto; border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-raised); }
.country-switcher li { box-shadow: var(--shadow-flat); }
.country-switcher li a, .country-switcher li > span { display: block; padding: var(--space-8) var(--space-12); border-radius: var(--radius-input); color: var(--color-text); text-decoration: none; font: var(--type-label); font-weight: 400; }
.country-switcher li a:hover { background: var(--color-hover); }
.country-switcher li a[aria-current] { background: var(--color-selected); font-weight: 500; }
.country-switcher li > span { color: var(--color-text-muted); padding-bottom: 0; }
.country-switcher li small { display: block; padding: 0 var(--space-12) var(--space-8); }

/* sidebar pages */
.side-pages { display: grid; gap: var(--space-4); }
.side-group summary { list-style: none; display: flex; align-items: center; gap: var(--space-8); min-height: 32px; padding: var(--space-4) var(--space-12); border-radius: var(--radius-input); font: var(--type-tab); color: var(--color-nav-text); cursor: pointer; }
.side-group summary::-webkit-details-marker { display: none; }
.side-group summary:hover { background: var(--color-hover); }
.side-group summary .count { margin-left: auto; min-width: 20px; height: 20px; }
.side-group summary .chevron { width: 14px; height: 14px; color: var(--color-text-secondary); }
.side-pages ul { list-style: none; margin: 0 0 var(--space-8); padding: 0; display: grid; gap: 2px; }
.side-pages a span { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.side-pages a { display: block; padding: 6px var(--space-12); border-radius: var(--radius-input); color: var(--color-nav-text); text-decoration: none; font: var(--type-label); font-weight: 400; line-height: 1.4; }
.side-hub { margin-bottom: var(--space-4); font-weight: 500; }
/* the desktop sidebar already lists the catalogue group; the phone menu gets this one-tap entry under the hub link */
.side-pages .side-catalogue { display: none; margin-bottom: var(--space-4); font-weight: 500; }
.side-pages a:hover { background: var(--color-hover); color: var(--color-text); }
.side-pages a[aria-current] { background: var(--color-surface); box-shadow: var(--shadow-card); color: var(--color-text); font-weight: 500; }
.side-cta { margin-top: auto; display: grid; gap: var(--space-8); padding: var(--space-8) var(--space-4) 0; }
.side-cta .button { width: 100%; }
.side-cta p { margin: 0; font: var(--type-caption); color: var(--color-text-secondary); }

/* breadcrumbs */
.breadcrumbs { min-width: 0; }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-8); margin: 0; padding: 0; font: var(--type-caption); font-size: .875rem; color: var(--color-text-secondary); }
.breadcrumbs li { display: flex; align-items: center; gap: var(--space-8); min-width: 0; }
.breadcrumbs .sep { width: 14px; height: 14px; color: var(--color-text-secondary); }
.breadcrumbs a { color: var(--color-text-secondary); text-decoration: none; }
.breadcrumbs a:hover { color: var(--color-text); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--color-text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; max-width: 36rem; }

/* cookie banner: wide card at the bottom of the content column (desktop) or the bottom of the screen (phone); never over the navigation */
.cookie-consent { position: fixed; z-index: 50; left: var(--space-12); bottom: var(--space-12); width: calc(var(--layout-sidebar) - var(--space-24)); padding: var(--space-16); border-radius: var(--radius-card); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-raised); }
@media (min-width: 1024px) {
  .layout:not(.no-country) .cookie-consent { left: calc(var(--layout-sidebar) + var(--space-16));
    width: min(760px, calc(100% - var(--layout-sidebar) - var(--space-32))); }
  .layout:has(.cookie-consent:not([hidden])) .site-col { padding-bottom: 112px; }
  .layout.no-country:has(.cookie-consent:not([hidden])) .site-col { padding-bottom: 0; }
  .layout:not(.no-country):has(.cookie-consent:not([hidden])) .fill-actions { bottom: 96px; }
}
@media (min-width: 1024px) {
  .site-col .cookie-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); }
  .site-col .cookie-bar .cookie-actions { flex-direction: row; align-items: center; flex: none; }
  .site-col .cookie-bar .cookie-choice:last-child { margin-left: var(--space-8); }
  /* Pages without a sidebar: one centred column; the cookie card sits in the flow above the content. */
  .layout.no-country .site-top { padding-inline: max(var(--layout-gutter), calc((100% - 1200px) / 2)); }
  .layout.no-country main.shell, .layout.no-country .footer-grid { width: 100%; max-width: calc(1200px + 2 * var(--layout-gutter)); margin-inline: auto; }
  .layout.no-country .cookie-consent { position: static; width: min(1200px, calc(100% - 2 * var(--layout-gutter))); margin: var(--space-16) auto 0; display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); }
  .layout.no-country .cookie-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); width: 100%; }
  .layout.no-country .site-col .cookie-bar .cookie-actions { flex-direction: row; align-items: center; flex: none; }
  .layout.no-country .site-col .cookie-bar .cookie-choice:last-child { margin-left: var(--space-8); }
}
.cookie-bar { padding: 0; display: grid; gap: var(--space-12); }
.cookie-bar p { margin: 0; font: var(--type-caption); color: var(--color-text-muted); }
.cookie-bar p a { color: var(--color-text); }
.cookie-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.cookie-bar .cookie-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: var(--space-8); }
.cookie-bar .cookie-choice { white-space: nowrap; }
.cookie-bar .cookie-choice:last-child { margin-left: auto; padding: var(--space-4) 2px; background: transparent; color: var(--color-text); box-shadow: var(--shadow-flat); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cookie-choice { min-height: 36px; padding: var(--space-4) var(--space-12); border: 0; border-radius: var(--radius-button); background: var(--color-primary); color: var(--color-on-primary); font: var(--type-label); font-weight: 600; cursor: pointer; }
.cookie-choice:hover { background: var(--color-primary-hover); }
.cookie-dialog { width: min(560px, calc(100% - var(--space-32))); max-height: calc(100dvh - var(--space-32)); overflow: auto; padding: var(--space-24); border: 0; border-radius: var(--radius-sheet); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-sheet); overscroll-behavior: contain; }
.cookie-dialog:not([open]) { display: none; }
.cookie-dialog::backdrop { background: var(--brand-ink); opacity: .4; }
.cookie-dialog h2 { margin-bottom: var(--space-12); }
.cookie-dialog p { font: var(--type-caption); font-size: .875rem; color: var(--color-text-muted); }
.cookie-dialog label { display: flex; align-items: center; gap: var(--space-8); margin-top: var(--space-16); }

/* ---------- article ---------- */
.article { display: grid; grid-template-columns: minmax(0, 1fr) var(--layout-toc); gap: var(--layout-gutter); }
.article:not(.has-toc), .article.legal { grid-template-columns: minmax(0, 1fr); }
.article-main { min-width: 0; container-type: inline-size; }
.article-header { margin-bottom: var(--space-24); }
.article-header h1 { margin-bottom: var(--space-12); }
.standfirst { font-size: 1.125rem; line-height: 1.6; color: var(--color-text-muted); margin-bottom: var(--space-16); }
.review-date { display: inline-flex; align-items: center; gap: var(--space-8); margin: 0; padding: var(--space-4) var(--space-12); border-radius: var(--radius-pill); background: var(--color-hover); color: var(--color-text-muted); font: var(--type-caption); }
.review-date time { font-variant-numeric: tabular-nums; }
.demo-notice, .evidence-note, .callout, .scope { padding: var(--space-16); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.callout, .scope, .callout-info, .info { color: var(--status-info-foreground); background: var(--status-info-background); }
.demo-notice, .evidence-note, .callout-warning, .warning { color: var(--status-warning-foreground); background: var(--status-warning-background); }
.callout-success, .success { color: var(--status-success-foreground); background: var(--status-success-background); }
.callout-danger, .danger { color: var(--status-danger-foreground); background: var(--status-danger-background); }
.notice-heading { display: flex; align-items: center; gap: var(--space-8); font-weight: 600; }
.region, .crop { display: inline-block; margin: 0 0 var(--space-16); padding: var(--space-4) var(--space-12); border-radius: var(--radius-pill); background: var(--color-hover); color: var(--color-text-muted); font: var(--type-label); }

/* direct answer, checklist, key dates */
.lead-grid { display: grid; gap: var(--space-16); margin-bottom: var(--space-24); align-items: start; }
@container (min-width: 760px) { .lead-grid { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); } .country-hub .lead-grid { grid-template-columns: minmax(0, 1fr); } .country-hub .key-dates dl { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: var(--space-16); } .country-hub .key-dates dl > div, .country-hub .key-dates dl > div:first-child { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding: 0 0 0 var(--space-12); box-shadow: var(--shadow-line-left); } }
.answer-card { padding: var(--space-20); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); margin-bottom: var(--space-24); }
.lead-grid .answer-card, .lead-grid > section { margin: 0; }
.answer-label { display: flex; align-items: center; gap: var(--space-8); margin: 0 0 var(--space-8); font: var(--type-label); color: var(--color-text-muted); }
.answer-card strong:has(a) { font-weight: inherit; }
.answer-card a, .article-body a { text-underline-offset: 2px; }
.answer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-16); margin: 0 0 var(--space-16); }
.answer-sources { display: inline-flex; align-items: center; gap: var(--space-8); color: var(--color-text-muted); font: var(--type-caption); text-decoration: none; }
.answer-sources:hover { color: var(--color-text); }
.answer-card > p:not(.answer-label) { margin: 0 0 var(--space-16); }
.answer-official { display: flex; align-items: center; gap: var(--space-12); padding: var(--space-12) var(--space-16); border-radius: var(--radius-card); background: var(--color-surface-muted); box-shadow: var(--shadow-card); color: var(--color-text); text-decoration: none; }
.answer-official:hover { background: var(--color-hover); color: var(--color-text); }
.answer-official span { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.answer-official b { font: var(--type-label); font-weight: 600; }
.answer-official small { overflow-wrap: anywhere; }
.answer-official .icon:first-child { color: var(--color-accent); }
.checklist, .key-dates { padding: var(--space-20); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); margin-bottom: var(--space-24); }
.checklist h2, .key-dates h2 { display: flex; align-items: center; gap: var(--space-8); font: var(--type-section-title); margin-bottom: var(--space-12); }
.checklist ol { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--space-12); }
.checklist li { counter-increment: step; display: flex; gap: var(--space-12); align-items: flex-start; line-height: 1.45; }
.checklist li::before { content: counter(step); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--color-hover); color: var(--color-text); font: var(--type-tab); font-variant-numeric: tabular-nums; }
.key-dates dl { margin: 0; display: grid; }
.key-dates dl > div { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: var(--space-12); padding: var(--space-12) 0; box-shadow: var(--shadow-line-top); }
.key-dates dl > div:first-child { box-shadow: var(--shadow-flat); padding-top: 0; }
.key-dates dt { font: var(--type-metric); font-variant-numeric: tabular-nums; }
.key-dates dd { margin: 0; line-height: 1.5; }

/* on this page */
.toc-rail { position: sticky; top: calc(var(--layout-topbar) + var(--space-24)); align-self: start; max-height: calc(100vh - var(--layout-topbar) - var(--space-48)); overflow-y: auto; }
.toc-title { font: var(--type-label); color: var(--color-text-secondary); margin: 0 0 var(--space-8); }
.toc ol { list-style: none; margin: 0; padding: 0; box-shadow: var(--shadow-line-left); }
.toc a { display: block; padding: 5px 0 5px var(--space-12); color: var(--color-nav-text); text-decoration: none; font: var(--type-caption); font-size: .875rem; line-height: 1.4; }
.toc a:hover { color: var(--color-text); }
.toc a.is-current { color: var(--color-text); font-weight: 500; box-shadow: var(--shadow-accent-left); }
.toc-inline { display: none; margin-bottom: var(--space-24); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.toc-inline summary { list-style: none; display: flex; align-items: center; gap: var(--space-8); min-height: var(--interaction-min-target); padding: var(--space-8) var(--space-16); font: var(--type-label); font-weight: 600; cursor: pointer; }
.toc-inline summary::-webkit-details-marker { display: none; }
.toc-inline summary .count { margin-left: auto; }
.toc-inline ol { margin: 0; padding: 0 var(--space-16) var(--space-16) var(--space-40); display: grid; gap: var(--space-8); font-size: .9375rem; line-height: 1.4; }
.toc-inline a { color: var(--color-text); text-decoration: none; }

/* body typography */
.article-body h2 { margin: var(--space-48) 0 var(--space-12); scroll-margin-top: calc(var(--layout-topbar) + var(--space-16)); }
.article-body h3 { margin: var(--space-32) 0 var(--space-8); }
.article-body ul, .article-body ol { margin: 0 0 var(--space-16); padding-left: 1.3em; }
.article-body li { margin: var(--space-4) 0; }
.article-body img { height: auto; border-radius: var(--radius-card); }
.citation { line-height: 0; }
.citation { font-size: 11px; vertical-align: super; }
.citation a { margin-left: 2px; color: var(--color-accent-text); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.citation a:hover { text-decoration: underline; }
table { width: 100%; margin: var(--space-24) 0; border-collapse: separate; border-spacing: 0; border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; font-size: .9375rem; line-height: 1.45; }
th { padding: var(--space-8) var(--space-12); background: var(--color-surface-muted); color: var(--color-text-secondary); font: var(--type-caption); font-weight: 600; text-align: left; vertical-align: bottom; }
td { padding: var(--space-12); border-top: 1px solid var(--color-border); vertical-align: top; }
td:first-child { font-weight: 600; }

/* hub task list: tables read as rows (Linear style) */
.country-hub .article-body table { box-shadow: var(--shadow-card); }
.country-hub .article-body td a { font-weight: 600; }
.article-list { list-style: none; margin: var(--space-24) 0; padding: 0; border-radius: var(--radius-card); background: var(--color-surface); }
.country-grid li, .article-list li { box-shadow: var(--shadow-card); }
.article-list li { border-radius: 0; }
.article-list li:first-child { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.article-list li:last-child { border-radius: 0 0 var(--radius-card) var(--radius-card); }
.article-list li:only-child { border-radius: var(--radius-card); }
.article-list a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); min-height: var(--interaction-min-target); padding: var(--space-12) var(--space-16); color: var(--color-text); text-decoration: none; font-weight: 500; line-height: 1.4; }
.article-list a:hover { background: var(--color-hover); }
.article-list a .icon { color: var(--color-text-secondary); }
.article-list p { margin: calc(-1 * var(--space-8)) var(--space-16) var(--space-12); font: var(--type-caption); font-size: .875rem; color: var(--color-text-secondary); }
.article-list small { display: block; padding: 0 var(--space-16) var(--space-12); }

/* downloads */
.downloads { margin: var(--space-32) 0; }
.downloads h2 { font: var(--type-section-title); margin-bottom: var(--space-12); }
.download-row { display: flex; flex-wrap: wrap; gap: var(--space-8); }

/* sign-up call to action */
.app-cta { display: flex; align-items: center; justify-content: space-between; gap: var(--space-24); margin: var(--space-32) 0; padding: var(--space-20); border-radius: var(--radius-card); background: var(--color-surface-muted); box-shadow: var(--shadow-card); }
.cta-text { display: flex; align-items: flex-start; gap: var(--space-12); min-width: 0; }
.cta-text img { flex: none; border-radius: 8px; }
.cta-text p { margin: var(--space-4) 0; font-size: .9375rem; line-height: 1.5; color: var(--color-text-muted); }
.cta-text small { display: block; }
.cta-buttons { display: flex; flex-wrap: wrap; gap: var(--space-8); flex: none; }
/* signed-in header: same box as the two buttons (cabinet.js fixes its size before the swap) */
.cta-buttons.is-signed-in { align-items: center; }
.cabinet-user { display: flex; align-items: center; gap: var(--space-8); flex: 1 0 100%; min-width: 0; }
.cabinet-avatar { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--color-primary); color: var(--color-on-primary); font-size: .8125rem; font-weight: 600; }
.cabinet-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: var(--type-label); }
.cabinet-bell { position: relative; flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-button); color: var(--color-text); }
.cabinet-bell:hover { background: var(--color-hover); color: var(--color-text); }
.cabinet-bell .icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.cabinet-badge { position: absolute; top: 2px; right: 0; min-width: 18px; height: 18px; padding: 0 var(--space-4); border-radius: 9px; background: var(--color-primary); color: var(--color-on-primary); font-size: .6875rem; font-weight: 600; line-height: 18px; text-align: center; }
.side-cta .is-signed-in .button { width: auto; flex: 1 1 0; }
.top-download.is-signed-in { flex-wrap: nowrap; }
.top-download .cabinet-user { flex: 0 1 auto; }
.app-intro { display: flex; align-items: center; gap: var(--space-24); margin-bottom: var(--space-24); }
.app-intro > img { border-radius: 18px; }
.app-intro .app-cta { flex: 1; margin: 0; }

/* FAQ, next step, sources */
.faq, .related, .sources { margin-top: var(--space-48); }
.faq h2, .related h2 { margin-bottom: var(--space-12); }
.faq details { box-shadow: var(--shadow-line-bottom); }
.faq summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: var(--space-16); min-height: var(--interaction-min-target); padding: var(--space-12) 0; font: var(--type-body-strong); line-height: 1.4; cursor: pointer; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .chevron { color: var(--color-text-secondary); transition: transform .15s; }
.faq details p { margin: 0 0 var(--space-16); color: var(--color-text-muted); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: var(--space-12); }
.related a { display: flex; justify-content: space-between; gap: var(--space-12); height: 100%; padding: var(--space-16); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); color: var(--color-text); text-decoration: none; font-weight: 500; line-height: 1.4; }
.related a:hover { box-shadow: var(--shadow-raised); }
.related a .icon { flex: none; margin-top: 2px; color: var(--color-text-secondary); }
.sources h2 { font: var(--type-section-title); margin-bottom: var(--space-12); }
.sources ol { margin: 0; padding-left: 1.6em; display: grid; gap: var(--space-8); font: var(--type-caption); font-size: .875rem; line-height: 1.5; color: var(--color-text-secondary); }
.sources li { padding: var(--space-4) var(--space-8); margin-left: calc(-1 * var(--space-8)); border-radius: var(--radius-input); }
.sources a { color: var(--color-text-muted); }
.sources li:target { background: var(--color-hover); }

/* ---------- fields (fill form, calculator) ---------- */
input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], select, textarea { width: 100%; min-width: 0; min-height: var(--interaction-primary-height); padding: var(--space-8) var(--space-12); border: 0; border-radius: var(--radius-input); background: var(--color-surface-muted); box-shadow: var(--shadow-field); color: var(--color-text); font-size: 1rem; line-height: 1.4; }
input::placeholder, textarea::placeholder { color: var(--color-text-secondary); opacity: 1; }
textarea { min-height: 72px; resize: vertical; }
select { appearance: none; -webkit-appearance: none; padding-right: var(--space-40); background-image: url("/assets/icons/down.svg"); background-repeat: no-repeat; background-position: right var(--space-12) center; background-size: 16px; }
input:hover, select:hover, textarea:hover { background-color: var(--color-hover); }
input:focus, select:focus, textarea:focus { outline: 0; background-color: var(--color-surface); box-shadow: var(--shadow-focus); }
input:user-invalid, select:user-invalid, textarea:user-invalid { box-shadow: var(--shadow-error); }
input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; display: inline-grid; place-items: center; width: 20px; height: 20px; margin: 1px 0 0; border: 0; border-radius: 6px; background: var(--color-surface-muted); box-shadow: var(--shadow-field); cursor: pointer; }
input[type=checkbox]:checked { background: var(--color-primary) url("/assets/icons/check-on-dark.svg") no-repeat center / 14px; box-shadow: var(--shadow-flat); }
input[type=checkbox]:focus-visible { box-shadow: var(--shadow-focus); }
input[type=checkbox]:disabled { opacity: .6; cursor: default; }
input[type=radio] { flex: none; width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--color-primary); }
label { font: var(--type-label); }

/* fill form */
.fill-form { display: flow-root; margin: 0 0 var(--space-32); padding: var(--space-24) var(--space-24) 0; border-radius: var(--radius-sheet); background: var(--color-surface); box-shadow: var(--shadow-raised); }
.fill-form h2 { display: flex; align-items: center; gap: var(--space-8); margin-bottom: var(--space-8); }
.fill-form h2 .icon { color: var(--color-accent); width: var(--icon-large); height: var(--icon-large); }
.fill-form > p { color: var(--color-text-muted); }
.fill-form h3 { font: var(--type-section-title); margin: var(--space-16) 0 var(--space-8); }
.fill-remember { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-8) var(--space-16); padding: var(--space-12) var(--space-16); border-radius: var(--radius-card); background: var(--color-surface-muted); }
.fill-check { display: flex; align-items: flex-start; gap: var(--space-8); font: var(--type-label); font-weight: 400; cursor: pointer; }
.fill-link { padding: 0; border: 0; background: none; color: var(--color-text-muted); font: var(--type-label); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.fill-link:hover { color: var(--color-text); }
.fill-note { font: var(--type-caption); color: var(--color-text-secondary); margin: 0 0 var(--space-12); }
.fill-doc { margin: 0 0 var(--space-16); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
.fill-doc > summary { padding: var(--space-12) var(--space-16); font: var(--type-section-title); cursor: pointer; }
.label-finder { display: grid; gap: var(--space-8); padding: var(--space-16); margin-block: var(--space-16) var(--space-24); border-radius: var(--radius-card); background: var(--color-surface-muted); box-shadow: var(--shadow-card); }
.label-finder label { font: var(--type-label); }
.label-finder input { width: 100%; min-width: 0; min-height: var(--interaction-primary-height); padding: var(--space-12); border: 1px solid var(--color-control-border); border-radius: var(--radius-input); font: inherit; }
.label-finder [data-label-finder-status] { margin: 0; }
.label-finder [data-label-finder-status]:empty, .label-finder[hidden], .article-body [hidden] { display: none; }
.article-body .label-index { columns: 15rem; column-gap: var(--space-24); padding-inline-start: 0; list-style: none; }
.article-body .label-index li { break-inside: avoid; margin-block: 0 var(--space-8); overflow-wrap: anywhere; }
.fill-doc > .fill-doc-body { padding: 0 var(--space-16) var(--space-16); }
.fill-group { margin: 0 0 var(--space-20); padding: 0 0 var(--space-20); border: 0; box-shadow: var(--shadow-line-bottom); min-width: 0; }
.fill-group legend { float: left; width: 100%; margin: 0 0 var(--space-12); padding: 0; font: var(--type-section-title); }
.fill-grid { clear: both; display: grid; gap: var(--space-16); }
@container (min-width: 620px) { .fill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-16) var(--space-20); } .fill-textarea, .fill-signature { grid-column: 1 / -1; } }
.fill-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.fill-field > label, .fill-label { font: var(--type-label); line-height: 1.35; }
.fill-n { margin-right: var(--space-4); color: var(--color-text-secondary); font: var(--type-caption); font-size: .75rem; font-variant-numeric: tabular-nums; }
.fill-req { color: var(--color-text-secondary); }
.fill-field small { font: var(--type-caption); color: var(--color-text-secondary); }
.fill-field small.fill-warning { padding: var(--space-8) var(--space-12); border-radius: var(--radius-input); background: var(--status-warning-background); color: var(--status-warning-foreground); }
.fill-sign { min-height: 56px; padding: var(--space-8) var(--space-12); border-radius: var(--radius-input); background: var(--color-surface-muted); color: var(--color-text-secondary); font: var(--type-caption); }
.fill-group [data-fill-remove] { margin-top: var(--space-16); }
.fill-legend { font: var(--type-caption); color: var(--color-text-secondary); margin: 0 0 var(--space-12); }
.fill-row-actions { display: flex; flex-wrap: wrap; gap: var(--space-8); margin: 0 0 var(--space-16); }
/* no box of its own: the sticky action bar is held by the whole document block, so at its top edge it lies over the intro, not the first field */
.fill-body { display: contents; }
.fill-purpose { color: var(--color-text); font-weight: 500; }
.fill-actions { position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: var(--space-8); min-height: 64px; margin: 0 calc(-1 * var(--space-24)); padding: var(--space-12) var(--space-24); background: var(--color-surface); box-shadow: var(--shadow-line-top); }
.fill-actions-label { margin-right: var(--space-4); font: var(--type-caption); color: var(--color-text-muted); }
.fill-actions .button { min-width: 6.5rem; }
.fill-actions .button:not(:first-child) { background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-card); font-weight: 500; }
.fill-actions .button:not(:first-child):hover { background: var(--color-hover); }
.fill-long { display: none; }
.fill-blank-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-8) var(--space-8); margin: 0 0 var(--space-20); padding: var(--space-12) var(--space-16); border-radius: var(--radius-card); background: var(--color-surface-muted); box-shadow: var(--shadow-card); }
.fill-blank-lead { margin-right: var(--space-4); font: var(--type-label); color: var(--color-text); }
.fill-blank-row .button { min-height: 36px; padding: var(--space-4) var(--space-12); }
.fill-official { display: inline-flex; align-items: center; gap: var(--space-8); margin-left: auto; padding: var(--space-4) var(--space-8); border-radius: var(--radius-input); color: var(--color-text); font: var(--type-label); text-decoration: none; }
.fill-official:hover { background: var(--color-hover); }
.fill-official span { display: flex; flex-direction: column; }
.fill-official small { font-weight: 400; }
.fill-alert { display: flex; align-items: flex-start; gap: var(--space-8); margin: 0 0 var(--space-20); padding: var(--space-12) var(--space-16); border-radius: var(--radius-card); background: var(--status-danger-background); color: var(--status-danger-foreground); font: var(--type-label); font-weight: 600; }
.fill-alert .icon { margin-top: 1px; }
.fill-field .is-missing { box-shadow: var(--shadow-error); }
.fill-field small.fill-error { color: var(--status-danger-foreground); font-weight: 500; }
.fill-status.is-error:not(:empty) { background: var(--status-danger-background); color: var(--status-danger-foreground); font-weight: 600; }
.fill-status:not(:empty) { margin: 0 0 var(--space-16); padding: var(--space-12) var(--space-16); border-radius: var(--radius-input); background: var(--color-hover); color: var(--color-text); font: var(--type-label); }
.fill-bundle { margin: 0; }
.fill-actions.fill-bundle .button { min-width: 0; }

/* calculator */
.calculator { margin: 0 0 var(--space-32); padding: var(--space-24); border-radius: var(--radius-sheet); background: var(--color-surface); box-shadow: var(--shadow-raised); }
.calculator h2 { display: flex; align-items: center; gap: var(--space-8); margin-bottom: var(--space-8); }
.calculator h2 .icon { color: var(--color-accent); }
.calculator > p { color: var(--color-text-muted); font-size: .9375rem; }
.calculator form { display: grid; gap: var(--space-16); }
@container (min-width: 620px) { .calculator form { grid-template-columns: repeat(2, minmax(0, 1fr)); } .calculator form > :not(label) { grid-column: 1 / -1; } }
.calculator label { display: flex; flex-direction: column; gap: 6px; font: var(--type-label); color: var(--color-text); }
.calculator .button { justify-self: start; }
.calculator [data-error]:empty { display: none; }
.calculator [data-error]:not(:empty) { margin: 0; padding: var(--space-12) var(--space-16); border-radius: var(--radius-input); background: var(--status-danger-background); color: var(--status-danger-foreground); }
.calculator [data-results] { padding: var(--space-16); border-radius: var(--radius-card); background: var(--color-surface-muted); }
.calculator [data-results] h3 { margin-bottom: var(--space-8); }
.calculator dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-8) var(--space-16); }
.calculator dt { color: var(--color-text-muted); }
.calculator dd { margin: 0; font: var(--type-metric); font-variant-numeric: tabular-nums; text-align: right; }


/* chooser, directory, 404 */
.chooser-head { margin-bottom: var(--space-32); }
.chooser-head h1 { margin-bottom: var(--space-8); }
.chooser-head p { color: var(--color-text-secondary); margin: 0; }
.chooser section + section { margin-top: var(--space-40); }
.chooser h2 { font: var(--type-section-title); margin-bottom: var(--space-12); }
.country-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: var(--space-12); }
.country-grid li { padding: var(--space-4); border-radius: var(--radius-card); background: var(--color-surface); }
.country-grid li { display: flex; flex-direction: column; justify-content: center; }
.country-grid a { display: flex; align-items: center; gap: var(--space-8); min-height: var(--interaction-min-target); padding: var(--space-8) var(--space-12); border-radius: var(--radius-input); color: var(--color-text); text-decoration: none; font-weight: 500; }
.country-grid a:hover { background: var(--color-hover); }
.country-grid a .icon { color: var(--color-text-secondary); }
.country-grid small { display: block; padding: 0 var(--space-12) var(--space-8); }
.directory h1 { margin-bottom: var(--space-12); }
.not-found { max-width: 560px; margin: 0 auto; padding: var(--space-48) 0; text-align: center; }
.not-found .article-list { text-align: left; }
.not-found-code { margin: 0 0 var(--space-8); font: var(--type-display); font-size: 4rem; line-height: 1; letter-spacing: -0.04em; color: var(--color-text-secondary); }
.not-found h1 { margin-bottom: var(--space-24); }
.not-found-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-8); }

/* legal */
.article.legal .review-date { margin-top: var(--space-8); }

/* footer */
.site-footer { margin-top: auto; background: var(--color-surface-muted); box-shadow: var(--shadow-line-top); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: var(--space-24) var(--space-48); padding: var(--space-40) var(--layout-gutter) var(--space-32); }
.footer-wordmark { display: flex; align-items: center; gap: var(--space-8); }
.footer-wordmark img { border-radius: 6px; }
.footer-about p { margin: var(--space-12) 0 0; color: var(--color-text-muted); font-size: .9375rem; line-height: 1.5; }
.footer-about .small { line-height: 1.5; }
.footer-about .small { margin-top: var(--space-4); }
.footer-download h2 { font: var(--type-section-title); margin-bottom: var(--space-12); }
.store-links { display: flex; flex-wrap: wrap; gap: var(--space-8); }
.footer-nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: var(--space-8) var(--space-24); padding-top: var(--space-20); box-shadow: var(--shadow-line-top); font: var(--type-caption); font-size: .875rem; }
.footer-nav a { color: var(--color-text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--color-text); text-decoration: underline; }

/* ---------- 1024–1279: the right contents rail collapses first ---------- */
@media (max-width: 1279px) {
  .article { grid-template-columns: minmax(0, 1fr); }
  .toc-rail { display: none; }
  .toc-inline { display: block; }
}

/* ---------- below 1024: sidebar becomes a drawer ---------- */
@media (max-width: 1023px) {
  .layout { display: block; }
  .site-header { display: none; position: fixed; inset: auto 0 0 0; top: auto; height: auto; max-height: 88vh; max-height: 88dvh; padding: var(--space-12) var(--space-16) max(var(--space-16), env(safe-area-inset-bottom)); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; background: var(--color-surface); box-shadow: var(--shadow-sheet); z-index: 80; }
  .nav-open .site-header, .site-header:target { display: flex; }
  .nav-open .layout::after { content: ""; position: fixed; inset: 0; z-index: 70; background: var(--brand-ink); opacity: .4; }
  .layout:has(.cookie-consent:not([hidden])) .site-header { padding-bottom: max(var(--space-16), env(safe-area-inset-bottom)); }
  .nav-top { padding: 0 0 0 var(--space-4); }
  .nav-close { display: grid; }
  .nav-close-wide { display: flex; width: 100%; min-height: 48px; flex: none; position: sticky; bottom: 0; }
  .side-cta { margin-top: 0; }
  .side-pages a, .country-switcher li a { min-height: var(--interaction-min-target); display: flex; align-items: center; }
  .site-top { padding: var(--space-8) var(--space-16); gap: var(--space-8); }
  .top-brand { display: inline-flex; align-items: center; justify-content: center; min-width: var(--interaction-min-target); min-height: var(--interaction-min-target); }
  .site-top .breadcrumbs { display: none; }
  .top-catalogue { display: none; }
  .side-pages .side-catalogue { display: flex; }
  .menu-button { display: inline-flex; }
  .top-actions .button { min-height: var(--interaction-min-target); }
  main.shell { padding: var(--space-20) var(--space-16) var(--space-48); }
  /* phone and tablet: a floating card at the bottom; the page keeps room for it so nothing stays hidden behind it */
  .cookie-consent { left: var(--space-12); right: var(--space-12); bottom: max(var(--space-12), env(safe-area-inset-bottom)); width: auto; padding: var(--space-12); }
  .layout:has(.cookie-consent:not([hidden])) .site-col { padding-bottom: 128px; }
  html:has(.cookie-consent:not([hidden])) { scroll-padding-bottom: 220px; }
  .layout:has(.cookie-consent:not([hidden])) .fill-actions { bottom: 124px; }
  .cookie-bar { gap: var(--space-8); }
  .cookie-bar .cookie-choice { min-height: 40px; padding: var(--space-4) var(--space-12); font: var(--type-caption); font-weight: 600; }
  .button, .cookie-choice { min-height: var(--interaction-min-target); }
  input[type=text], input[type=email], input[type=number], input[type=date], input[type=time], select { min-height: var(--interaction-primary-height); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); padding: var(--space-32) var(--space-16) var(--space-24); }
}

/* ---------- phone ---------- */
@media (max-width: 759px) {
  h1 { font: var(--type-brand-heading); letter-spacing: -0.02em; }
  h2, .article-body h2 { font: var(--type-screen-title); font-size: 1.375rem; line-height: 1.75rem; }
  h1 { font-size: 1.625rem; line-height: 1.2; }
  .sources-link { display: none; }
  .top-download .button { min-height: 36px; padding: var(--space-4) var(--space-12); font-size: .875rem; }
  .top-download .cabinet-name { display: none; }
  /* clipped, not display:none, so the link keeps its accessible name */
  .top-brand .wordmark, .menu-button span { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  .menu-button { padding: var(--space-4) var(--space-12); }
  .standfirst { font-size: .9375rem; line-height: 1.45; margin-bottom: var(--space-12); }
  .article-header { margin-bottom: var(--space-16); }
  .answer-card, .checklist, .key-dates { padding: var(--space-16); }
  .article-header h1 { margin-bottom: var(--space-8); }
  .app-cta { flex-direction: column; align-items: stretch; padding: var(--space-16); }
  .app-cta .cta-buttons { flex-direction: column; }
  .app-cta .button, .store-links .button, .download-row .button { width: 100%; }
  .fill-form { margin-left: calc(-1 * var(--space-16)); margin-right: calc(-1 * var(--space-16)); padding: var(--space-16) var(--space-16) 0; border-radius: 0; box-shadow: var(--shadow-line-top); }
  .fill-actions { margin: 0 calc(-1 * var(--space-16)); padding: var(--space-8) var(--space-16); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; }
  .fill-actions-label { display: none; }
  .fill-actions.fill-bundle { display: flex; }
  .fill-actions.fill-bundle .button { width: 100%; }
  .fill-actions .button { min-width: 0; padding: var(--space-8); }
  .fill-row-actions { display: grid; }
  .fill-remember { padding: var(--space-12); }
  .calculator { padding: var(--space-16); }
  .table-scroll { overflow-x: auto; padding: 0 2px 6px; margin: 0 -2px -6px; }
  .country-hub .article-body table { display: block; overflow: visible; box-shadow: var(--shadow-flat); border-radius: 0; }
  .country-hub .article-body thead { display: none; }
  .country-hub .article-body tbody { display: grid; gap: var(--space-8); }
  .country-hub .article-body tr { display: grid; gap: var(--space-4); padding: var(--space-12) var(--space-16); border-radius: var(--radius-card); box-shadow: var(--shadow-card); }
  .country-hub .article-body td { display: block; padding: 0; border-top: 0; }
  .country-hub .article-body td:not(:first-child) { color: var(--color-text-muted); }
  .key-dates dl > div { grid-template-columns: 6rem minmax(0, 1fr); }
  .app-intro { flex-direction: column; align-items: flex-start; }
  .not-found-code { font-size: 3rem; }
}

@media print {
  .site-header, .site-top, .cookie-consent, .cookie-dialog, .toc-rail, .toc-inline, .app-cta, .fill-actions { display: none !important; }
  .layout { display: block; }
}

/* pricing page and legal navigation */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: var(--space-16); margin: var(--space-16) 0 var(--space-24); }
.plan { display: flex; flex-direction: column; gap: var(--space-8); padding: var(--space-16); border-radius: var(--radius-card); background: var(--color-surface); box-shadow: var(--shadow-card); }
.plan h3 { margin: 0; }
.plan p, .plan ul { margin: 0; }
.plan ul { padding-left: var(--space-20); flex: 1; }
.plan-price strong { font-size: 1.5rem; }
.plan .button { margin-top: var(--space-8); width: 100%; }
.side-legal { display: flex; flex-wrap: wrap; gap: var(--space-4) var(--space-12); padding: var(--space-8) var(--space-12); font: var(--type-caption); }
.side-legal a { color: var(--color-text-muted); text-decoration: none; }
.side-legal a:hover { text-decoration: underline; }
.home-intro p { margin: 0 0 var(--space-12); }
