@font-face { font-family: "Gilroy"; src: url("./assets/fonts/Gilroy-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("./assets/fonts/Gilroy-Medium.ttf") format("truetype"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("./assets/fonts/Gilroy-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Gilroy"; src: url("./assets/fonts/Gilroy-Bold.ttf") format("truetype"); font-weight: 700 900; font-display: swap; }

:root {
  --ink: #111611;
  --muted: #4b5850;
  --paper: #ffffff;
  --canvas: #f5f8f1;
  --line: #cfdad0;
  --brand: #0f7b37;
  --brand-dark: #095c28;
  --brand-pale: #f3f7d6;
  --danger: #a31616;
  --danger-bg: #fdeeee;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Gilroy", ui-sans-serif, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
button, input { font: inherit; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 10; padding: .75rem 1rem; color: #fff; background: var(--brand-dark); border-radius: 10px; }
.skip-link:focus { top: 1rem; }

.site-header { max-width: 760px; margin: 0 auto; padding: 1rem 1rem .25rem; }
.site-header img { display: block; width: 150px; height: auto; }

#app { max-width: 760px; margin: 0 auto; padding: .5rem 1rem 3rem; outline: none; }
.screen { padding: 1.25rem 1.1rem 1.5rem; background: var(--paper); border: 1px solid var(--line); border-radius: 20px; }

h1 { margin: 0 0 1rem; font-size: clamp(1.4rem, 5.4vw, 1.9rem); line-height: 1.2; letter-spacing: -.02em; }
h2 { margin: 0 0 .6rem; font-size: 1.3rem; line-height: 1.25; }
p { margin: 0 0 .9rem; }
.lede { color: var(--muted); font-size: 1.08rem; }
.small, .hint { color: var(--muted); font-size: .92rem; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
h1:focus { outline: none; }
h1:focus-visible { outline: none; } /* heading gets focus only for screen readers */

.progress { margin-bottom: 1.25rem; }
.progress-meta { margin: 0 0 .4rem; color: var(--muted); font-size: .9rem; font-weight: 700; }
.progress-track { height: 8px; overflow: hidden; background: #e1e8dc; border-radius: 999px; }
.progress-bar { height: 100%; background: var(--brand); border-radius: inherit; }

.choices { display: grid; gap: .6rem; margin: 0 0 1.25rem; }
.choice { display: flex; align-items: center; gap: .8rem; min-height: 52px; padding: .65rem .9rem; background: #fbfcf8; border: 1px solid var(--line); border-radius: 14px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--brand); background: var(--brand-pale); box-shadow: inset 0 0 0 1px var(--brand); }
.choice:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.choice:has(input:disabled) { opacity: .7; cursor: not-allowed; }
.choice input { flex: 0 0 auto; width: 22px; height: 22px; margin: 0; accent-color: var(--brand); }
.choice small { display: block; color: var(--muted); font-size: .88rem; }
.choice .tag { margin-top: .25rem; color: var(--brand-dark); font-weight: 700; }

.actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: space-between; }
.actions.wrap { justify-content: flex-start; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; min-width: 48px; padding: .7rem 1.1rem; border: 1px solid transparent; border-radius: 14px; font-weight: 700; text-decoration: none; cursor: pointer; }
.button.primary { margin-left: auto; color: #fff; background: var(--brand); }
.button.primary:hover { background: var(--brand-dark); }
.button.secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button:disabled { opacity: .45; cursor: not-allowed; }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .3rem; font-weight: 700; }
.field input[type="text"], .field input[type="email"], .field input[type="tel"] { width: 100%; min-height: 48px; padding: .6rem .8rem; border: 1px solid #8a978d; border-radius: 12px; background: #fff; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .check { display: flex; align-items: flex-start; gap: .7rem; min-height: 48px; padding: .4rem 0; font-weight: 500; }
.field .check input { flex: 0 0 auto; width: 24px; height: 24px; margin: .1rem 0 0; accent-color: var(--brand); }
.error { margin: .35rem 0 0; color: var(--danger); font-size: 1rem; font-weight: 600; }
.banner { padding: .8rem 1rem; color: var(--danger); background: var(--danger-bg); border: 1px solid #e3b5b5; border-radius: 12px; font-weight: 600; }

.direction { margin: 0 0 1.1rem; padding: 1rem; background: #fbfcf8; border: 1px solid var(--line); border-radius: 16px; }
.direction.tentative { border-style: dashed; }
.programmes { display: grid; gap: .6rem; margin: 0 0 .9rem; padding: 0; list-style: none; }
.programme { display: grid; gap: .1rem; padding: .7rem .8rem; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.programme-note, .programme-also { color: var(--muted); font-size: .92rem; }
.programme a { color: var(--brand-dark); font-weight: 700; text-underline-offset: 3px; }
.more { color: var(--muted); font-size: .95rem; }
.result .button { margin-left: 0; }

.noscript { margin: 1rem; padding: 1rem; background: #fff1c9; border-radius: 12px; }

@media (min-width: 640px) {
  .screen { padding: 2rem; }
}
@media (max-width: 420px) {
  .actions .button { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Довгий список напрямів: кнопки завжди під великим пальцем */
.actions.sticky { position: sticky; bottom: 0; padding: .75rem 0 .25rem; background: linear-gradient(to bottom, transparent, var(--paper) 25%); }

.exits { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1rem; }
.exits .button { flex: 1 1 12rem; font-weight: 500; }

/* Inside an auto-sized iframe 100vh would grow forever. */
html.embedded, html.embedded body { min-height: 0; background: transparent; }
