/* Simeyka — site styles.
 *
 * Design A1 «Ранок», chosen by the owner on 2026-11-25 (umbrella design work for Simeyka and Aptechka; see
 * docs/design/README.md): white and blush, rose for actions, pink and sage as accents, Lora headings and
 * Nunito text, soft radii. Components read only the tokens below; the dark theme is derived from them.
 */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --blush: #fff0f3;          /* section bands, cards, footer */
  --line: #f0d6de;           /* borders */
  --divider: #f5e0e6;        /* list dividers */
  --text: #2a1e1a;           /* ink */
  --muted: #6e5560;
  --body-muted: #5c4650;     /* leads */
  --brand: #b04866;          /* rose: links, buttons, selected chips */
  --brand-hover: #8a344f;
  --on-brand: #ffffff;
  --pink: #f4afbf;           /* decor only, never text */
  --sage: #6f8f72;           /* decor only */
  --sage-bg: #eef3ec;
  --sage-ink: #4d6b50;       /* headings on sage */
  --sage-text: #5a6658;      /* text on sage */
  --accent-soft: #fde3ea;    /* highlight of a linked paragraph */
  --focus: #b04866;
  --radius: 26px;            /* cards */
  --radius-band: 32px;       /* bands */
  --radius-s: 16px;
  --shadow: 0 10px 30px rgb(42 30 26 / .10), 0 2px 6px rgb(42 30 26 / .06);
  --font-head: "Simeyka Serif", Georgia, "Times New Roman", serif;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", Arial, sans-serif;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1517;
    --surface: #241b1f;
    --blush: #2a1f24;
    --line: #4a3540;
    --divider: #3a2a32;
    --text: #f7ecef;
    --muted: #cdb5bf;
    --body-muted: #d9c3cc;
    --brand: #f29ab2;
    --brand-hover: #f7bccb;
    --on-brand: #2a1e1a;
    --pink: #c97d92;
    --sage: #8fb093;
    --sage-bg: #1e2a20;
    --sage-ink: #b9d4bb;
    --sage-text: #a9bfa9;
    --accent-soft: #4a2c37;
    --focus: #f29ab2;
    --shadow: 0 10px 30px rgb(0 0 0 / .5);
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------ fonts (SIL OFL 1.1, site/assets/fonts/) */
@font-face { font-family: "Simeyka Serif"; src: url("/assets/fonts/SimeykaSerif-var.woff") format("woff"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Simeyka Serif"; src: url("/assets/fonts/SimeykaSerif-Italic-var.woff") format("woff"); font-weight: 400 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("/assets/fonts/Nunito-var.woff") format("woff"); font-weight: 200 1000; font-style: normal; font-display: swap; }

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--font); overflow-wrap: break-word; }
@media (min-width: 900px) { body { font-size: 18px; } }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-hover); }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.2; margin: 0 0 .5em; color: var(--text); }
h1 { font-size: clamp(32px, 5.4vw, 58px); font-weight: 600; line-height: 1.1; }
h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 600; margin-top: 1.4em; }
h3 { font-size: 20px; font-weight: 600; }
.main h2 { font-size: clamp(24px, 2.6vw, 30px); }
p, ul, ol, dl { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
li + li { margin-top: .35em; }
.ic { width: 22px; height: 22px; flex: none; }
.ic-s { width: 16px; height: 16px; flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 6px; color: var(--muted); font-size: 13px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; padding: 8px 12px; background: var(--surface); }
.skip:focus { left: 8px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
@media (min-width: 700px) { .card { padding: 26px 30px; } }

/* ------------------------------------------------------------------ logo, header, footer */
.logo { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; }
.logo:hover { color: var(--text); }
.logo .word { font-family: var(--font-head); font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.site-header { background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; gap: 12px 20px; min-height: 76px; flex-wrap: wrap; }
.nav { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { padding: 8px 14px; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 16px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--blush); color: var(--text); }
.lang { display: flex; gap: 2px; padding: 3px; border: 1.5px solid var(--line); border-radius: 999px; }
.lang a { padding: 5px 10px; border-radius: 999px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 800; }
.lang a:hover { color: var(--text); background: var(--blush); }
.lang a[aria-current="true"] { color: var(--on-brand); background: var(--brand); }
@media (max-width: 640px) {
  .site-header .wrap { padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .nav { order: 3; width: 100%; margin: 0 0 0 -14px; }
  .nav a { font-size: 15px; padding: 6px 12px; }
  .lang { margin-left: auto; }
}
.site-footer { margin-top: 64px; padding: 40px 0 48px; background: var(--blush); font-size: 16px; }
.site-footer .wrap > * + * { margin-top: 18px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer .logo .word { font-size: 26px; }
.not-gov { display: flex; gap: 10px; align-items: flex-start; color: var(--muted); margin: 0; }
.portal { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.portal li { margin: 0; }
.portal a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; }
.portal a:hover { border-color: var(--brand); color: var(--text); }
.portal .sub { color: var(--muted); font-weight: 600; }
.portal-cards { display: grid; gap: 12px; }
@media (min-width: 700px) { .portal-cards { grid-template-columns: repeat(3, 1fr); } }
.portal-cards li { padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--blush); }
.portal-cards a { padding: 0; border: 0; background: none; font-size: 18px; }
.portal-cards .sub { display: block; font-weight: 400; font-size: 15px; }
.in-lang { color: var(--muted); font-size: .9em; }

/* ------------------------------------------------------------------ home */
.hero { margin-top: 4px; padding: 48px 20px 44px; border-radius: var(--radius-band); background: var(--blush); text-align: center; }
@media (min-width: 700px) { .hero { padding: 64px 40px 56px; } }
.trio { display: inline-flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.trio span { display: block; border-radius: 50%; }
.trio .t1 { width: 64px; height: 64px; background: var(--brand); }
.trio .t2 { width: 34px; height: 34px; background: var(--sage); }
.trio .t3 { width: 64px; height: 64px; background: var(--pink); }
@media (max-width: 480px) { .trio .t1, .trio .t3 { width: 48px; height: 48px; } .trio .t2 { width: 26px; height: 26px; } }
.hero h1 { max-width: 900px; margin: 0 auto 18px; }
.hero h1 .l2 { display: block; font-style: italic; color: var(--brand); }
.hero .lead { max-width: 680px; margin: 0 auto 28px; color: var(--body-muted); font-size: clamp(18px, 2vw, 21px); }
.age-q { margin: 0 0 12px; font-family: var(--font-head); font-size: 22px; font-weight: 600; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li { margin: 0; }
.chip { display: inline-block; padding: 9px 18px; border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 700; text-decoration: none; }
.chip:hover { border-color: var(--brand); color: var(--text); }
.chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.section-head { text-align: center; margin: 64px 0 24px; }
.section-head h2 { margin: 0 0 6px; }
.section-head p { margin: 0; color: var(--body-muted); }
.popular { display: grid; gap: 16px; }
@media (min-width: 700px) { .popular { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1080px) { .popular { grid-template-columns: repeat(4, 1fr); } }
.pop-card { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 200px; padding: 24px; border-radius: var(--radius); background: var(--blush); color: var(--text); text-decoration: none; }
.pop-card:hover { color: var(--text); box-shadow: var(--shadow); }
.pop-card .big { font-family: var(--font-head); font-size: 30px; font-weight: 700; line-height: 1.15; }
.pop-card .sub { color: var(--body-muted); font-size: 16px; }
.pop-card .go { display: inline-flex; align-items: center; gap: 6px; color: var(--brand); font-weight: 800; }
.pop-card.sage { background: var(--sage-bg); }
.pop-card.sage .big { color: var(--sage-ink); }
.pop-card.sage .sub { color: var(--sage-text); }
.pop-card.sage .go { color: var(--sage-ink); }
.columns { display: grid; gap: 32px; margin-top: 56px; }
@media (min-width: 800px) { .columns { grid-template-columns: repeat(2, 1fr); gap: 48px; } }
.columns h2 { font-size: 24px; margin: 0 0 8px; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list li { margin: 0; border-bottom: 1px solid var(--divider); }
.link-list a { display: flex; align-items: center; gap: 12px; padding: 14px 2px; color: var(--text); text-decoration: none; }
.link-list a:hover { color: var(--brand); }
.link-list .txt { flex: 1; min-width: 0; }
.link-list strong { display: block; font-weight: 800; }
.link-list .sub { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.link-list .ic { color: var(--brand); }
.remind { display: grid; gap: 16px; align-items: center; margin-top: 64px; padding: 32px 28px; border-radius: var(--radius-band); background: var(--brand); color: var(--on-brand); }
@media (min-width: 800px) { .remind { grid-template-columns: 1fr auto; padding: 40px 48px; } }
.remind h2 { margin: 0 0 8px; color: var(--on-brand); font-size: clamp(26px, 3vw, 34px); }
.remind p { margin: 0; color: var(--on-brand); }
.soon { justify-self: start; padding: 10px 22px; border-radius: 999px; background: var(--surface); color: var(--brand); font-weight: 800; }
.stages { margin-top: 8px; }
.stage { margin-top: 32px; scroll-margin-top: 16px; }
.stage-head h3 { margin: 0 0 2px; font-size: 24px; }
.stage-head p { margin: 0 0 12px; color: var(--muted); }
.topic-grid { display: grid; gap: 12px; }
@media (min-width: 700px) { .topic-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .stage .topic-grid { grid-template-columns: repeat(3, 1fr); } }
.topic-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--surface); color: var(--text); text-decoration: none; min-height: 84px; }
.topic-card:hover { border-color: var(--brand); color: var(--text); }
.topic-card .txt { flex: 1; min-width: 0; }
.topic-card strong { display: block; font-size: 17px; font-weight: 800; }
.topic-card .sub { display: block; color: var(--muted); font-size: 15px; line-height: 1.45; }
.topic-card > .ic { color: var(--brand); }
.badge-ic { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; background: var(--blush); color: var(--brand); }
.trust { margin-top: 48px; max-width: 760px; background: var(--sage-bg); border: 0; }
.trust h2 { margin-top: 0; color: var(--sage-ink); font-size: 26px; }
.trust p { color: var(--sage-text); }
.trust a { color: var(--sage-ink); font-weight: 800; }

/* ------------------------------------------------------------------ article */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 12px 0 8px; font-size: 15px; color: var(--muted); }
.crumbs .ic { width: 14px; height: 14px; }
.crumbs a { color: var(--muted); }
.layout { display: grid; gap: 36px; }
@media (min-width: 1000px) { .layout { grid-template-columns: minmax(0, 1fr) 290px; } }
.main { min-width: 0; max-width: 780px; }
.title { margin: 8px 0 22px; }
.title h1 { font-size: clamp(30px, 4.2vw, 46px); }
.title .lead { font-size: 20px; color: var(--body-muted); }
.meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 15px; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }
.short { margin-bottom: 8px; background: var(--blush); border: 0; }
.short p:last-child, .short ul:last-child { margin-bottom: 0; }
.fact-v { font-weight: 800; white-space: nowrap; }
sup.fn { font-size: .68em; line-height: 0; }
sup.fn a { text-decoration: none; padding: 0 1px; font-weight: 700; }
sup.fn + sup.fn::before { content: ","; color: var(--muted); }  /* 12,13 rather than 1213 */
.callout { margin: 22px 0; padding: 18px 22px; border-radius: var(--radius-s); background: var(--sage-bg); color: var(--sage-text); }
.callout strong { color: var(--sage-ink); }
.callout p:last-child { margin-bottom: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { position: relative; padding-left: 48px; min-height: 34px; }
.steps > li + li { margin-top: 16px; }
.steps > li::before {
  counter-increment: step; content: counter(step); position: absolute; left: 0; top: -1px; display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--on-brand); font-weight: 800; font-size: 16px;
}
.table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1px solid var(--line); border-radius: var(--radius-s); }
table { border-collapse: collapse; width: 100%; font-size: 16px; background: var(--surface); }
caption { padding: 10px 14px; text-align: left; caption-side: top; }
th, td { padding: 10px 14px; border-top: 1px solid var(--divider); text-align: left; vertical-align: top; }
th { background: var(--blush); font-weight: 800; }
dl > div { margin-bottom: 14px; }
dt { font-weight: 800; }
dd { margin: 0; }
.faq .qa { padding: 16px 0; border-top: 1px solid var(--divider); }
.faq .qa h3 { margin-bottom: 6px; font-size: 20px; }
.faq .qa p:last-child { margin-bottom: 0; }
.sources-card { margin-top: 36px; background: var(--blush); border: 0; }
.sources-card h2 { margin-top: 0; }
.footnotes { list-style: none; padding: 0; margin: 0; }
.footnotes li { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.footnotes li:target { background: var(--accent-soft); }
.fn-n { flex: none; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); font-size: 13px; font-weight: 800; }
.orig { margin: 0 0 4px; font-style: italic; }
.src { margin: 0; font-size: 14px; }
.dom { color: var(--muted); }
.checked-line { display: flex; gap: 8px; align-items: flex-start; margin: 12px 0 0; color: var(--muted); font-size: 14px; }
.disclaimer { margin-top: 20px; color: var(--muted); font-size: 15px; }
.side { min-width: 0; }
.toc { display: none; }
@media (min-width: 1000px) {
  .toc { position: sticky; top: 16px; display: grid; gap: 2px; padding: 18px; border-radius: var(--radius); background: var(--blush); font-size: 15px; }
  .toc a { padding: 6px 10px; border-radius: 999px; color: var(--text); text-decoration: none; }
  .toc a:hover { background: var(--surface); }
}

/* ------------------------------------------------------------------ 404 page */
.chooser { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--blush); }
.chooser-box { width: 100%; max-width: 460px; display: grid; gap: 20px; }
.chooser .logo .word { font-size: 32px; }
.btn {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 50px; padding: 10px 20px;
  border: 1.5px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); font-weight: 800; text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--text); }
.nf + .nf { padding-top: 16px; border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------ paragraph links (share.js, from Papirka) */
.main [id] { scroll-margin-top: 16px; }
.main [id^="p-"] { border-radius: 6px; }
.main [id^="p-"]:target { animation: p-arrive 3.2s ease-out; }
@keyframes p-arrive {
  0%, 45% { background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
  100% { background: transparent; box-shadow: 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) {
  .main [id^="p-"]:target { animation: none; background: var(--accent-soft); box-shadow: 0 0 0 6px var(--accent-soft); }
}
.p-share {
  display: inline-grid; place-items: center; width: 26px; height: 26px; margin: -4px 0; padding: 0;
  vertical-align: middle; border: 0; border-radius: 8px; background: none; color: var(--muted);
  cursor: pointer; opacity: .6; transition: opacity .15s, background-color .15s;
}
.p-share:hover, .p-share[aria-expanded="true"] { opacity: 1; color: var(--brand); background: var(--brand-soft); }
.p-share:focus-visible { opacity: 1; outline: 2px solid var(--focus); outline-offset: 1px; }
@media (hover: hover) {
  .p-share { opacity: 0; }
  .main [id^="p-"]:hover .p-share, .p-share:focus-visible, .p-share[aria-expanded="true"] { opacity: 1; }
}
.share-menu {
  position: absolute; z-index: 20; display: grid; min-width: 220px; max-width: calc(100vw - 16px); padding: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); box-shadow: var(--shadow);
}
.share-menu[hidden], .share-menu [hidden] { display: none; }
.share-menu [role="menuitem"] {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 10px;
  background: none; color: var(--text); font: inherit; font-size: 15px; font-weight: 600; text-align: left;
  text-decoration: none; cursor: pointer;
}
.share-menu [role="menuitem"] .ic { color: var(--muted); }
.share-menu [role="menuitem"]:hover, .share-menu [role="menuitem"]:focus { background: var(--surface-2); outline: none; }
.share-menu [role="menuitem"]:focus-visible { outline: 2px solid var(--focus); outline-offset: -2px; }
.share-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 30; max-width: calc(100vw - 32px); padding: 10px 16px;
  border-radius: 12px; background: var(--text); color: var(--bg); font-size: 15px; font-weight: 600;
  transform: translateX(-50%); opacity: 0; pointer-events: none; transition: opacity .2s;
}
.share-toast.on { opacity: 1; }
