/* Народна позика — спільна база всіх сторінок. Палітра: льон, червоний вишиванковий CTA, чорний текст, охра. */
:root {
  --linen: #F4EBDD;
  --linen-2: #EADFCB;
  --paper: #FBF6EE;
  --ink: #1A1714;
  --muted: #5E5248;
  --red: #B5242B;
  --red-d: #861A1F;
  --ochre: #C98A1B;
  --green: #3F7A4A;
  --cobalt: #2C4E8A;
  --brown: #5A3A22;
  --line: rgba(90, 58, 34, 0.22);
  --err: #C0262E;
  --display: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --orn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='10'%3E%3Cpath fill='%23B5242B' d='M9 0h2v2H9zM7 2h2v2H7zM11 2h2v2h-2zM5 4h2v2H5zM13 4h2v2h-2zM7 6h2v2H7zM11 6h2v2h-2zM9 8h2v2H9z'/%3E%3Cpath fill='%231A1714' d='M0 4h3v2H0zM17 4h3v2h-3zM9 4h2v2H9z'/%3E%3C/svg%3E");
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  font: 16px/1.5 var(--sans);
  color: var(--ink);
  background-color: var(--linen);
  background-image:
    repeating-linear-gradient(0deg, rgba(90, 58, 34, 0.035) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(90, 58, 34, 0.035) 0 1px, transparent 1px 3px);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--red); }
h1, h2, h3 { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ochre); outline-offset: 2px; }

.ornament {
  height: 10px;
  margin: 8px 0;
  background: var(--orn) repeat-x center / 20px 10px;
}

/* ---------- шапка ---------- */
.topbar {
  width: min(1120px, 100% - 32px);
  height: 60px; /* фіксована: назва може переноситися, поки вантажиться Alegreya, — сторінка не зсувається */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font: 800 24px/1 var(--display);
  color: var(--ink);
}
.wordmark img { flex: none; }
.wordmark i { font-style: normal; color: var(--red); }
.wordmark-sm { font-size: 20px; }
.btn-ghost {
  background: transparent;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 18px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
@media (max-width: 400px) {
  .topbar .wordmark { font-size: 20px; }
  .topbar .wordmark img { width: 38px; height: 38px; }
  .topbar .btn-ghost { padding: 6px 12px; font-size: 14px; }
}

/* ---------- кнопка-вишиванка ---------- */
.btn-red {
  display: inline-block;
  background: var(--red);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 17px 20px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--red-d);
  outline: 1.5px dashed rgba(255, 255, 255, 0.5);
  outline-offset: -7px;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s;
}
.btn-red:hover { background: #A11F26; }
.btn-red:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--red-d); }
.btn-red:disabled { opacity: 0.7; cursor: progress; }
.btn-red:focus-visible { outline: 3px solid var(--ochre); outline-offset: 3px; }
.btn-block { display: block; width: 100%; }

/* ---------- секції ---------- */
.block {
  width: min(1120px, 100% - 32px);
  margin: 52px auto 0;
}
.block-title {
  margin-bottom: 22px;
  font: 800 clamp(28px, 7vw, 40px)/1.1 var(--display);
}
.block-title::after {
  content: "";
  display: block;
  width: 52px;
  margin-top: 10px;
  border-top: 3px dashed var(--red);
}
.block-sub { margin: -6px 0 10px; color: var(--muted); }
.block h3 { font-size: 17px; font-weight: 800; }
.block p { margin: 4px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- рамка попередження (НБУ №130) ---------- */
.caution {
  width: min(1120px, 100% - 32px);
  margin: 26px auto 0;
  padding: 20px 22px;
  background: var(--paper);
  border: 2px solid var(--ink);
  outline: 1.5px dashed var(--red);
  outline-offset: -8px;
  font-size: 14px;
  line-height: 1.55;
}
.caution p { margin: 0; }
.caution .caution-title { margin-bottom: 6px; font-weight: 800; }
@media (min-width: 900px) {
  .caution { padding: 24px 30px; }
}

/* ромб-вузлик: номер кроку, місце в рейтингу */
.knot {
  position: absolute;
  left: 0;
  top: 0;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font: 800 18px/1 var(--display);
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
}

/* ---------- футер ---------- */
.footer {
  margin-top: 60px;
  padding-top: 28px;
  background: var(--linen-2);
  font-size: 13px;
  line-height: 1.55;
  color: #4A3F35;
}
.footer-inner { width: min(1120px, 100% - 32px); margin: 0 auto; }
.footer-inner p { margin: 12px 0 0; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; }
.footer-copy { padding-bottom: 14px; opacity: 0.8; }
.footer .ornament { margin: 0; height: 14px; background-color: var(--paper); background-size: 20px 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
