/* My Trip Book web app. The iPhone app's look: grouped iOS colors, the system font, the app's blue.
   One loud element: the flight card's airport codes. Everything else stays quiet. */

:root {
  color-scheme: light;
  --bg: #f2f2f7;
  --surface: #ffffff;
  --surface-2: #e9e9ef;
  --ink: #1c1c1e;
  --muted: #6c6c72;
  --line: #d8d8de;
  --accent: #1e6eff;
  --accent-strong: #0f5fe6;
  --on-accent: #ffffff;
  --accent-tint: #e5efff;
  --danger: #d70015;
  --danger-tint: #ffe9eb;
  --warn: #a14a00;
  --warn-tint: #fff1e0;
  --ok: #1f7a36;
  --shadow: 0 1px 2px rgba(28, 28, 30, .06), 0 4px 14px rgba(28, 28, 30, .05);
  --radius-l: 16px;
  --radius-m: 12px;
  --radius-s: 8px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --bar-h: 56px;
  --tabs-h: 0px;
}

/* Light by default, whatever the system says; dark only when chosen with the bar's moon button, in AllSkill's
   charcoal (not pure black), with the app's blue kept as the accent (Tommy 11-25: "Default to light mode, dark as allskill"). */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121316;
  --surface: #1b1d21;
  --surface-2: #24272c;
  --ink: #f2f0eb;
  --muted: #a3a7ae;
  --line: #2c2f35;
  --accent: #4a94ff;
  --accent-strong: #4a94ff;
  --on-accent: #14161a;
  --accent-tint: #172840;
  --danger: #ff7b72;
  --danger-tint: #3a1c1a;
  --warn: #fbbf24;
  --warn-tint: #33280f;
  --ok: #86efac;
  --shadow: 0 1px 2px rgba(0, 0, 0, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--line) transparent; scroll-padding-top: calc(var(--bar-h) + 12px); scroll-padding-bottom: calc(var(--tabs-h) + 12px); }
a, button, label, input, select, textarea { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--font);
  -webkit-font-smoothing: antialiased; caret-color: var(--accent);
  padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom));
}
::selection { background: var(--accent-tint); color: var(--ink); }
img, svg { display: block; }
a { color: var(--accent-strong); text-underline-offset: 3px; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }
h1 { font-size: 2rem; line-height: 1.15; font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 1.0625rem; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--radius-s); z-index: 20; }
.skip:focus { left: 8px; }

/* ---------- the shell: top bar, and a bottom tab bar on phones (LeadFunnel's) ---------- */

