/* Boarding Now - see DESIGN.md. One signal orange on near-black ink. */
:root {
  color-scheme: light dark;
  --bg: #fafaf9;
  --surface: #ffffff;
  --surface-2: #f1f1ef;
  --line: rgba(15, 19, 26, 0.1);
  --line-strong: rgba(15, 19, 26, 0.22);
  --text: #0f131a;
  --muted: #5f6672;
  --accent: #ff5b1f;
  --on-accent: #0b0b0d;
  --danger: #d4262c;
  --r: 10px;
  --r-lg: 14px;
  --tabs-h: 64px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --surface: #131316;
    --surface-2: #1b1b1f;
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.22);
    --text: #f5f5f4;
    --muted: rgba(245, 245, 244, 0.58);
    --danger: #ff6369;
  }
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.5 'Geist', -apple-system, system-ui, sans-serif;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
main { max-width: 560px; margin: 0 auto; padding: 0 20px max(40px, env(safe-area-inset-bottom)); }
main.has-tabs { padding-bottom: calc(var(--tabs-h) + 32px + env(safe-area-inset-bottom)); }
main > :not(.tabs) { animation: in 0.16s ease-out both; }
@keyframes in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
h1 { font-size: 32px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 13px; font-weight: 400; color: var(--muted); margin: 32px 0 8px; }
p { margin: 0 0 16px; }
a { color: inherit; }
.muted { color: var(--muted); }
.mono { font-family: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace; font-variant-numeric: tabular-nums; }
.hidden { display: none; }
.eyebrow { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent); font-weight: 500; }

/* ---- splash ---- */
#splash { position: fixed; inset: 0; z-index: 100; background: #0b0b0d; display: grid; place-items: center; transition: opacity 0.22s ease; }
#splash.out { opacity: 0; pointer-events: none; }
#splash .mark { display: flex; flex-direction: column; align-items: center; gap: 20px; }
#splash svg { overflow: visible; }
#splash .tile { transform-origin: 32px 32px; animation: pop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
#splash .jetp { stroke: #0b0b0d; stroke-width: 0.9; stroke-dasharray: 1; stroke-dashoffset: 1; fill: #0b0b0d; fill-opacity: 0; animation: draw 0.7s 0.15s ease-out forwards, fillin 0.3s 0.62s ease-out forwards; }
#splash .word { color: #f5f5f4; font-weight: 500; font-size: 22px; letter-spacing: -0.02em; opacity: 0; animation: fade 0.3s 0.55s ease-out forwards; }
@keyframes pop { from { transform: scale(0.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fillin { to { fill-opacity: 1; } }
@keyframes fade { to { opacity: 1; } }

/* ---- top bar ---- */
.top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; height: calc(56px + env(safe-area-inset-top)); padding-top: env(safe-area-inset-top); margin: 0 -20px; padding-left: 20px; padding-right: 20px; background: var(--bg); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 500; letter-spacing: -0.02em; }
.back { display: flex; align-items: center; gap: 2px; text-decoration: none; margin-left: -8px; padding: 8px 8px 8px 0; min-height: 44px; color: var(--muted); font-size: 15px; }
.back .ic { width: 22px; height: 22px; }
.top-right { display: flex; align-items: center; gap: 4px; }
.me { display: block; padding: 6px; border-radius: 50%; }
.av { width: 30px; height: 30px; border-radius: 50%; display: block; object-fit: cover; }
.av-empty { background: var(--surface-2); }
.logo { display: block; flex: none; }
.ic { display: block; flex: none; }

/* ---- buttons and forms ---- */
button, .btn { font: 500 16px/1 'Geist', system-ui, sans-serif; min-height: 48px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); cursor: pointer; transition: background-color 0.15s, border-color 0.15s, color 0.15s, transform 0.15s, opacity 0.15s; }
button:active { transform: scale(0.98); }
button.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
button.link { border: 0; background: transparent; padding: 0 4px; color: var(--muted); }
button.danger { color: var(--danger); }
button:disabled { opacity: 0.5; cursor: default; }
.actions { display: grid; gap: 10px; }
.actions.two { grid-template-columns: 1fr 1fr; }
label { display: block; font-size: 13px; color: var(--muted); margin: 18px 0 6px; }
input, textarea { width: 100%; font: 400 16px/1.4 'Geist', system-ui, sans-serif; padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); color: var(--text); transition: border-color 0.15s; }
textarea { min-height: 96px; resize: vertical; }
input[type='file'] { padding: 10px 12px; }
input:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.two-col > div { min-width: 0; }
.chk { color: var(--accent); font-size: 12px; margin-left: 8px; }

