@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400..600;1,9..144,400&family=Source+Sans+3:ital,wght@0,400;0,600;1,400&display=swap");

:root {
  --paper: #f4eee3;
  --card: #fffcf6;
  --ink: #1c1612;
  --muted: #5c534a;
  --terracotta: #c45c32;
  --terracotta-hover: #8e3b1c;
  --teal: #0e4a55;
  --teal-soft: #dcecee;
  --terra-soft: #f3e4d4;
  --sand: #e4d4b8;
  --brass: #c4a46c;
  --error: #9b2335;
  --on-dark: #fffcf6;
  --radius: 0.5rem;
  --shadow: 0 1px 0 color-mix(in srgb, var(--brass) 40%, transparent),
    0 12px 28px -18px color-mix(in srgb, var(--ink) 35%, transparent);
  --max: 1120px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { max-width: 100%; overflow-x: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0;
}
h1 { font-size: 2.15rem; font-variation-settings: "opsz" 144; }
h2 { font-size: 1.55rem; font-variation-settings: "opsz" 72; }
h3 { font-size: 1.25rem; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--teal); }
:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
  border-radius: 3px;
}
table { font-variant-numeric: tabular-nums; border-collapse: collapse; }

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--card);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip:focus { left: 0.75rem; top: 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.tabular { font-variant-numeric: tabular-nums; }
.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0;
}
.lead {
  max-width: 62ch;
  font-size: 1.15rem;
  color: var(--muted);
  margin: 1.25rem 0 0;
}
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }
.date-stamp { margin: 1rem 0 0; font-size: 0.95rem; font-weight: 600; color: var(--teal); }

/* Sparse zellige rule */
.zellige {
  height: 14px;
  max-width: 220px;
  margin-top: 1.35rem;
  background:
    linear-gradient(var(--brass), var(--brass)) center / 100% 1px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='14'%3E%3Cpath d='M7 1l6 6-6 6-6-6z' fill='%23C45C32'/%3E%3Cpath d='M29 3l4 4-4 4-4-4z' fill='%230E4A55'/%3E%3C/svg%3E") left center / 44px 14px repeat-x;
}
.zellige.full { max-width: none; margin: 0; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--sand);
  background: color-mix(in srgb, var(--paper) 95%, transparent);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4rem;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.brand-mark { display: block; flex-shrink: 0; }
.wordmark { font-family: var(--font-display); font-size: 1.2rem; line-height: 1; color: var(--ink); }
.wordmark em { font-style: italic; font-weight: 400; }
.wordmark strong { font-style: normal; font-weight: 600; }

.nav-desktop { display: none; margin-left: auto; align-items: center; gap: 0.15rem; }
.nav-desktop a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.5rem 0.7rem;
  border-radius: 4px;
  font-size: 0.97rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.nav-desktop a:hover,
.nav-desktop a[aria-current="page"] { color: var(--ink); }
.nav-desktop a[aria-current="page"] { font-weight: 600; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.55rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  background: var(--terracotta);
  color: var(--on-dark);
}
.btn:hover { background: var(--terracotta-hover); color: var(--on-dark); }
.btn-teal { background: var(--teal); color: var(--on-dark); }
.btn-teal:hover { background: var(--ink); }
.btn-outline {
  background: var(--card);
  color: var(--ink);
  border-color: var(--sand);
}
.btn-outline:hover { border-color: var(--teal); color: var(--teal); }
.btn-sm { min-height: 40px; padding: 0.4rem 1rem; font-size: 0.92rem; }
.btn-ghost {
  background: none;
  color: var(--teal);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  padding-inline: 0;
  border: 0;
}
.btn-esim { margin-left: auto; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  cursor: pointer;
}
.nav-mobile {
  display: none;
  border-top: 1px solid var(--sand);
  background: var(--card);
}
.nav-mobile.open { display: block; }
.nav-mobile ul {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem;
  list-style: none;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 1rem;
  max-width: var(--max);
}
.nav-mobile a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.5rem;
  text-decoration: none;
  color: var(--ink);
  border-radius: 4px;
}
.nav-mobile a:hover,
.nav-mobile a[aria-current="page"] { background: var(--paper); }