.bar {
  position: sticky; top: 0; z-index: 10; height: var(--bar-h);
  display: flex; align-items: center; gap: 24px; padding: 0 max(16px, env(safe-area-inset-left));
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: 1.0625rem; }
.brand img { border-radius: 7px; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
/* AllSkill's theme switch: one icon button, a moon in light mode and a sun in dark. */
.theme-btn {
  width: 40px; height: 40px; flex: none; display: grid; place-items: center; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer; transition: background-color .18s var(--ease), color .18s var(--ease);
}
.theme-btn svg { width: 20px; height: 20px; }
.theme-btn:hover { background: var(--surface-2); color: var(--ink); }
.tab {
  display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px;
  color: var(--muted); text-decoration: none; font-weight: 550; font-size: .9375rem;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.tab svg { width: 20px; height: 20px; }
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab[aria-current="page"] { color: var(--accent-strong); background: var(--accent-tint); }

@media (max-width: 719px) {
  :root { --tabs-h: 58px; }
  /* A backdrop-filter would make the bar the fixed tab bar's containing block and pin it to the top. */
  .bar { justify-content: center; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .theme-btn { position: absolute; right: max(8px, env(safe-area-inset-right)); top: 8px; }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 10; gap: 0;
    height: calc(var(--tabs-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border-top: 1px solid var(--line);
  }
  .tab { flex: 1; flex-direction: column; justify-content: center; gap: 2px; border-radius: 0; font-size: .6875rem; padding: 0; min-height: 0; }
  .tab svg { width: 24px; height: 24px; }
  .tab:hover, .tab[aria-current="page"] { background: transparent; }
}

.demo-banner {
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 16px; background: var(--warn-tint); color: var(--warn); font-size: .9375rem; font-weight: 550; text-align: center;
}
.demo-banner a { color: inherit; font-weight: 650; }

main { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; outline: none; }
@media (min-width: 720px) { main { padding: 32px 24px 64px; } }

/* ---------- controls ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px;
  border: 0; border-radius: var(--radius-m); font: 600 1rem/1 var(--font); cursor: pointer; text-decoration: none;
  background: var(--surface-2); color: var(--ink);
  transition: background-color .18s var(--ease), transform .12s var(--ease), opacity .18s;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: color-mix(in srgb, var(--surface-2) 80%, var(--ink) 8%); }
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--accent-strong); color: var(--on-accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent-strong) 88%, var(--ink)); }
.btn.plain { background: transparent; color: var(--accent-strong); padding: 0 10px; }
.btn.plain:hover { background: var(--accent-tint); }
.btn.danger { background: var(--danger-tint); color: var(--danger); }
.btn.wide { width: 100%; }
.btn.icon { width: 44px; padding: 0; }
.btn[aria-busy="true"] { opacity: .7; cursor: progress; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label.field { display: grid; gap: 6px; font-weight: 550; font-size: .9375rem; }
label.field > span.hint { font-weight: 400; color: var(--muted); font-size: .875rem; }
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--surface); color: var(--ink); font: 400 1rem/1.4 var(--font);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
textarea { min-height: 96px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
input[aria-invalid="true"] { border-color: var(--danger); }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
.field-error { color: var(--danger); font-size: .875rem; font-weight: 500; }
.form { display: grid; gap: 18px; max-width: 640px; }
.grid-2 { display: grid; gap: 18px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 18px; }
legend { font-weight: 650; font-size: 1.0625rem; margin-bottom: 4px; padding: 0; }

.segmented { display: inline-flex; padding: 3px; background: var(--surface-2); border-radius: 10px; gap: 2px; }
.segmented a, .segmented button {
  min-height: 36px; padding: 0 16px; display: flex; align-items: center; border-radius: 8px; border: 0; background: none;
  color: var(--ink); text-decoration: none; font: 550 .9375rem/1 var(--font); cursor: pointer;
}
.segmented [aria-current="page"], .segmented [aria-pressed="true"] { background: var(--surface); box-shadow: var(--shadow); }

.notice { padding: 12px 14px; border-radius: var(--radius-m); background: var(--surface-2); font-size: .9375rem; }
.notice.error { background: var(--danger-tint); color: var(--danger); font-weight: 500; }
.notice.warn { background: var(--warn-tint); color: var(--warn); }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 20px); z-index: 30;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  padding: 12px 18px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; font-size: .9375rem;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .2); transition: opacity .2s var(--ease), transform .2s var(--ease); max-width: calc(100vw - 32px);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- page heads and groups ---------- */

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 28px; }
.page-head .sub { color: var(--muted); margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 2px; margin: -8px 0 12px -8px; min-height: 40px; padding: 0 8px; color: var(--accent-strong); text-decoration: none; font-weight: 550; border-radius: 8px; }
.back svg { width: 20px; height: 20px; }
.back:hover { background: var(--accent-tint); }
section.group { margin-top: 36px; }
section.group:first-of-type { margin-top: 0; }
.group > h2 { margin-bottom: 12px; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

/* ---------- trips list ---------- */

.list { background: var(--surface); border-radius: var(--radius-l); overflow: hidden; box-shadow: var(--shadow); }
.list > * + * { border-top: 1px solid var(--line); }
.trip-row {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px;
  color: var(--ink); text-decoration: none; transition: background-color .15s var(--ease);
}
.trip-row:hover { background: color-mix(in srgb, var(--surface-2) 55%, var(--surface)); }
.cover { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; font-size: 26px; background: var(--surface-2); }
.trip-row .title { font-weight: 600; font-size: 1.0625rem; }
.trip-row .meta { color: var(--muted); font-size: .9375rem; }
.trip-row .when { text-align: right; font-size: .875rem; color: var(--muted); white-space: nowrap; }
.trip-row .when strong { display: block; color: var(--accent-strong); font-size: .9375rem; }
.trip-row .when { display: flex; align-items: center; gap: 10px; }
.trip-row .when svg { width: 18px; height: 18px; color: var(--muted); flex: none; }

.next-up {
  display: grid; gap: 16px; padding: 20px; border-radius: var(--radius-l); background: var(--surface); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none; margin-bottom: 36px;
}
.next-up .count { font-family: var(--display); font-size: 3rem; line-height: 1; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.next-up .count small { font-size: 1rem; font-weight: 550; letter-spacing: 0; color: var(--muted); margin-left: 6px; }

.empty { text-align: left; padding: 32px 24px; background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); display: grid; gap: 14px; max-width: 560px; }
.empty h2 { font-size: 1.25rem; }

/* ---------- skeletons ---------- */

.skel { background: var(--surface-2); border-radius: 8px; position: relative; overflow: hidden; }
.skel::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--surface) 60%, transparent), transparent);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }

