:root {
  --ink: #0e2b30;
  --teal: #14505a;
  --river: #2f8fa8;
  --amber: #f0b429;
  --paper: #f4f7f6;
  --line: #cfdcd9;
  --muted: #4b6368;
  --font: "Segoe UI", "Helvetica Neue", Roboto, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
a { color: var(--teal); text-underline-offset: .18em; }
a:hover { color: var(--river); }
a:focus-visible, label:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

/* ---------- Перемикач мови / Language switch (CSS only) ---------- */
.lang-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
#l-uk:checked ~ .page [lang="en"],
#l-en:checked ~ .page [lang="uk"] { display: none; }

.switch { display: inline-flex; border: 2px solid var(--amber); border-radius: 999px; overflow: hidden; }
.switch label {
  padding: .3rem .95rem;
  font-weight: 700;
  font-size: .9rem;
  color: #fff;
  cursor: pointer;
  user-select: none;
}
#l-uk:checked ~ .page label[for="l-uk"],
#l-en:checked ~ .page label[for="l-en"] { background: var(--amber); color: var(--ink); }
#l-uk:focus-visible ~ .page label[for="l-uk"],
#l-en:focus-visible ~ .page label[for="l-en"] { outline: 3px solid #fff; outline-offset: 2px; }

/* ---------- Hero ---------- */
.hero { background: var(--ink); color: #fff; padding: 1.25rem 0 3.5rem; }
.hero-grid { display: grid; gap: 2rem; align-items: center; grid-template-columns: 1fr; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 3rem; }
.logo { width: 3.4rem; height: auto; }
.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 12vw, 6.5rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -.04em;
  color: var(--amber);
}
.hero-name { margin: .5rem 0 0; font-size: clamp(1.25rem, 3.5vw, 1.75rem); font-weight: 600; }
.hero-sub { margin: 1rem 0 0; max-width: 34rem; color: #b9cfd2; }
.hub { width: min(100%, 22rem); justify-self: center; }
.hub circle[fill="#0e2b30"] { fill: var(--ink); stroke: #5fb3c8; }
.hub text { fill: var(--ink); }

/* ---------- Sections ---------- */
.sec { display: grid; gap: 1rem; padding-top: 3rem; padding-bottom: 3rem; grid-template-columns: 1fr; }
section + section .sec { border-top: 1px solid var(--line); }
h2 { margin: 0; font-size: 1.5rem; line-height: 1.2; color: var(--teal); }
h3 { margin: 1.75rem 0 .5rem; font-size: 1.1rem; }
.body { max-width: 44rem; }
.body p { margin: 0 0 1rem; max-width: 68ch; }
.body > div > :first-child { margin-top: 0; }

ol { padding-left: 1.4rem; margin: 0; }
ol li { margin-bottom: .6rem; padding-left: .25rem; }
ol li::marker { color: var(--river); font-weight: 700; }
.steps li { margin-bottom: .35rem; }

/* ---------- Definition lists ---------- */
.facts { margin: 1.5rem 0 0; display: grid; grid-template-columns: 1fr; gap: 0; }
.body > .facts:first-child { margin-top: 0; }
.facts dt { font-weight: 700; color: var(--muted); font-size: .95rem; margin-top: 1rem; }
.facts dd { margin: 0; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }

/* ---------- Table ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 28rem; }
th, td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); }
th { font-size: .95rem; color: var(--muted); border-bottom: 2px solid var(--teal); }
td:nth-child(2) { font-variant-numeric: tabular-nums; }
td:first-child { font-weight: 600; }

/* ---------- News ---------- */
.news h3 { margin: 0; font-size: 1.35rem; line-height: 1.25; }
.news .date { margin: .35rem 0 1.25rem; color: var(--muted); font-size: .95rem; }
.news ol { margin-bottom: 1rem; }
.news .signoff { margin-top: 1.5rem; color: var(--muted); }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: #b9cfd2; padding: 1.5rem 0; font-size: .95rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; }

/* ---------- Wide screens ---------- */
@media (min-width: 52rem) {
  .hero-grid { grid-template-columns: 1.2fr 1fr; }
  .sec { grid-template-columns: 12rem 1fr; gap: 3rem; }
  .facts { grid-template-columns: 13rem 1fr; }
  .facts dt { margin-top: 0; padding: .55rem 0; border-bottom: 1px solid var(--line); }
  .facts dd { padding: .55rem 0; }
  /* дві мови: прихований dt не має займати комірку сітки */
  .facts dt[lang], .facts dd { align-self: stretch; }
}

@media print {
  .switch, .hub { display: none; }
  .hero { background: none; color: #000; }
  .hero h1 { color: #000; }
}
