/* prostovslovachchyni.sk
   Colours come from the logo: navy #00296B, blue #0080E8, yellow #F8D000 (the underline under the wordmark).
   The yellow is used for one thing only: marking WHEN something must happen. */
:root {
  --navy: #00296b;
  --text: #1c2333;
  --muted: #4a5468;
  --blue: #0a5fc2;
  --blue-hover: #00296b;
  --blue-soft: #eaf2fc;
  --mark: #ffd21f;
  --mark-soft: #fff6cc;
  --alert: #a8271c;
  --alert-soft: #fdeeec;
  --line: #d8dfe9;
  --line-soft: #e8edf3;
  --paper: #ffffff;
  --tint: #f3f6fa;

  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: "IBM Plex Sans", "Segoe UI", Roboto, Arial, sans-serif;

  --r-s: 6px;
  --r-m: 10px;
  --r-l: 16px;
  --wrap: 72rem;
  --measure: 42rem;
  --gutter: 1rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a, button, label, summary, input { touch-action: manipulation; -webkit-tap-highlight-color: rgba(10, 95, 194, .15); }
p, ul, ol, dl { margin: 0 0 1rem; }
ul, ol { padding-left: 1.25rem; }
li + li { margin-top: .35rem; }
strong { font-weight: 600; color: var(--navy); }

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.18;
  text-wrap: balance;
  margin: 0 0 .75rem;
}
h1 { font-size: clamp(1.9rem, 1.3rem + 2.6vw, 2.75rem); letter-spacing: -.005em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.75rem); margin-top: 2.75rem; }
h3 { font-size: 1.2rem; line-height: 1.3; }
p, li, dd { text-wrap: pretty; }

a { color: var(--blue); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--blue-hover); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--r-s); z-index: 10; }
.skip:focus { left: .5rem; }

/* the highlighter: same stroke as the yellow line under the logo's wordmark */
.mark {
  background: linear-gradient(transparent 58%, var(--mark) 58%, var(--mark) 92%, transparent 92%);
  padding: 0 .12em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  font-weight: 600;
  color: var(--navy);
}