/* Footer */
.site-footer {
  margin-top: 5rem;
  border-top: 1px solid var(--sand);
  background: var(--card);
}
.footer-grid {
  display: grid;
  gap: 2rem;
  padding: 2.5rem 0;
}
.footer-grid h2 { font-family: var(--font-sans); }
.footer-grid ul { list-style: none; margin: 0.75rem 0 0; padding: 0; }
.footer-grid li + li { margin-top: 0.15rem; }
.footer-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.97rem;
}
.footer-grid a:hover { color: var(--teal); text-decoration: underline; }
.tagline { font-family: var(--font-display); font-style: italic; color: var(--muted); margin: 0.75rem 0 0; }
.not-gov { font-size: 0.95rem; font-weight: 600; margin: 0.85rem 0 0; }
.footer-note { font-size: 0.9rem; color: var(--muted); margin: 1.1rem 0 0; }
.footer-bar {
  border-top: 1px solid var(--sand);
  padding: 1.1rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Page intro */
.intro { padding: 2.4rem 0 0; }
.intro h1 { max-width: 18ch; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 1.25rem 1.35rem; }
a.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
a.card-link:hover { border-color: var(--terracotta); }
a.card-link h2 { color: var(--ink); }
a.card-link .go { display: inline-block; margin-top: 1rem; font-weight: 600; color: var(--terracotta); }

.grid-3, .grid-2, .grid-tools { display: grid; gap: 1.1rem; }
.tools-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.7rem; margin-top: 1.1rem; }
.tools-row a {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
}
.tools-row a:hover { color: var(--teal); }
.section { margin-top: 3rem; }
.section-split { display: grid; gap: 2rem; margin-top: 3.5rem; }

.callout {
  display: flex;
  gap: 0.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--teal);
  border-left-width: 4px;
  background: var(--teal-soft);
  padding: 1rem 1.15rem;
}
.callout.warn { border-color: var(--terracotta); background: var(--terra-soft); }
.callout strong.t { display: block; margin-bottom: 0.25rem; }
.callout p:last-child { margin-bottom: 0; }
.callout-icon { flex-shrink: 0; margin-top: 0.15rem; }

/* Forms */
.field-label { display: block; font-size: 0.9rem; font-weight: 600; margin-bottom: 0.3rem; }
.field, select.field, textarea.field {
  width: 100%;
  min-height: 44px;
  border-radius: var(--radius);
  border: 1px solid var(--sand);
  background: var(--card);
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
}
textarea.field { min-height: 6rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--sand);
  background: var(--card);
  font: inherit;
  font-size: 0.95rem;
  white-space: nowrap;
  cursor: pointer;
  color: var(--ink);
}
.chip[aria-pressed="true"] {
  background: var(--teal);
  color: var(--on-dark);
  border-color: var(--teal);
}
.check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  min-height: 44px;
  font-size: 0.95rem;
  margin: 0.4rem 0;
}
.check input { margin-top: 0.35rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; }
.form-grid { display: grid; gap: 1rem; }
.stack > * + * { margin-top: 1.15rem; }

