/* airport-codes.de — light reference-guide styling, mobile first, no build step */
:root {
  --navy: #0c4a7a;
  --navy-dark: #08355a;
  --navy-soft: #e7f0f7;
  --accent: #c84e42;
  --ink: #16232e;
  --ink-soft: #526676;
  --line: #dde5ec;
  --line-soft: #eef2f6;
  --bg: #ffffff;
  --bg-soft: #f6f9fb;
  --bg-sink: #eef3f7;
  --radius: 12px;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --shadow: 0 1px 2px rgba(16, 42, 66, .05), 0 8px 24px rgba(16, 42, 66, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink);
  background: var(--bg);
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-underline-offset: 2px; }
a:hover { color: var(--accent); }
code { font-family: var(--mono); font-size: .95em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }
@media (min-width: 700px) { .wrap { width: min(1160px, 100% - 3rem); } }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff;
  padding: .7rem 1.1rem; z-index: 100; border-radius: 0 0 var(--radius) 0;
}
.skip:focus { left: 0; color: #fff; }

/* ---------- header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.site-header a { color: var(--ink); text-decoration: none; }
.site-header a:hover { color: var(--navy); }
.header-inner {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center; gap: .6rem; padding-block: .7rem;
}
.logo {
  display: flex; align-items: center; gap: .55rem; min-width: 0;
  font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--navy) !important;
}
.logo-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-mark {
  width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  background: radial-gradient(circle at 35% 35%, #fff 0 26%, var(--accent) 27% 55%, transparent 56%), var(--navy);
}
.logo-de { color: var(--ink-soft); font-weight: 600; }

.langswitch {
  font-size: .85rem; font-weight: 600; border: 1px solid var(--line);
  padding: .45rem .8rem; border-radius: 999px; white-space: nowrap; background: var(--bg-soft);
  min-height: 40px; display: inline-flex; align-items: center;
}
.langswitch:hover { border-color: var(--navy); }

.nav-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; }
.navbtn {
  display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
  min-height: 40px; padding: .45rem .8rem; border: 1px solid var(--line);
  border-radius: 999px; background: var(--bg-soft); font-size: .85rem; font-weight: 600;
}
.navbtn::before { content: ""; width: 16px; height: 2px; background: currentColor; box-shadow: 0 5px 0 currentColor, 0 -5px 0 currentColor; }
.nav-toggle:focus-visible + .navbtn { outline: 3px solid var(--accent); outline-offset: 2px; }
.mainnav { grid-column: 1 / -1; display: none; }
.nav-toggle:checked ~ .mainnav { display: block; }
.mainnav ul {
  list-style: none; margin: 0 0 .6rem; padding: .4rem 0 0; display: grid; gap: .1rem;
  border-top: 1px solid var(--line-soft);
}
.mainnav a { display: block; padding: .7rem .2rem; font-weight: 600; border-bottom: 1px solid var(--line-soft); }

@media (min-width: 900px) {
  .header-inner { grid-template-columns: auto minmax(0, 1fr) auto; padding-block: .9rem; gap: 1.2rem; }
  .navbtn, .nav-toggle { display: none; }
  .mainnav { grid-column: auto; display: block; }
  .mainnav ul { display: flex; flex-wrap: wrap; gap: .2rem 1.3rem; margin: 0; padding: 0; border: 0; font-size: .95rem; }
  .mainnav a { padding: .2rem 0; border: 0; }
  .logo { font-size: 1.3rem; }
}

.searchbar { display: flex; gap: .5rem; padding-bottom: .85rem; }
.searchbar input {
  flex: 1; min-width: 0; padding: .7rem .9rem; font-size: 1rem; font-family: inherit; min-height: 46px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--bg-soft); color: var(--ink);
}
.searchbar input:focus { background: #fff; }
.searchbar button {
  padding: .7rem 1.2rem; min-height: 46px; font-size: 1rem; font-family: inherit; font-weight: 700; cursor: pointer;
  border: 0; border-radius: 10px; background: var(--navy); color: #fff;
}
.searchbar button:hover { background: var(--navy-dark); }

/* ---------- hero (light) ---------- */
.hero { background: linear-gradient(180deg, var(--navy-soft), #fff); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; gap: 1.1rem; padding-block: 1.6rem 1.8rem; align-items: center; }
.hero-text h1 { margin: 0 0 .4rem; font-size: clamp(1.65rem, 6vw, 2.7rem); line-height: 1.15; letter-spacing: -.025em; color: var(--navy-dark); }
.hero-text p { margin: 0; font-size: clamp(1rem, 2.6vw, 1.18rem); color: var(--ink-soft); max-width: 46ch; }
.hero-media { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-media img { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1.1fr .9fr; gap: 2.2rem; padding-block: 2.6rem 3rem; }
  .hero-media img { aspect-ratio: 4 / 3; }
}

/* ---------- breadcrumbs ---------- */
.crumbs { padding-block: .7rem 0; font-size: .85rem; color: var(--ink-soft); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .35rem; color: #9fb0bd; }

main { padding-block: 1.4rem 3rem; }
h1 { font-size: clamp(1.5rem, 5.6vw, 2.3rem); line-height: 1.2; letter-spacing: -.025em; margin: .4rem 0 .6rem; }
h2 { font-size: clamp(1.2rem, 3.6vw, 1.55rem); letter-spacing: -.015em; margin: 0 0 .7rem; }
h3 { font-size: 1.1rem; margin: 0 0 .4rem; }
.lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 70ch; }
.section { margin-block: 2.2rem; }
.section > h2 { padding-bottom: .4rem; border-bottom: 2px solid var(--navy-soft); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding: .6rem 1.2rem; border-radius: 10px;
  background: var(--navy); color: #fff !important; text-decoration: none; font-weight: 700; font-size: .95rem;
  border: 1px solid var(--navy); cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--navy-dark); }
.btn-ghost { background: #fff; color: var(--navy) !important; border-color: var(--line); }
.btn-ghost:hover { background: var(--bg-soft); }

/* ---------- airport head ---------- */
.airport-head { max-width: 78ch; }
.codeline { display: flex; flex-wrap: wrap; gap: .45rem; margin: .5rem 0 1rem; }
.code-badge {
  display: inline-flex; gap: .4rem; align-items: baseline;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 999px;
  padding: .3rem .8rem; font-size: .8rem; color: var(--ink-soft);
}
.code-badge code { font-size: 1rem; font-weight: 700; color: var(--navy); letter-spacing: .06em; }

figure { margin: 0; }
.airport-card, .photo {
  margin-block: 1.3rem; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; box-shadow: var(--shadow);
}
.airport-card img { width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.airport-card figcaption, .photo figcaption, .maps figcaption {
  padding: .55rem .85rem; font-size: .82rem; color: var(--ink-soft); border-top: 1px solid var(--line-soft); background: #fff;
}

.maps { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-block: 1.4rem; }
.maps figure { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); box-shadow: var(--shadow); }
@media (min-width: 900px) { .maps { grid-template-columns: 3fr 2fr; align-items: start; } }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; }
.data-table th, .data-table td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.data-table tbody th { width: 34%; font-weight: 600; color: var(--ink-soft); background: var(--bg-soft); }
.data-table thead th { background: var(--navy-soft); color: var(--navy-dark); font-weight: 700; border-bottom: 2px solid #cfe0ee; }
.data-table tbody tr:nth-child(even) td { background: #fbfdfe; }
.data-table tr.closed { color: #8a97a3; }
.code-table tbody th { width: auto; }
.code-table code { font-weight: 700; letter-spacing: .08em; color: var(--navy); }
.tag { font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; background: var(--bg-sink); color: var(--ink-soft); padding: .1rem .4rem; border-radius: 4px; }

/* stacked data tables on phones */
@media (max-width: 599px) {
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: auto; }
  .data-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
  .data-table tbody th { width: auto; background: var(--bg-soft); border-bottom: 0; padding-bottom: .1rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .03em; }
  .data-table tbody td { background: #fff !important; padding-top: .15rem; border-bottom: 1px solid var(--line-soft); }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .data-table.rw-table tbody tr { border-bottom: 2px solid var(--line); padding-block: .3rem; }
  .data-table.rw-table td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink-soft); }
  .table-scroll { overflow-x: visible; }
}

/* ---------- cards & tiles ---------- */
.cards { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .cards { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); } }
.card a {
  display: grid; gap: .1rem; height: 100%; padding: .85rem 1rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow);
}
.card a:hover { border-color: var(--navy); background: var(--bg-soft); }
.card-code { font-family: var(--mono); font-weight: 700; color: var(--navy); letter-spacing: .08em; }
.card-name { font-weight: 600; color: var(--ink); line-height: 1.3; }
.card-meta, .card-note { font-size: .85rem; color: var(--ink-soft); }
.card-note { margin-top: .2rem; font-weight: 700; color: var(--accent); }

.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.tile a { display: block; height: 100%; text-decoration: none; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.tile a:hover { border-color: var(--navy); }
.tile img { aspect-ratio: 3 / 2; object-fit: cover; width: 100%; }
.tile-cat { display: inline-block; margin: .8rem 1rem 0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); font-weight: 800; }
.tile-title { display: block; margin: .2rem 1rem 0; font-weight: 700; color: var(--ink); }
.tile-text { display: block; margin: .35rem 1rem 1rem; font-size: .9rem; color: var(--ink-soft); }

/* ---------- airport of the day ---------- */
.potd { display: grid; gap: 1rem; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.potd-map img { width: 100%; }
.potd-body { padding: 0 1.1rem 1.2rem; }
.potd-body h2, .potd-body h3 { margin-top: .8rem; }
@media (min-width: 860px) { .potd { grid-template-columns: 3fr 2fr; } .potd-body { padding: 1.3rem 1.4rem 1.3rem 0; } }

/* ---------- chips + letters ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips a {
  display: inline-flex; gap: .4rem; align-items: baseline; text-decoration: none; min-height: 40px;
  padding: .45rem .85rem; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: .92rem;
}
.chips a:hover { border-color: var(--navy); background: var(--bg-soft); }
.chip-n { font-family: var(--mono); font-size: .78rem; color: var(--ink-soft); }
.letters ul { list-style: none; margin: 1rem 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
.letters a {
  display: grid; place-items: center; min-width: 2.6rem; min-height: 2.6rem; padding: .3rem .5rem; text-decoration: none;
  border: 1px solid var(--line); border-radius: 8px; font-family: var(--mono); font-weight: 700; background: #fff;
}
.letters a.active, .letters a:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

.two-col { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 780px) { .two-col { grid-template-columns: 1fr 1fr; } }
.panel { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.panel img { aspect-ratio: 5 / 3; object-fit: cover; width: 100%; }
.panel h3, .panel p { margin: .7rem 1.1rem; }

.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem; margin-top: 1.5rem; }
.linklist a { margin-right: .4rem; }

/* ---------- ads ---------- */
.ad { margin-block: 1.6rem; padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-soft); }
.ad-label { display: block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: #8a97a3; margin-bottom: .5rem; }

/* ---------- legal ---------- */
.legal { max-width: 76ch; }
.legal h2 { margin-top: 2rem; font-size: 1.18rem; }
.legal ul { padding-left: 1.2rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--ink-soft); padding-block: 2.2rem 2.6rem; margin-top: 3rem; font-size: .92rem; }
.site-footer a { color: var(--navy); }
.site-footer strong { display: block; color: var(--ink); margin-bottom: .5rem; }
.footer-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1.8rem; } }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.site-footer .muted { color: #7b8b98; font-size: .84rem; }
.stats { font-family: var(--mono); font-size: .84rem; }

/* ---------- forms / admin ---------- */
.admin-main { max-width: 780px; }
.form { display: grid; gap: .6rem; margin-block: 1.3rem; }
.form.inline { display: block; }
.form label { font-weight: 600; font-size: .92rem; }
.form input[type=text], .form input[type=password], .form input[type=email], .form textarea, .form select {
  width: 100%; padding: .65rem .7rem; font: inherit; font-size: 16px; min-height: 46px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.form textarea { font-family: var(--mono); font-size: .86rem; }
.form fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1rem 1.2rem; display: grid; gap: .6rem; background: #fff; }
.form legend { font-weight: 700; padding-inline: .4rem; }
.form .check { display: flex; gap: .5rem; align-items: center; font-weight: 500; }
.form .check input { width: auto; min-height: 0; }
.form button { min-height: 46px; }
.hint { font-size: .86rem; color: var(--ink-soft); margin: 0; }
.tip-row { display: grid; gap: .35rem; padding-block: .6rem; border-top: 1px solid var(--line); }
.alert { padding: .8rem 1rem; border-radius: var(--radius); }
.alert.ok { background: #e8f5ea; border: 1px solid #a9d5b3; }
.alert.error { background: #fdeceb; border: 1px solid #efb3ae; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Amazon product recommendations */
.shop-grid { list-style: none; margin: 1rem 0 0; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.shop-card { display: flex; flex-direction: column; gap: .5rem; padding: .85rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.shop-link { display: flex; flex-direction: column; gap: .55rem; text-decoration: none; color: inherit; }
.shop-link img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: calc(var(--radius) - 4px); background: var(--bg-soft); }
.shop-name { font-weight: 600; line-height: 1.3; }
.shop-link:hover .shop-name { text-decoration: underline; }
.shop-desc { margin: 0; font-size: .88rem; color: var(--muted, #5b6874); flex: 1 1 auto; }
.btn-small { padding: .4rem .8rem; font-size: .85rem; align-self: flex-start; }
.shop-note { margin-top: 1rem; font-size: .78rem; color: #8a97a3; }
@media (min-width: 700px) { .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media print {
  .site-header, .site-footer, .hero, .ad, .crumbs { display: none; }
  body { font-size: 12pt; }
}
