/* LayoverLab v2 — "airmail transit document".
   Signature: airmail stripe borders, hard-edged form panels with offset shadows,
   numbered sections like an immigration form, ticket-stub directory.
   Display: Bricolage Grotesque. Data: Spline Sans Mono. */
:root {
  --paper: #f4f1e8; --card: #fdfcf7; --ink: #17202b; --line: #17202b;
  --rule: #c9c2ae;
  --stamp-green: #1f7a4d; --stamp-amber: #b96a00; --stamp-red: #b3372f;
  --air-red: #d64541; --air-blue: #2a4d9b; --accent: #2a4d9b; --muted: #6d7480;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }

/* airmail stripe — the signature, top and bottom of every page */
body::before, body::after {
  content: ""; display: block; height: 14px;
  background: repeating-linear-gradient(-45deg,
    var(--air-red) 0 16px, var(--card) 16px 32px, var(--air-blue) 32px 48px, var(--card) 48px 64px);
  border-bottom: 2px solid var(--ink);
}
body::after { border-bottom: none; border-top: 2px solid var(--ink); }

body { margin: 0; background: var(--paper); color: var(--ink);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif; line-height: 1.6; }
.mono { font-family: 'Spline Sans Mono', monospace; }
a { color: var(--accent); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--air-red); outline-offset: 2px; }

nav.top { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; max-width: 1020px;
  margin: 0 auto; padding: 20px clamp(18px, 5vw, 60px) 14px; font-size: 0.85rem;
  border-bottom: 2px solid var(--ink); text-transform: uppercase; letter-spacing: 0.08em; }
nav.top .logo { font-weight: 800; font-size: 1.2rem; color: var(--ink); text-decoration: none; letter-spacing: 0; text-transform: none; }
nav.top .logo span { color: var(--air-red); }
nav.top a { text-decoration: none; font-weight: 700; color: var(--ink); }
nav.top a:hover { color: var(--air-red); }

header.hero { padding: 34px clamp(18px, 5vw, 60px) 6px; max-width: 1020px; margin: 0 auto; }

/* ---- travel-poster hero (photo: "Airplane during Sunset" by Jacoby Clarke,
   Pexels #1911388 — free for commercial use, no attribution required) ---- */
.poster { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink);
  background-color: #3a3a63;
  background-image:
    linear-gradient(180deg, rgba(23,32,43,0.55) 0%, rgba(23,32,43,0.28) 45%, rgba(23,32,43,0.5) 100%),
    url("https://images.pexels.com/photos/1911388/pexels-photo-1911388.jpeg?auto=compress&cs=tinysrgb&w=1800"),
    linear-gradient(180deg, #23335c 0%, #4b4a7a 30%, #c86a5a 62%, #e89a5d 78%, #f3c574 100%);
  background-size: cover, cover, cover; background-position: center, center 62%, center; }
.poster .sky { position: absolute; inset: 0; pointer-events: none; }
.poster-inner { position: relative; max-width: 1020px; margin: 0 auto;
  padding: clamp(48px, 8vw, 92px) clamp(18px, 5vw, 60px) clamp(40px, 6vw, 72px); }
.poster h1 { color: #fdf7ea; font-size: clamp(2rem, 5.6vw, 3.6rem); text-shadow: 0 2px 0 rgba(23,32,43,0.35);
  max-width: 17ch; }