/* ---- rows (lists, details) ---- */
.rows { border-top: 1px solid var(--line); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--text); }
.row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.row .v { color: var(--muted); text-align: right; flex: none; }
.row > .muted:first-child { flex: none; margin-right: 12px; }
.row > .val { flex: 1 1 auto; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.row > a.val { flex: none; white-space: nowrap; margin-left: 12px; color: var(--accent); text-decoration: none; }
a.row:active { opacity: 0.7; }
.title { font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.sub { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.notes { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg { padding: 12px 0; font-size: 15px; }
.msg.err { color: var(--danger); }
.fatal { padding: 12px 20px; font-size: 14px; color: var(--danger); border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.by { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.by img { width: 16px; height: 16px; border-radius: 50%; }
.wait { color: var(--accent); font-size: 13px; }
.syncbar { margin: 16px 0 4px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.syncbar .actions { max-width: 260px; }
.row.cmp { align-items: flex-start; padding: 12px 0; }
.row.cmp .val { text-align: left; }
.who { display: inline-block; min-width: 44px; color: var(--muted); font-size: 13px; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 400 13px/1.45 'Geist Mono', ui-monospace, monospace; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin: 8px 0 0; }
details summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }

/* ---- sign in ---- */
.hero { padding-top: 28px; }
.hero .logo { margin-bottom: 28px; }
.hero h1 { font-size: 44px; letter-spacing: -0.04em; line-height: 1.04; margin-bottom: 14px; }
.lede { color: var(--muted); font-size: 18px; line-height: 1.45; margin-bottom: 28px; max-width: 30ch; }
.sample { margin-top: 36px; }
.sample .eyebrow { display: block; margin-bottom: 12px; color: var(--muted); }
.legal { margin-top: 40px; font-size: 13px; color: var(--muted); }
.legal a { color: var(--muted); }

/* ---- trips list ---- */
.trips { margin-top: 24px; border-top: 1px solid var(--line); }
.trip-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.trip-row .name { font-size: 22px; font-weight: 500; letter-spacing: -0.025em; overflow-wrap: anywhere; }
.trip-row .when { color: var(--muted); font-size: 13px; }
.trip-row .st { color: var(--muted); font-size: 13px; text-align: right; }
.trip-row .ic { color: var(--muted); grid-row: 1 / span 2; grid-column: 2; }
.trip-row:active { opacity: 0.7; }

/* ---- trip header and next up ---- */
.trip-head { padding: 8px 0 4px; }
.trip-title { font-size: 40px; letter-spacing: -0.035em; line-height: 1.05; margin-bottom: 10px; }
.trip-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; color: var(--muted); font-size: 14px; margin: 0; }
.trip-meta .status { color: var(--text); }
.next-card { display: flex; align-items: center; gap: 18px; margin: 22px 0 6px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); text-decoration: none; }
.next-count { min-width: 76px; display: flex; flex-direction: column; }
.next-count .big { font-size: 52px; line-height: 0.95; font-weight: 500; letter-spacing: -0.05em; color: var(--accent); }
.next-count .unit { font-size: 13px; color: var(--muted); margin-top: 6px; }
.next-what { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.next-what .title { font-size: 18px; }
.next-what .sub { font-size: 14px; }

/* ---- timeline ---- */
.tl { position: relative; margin-top: 8px; }
.tl::before { content: ''; position: absolute; left: 67.5px; top: 0; bottom: 0; width: 1px; background: var(--line); }
.day-head { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 12px; margin: 0; padding: 22px 0 8px; background: var(--bg); font-weight: 400; color: var(--text); }
.dnum { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.dtxt { font-size: 13px; color: var(--muted); }
.dtxt b { font-weight: 500; color: var(--text); }
.entries { list-style: none; margin: 0; padding: 0; }
.entry { display: grid; grid-template-columns: 48px 24px minmax(0, 1fr); column-gap: 8px; align-items: start; padding: 8px 0; }
.entry .t { padding-top: 3px; font-size: 13px; color: var(--muted); }
.node { position: relative; z-index: 1; width: 9px; height: 9px; margin: 8px auto 0; border-radius: 50%; background: var(--bg); border: 1.5px solid var(--line-strong); }
.entry.next .node { background: var(--accent); border-color: var(--accent); animation: ring 2.6s ease-out infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255, 91, 31, 0.55); } 70%, 100% { box-shadow: 0 0 0 9px rgba(255, 91, 31, 0); } }
.entry.next .t { color: var(--accent); }
.eb { min-width: 0; }
.plain { display: flex; flex-direction: column; gap: 2px; text-decoration: none; padding: 1px 0 6px; }
.plain .title { font-size: 17px; }
.plain .foot { margin-top: 4px; display: flex; gap: 10px; align-items: center; }
.plain:active, .pass:active { opacity: 0.75; }

/* ---- the flight as a boarding pass ---- */
.pass { display: block; text-decoration: none; padding: 14px 16px 12px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.pass-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; }
.fno { font-size: 15px; font-weight: 500; }
.route { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; margin: 12px 0 4px; }
.code { font-size: 32px; font-weight: 500; letter-spacing: -0.02em; line-height: 1; }
.line { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.line i { flex: 1; border-top: 1px dashed var(--line-strong); }
.times { display: flex; justify-content: space-between; font-size: 14px; }
.times sup { font-size: 10px; color: var(--accent); margin-left: 2px; }
.cities { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.cities span { min-width: 0; overflow-wrap: anywhere; }
.pass-foot { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); display: flex; justify-content: space-between; align-items: center; gap: 10px; }

/* ---- bottom bar ---- */
.tabs { position: fixed; left: 50%; bottom: 0; transform: translateX(-50%); z-index: 30; width: min(100%, 560px); height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding: 6px 10px env(safe-area-inset-bottom); display: flex; align-items: center; justify-content: space-between; background: var(--bg); border-top: 1px solid var(--line); }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 52px; padding: 0; border: 0; background: transparent; border-radius: 12px; color: var(--muted); font: 500 11px/1 'Geist', system-ui, sans-serif; text-decoration: none; letter-spacing: 0.01em; }
.tab.on { color: var(--text); }
.tab.add { flex: none; width: 56px; min-height: 44px; margin: 0 6px; background: var(--accent); color: var(--on-accent); border-radius: 14px; }
.tab.add:active { transform: scale(0.96); }

/* ---- files and people ---- */
.file-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.file-row .ic { color: var(--muted); }
.file-row .open { color: var(--accent); font-size: 14px; white-space: nowrap; }
.person { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.person .av { width: 40px; height: 40px; }
.person .nm { font-weight: 500; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.person .em { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.person .st { font-size: 13px; color: var(--muted); }
.person .st.ok { color: var(--text); }
.invite { margin-top: 8px; display: grid; gap: 10px; }
.invite input { font-size: 14px; }

/* ---- account ---- */
.acct { display: flex; align-items: center; gap: 16px; padding: 12px 0 20px; }
.acct .av { width: 56px; height: 56px; }
.acct .nm { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .entry.next .node { animation: none; }
  #splash .jetp { stroke-dashoffset: 0; fill-opacity: 1; }
  #splash .word { opacity: 1; }
}
@media (max-width: 360px) {
  .trip-title { font-size: 34px; }
  .hero h1 { font-size: 38px; }
  .code { font-size: 28px; }
  .next-count .big { font-size: 44px; }
}

/* ---- toast ---- */
.toast { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 16px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 40; max-width: min(92vw, 520px); padding: 12px 16px; border-radius: 12px; background: var(--text); color: var(--bg); font-size: 14px; animation: in 0.16s ease-out both; }
.pass-static { pointer-events: none; }
.empty { margin-top: 32px; }
