/* Papirka: tokens and components, taken from docs/design/mockups/papirka.css (feature/brand-identity).
   Mark A3 "Kruhla", style S2 "Plum", family palette F2 "Shared sun" (owner's choices, 2026-11-24).
   Light and dark themes; html[data-theme] is set by theme.js (stored choice, else the system setting). */

@font-face {
  font-family: "Commissioner";
  src: url("fonts/Commissioner-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  --plum-800: #3B1541; --plum-700: #4B1D52; --plum-600: #6A2A72; --lilac-200: #E9C8F0;
  --sun: #FFD43B; --sun-deep: #E0A100; --sun-100: #FFF3C4; --sun-ink: #6B4E00;
  --paper: #F6F3EC; --ink: #16131F; --ink-muted: #4B4757; --line-ile: #E7E2D6;

  --bg: var(--paper);
  --surface: #FFFFFF;
  --surface-2: #EFEBE2;
  --line: var(--line-ile);
  --line-strong: #D3CCBC;
  --text: var(--ink);
  --muted: var(--ink-muted);
  --brand: var(--plum-700);
  --brand-hover: var(--plum-800);
  --brand-ink: #FFFFFF;
  --brand-soft: #EFEBE2;
  --brand-soft-line: #E2DCCF;
  --link: var(--plum-600);
  --accent: var(--sun);
  --accent-soft: var(--sun-100);
  --accent-ink: var(--sun-ink);
  --ok: #2E7458; --ok-soft: #E1F1E8;
  --danger: #A8321F; --danger-soft: #FBE4DE;
  --focus: var(--plum-700);
  --shadow: 0 1px 2px rgba(22, 19, 31, .05), 0 8px 24px rgba(22, 19, 31, .07);
  --radius: 18px; --radius-s: 14px;
  --head: "FLAR" 0, "VOLM" 0;
  --body: "FLAR" 0, "VOLM" 0;
  --marker: linear-gradient(transparent 56%, var(--accent) 56%, var(--accent) 90%, transparent 90%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16131F; --surface: #201C2B; --surface-2: #2A2536; --line: #353044; --line-strong: #4A4458;
    --text: #F6F3EC; --muted: #B3AEBE; --brand: #E9C8F0; --brand-hover: #F3DCF7; --brand-ink: #16131F;
    --brand-soft: #2A2536; --brand-soft-line: #3B3549; --link: #E9C8F0; --accent-soft: #3A3214;
    --accent-ink: #FFE48A; --ok: #86D6AE; --ok-soft: #1D3A2C; --danger: #FF9F8C; --danger-soft: #45201B;
    --focus: var(--sun); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .3);
    --marker: linear-gradient(transparent 72%, var(--accent) 72%, var(--accent) 88%, transparent 88%);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #16131F; --surface: #201C2B; --surface-2: #2A2536; --line: #353044; --line-strong: #4A4458;
  --text: #F6F3EC; --muted: #B3AEBE; --brand: #E9C8F0; --brand-hover: #F3DCF7; --brand-ink: #16131F;
  --brand-soft: #2A2536; --brand-soft-line: #3B3549; --link: #E9C8F0; --accent-soft: #3A3214;
  --accent-ink: #FFE48A; --ok: #86D6AE; --ok-soft: #1D3A2C; --danger: #FF9F8C; --danger-soft: #45201B;
  --focus: var(--sun); --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 10px 28px rgba(0, 0, 0, .3);
  --marker: linear-gradient(transparent 72%, var(--accent) 72%, var(--accent) 88%, transparent 88%);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 "Commissioner", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variation-settings: var(--body);
}
img, svg { display: block; }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -.015em; font-variation-settings: var(--head); }
/* the word that matters in a title: a sun marker stroke, as on a printed letter */
.hl { background: var(--marker); padding: 0 .06em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
h1 { font-size: 30px; font-weight: 800; letter-spacing: -.025em; line-height: 1.15; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
p { margin: 0; }
small, .small { font-size: 14px; }
.muted { color: var(--muted); }
.ic { width: 20px; height: 20px; flex: none; }
.ic-s { width: 16px; height: 16px; flex: none; }
.ic-l { width: 24px; height: 24px; flex: none; }
.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.stack > * + * { margin-top: var(--gap, 16px); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media (min-width: 900px) {
  body { font-size: 17px; }
  h1 { font-size: 44px; }
  h2 { font-size: 26px; }
  .wrap { padding: 0 32px; }
}

/* ------------------------------------------------------------------ header */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.logo { display: block; height: 28px; }
.logo img { height: 28px; width: auto; }
.logo .on-dark { display: none; }
:root[data-theme="dark"] .logo .on-light { display: none; }
:root[data-theme="dark"] .logo .on-dark { display: block; }
.nav { display: none; gap: 4px; margin-left: 20px; }
.nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 15px; padding: 8px 12px; border-radius: 10px; }
.nav a:hover, .nav a[aria-current] { background: var(--surface-2); }
.header-end { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
}
@media (min-width: 900px) {
  .site-header .wrap { height: 72px; }
  .logo, .logo img { height: 32px; }
  .nav { display: flex; }
  .only-mobile { display: none !important; }
}
@media (max-width: 899px) { .only-desktop { display: none !important; } }

/* language switch */
.lang { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); }
.lang a {
  min-width: 40px; text-align: center; padding: 6px 8px; border-radius: 9px; font-size: 13px; font-weight: 700;
  color: var(--muted); text-decoration: none; letter-spacing: .02em;
}
.lang a[aria-current] { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.lang-compact {
  display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; color: var(--text);
}

/* ------------------------------------------------------------------ buttons, inputs, chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 14px; border: 1.5px solid transparent;
  font: 700 16px/1 "Commissioner", sans-serif; font-variation-settings: var(--head); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-ghost { background: transparent; color: var(--link); padding: 0 8px; }
.btn-s { min-height: 40px; padding: 0 14px; font-size: 15px; border-radius: 12px; }
.btn-block { width: 100%; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 700; }
.field .hint { font-size: 13px; color: var(--muted); }
.input {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 16px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 14px; color: var(--muted);
  font-size: 16px;
}
.input input { all: unset; flex: 1; min-width: 0; color: var(--text); }
.input input::placeholder { color: var(--muted); }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px;
  border: 1px solid var(--line); background: var(--surface); font-size: 14px; font-weight: 600; color: var(--text);
  text-decoration: none; white-space: nowrap;
}
.chip[aria-pressed="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px;
  font-size: 12.5px; font-weight: 700; line-height: 1.35; white-space: nowrap;
}
.tag-ok { background: var(--ok-soft); color: var(--ok); }
.tag-soon { background: var(--accent-soft); color: var(--accent-ink); }
.tag-late { background: var(--danger-soft); color: var(--danger); }
.tag-neutral { background: var(--surface-2); color: var(--muted); }

/* ------------------------------------------------------------------ cards and blocks */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.card-shadow { box-shadow: var(--shadow); }
.panel { background: var(--surface-2); border-radius: var(--radius); padding: 18px; }
.eyebrow { font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.section { padding: 32px 0; }
@media (min-width: 900px) { .section { padding: 56px 0; } .card { padding: 24px; } }

/* the paper motif: a block with a folded corner */
.folded { position: relative; }
.folded::after {
  content: ""; position: absolute; top: -1px; right: -1px; width: 28px; height: 28px;
  background: linear-gradient(225deg, var(--bg) 0 50%, var(--accent) 50% 100%);
  border-bottom-left-radius: 6px; border-top-right-radius: var(--radius);
}

/* callouts */
.callout {
  display: grid; grid-template-columns: auto 1fr; gap: 12px; align-items: start;
  padding: 16px; border-radius: var(--radius-s); border: 1px solid;
}
.callout .ic-l { margin-top: 1px; }
.callout-deadline { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.callout-deadline .ic-l { color: var(--accent-ink); }
.callout-info { background: var(--brand-soft); border-color: var(--brand-soft-line); }
.callout-info .ic-l { color: var(--brand); }
.callout h3 { font-size: 17px; margin-bottom: 4px; }

/* breadcrumbs */
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs svg { width: 14px; height: 14px; opacity: .6; }

/* meta line under a title */
.meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--muted); align-items: center; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.checked { color: var(--ok); font-weight: 700; }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps > li { position: relative; padding: 0 0 22px 48px; counter-increment: step; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 32px; height: 32px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--brand-soft); color: var(--brand);
  border: 1px solid var(--brand-soft-line);
}
.steps > li::after { content: ""; position: absolute; left: 16px; top: 34px; bottom: 4px; width: 2px; background: var(--line); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { font-size: 17px; margin-bottom: 4px; }
.steps p { color: var(--muted); }

/* checklist */
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.checklist li {
  display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; padding: 12px 14px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface);
}
.box { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--line-strong); margin-top: 1px; display: grid; place-items: center; }
.box.on { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.box.on svg { width: 15px; height: 15px; }
.checklist .sub { display: block; font-size: 14px; color: var(--muted); }

/* sources */
.sources { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sources li { display: grid; grid-template-columns: 20px 1fr; gap: 10px; }
.sources .dom { font-size: 13px; color: var(--muted); }

/* disclaimer */
.disclaimer { font-size: 14px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 16px; }

/* rows (lists of links) */
.rows { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.row {
  display: grid; grid-template-columns: 44px 1fr 20px; gap: 14px; align-items: center; padding: 14px 16px;
  color: var(--text); text-decoration: none; border-top: 1px solid var(--line);
}
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row .badge-ic {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand);
}
.row strong { display: block; font-weight: 700; line-height: 1.3; }
.row .sub { display: block; font-size: 14px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.row > svg:last-child { color: var(--muted); }

/* key-value list */
.kv { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 10px 16px; margin: 0; }
.kv dt { color: var(--muted); font-size: 14px; }
.kv dd { margin: 0; font-weight: 600; }

/* timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 20px 34px; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid var(--line-strong); background: var(--surface);
}
.timeline li::after { content: ""; position: absolute; left: 8px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline li.done::before { background: var(--brand); border-color: var(--brand); }
.timeline li.now::before { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.timeline .when { font-size: 13px; color: var(--muted); font-weight: 600; }
.timeline strong { display: block; }
.timeline .note { font-size: 14px; color: var(--muted); }

/* progress (document validity) */
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.bar.soon i { background: var(--accent); }

/* footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 40px; margin-top: 24px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: grid; gap: 14px; }
.site-footer .not-gov { display: flex; gap: 10px; align-items: flex-start; color: var(--text); font-weight: 600; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.site-footer nav a { color: var(--muted); }