/* Tables */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  -webkit-overflow-scrolling: touch;
}
.table-hint { display: block; padding: 0.7rem 1rem 0; font-size: 0.8rem; color: var(--muted); }
table.data { width: 100%; min-width: 720px; font-size: 0.95rem; }
table.data th, table.data td {
  padding: 0.8rem 1rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--sand);
}
table.data th {
  font-size: 0.85rem;
  font-weight: 600;
  background: var(--card);
  position: sticky;
  top: 0;
}
table.data tr:last-child td { border-bottom: 0; }
table.data.climate { min-width: 720px; font-size: 0.82rem; }
table.data.climate th, table.data.climate td { padding: 0.5rem 0.55rem; text-align: right; }
table.data.climate th:first-child, table.data.climate td:first-child { text-align: left; }
.badge {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--teal);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Prose (guides, legal) */
.prose { max-width: 68ch; }
.prose > * + * { margin-top: 1.05em; }
.prose h2 { margin-top: 2.15em; }
.prose h3 { margin-top: 1.5em; }
.prose a { text-decoration-color: var(--brass); }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 0.35em; }
.guide-layout {
  display: grid;
  gap: 2.5rem;
  margin-top: 2.25rem;
}
.guide-aside { }
.guide-aside .card { padding: 1.2rem; }
.guide-aside ul { list-style: none; margin: 0.7rem 0 0; padding: 0; }
.guide-aside a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--sand);
  text-decoration: none;
  color: var(--ink);
}
.guide-aside a:hover { color: var(--teal); }
.crumb { font-size: 0.9rem; color: var(--muted); }
.crumb a { color: var(--muted); }
.crumb a:hover { color: var(--teal); }

/* Visa checklist */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  border-bottom: 1px solid var(--sand);
  padding: 0.15rem 0;
}

/* Result panel */
.result dt { color: var(--muted); }
.result .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--sand);
  padding: 0.5rem 0;
  font-size: 0.95rem;
}
.result .total { border-top: 1px solid var(--sand); margin-top: 1rem; padding-top: 1rem; font-size: 1.15rem; }
.actions { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1.25rem; }

.ext::after {
  content: "";
  display: inline-block;
  width: 0.7em;
  height: 0.7em;
  margin-left: 0.2em;
  vertical-align: 0.05em;
  background: currentColor;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4'%3E%3Cpath d='M7 17L17 7M9 7h8v8'/%3E%3C/svg%3E") center / contain no-repeat;
}

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.5rem 0 0; }
.steps li { counter-increment: step; display: flex; gap: 1rem; margin: 0 0 1rem; }
.steps li::before {
  content: counter(step);
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--teal);
  color: var(--on-dark);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.page-404 { text-align: center; padding: 5rem 1.25rem 4rem; }
.page-404 h1 { font-size: 4.5rem; }

@media (min-width: 720px) {
  h1 { font-size: 3.15rem; }
  .lead { font-size: 1.22rem; }
  .wrap { padding-inline: 2rem; }
  .intro { padding-top: 3.4rem; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .section-split { grid-template-columns: 1fr 1fr; }
  .form-grid.two { grid-template-columns: 1fr 1fr; }
  .budget-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 2rem; align-items: start; }
  .sticky-aside { position: sticky; top: 5.5rem; }
  .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; }
  .guide-layout { grid-template-columns: minmax(0, 1fr) 280px; }
  .guide-aside { position: sticky; top: 5.5rem; align-self: start; }
  .table-hint { display: none; }
  .menu-toggle { display: none; }
  .nav-desktop { display: flex; }
  .btn-esim { margin-left: 0.4rem; }
}
@media (max-width: 719px) {
  .btn-esim { margin-left: auto; }
}

.plan-cards { display: grid; gap: 0.85rem; }
.plan-card {
  background: var(--card);
  border: 1px solid var(--sand);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem 1.1rem;
}
.plan-card header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-bottom: 0.7rem;
}
.plan-card header strong { font-family: var(--font-display); font-size: 1.15rem; }
.plan-card .badge { margin-left: 0; }
.plan-card dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.45rem 1rem;
  margin: 0;
}
.plan-card dt { font-size: 0.75rem; color: var(--muted); font-weight: 600; }
.plan-card dd { margin: 0; font-weight: 600; }
.plan-card .btn { margin-top: 0.9rem; width: 100%; }
.table-desktop { }
@media (min-width: 720px) {
  .plan-cards { display: none; }
}
@media (max-width: 719px) {
  .table-desktop { display: none; }
}