/* ---------- header ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .75rem; padding-bottom: .5rem; }
.brand { display: block; flex-shrink: 0; }
.brand img { width: 150px; height: auto; }
.langs { display: flex; gap: .25rem; }
.lang {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; min-height: 44px; padding: 0 .6rem;
  font-weight: 600; font-size: .9375rem; letter-spacing: .02em;
  color: var(--muted); text-decoration: none; border-radius: var(--r-s);
}
.lang:hover { color: var(--navy); background: var(--tint); }
.lang.is-current { color: var(--navy); box-shadow: inset 0 -3px 0 var(--mark); border-radius: 0; }

.guides-nav {
  display: flex; gap: 1.25rem; overflow-x: auto; scrollbar-width: none;
  padding-top: .1rem; padding-bottom: 0;
  -webkit-overflow-scrolling: touch;
}
.guides-nav::-webkit-scrollbar { display: none; }
.guides-nav a {
  flex-shrink: 0; display: inline-flex; align-items: center; min-height: 44px;
  color: var(--text); text-decoration: none; font-size: .9375rem; font-weight: 500;
  border-bottom: 3px solid transparent;
}
.guides-nav a:hover { color: var(--navy); border-bottom-color: var(--line); }
.guides-nav a[aria-current="page"] { color: var(--navy); font-weight: 600; border-bottom-color: var(--navy); }

/* ---------- status strip ---------- */
.status-strip { background: var(--navy); color: #fff; }
.status-strip p { margin: 0; padding: .65rem 0; font-size: .9375rem; line-height: 1.45; }
.status-strip strong { color: #fff; }
.status-strip a { color: #fff; font-weight: 600; white-space: nowrap; text-decoration-color: var(--mark); text-decoration-thickness: 2px; }
.status-strip a:hover { color: var(--mark); }

/* ---------- shared blocks ---------- */
main { padding-bottom: 3rem; }
.crumbs { padding-top: 1.25rem; margin-bottom: .75rem; font-size: .9375rem; }
.crumbs a { color: var(--muted); }
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--text); max-width: var(--measure); }
.lead p:last-child { margin-bottom: 0; }
.section-intro { color: var(--muted); max-width: var(--measure); }
.more { margin-top: .75rem; font-weight: 600; }

.checked { display: flex; flex-wrap: wrap; gap: .25rem 1rem; margin: 1.25rem 0 0; font-size: .9375rem; color: var(--muted); }
.checked-date { font-weight: 600; color: var(--navy); }
.checked-date time { white-space: nowrap; }

/* ---------- home ---------- */
.home-intro { padding-top: 2.5rem; max-width: var(--measure); }
.home-intro h1 { font-size: clamp(2.2rem, 1.4rem + 3.4vw, 3.25rem); }
.choices { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--line); }
.choices li { margin: 0; border-bottom: 1px solid var(--line); }
.choice {
  position: relative; display: grid; gap: .3rem; padding: 1.35rem 2.5rem 1.35rem 0;
  color: inherit; text-decoration: none;
}
.choice::after {
  content: ""; position: absolute; right: .5rem; top: 50%; width: .7rem; height: .7rem;
  border-right: 2px solid var(--navy); border-top: 2px solid var(--navy);
  transform: translateY(-50%) rotate(45deg);
  transition: right .15s ease-out;
}
.choice:hover::after { right: .25rem; }
.choice { grid-template-columns: 5.5rem minmax(0, 1fr); column-gap: 1rem; }
.choice > span { grid-column: 2; }
.choice-img { grid-column: 1; grid-row: 1 / span 3; width: 5.5rem; height: auto; margin-top: .25rem; border-radius: var(--r-s); outline: 1px solid rgba(0, 0, 0, .08); outline-offset: -1px; }
.choice-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); line-height: 1.2; color: var(--navy); }
.choice:hover .choice-title { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.choice-sum { color: var(--muted); max-width: var(--measure); }
.choice-urgent { font-size: .9375rem; }

.home-cols { display: grid; gap: 0 3rem; margin-top: 1rem; }
.dates { margin: 0; }
.dates div { display: grid; gap: .1rem; padding: .8rem 0; border-bottom: 1px solid var(--line-soft); }
.dates div:first-child { border-top: 1px solid var(--line-soft); }
.dates dt { color: var(--muted); font-size: .9375rem; }
.dates dd { margin: 0; font-weight: 600; color: var(--navy); font-size: 1.125rem; }

/* ---------- guide layout ---------- */
.guide-grid { display: grid; gap: 2rem; }
.guide { min-width: 0; }
.guide > h1 { max-width: 40rem; }
.side { display: none; }

.guide-hero { margin: 1.5rem 0 0; max-width: var(--measure); }
.guide-hero img { width: 100%; height: auto; border-radius: var(--r-l); outline: 1px solid rgba(0, 0, 0, .06); outline-offset: -1px; }
.keypoints {
  margin-top: 2rem; padding: 1.25rem 1.25rem 1rem; max-width: var(--measure);
  background: var(--mark-soft); border-radius: var(--r-l);
}
.keypoints h2 { margin-top: 0; font-size: 1.25rem; }
.keypoints ul { margin-bottom: .25rem; }
.keypoints li::marker { color: var(--navy); }

/* track switch */
.tracks { border: 0; margin: 0 0 1.5rem; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.tracks legend { padding: 0; margin-bottom: .5rem; font-weight: 600; color: var(--navy); width: 100%; }
.tracks label {
  position: relative; display: inline-flex; align-items: center; gap: .5rem;
  min-height: 44px; padding: .45rem .9rem .45rem .75rem; cursor: pointer;
  border-radius: var(--r-m); background: var(--tint); font-size: .9375rem; line-height: 1.3;
  box-shadow: inset 0 0 0 1px var(--line);
}
.tracks label:has(input:checked) { background: var(--blue-soft); box-shadow: inset 0 0 0 2px var(--blue); color: var(--navy); font-weight: 600; }
.tracks input { accent-color: var(--blue); width: 1.05rem; height: 1.05rem; margin: 0; }

/* the deadline rail */
.rail { list-style: none; padding: 0; margin: 0; max-width: 46rem; }
.step { position: relative; margin: 0; padding: 0 0 1.75rem 1.75rem; }
.step::before { content: ""; position: absolute; left: 5px; top: .55rem; bottom: 0; width: 2px; background: var(--line); }
.step:last-child::before { display: none; }
.step::after {
  content: ""; position: absolute; left: 0; top: .3rem; width: 12px; height: 12px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 3px var(--navy);
}
.when { margin: 0 0 .2rem; font-size: .9375rem; line-height: 1.5; }
.step-body h3 { margin-bottom: .4rem; }
.step-body p:last-child, .step-body ul:last-child { margin-bottom: 0; }
.only-for { font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
.where { font-size: .9375rem; margin-top: .6rem; }
.where span { color: var(--muted); margin-right: .25rem; }
[data-filter="refuge"] .step[data-track="residence"],
[data-filter="refuge"] .step[data-track="business"],
[data-filter="residence"] .step[data-track="refuge"],
[data-filter="residence"] .step[data-track="business"],
[data-filter="business"] .step[data-track="refuge"],
[data-filter="business"] .step[data-track="residence"] { display: none; }
[data-filter]:not([data-filter="all"]) .only-for { display: none; }

/* prose sections, tables */
.prose { max-width: var(--measure); }
.table-scroll { overflow-x: auto; margin: 0 0 1rem; border-radius: var(--r-m); box-shadow: inset 0 0 0 1px var(--line); }
table { border-collapse: collapse; width: 100%; font-size: .9375rem; font-variant-numeric: tabular-nums; }
th, td { text-align: left; vertical-align: top; padding: .7rem .85rem; border-bottom: 1px solid var(--line-soft); }
thead th { background: var(--tint); color: var(--navy); font-weight: 600; font-size: .875rem; }
tbody th { font-weight: 600; color: var(--navy); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: 0; }

/* mistakes */
.mistakes { max-width: var(--measure); }
.mistakes ul { list-style: none; padding: 0; }
.mistakes li { position: relative; padding: .8rem 0 .8rem 1.6rem; margin: 0; border-bottom: 1px solid var(--line-soft); }
.mistakes li:first-child { border-top: 1px solid var(--line-soft); }
.mistakes li::before {
  content: ""; position: absolute; left: .15rem; top: 1.35rem; width: .8rem; height: 2px; background: var(--alert);
}

/* FAQ */
.faq { max-width: var(--measure); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq details:first-of-type { border-top: 1px solid var(--line-soft); }
.faq summary {
  position: relative; cursor: pointer; list-style: none; padding: .95rem 2.25rem .95rem 0;
  font-weight: 600; color: var(--navy); line-height: 1.4;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: .55rem; top: 1.2rem; width: .55rem; height: .55rem;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg);
  transition: transform .15s ease-out;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 1.45rem; }
.faq-a { padding-bottom: .75rem; }

/* contacts */
.contacts { list-style: none; padding: 0; margin: 0 0 .5rem; display: grid; gap: .75rem; }
.contact { margin: 0; padding: 1rem 1.1rem; border-radius: var(--r-l); background: var(--tint); scroll-margin-top: 1rem; }
.contact:target { box-shadow: inset 0 0 0 2px var(--blue); }
.c-name { font-weight: 600; color: var(--navy); margin-bottom: .2rem; line-height: 1.35; }
.c-sk { display: block; font-weight: 400; font-size: .875rem; color: var(--muted); }
.c-what { font-size: .9375rem; margin-bottom: .6rem; }
.c-data { margin: 0; font-size: .9375rem; display: grid; gap: .3rem; }
.c-data div { display: grid; grid-template-columns: 4.5rem 1fr; gap: .5rem; }
.c-data dt { color: var(--muted); }
.c-data dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.c-data a[href^="tel:"] { font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.c-hours { display: block; color: var(--muted); font-size: .875rem; }

.jump ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin: 1.5rem 0 0; }
.jump li { margin: 0; }
.jump a { display: inline-flex; min-height: 44px; align-items: center; }

/* sources */
.sources { max-width: var(--measure); font-size: .9375rem; }
.sources ol { padding-left: 1.5rem; }
.sources li { padding-left: .25rem; }
.src-meta { display: block; color: var(--muted); font-size: .875rem; }

.related ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.related li { margin: 0; }
.related a { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; }

.page-narrow { max-width: 48rem; }
.contact-group h2 { margin-top: 2.5rem; }
.notfound section { padding: 2rem 0 1rem; border-bottom: 1px solid var(--line-soft); }

/* status page timeline (computed from facts in build.py) */
.timeline { max-width: 46rem; }
.tl { position: relative; margin: 1.5rem 0 .75rem; padding-bottom: 1.6rem; }
.tl-rows { list-style: none; padding: 0; margin: 0; }
.tl-row { margin: 0 0 1.1rem; }
.tl-label { position: relative; z-index: 1; margin: 0 0 .35rem; font-size: .9375rem; line-height: 1.4; }
.tl-label span { background: var(--paper); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.tl-name { font-weight: 600; color: var(--navy); }
.tl-dates { display: block; color: var(--muted); font-size: .875rem; font-variant-numeric: tabular-nums; }
.tl-track { position: relative; display: block; height: 14px; border-radius: 7px; background: var(--tint); box-shadow: inset 0 0 0 1px var(--line-soft); }
.tl-bar { position: absolute; top: 0; bottom: 0; border-radius: 7px; background: var(--navy); }
.tl-open { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-grace .tl-bar { background: #7d93bd; }
.tl-switch .tl-bar { background: var(--mark); }
.tl-eu .tl-bar { background: repeating-linear-gradient(135deg, #b8c5dc 0 5px, #e3e9f3 5px 10px); }
.tl-axis { position: relative; height: 1.4rem; border-top: 1px solid var(--line); font-size: .8125rem; color: var(--muted); }
.tl-tick { position: absolute; top: .3rem; transform: translateX(-50%); }
.tl-tick:first-child { transform: none; }
.tl-tick:last-child { transform: translateX(-100%); }
.tl-today { position: absolute; top: 0; bottom: 0; border-left: 2px dashed var(--alert); }
.tl-today span { position: absolute; bottom: 0; left: .35rem; white-space: nowrap; font-size: .8125rem; font-weight: 600; color: var(--alert); }
.tl-note { font-size: .9375rem; color: var(--muted); }
@media (min-width: 40rem) { .tl-dates { display: inline; margin-left: .35rem; } }

/* ---------- footer ---------- */
.foot { background: var(--tint); border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.foot-grid { display: grid; gap: 1.5rem; padding-top: 2rem; padding-bottom: 1rem; }
.foot-name { font-family: var(--serif); font-weight: 600; font-size: 1.15rem; color: var(--navy); margin-bottom: .35rem; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 0; }
.foot li a { display: inline-flex; min-height: 40px; align-items: center; }
.foot-note { padding-bottom: 2rem; }
.foot-note p { margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); max-width: var(--measure); }

/* ---------- wider screens ---------- */
@media (min-width: 40rem) {
  :root { --gutter: 1.5rem; }
  body { font-size: 1.125rem; }
  .brand img { width: 172px; }
  .contacts { grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
  .page-narrow .contacts { grid-template-columns: 1fr 1fr; }
  .choice { grid-template-columns: 9rem minmax(0, 1fr); column-gap: 1.5rem; }
  .choice-img { width: 9rem; margin-top: .15rem; }
  .foot-grid { grid-template-columns: 2fr 1fr; }
  .step { padding-left: 2rem; }
}
@media (min-width: 56rem) {
  .home-cols { grid-template-columns: 1fr 1.4fr; margin-top: 1.5rem; }
  .home-help .contacts { grid-template-columns: 1fr 1fr; }
  /* rail: the deadline sits in its own column, left of the line */
  .step { display: grid; grid-template-columns: 9rem 1fr; gap: 0 2.25rem; padding-left: 0; }
  .step::before { left: calc(9rem + 1.125rem - 1px); }
  .step::after { left: calc(9rem + 1.125rem - 6px); }
  .when { text-align: right; margin: 0; padding-top: .05rem; }
}
@media (min-width: 64rem) {
  .guide-grid { grid-template-columns: minmax(0, 1fr) 16rem; gap: 4rem; }
  .side { display: block; padding-top: 4.5rem; }
  .side-sticky { position: sticky; top: 1.5rem; font-size: .9375rem; }
  .side-h { font-weight: 600; color: var(--navy); margin-bottom: .5rem; }
  .toc { list-style: none; padding: 0; margin: 0 0 2rem; border-left: 2px solid var(--line); }
  .toc li { margin: 0; }
  .toc a { display: block; padding: .3rem 0 .3rem .9rem; color: var(--muted); text-decoration: none; line-height: 1.35; }
  .toc a:hover { color: var(--navy); text-decoration: underline; }
  .side-help p { margin-bottom: .6rem; line-height: 1.35; }
  .side-help-name { display: block; color: var(--muted); }
  .side-help a { font-weight: 600; font-variant-numeric: tabular-nums; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

@media print {
  .top, .guides-nav, .status-strip, .side, .tracks, .foot nav, .related, .skip { display: none !important; }
  body { font-size: 11pt; }
  a { color: inherit; }
  .sources a::after { content: " (" attr(href) ")"; font-size: 9pt; }
  .faq details > *:not(summary) { display: block; }
  .step { break-inside: avoid; }
}