/* ---------- trip detail ---------- */

.trip-head { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 20px; }
.trip-head .cover { width: 64px; height: 64px; font-size: 32px; border-radius: 16px; }
.trip-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--muted); margin-top: 4px; font-size: .9375rem; }
.trip-facts span { display: inline-flex; align-items: center; gap: 6px; }
.trip-facts svg { width: 16px; height: 16px; }
.trip-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 28px; }

.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 880px) { .cards.two { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); padding: 18px 20px;
  color: var(--ink); text-decoration: none; display: block; transition: box-shadow .18s var(--ease), transform .18s var(--ease);
}
a.card:hover { box-shadow: 0 2px 4px rgba(28, 28, 30, .06), 0 10px 28px rgba(28, 28, 30, .09); }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-top .who { display: flex; align-items: center; gap: 10px; font-weight: 600; min-width: 0; }
.card-top .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kind-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-tint); color: var(--accent-strong); flex: none; }
.kind-icon svg { width: 18px; height: 18px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8125rem; font-weight: 600; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.pill.warn { background: var(--warn-tint); color: var(--warn); }
.pill.bad { background: var(--danger-tint); color: var(--danger); }

/* The flight card's route: the page's one loud element. */
.route { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 12px; margin: 18px 0 16px; }
.route .end { min-width: 0; }
.route .end.to { text-align: right; }
.route .code { font-family: var(--display); font-size: clamp(2.5rem, 7vw, 3.25rem); line-height: .95; font-weight: 750; letter-spacing: -.035em; }
.route .time { font-size: 1.0625rem; font-weight: 600; font-variant-numeric: tabular-nums; margin-top: 8px; }
.route .city { color: var(--muted); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route .path { display: grid; justify-items: center; gap: 6px; padding-bottom: 30px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; min-width: 84px; }
.route .path .line { display: flex; align-items: center; gap: 6px; width: 100%; }
.route .path .line::before, .route .path .line::after { content: ""; flex: 1; height: 2px; border-radius: 2px; background: var(--line); }
.route .path svg { width: 18px; height: 18px; color: var(--accent); transform: rotate(45deg); }
.plus-day { font-size: .75rem; font-weight: 700; color: var(--warn); vertical-align: super; margin-left: 2px; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); }
.facts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.facts div { min-width: 0; }
.facts dt { color: var(--muted); font-size: .8125rem; }
.facts dd { margin: 2px 0 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.facts dd.none { color: var(--muted); font-weight: 400; }
@media (max-width: 420px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stay-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.stay-dates .label { color: var(--muted); font-size: .8125rem; }
.stay-dates .value { font-weight: 600; font-variant-numeric: tabular-nums; }
.card .addr { color: var(--muted); font-size: .9375rem; margin-top: 6px; }

.add-menu { display: flex; flex-wrap: wrap; gap: 8px; }

/* day plan */
.day { background: var(--surface); border-radius: var(--radius-l); box-shadow: var(--shadow); overflow: hidden; }
.day + .day { margin-top: 14px; }
.day-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 20px 12px; }
.day-head .n { color: var(--accent-strong); font-weight: 650; font-size: .9375rem; }
.stop { display: grid; grid-template-columns: 76px 1fr auto; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--line); align-items: start; }
.stop .t { white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--accent-strong); padding-top: 1px; }
.stop .t.none { color: var(--muted); font-weight: 400; }
.leg { display: flex; align-items: center; gap: 8px; padding: 6px 20px 6px 108px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.leg svg { width: 16px; height: 16px; flex: none; }
.day-route { display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--line); color: var(--accent-strong); font-weight: 600; text-decoration: none; min-height: 44px; }
.day-route svg { width: 20px; height: 20px; flex: none; }
.day-route:hover { text-decoration: underline; }
@media (max-width: 520px) { .leg { padding-left: 20px; } }
.stop .what { min-width: 0; }
.stop .what .name { font-weight: 600; }
.stop.done .name { text-decoration: line-through; text-decoration-color: var(--muted); color: var(--muted); }
.stop .what .place, .stop .what .note { color: var(--muted); font-size: .9375rem; }
.stop-tools { display: flex; gap: 2px; }
.stop-tools .btn.icon { width: 36px; min-height: 36px; border-radius: 8px; background: transparent; color: var(--muted); }
.stop-tools .btn.icon:hover { background: var(--surface-2); color: var(--ink); }
.stop-tools svg { width: 17px; height: 17px; }
.day-add { padding: 12px 20px 16px; border-top: 1px solid var(--line); }
.day-add form { display: grid; grid-template-columns: 120px 1fr auto; gap: 8px; }
@media (max-width: 560px) { .day-add form { grid-template-columns: 1fr; } }