.poster h1 .acc { color: #ffd98a; }
.poster .tag { color: #fdf7ea; opacity: 0.92; max-width: 56ch; text-shadow: 0 1px 0 rgba(23,32,43,0.3); }
.poster .pill { background: rgba(253,247,234,0.94); color: var(--ink); }
.poster-cta { display: inline-block; margin-top: 22px; background: #fdf7ea; color: var(--ink);
  border: 2px solid var(--ink); padding: 12px 26px; font-family: 'Spline Sans Mono', monospace;
  font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em;
  text-decoration: none; box-shadow: 4px 4px 0 rgba(23,32,43,0.45); }
.poster-cta:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 rgba(23,32,43,0.45); }
.poster-strip { position: relative; overflow: hidden; border-bottom: 2px solid var(--ink);
  background: linear-gradient(180deg, #2a3a63 0%, #7a5a78 55%, #d98a5f 100%); }
.poster-strip .poster-inner { padding: clamp(30px, 5vw, 52px) clamp(18px, 5vw, 60px) clamp(26px, 4vw, 44px); }
.poster-strip h1 { color: #fdf7ea; text-shadow: 0 2px 0 rgba(23,32,43,0.35); }
.poster-strip .tag { color: #fdf7ea; opacity: 0.92; }
.poster-code { position: absolute; right: clamp(6px, 3vw, 40px); bottom: -0.18em; pointer-events: none;
  font-family: 'Spline Sans Mono', monospace; font-weight: 700; letter-spacing: -0.04em;
  font-size: clamp(6rem, 20vw, 13rem); color: rgba(253,247,234,0.14); line-height: 1; user-select: none; }

h1 { font-weight: 800; font-size: clamp(1.7rem, 4.4vw, 2.7rem); margin: 0 0 10px; letter-spacing: -0.02em; line-height: 1.08; }
h1 .acc { color: var(--air-red); }
.tag { color: var(--muted); max-width: 64ch; margin: 0; }
.pill { display: inline-block; background: var(--ink); color: var(--paper); padding: 3px 12px;
  font-family: 'Spline Sans Mono', monospace; font-size: 0.68rem; letter-spacing: 0.14em; font-weight: 700;
  margin-bottom: 14px; text-transform: uppercase; }
.pill.ok { background: var(--stamp-green); }

main { max-width: 1020px; margin: 0 auto; padding: 8px clamp(18px, 5vw, 60px) 90px; counter-reset: sec; }
.card { background: var(--card); border: 2px solid var(--ink); border-radius: 0;
  padding: 20px 22px; margin: 18px 0; box-shadow: 5px 5px 0 rgba(23,32,43,0.16); }

/* numbered form sections */
main h2 { font-size: 1.2rem; margin: 40px 0 8px; text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 2px solid var(--ink); padding-bottom: 6px; }
main h2::before { counter-increment: sec; content: counter(sec, decimal-leading-zero) " / ";
  font-family: 'Spline Sans Mono', monospace; color: var(--air-red); font-weight: 700; }
main h2.sec { font-size: 1rem; margin: 28px 0 4px; }
h3 { font-size: 0.95rem; margin: 20px 0 6px; text-transform: uppercase; letter-spacing: 0.06em; }
.muted { color: var(--muted); } .small { font-size: 0.85rem; }
ul { padding-left: 20px; } li { margin: 5px 0; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.grid > div { display: flex; flex-direction: column; justify-content: flex-end; }
@media (max-width: 640px) {
  .grid { grid-template-columns: 1fr 1fr; }
  .grid > div:first-child { grid-column: 1 / -1; }
}
label { display: block; font-family: 'Spline Sans Mono', monospace; font-size: 0.66rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted); font-weight: 700; margin-bottom: 5px; }
select, input { width: 100%; background: var(--card); border: 2px solid var(--ink); border-radius: 0;
  padding: 10px 11px; font-family: 'Spline Sans Mono', monospace; font-size: 0.9rem; color: var(--ink); }
select { appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%2317202b' stroke-width='2.4'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus { border-color: var(--air-blue); }
select:disabled, input[readonly] { background-color: var(--paper); opacity: 1; }

/* custom autocomplete */
.combo { position: relative; }
.combo-panel { position: absolute; top: calc(100% - 2px); left: 0; right: 0; z-index: 40;
  background: var(--card); border: 2px solid var(--ink); box-shadow: 5px 5px 0 rgba(23,32,43,0.2);
  max-height: 264px; overflow-y: auto; }
.combo-group { font-family: 'Spline Sans Mono', monospace; font-size: 0.62rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--paper); background: var(--ink); padding: 4px 11px;
  position: sticky; top: 0; }
.combo-item { padding: 9px 11px; cursor: pointer; font-size: 0.9rem;
  border-bottom: 1px dashed var(--rule); }
.combo-item:last-child { border-bottom: none; }
.combo-item .ci-code { color: var(--air-red); font-weight: 700; margin-right: 4px; }
.combo-item .ci-sub { color: var(--muted); font-size: 0.78rem; }
.combo-item:hover, .combo-item.active { background: var(--air-blue); color: #fdf7ea; }
.combo-item:hover .ci-code, .combo-item.active .ci-code { color: #ffd98a; }
.combo-item:hover .ci-sub, .combo-item.active .ci-sub { color: rgba(253,247,234,0.75); }
.btn { cursor: pointer; background: var(--ink); color: var(--paper); border: 2px solid var(--ink); border-radius: 0;
  padding: 12px 26px; font-family: 'Spline Sans Mono', monospace; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.1em; box-shadow: 4px 4px 0 rgba(23,32,43,0.25);
  transition: transform 0.06s ease, box-shadow 0.06s ease; }
.btn:hover { transform: translate(-1px,-1px); box-shadow: 5px 5px 0 rgba(23,32,43,0.25); }
.btn:active { transform: translate(3px,3px); box-shadow: 1px 1px 0 rgba(23,32,43,0.25); }
.btn:disabled { opacity: 0.5; cursor: wait; }

/* the stamp — inked, off-kilter, slightly overlapping its panel */
.stamp-row { display: flex; gap: 26px; align-items: center; flex-wrap: wrap; }
.stamp { flex-shrink: 0; width: 172px; height: 172px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  text-align: center; transform: rotate(-9deg); margin: 4px;
  font-weight: 800; letter-spacing: 0.08em; line-height: 1.2; padding: 18px;
  border: 5px double currentColor; text-transform: uppercase; font-size: 1.02rem;
  font-family: 'Spline Sans Mono', monospace;
  mask-image: radial-gradient(circle at 32% 28%, black 55%, rgba(0,0,0,0.7)); }
.stamp.green { color: var(--stamp-green); } .stamp.amber { color: var(--stamp-amber); } .stamp.red { color: var(--stamp-red); }
.verdict-body { flex: 1; min-width: 260px; }
.verdict-body h2 { margin: 0 0 6px; font-size: 1.2rem; border: none; padding: 0; text-transform: none; letter-spacing: 0; }
.verdict-body h2::before { content: none; counter-increment: none; }
.kv { font-size: 0.9rem; margin: 3px 0; }
.kv b { font-weight: 800; }

.timeline { border-left: 3px dotted var(--rule); margin: 14px 0 0 8px; padding-left: 20px; }
.slot { position: relative; margin: 0 0 16px; }
.slot::before { content: ""; position: absolute; left: -27px; top: 5px; width: 11px; height: 11px;
  background: var(--air-red); border: 2px solid var(--card); transform: rotate(45deg); }
.slot .t { font-family: 'Spline Sans Mono', monospace; font-size: 0.76rem; color: var(--air-blue); font-weight: 700; text-transform: uppercase; }
.slot p { margin: 2px 0 0; font-size: 0.93rem; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; margin-top: 10px;
  border: 2px solid var(--ink); }
.fact { background: var(--card); border: 1px solid var(--rule); margin: -0.5px; padding: 14px 16px; font-size: 0.88rem; }
.fact .h { font-family: 'Spline Sans Mono', monospace; font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--air-red); font-weight: 700; margin-bottom: 5px; }
.warn { border: 2px solid var(--stamp-amber); border-left-width: 10px; background: #fdf4e3;
  padding: 11px 14px; margin: 12px 0; font-size: 0.9rem; }
.aff { display: inline-block; margin: 6px 12px 0 0; font-size: 0.82rem; font-weight: 700;
  font-family: 'Spline Sans Mono', monospace; text-transform: uppercase; letter-spacing: 0.03em; }
.aff::after { content: " ->"; }
.disclosure { font-size: 0.75rem; color: var(--muted); margin-top: 10px; }
.fine { font-size: 0.78rem; color: var(--muted); margin-top: 26px; border-top: 2px dashed var(--rule); padding-top: 12px; }
#result { display: none; }

/* ticket-stub directory */
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; margin: 16px 0; }
.dir a { display: block; background: var(--card); border: 2px solid var(--ink); padding: 14px 16px 14px 22px;
  text-decoration: none; color: var(--ink); position: relative; box-shadow: 4px 4px 0 rgba(23,32,43,0.14); }
.dir a::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; border-left: 2px dashed var(--rule); }
.dir a:hover { border-color: var(--air-red); }
.dir a:hover .nm { color: var(--air-red); }
.dir .code { font-family: 'Spline Sans Mono', monospace; font-weight: 700; color: var(--air-blue); font-size: 0.72rem;
  text-transform: uppercase; letter-spacing: 0.08em; }
.dir .nm { font-weight: 800; font-size: 1.02rem; margin: 2px 0; }
.dir .d { font-size: 0.78rem; color: var(--muted); }

.faq details { border-bottom: 2px dashed var(--rule); padding: 10px 0; }
.faq summary { font-weight: 800; cursor: pointer; }
.faq summary::marker { color: var(--air-red); }
.faq p { margin: 8px 0 4px; font-size: 0.93rem; }

.oracle-out { white-space: pre-wrap; background: var(--paper); border: 2px dashed var(--ink); padding: 16px; margin-top: 14px; font-size: 0.93rem; }
footer { text-align: center; padding: 22px; font-size: 0.75rem; color: var(--muted); border-top: 2px solid var(--ink);
  max-width: 1020px; margin: 0 auto; font-family: 'Spline Sans Mono', monospace; text-transform: uppercase; letter-spacing: 0.06em; }
footer a { color: var(--muted); }