/* checklist */
.check { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; cursor: pointer; }
.check.done .text { color: var(--muted); text-decoration: line-through; }
.check .due { margin-left: auto; color: var(--muted); font-size: .875rem; white-space: nowrap; }
.check-add { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; max-width: 640px; }

/* screenshot import */
.drop {
  display: grid; place-items: center; gap: 10px; text-align: center; padding: 36px 20px; border-radius: var(--radius-l);
  border: 2px dashed var(--line); background: var(--surface); color: var(--muted); cursor: pointer;
  transition: border-color .15s var(--ease), background-color .15s var(--ease);
}
.drop svg { width: 32px; height: 32px; color: var(--accent); }
.drop strong { color: var(--ink); font-size: 1.0625rem; }
.drop.over { border-color: var(--accent); background: var(--accent-tint); }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.thumbs img { width: 64px; height: 112px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); }
.progress { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s var(--ease); }
.found { cursor: pointer; display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; padding: 16px; }
.found.unsure { background: color-mix(in srgb, var(--warn-tint) 55%, var(--surface)); }
.found .why { color: var(--warn); font-size: .9375rem; margin-top: 4px; }

/* sign-in */
.sign-in { min-height: calc(100vh - 96px); display: grid; place-items: center; }
.sign-in .panel { width: 100%; max-width: 400px; display: grid; gap: 14px; }
.sign-in .mark { width: 72px; height: 72px; border-radius: 17px; box-shadow: var(--shadow); margin-bottom: 10px; }
.sign-in h1 { font-size: 2.25rem; }
.sign-in .lead { color: var(--muted); font-size: 1.0625rem; margin-bottom: 14px; }
.btn.apple { background: #000; color: #fff; }
:root[data-theme="dark"] .btn.apple { background: #fff; color: #000; }
.btn.google { background: var(--surface); color: var(--ink); border: 1px solid var(--line); }
.sign-in .fine { color: var(--muted); font-size: .875rem; margin-top: 10px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .875rem; margin: 4px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* settings */
.settings { display: grid; gap: 28px; max-width: 640px; }
.kv { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 16px; align-items: center; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 550; text-align: right; overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

main:focus, main:focus-visible { outline: none; }
.theme-switching *, .theme-switching *::before, .theme-switching *::after { transition: none !important; }

/* Friends trip switch on the trip form, and whose ticket it is on a flight card. */
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 4px 0; cursor: pointer; }
.check-row .check-title { display: block; font-weight: 600; }
.check-row .hint { display: block; }
.card-top .pills { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pill.who-pill { background: color-mix(in srgb, #8e44ad 16%, transparent); color: #8e44ad; }
:root[data-theme="dark"] .pill.who-pill { color: #c79be0; }

/* One flight's page: an airline-style timeline (Tommy 11-25). */
.flight-info { margin-top: 16px; }
.flight-info .fi-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.fi-timeline { list-style: none; margin: 0; padding: 0; }
.fi-timeline li { position: relative; padding-left: 26px; display: block; }
.fi-timeline .fi-stop::before { content: ""; position: absolute; left: 0; top: 14px; width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid var(--accent); box-sizing: border-box; }
.fi-timeline .fi-stop.last::before { background: var(--accent); }
.fi-timeline .fi-leg { border-left: 2px solid color-mix(in srgb, var(--accent) 50%, transparent); margin-left: 5px; padding: 10px 0 10px 19px; display: flex; flex-direction: column; gap: 2px; color: var(--muted); font-weight: 600; }
.fi-timeline .fi-leg .fi-left { color: var(--accent); }
.fi-timeline .fi-leg svg { width: 14px; height: 14px; vertical-align: -2px; }
.fi-timeline .fi-when { font-size: 32px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.fi-timeline .fi-when.late { color: var(--warn, #c77700); }
.fi-timeline .fi-was { text-decoration: line-through; color: var(--muted); }
.fi-timeline .fi-day { color: var(--muted); }
.fi-timeline .fi-where { font-weight: 500; margin-top: 2px; }
.fi-next { border-top: 1px solid var(--line, rgba(127,127,127,.25)); margin-top: 14px; padding-top: 12px; }
.fi-next .fi-layover { font-weight: 600; margin: 0 0 6px; }
.fi-next .fi-layover.long { color: var(--warn, #c77700); }
.fi-next p { margin: 2px 0 0; }

/* The trip you're on (Tommy 11-26): a green edge, a "Now" pill with a breathing dot, the day and a progress bar. */
.trip-row.live { box-shadow: inset 0 0 0 2px #2fb565; }
.live-pill { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 2px 10px; border-radius: 999px;
  background: #2fb565; color: #fff; font-size: 13px; font-weight: 700; }
.live-pill i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: live-dot 1.1s ease-in-out infinite alternate; }
@keyframes live-dot { to { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .live-pill i { animation: none; } }
.live-day { margin-top: 6px; font-weight: 600; }
.live-bar { margin-top: 6px; height: 6px; border-radius: 3px; background: color-mix(in srgb, currentColor 14%, transparent); max-width: 320px; overflow: hidden; }
.live-bar i { display: block; height: 100%; border-radius: 3px; background: #2fb565; }

.card .landed { margin: 6px 0 0; color: #2fb565; font-weight: 600; }

/* Aircraft: facts, tips and a typical seat map (Tommy 11-26). */
.aircraft { margin-top: 16px; }
.aircraft h2 { margin: 0 0 4px; font-size: 1.1rem; }
.aircraft .ac-name { margin: 0; font-size: 1.15rem; font-weight: 600; }
.aircraft .ac-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 10px 0; }
.aircraft .ac-facts dt { font-size: .75rem; color: var(--muted, #8e8e93); }
.aircraft .ac-facts dd { margin: 2px 0 0; font-weight: 600; }
.aircraft .ac-tips { margin: 0; padding-left: 1.1em; display: grid; gap: 6px; font-size: .95rem; }
.aircraft .ac-seat { margin: 10px 0 0; color: var(--accent, #1e6eff); font-weight: 600; }
.aircraft .ac-map { margin-top: 10px; border-top: 1px solid rgba(127,127,127,.25); }
.aircraft .ac-map summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; cursor: pointer; }
.aircraft .seat-map { display: block; width: 100%; max-width: 380px; height: auto; margin: 0 auto; }
.seat-map .sm-body, .seat-map .sm-wing { fill: rgba(127,127,127,.08); stroke: rgba(127,127,127,.45); stroke-width: 1.2; }
.seat-map .sm-seat { fill: rgba(127,127,127,.3); }
.seat-map .sm-mine { fill: var(--accent, #1e6eff); }
.seat-map .sm-exit { fill: #ff9500; }
.seat-map text { font: 600 11px -apple-system, system-ui, sans-serif; fill: var(--muted, #8e8e93); text-anchor: middle; dominant-baseline: central; }
.seat-map .sm-row { font-size: 9px; font-weight: 400; text-anchor: end; }
.seat-map .sm-row.mine { fill: var(--accent, #1e6eff); font-weight: 700; }
.aircraft .ac-legend { display: flex; gap: 16px; font-size: .85rem; color: var(--muted, #8e8e93); margin: 8px 0 0; }
.aircraft .ac-legend i { display: inline-block; margin-right: 6px; border-radius: 2px; vertical-align: middle; }
.aircraft .ac-legend i.mine { width: 10px; height: 10px; background: var(--accent, #1e6eff); }
.aircraft .ac-legend i.exit { width: 12px; height: 4px; background: #ff9500; }
.aircraft .ac-note { font-size: .8rem; margin: 4px 0 0; }

/* ---------- Ready to go, and Good time to go? (the iPhone app's cards) ---------- */

:root { --good: #248a3d; --good-fill: #34c759; --so: #c93400; --so-fill: #ff9500; --bad: #d70015; --bad-fill: #ff3b30; --unknown: var(--surface-2); }
:root[data-theme="dark"] { --good: #30d158; --good-fill: #30d158; --so: #ff9f0a; --so-fill: #ff9f0a; --bad: #ff6961; --bad-fill: #ff453a; }

.health-cards { display: grid; gap: 14px; margin: 4px 0 20px; }
.card.health { padding: 18px 20px 12px; }
.health-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.health-head.spread { justify-content: space-between; flex-wrap: wrap; }
.health-head .sub { font-weight: 600; font-size: .9375rem; }
.hex-dot { width: 18px; height: 18px; flex: none; clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); background: var(--unknown); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--unknown); }
.hex-dot.good, .dot.good { background: var(--good-fill); }
.hex-dot.ok, .dot.ok { background: var(--so-fill); }
.hex-dot.bad, .dot.bad { background: var(--bad-fill); }

.ready-body { display: grid; gap: 8px 28px; grid-template-columns: 1fr; }
.hex-wrap { max-width: 380px; width: 100%; justify-self: center; }
.hexagon { width: 100%; height: auto; overflow: visible; }
.hexagon .hex-ring { fill: none; stroke: var(--line); stroke-width: 1; }
.hexagon .hex-shape { stroke-width: 2; stroke-linejoin: round; fill-opacity: .28; }
.hexagon .hex-shape.good { fill: var(--good-fill); stroke: var(--good-fill); }
.hexagon .hex-shape.ok { fill: var(--so-fill); stroke: var(--so-fill); }
.hexagon .hex-shape.bad { fill: var(--bad-fill); stroke: var(--bad-fill); }
.hexagon text { fill: var(--muted); font: 600 12px var(--font); }
.ready-rows { min-width: 0; }
.ready-row { padding: 10px 0; }
.ready-row + .ready-row { border-top: 1px solid var(--line); }
.ready-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ready-line .what, .good-row .what { min-width: 0; }
.ready-line .name, .good-row .name { font-weight: 600; }
.ready-line .tip, .good-row .tip { color: var(--muted); font-size: .9375rem; }
.ready-line .score { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.ready-line.sub .name { font-weight: 500; font-size: .9375rem; }
.ready-line.sub .score { font-weight: 600; font-size: .9375rem; }
.score.good { color: var(--good); } .score.ok { color: var(--so); } .score.bad { color: var(--bad); }
.ready-checks { display: grid; gap: 8px; margin: 8px 0 2px 16px; padding-left: 12px; border-left: 2px solid var(--line); }
.ready-boxes { margin: 6px 0 0 4px; }
.ready-boxes .check { padding: 6px 0; min-height: 44px; font-size: .9375rem; }
.ready-boxes .check input { width: 18px; height: 18px; accent-color: var(--accent-strong); flex: none; }
.ready-add { margin-top: 8px; min-height: 40px; font-size: .9375rem; }

.verdict { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 600; font-size: .9375rem; }
.good-body { display: grid; gap: 12px 28px; grid-template-columns: 1fr; }
.year-grid { display: grid; grid-template-columns: 64px repeat(12, minmax(0, 1fr)); gap: 3px; align-items: center; }
.yg-label { color: var(--muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yg-label.strong { color: var(--ink); font-weight: 650; }
.yg-month { text-align: center; color: var(--muted); font-size: .75rem; }
.yg-month.mine { color: var(--ink); font-weight: 700; }
.yg-cell { height: 18px; border-radius: 4px; background: var(--unknown); }
.yg-cell.good { background: color-mix(in srgb, var(--good-fill) 75%, transparent); }
.yg-cell.ok { background: color-mix(in srgb, var(--so-fill) 75%, transparent); }
.yg-cell.bad { background: color-mix(in srgb, var(--bad-fill) 75%, transparent); }
.yg-cell.mine { box-shadow: inset 0 0 0 1.5px var(--ink); }
.yg-best { font-weight: 600; font-size: .9375rem; margin-top: 12px; }
.yg-legend { display: flex; gap: 14px; margin-top: 8px; color: var(--muted); font-size: .8125rem; }
.yg-legend span { display: inline-flex; align-items: center; gap: 5px; }
.yg-legend .dot { width: 8px; height: 8px; }
.good-row { display: flex; align-items: baseline; gap: 10px; padding: 9px 0; }
.good-row + .good-row { border-top: 1px solid var(--line); }

@media (min-width: 880px) {
  .ready-body { grid-template-columns: minmax(300px, 380px) 1fr; align-items: start; }
  .hex-wrap { position: sticky; top: calc(var(--bar-h) + 16px); }
  .good-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: start; }
}
.seat-map .sm-letter { font-size: 10px; font-weight: 500; }
.seat-map .sm-letter.mine { fill: var(--accent, #1e6eff); font-weight: 700; }
.price-spark { display: block; width: 100%; max-width: 260px; height: 28px; margin-top: 6px; }
.price-spark polyline { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.price-spark.down polyline { stroke: #34c759; }
.price-spark.up polyline { stroke: #ff9500; }

/* Saved travel companions: picks under a ticket's traveler, and the list in Settings. */
.companion-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pick-chip { min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--ink); font: inherit; font-size: .9375rem; cursor: pointer; }
.pick-chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.pick-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.save-companion { display: flex; align-items: center; gap: 10px; margin-top: 10px; min-height: 44px; font-weight: 500; }
.save-companion[hidden] { display: none; }
.save-companion input { width: 20px; height: 20px; accent-color: var(--accent); }
.companion-add { display: flex; gap: 8px; margin-top: 10px; }
.companion-add input { flex: 1; min-width: 0; }

/* Paste a route or link onto a day (Tommy 11-29) */
.day-add .paste-day { margin-top: 8px; min-height: 40px; }
.paste-dialog { border: 0; border-radius: var(--radius-l); background: var(--surface); color: var(--ink); box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
  padding: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); }
.paste-dialog::backdrop { background: rgba(0, 0, 0, .35); }
.paste-dialog form { display: grid; gap: 14px; padding: 22px; }
.paste-dialog h2 { font-size: 1.25rem; }
.paste-problem { color: var(--warn); font-weight: 500; }
.paste-problem[hidden] { display: none; }
.paste-found { display: grid; gap: 2px; }
.paste-stop { display: grid; grid-template-columns: 76px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.paste-stop .t { color: var(--muted); font-variant-numeric: tabular-nums; }
.paste-stop .note { display: block; color: var(--muted); font-size: .875rem; }
.paste-actions { display: flex; justify-content: flex-end; gap: 8px; }
.paste-routes { border: 0; padding: 0; margin: 0 0 8px; display: grid; gap: 2px; }
.paste-routes legend { margin-bottom: 6px; }
.paste-routes label { display: flex; gap: 12px; align-items: center; min-height: 48px; padding: 4px 0; border-top: 1px solid var(--line); cursor: pointer; }
.paste-routes input { width: 20px; height: 20px; min-height: 0; accent-color: var(--accent); margin: 0; flex: none; }
.paste-routes .note { display: block; color: var(--muted); font-size: .875rem; }
