@import url("/tokens.css");

@font-face {
  font-family: Literata;
  src: url("/Literata-Variable.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Syne;
  src: url("/Syne-Variable.ttf") format("truetype");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --chrome: system-ui, -apple-system, "SF Pro Text", sans-serif;
  --display: Literata, "Iowan Old Style", Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--color-surface-ground); color: var(--color-text-primary); font-family: var(--chrome); }
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/*
 * Privacy, Terms, and Support. The HTML is a static asset on the email-ingest
 * Worker, but `/site.css`, `/tokens.css`, fonts, and `/brand/*` on the product
 * host resolve here, so the legal pages share the homepage's stylesheet.
 * Chrome mirrors the logged-out homepage header and footer; Syne comes from
 * that homepage's @font-face and falls back to system-ui without it.
 */
.legal {
  --legal-display: Syne, system-ui, sans-serif;
  --legal-narrative: Literata, "Iowan Old Style", Georgia, serif;
  min-height: 100vh; background: var(--color-surface-ground); color: var(--color-text-primary); font-family: var(--chrome);
}
.legal > header, .legal > footer { max-width: 1120px; margin: 0 auto; padding-left: 40px; padding-right: 40px; }
.legal > header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 28px; padding-bottom: 28px; }
.legal .brand { display: flex; align-items: center; gap: 10px; color: inherit; font-size: inherit; font-weight: inherit; }
.legal .plate { width: 36px; height: 36px; border-radius: 10px; background: var(--color-brand-logo-background); display: grid; place-items: center; }
.legal .plate img { width: 26px; height: 26px; }
.legal .word { font-family: var(--legal-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em; color: var(--color-text-primary); }
.legal nav { display: flex; flex-wrap: wrap; gap: 24px; }
.legal > header nav a { font-size: 15px; font-weight: 500; color: var(--color-text-secondary); }
.legal nav a:hover, .legal nav a[aria-current="page"] { color: var(--color-text-primary); }
.legal main { max-width: 720px; margin: 0 auto; padding: 48px 20px 96px; }
.legal .eyebrow, .legal .updated { font-family: var(--chrome); }
.legal .eyebrow { font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--color-brand-accent); margin: 0 0 20px; }
.legal h1 { font-family: var(--legal-display); font-weight: 700; font-size: 48px; line-height: 1.06; letter-spacing: -0.01em; margin: 0 0 12px; }
.legal .updated { font-size: 14px; color: var(--color-text-secondary); margin: 0 0 32px; }
.legal .lede { font-family: var(--legal-narrative); font-size: 21px; line-height: 1.6; color: var(--color-text-secondary); margin: 0 0 40px; }
.legal h2 {
  font-family: var(--legal-narrative); font-weight: 600; font-size: 23px; line-height: 1.3;
  margin: 48px 0 12px; padding-top: 24px; border-top: 1px solid var(--color-border-hairline);
}
.legal main p, .legal main li { font-family: var(--legal-narrative); font-size: 17px; line-height: 1.65; }
.legal main p, .legal main ul { margin: 0 0 16px; }
.legal main ul { padding-left: 1.2em; }
.legal main li { margin: 6px 0; }
.legal main a { color: var(--color-brand-accent); text-decoration: underline; text-underline-offset: 2px; }
.legal main a:hover { text-decoration-thickness: 2px; }
.legal > footer {
  border-top: 1px solid var(--color-border-hairline); padding-top: 28px; padding-bottom: 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 14px; color: var(--color-text-secondary);
}
.legal > footer a:hover { color: var(--color-text-primary); }
@media (max-width: 900px) {
  .legal > header, .legal > footer { padding-left: 16px; padding-right: 16px; }
  .legal > header { padding-top: 20px; padding-bottom: 20px; }
  .legal > header nav { gap: 16px; }
  .legal main { padding: 32px 16px 72px; }
  .legal h1 { font-size: 36px; }
  .legal .lede { font-size: 18px; }
}
@media (max-width: 420px) {
  .legal > header { flex-wrap: wrap; }
}

.shell { display: grid; min-height: 100vh; }
.rail { display: flex; flex-direction: column; gap: 8px; padding: 16px 20px 12px; border-bottom: 1px solid var(--color-border-hairline); background: var(--color-surface-tint); }
.rail .brand { padding: 4px 12px 8px; text-decoration: none; }
.rail .brand:hover { color: var(--color-text-primary); }
.rail-nav { display: flex; gap: 8px; }
.nav-item { padding: 8px 12px; border-radius: 8px; }
.nav-item.selected { background: var(--color-surface-tint); color: var(--color-brand-accent); box-shadow: inset 0 -3px 0 var(--color-brand-accent); }
.column { min-width: 0; }
.top { display: flex; justify-content: flex-end; align-items: center; padding: 16px 20px; }
.brand, .display { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--color-brand-accent); }
.section { font-family: var(--display); font-weight: 600; font-size: 1.5rem; }
.list-title { font-family: var(--display); font-weight: 600; font-size: 1.25rem; margin: 0; }
main { max-width: 720px; margin: 0 auto; padding: 0 20px 48px; }
.sign-in { max-width: 360px; margin: 10vh auto; text-align: center; }
.auth-form { display: grid; gap: 12px; text-align: left; }
.auth-form label { display: grid; gap: 6px; }
.auth-form input {
  width: 100%; padding: 11px 12px; border-radius: 8px; border: 1px solid var(--color-border-hairline);
  background: var(--color-surface-raised); color: var(--color-text-primary);
}
.apple-button { width: 100%; margin-top: 12px; background: var(--color-text-primary); color: var(--color-surface-ground); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--color-text-secondary); }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--color-border-hairline); }
.auth-notice { padding: 10px 12px; border-radius: 8px; background: var(--color-surface-raised); }
.auth-switch { display: inline-block; margin-top: 16px; color: var(--color-brand-accent); font-weight: 600; text-decoration: none; }
.auth-switch:hover { text-decoration: underline; }
.pair-device { margin-top: 28px; color: var(--color-text-secondary); text-align: left; }
.pair-device summary { cursor: pointer; color: var(--color-brand-accent); text-align: center; }
.pair-device .auth-form { margin-top: 12px; }
.empty, .secondary { color: var(--color-text-secondary); }
.toolbar { display: flex; justify-content: flex-end; gap: 8px; margin-bottom: 16px; }
button { background: var(--color-brand-accent); color: var(--color-text-on-accent); border: 0; border-radius: 8px; padding: 10px 16px; }
button:disabled { cursor: wait; opacity: 0.65; }
.secondary-button { background: var(--color-surface-raised); color: var(--color-brand-accent); border: 1px solid var(--color-border-hairline); }
.text-button { background: transparent; color: var(--color-brand-accent); padding: 6px 8px; }
.text-button.destructive { color: var(--color-status-destructive); }
.gear { background: transparent; color: var(--color-text-primary); font-size: 1.25rem; padding: 8px; }
.trip-row { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--color-border-hairline); }
.board-row { display: block; margin: 12px 0; padding: 20px; border-radius: 16px; background: var(--color-surface-raised); }
.board-row .trip-title { font-size: 18px; font-weight: 600; }
.board-row .secondary { margin-top: 5px; }
.orphan-inbox-page { max-width: 960px; padding-top: 24px; }
.orphan-inbox-page .display { color: var(--color-text-primary); margin: 16px 0 0; }
.orphan-count { color: var(--color-brand-accent); margin: 2px 0 8px; }
.orphan-inbox-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 16px; padding: 20px 24px; border-radius: 14px; background: var(--color-surface-raised); }
.orphan-inbox-card .trip-title { font-size: 17px; font-weight: 500; margin-bottom: 5px; }
.orphan-inbox-card button { min-width: 160px; }
.unfiled-note { margin: 0 0 4px; }
.unfiled-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--color-border-hairline); }
.unfiled-card .trip-title { font-size: 17px; font-weight: 500; margin-bottom: 4px; }
.unfiled-card button { min-width: 140px; }
.editor-card.orphan-dialog { width: min(420px, 100%); min-height: 300px; padding: 28px; background: var(--color-surface-raised); }
.orphan-title { margin: 0; font: 700 20px/1.3 var(--chrome); color: var(--color-text-primary); }
.orphan-dialog p { margin: 0; font-size: 15px; line-height: 1.4; }
.orphan-dialog .form-actions { align-self: end; justify-content: space-between; gap: 20px; margin-top: 44px; }
.orphan-dialog .form-actions button { flex: 1; white-space: nowrap; }
.orphan-trip-choice { display: grid; gap: 4px; width: 100%; text-align: left; background: var(--color-surface-ground); color: var(--color-text-primary); }
.cover {
  width: 56px; height: 56px; border-radius: 12px; background: var(--color-surface-raised);
  color: var(--color-brand-accent); display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 1.5rem;
}
.live-badge {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: var(--color-surface-tint); color: var(--color-brand-accent); font-size: 0.75rem;
}
.item { padding: 16px 0; border-bottom: 1px solid var(--color-border-hairline); }
.plan-heading, .item-heading, .item-actions, .add-menu, .conflict-actions, .form-actions {
  display: flex; align-items: center; gap: 8px;
}
.plan-heading, .item-heading { justify-content: space-between; }
.plan-heading .display { margin-right: 16px; }
.add-menu { justify-content: flex-start; flex-wrap: wrap; margin-top: 20px; }
.review-note, .conflict {
  padding: 14px 16px; border-radius: 12px; background: color-mix(in srgb, var(--color-brand-attention) 12%, var(--color-surface-raised));
  border: 1px solid color-mix(in srgb, var(--color-brand-attention) 35%, transparent);
}
.conflict { margin-top: 12px; }
.conflict p { margin: 6px 0 12px; }
.modal {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center;
  padding: 24px; background: color-mix(in srgb, var(--color-text-primary) 36%, transparent);
}
.editor-card {
  display: grid; gap: 14px; width: min(560px, 100%); max-height: calc(100vh - 48px); overflow: auto;
  padding: 24px; border-radius: 16px; background: var(--color-surface-ground); box-shadow: 0 20px 70px color-mix(in srgb, var(--color-text-primary) 25%, transparent);
}
.editor-card label { display: grid; gap: 6px; }
.editor-card input {
  width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--color-border-hairline);
  background: var(--color-surface-raised); color: var(--color-text-primary);
}
.form-actions { justify-content: flex-end; margin-top: 8px; }
.kind { color: var(--color-text-secondary); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; }
.start-form { display: grid; gap: 16px; }
.start-form label { display: grid; gap: 8px; }
.start-form input { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--color-border-hairline); background: var(--color-surface-raised); color: var(--color-text-primary); }
.settings-page { display: grid; gap: 24px; }
.profile-section { display: grid; gap: 12px; }
.profile-section .section { margin: 0; }
.booking-address { display: grid; gap: 5px; padding: 14px 0; }
.booking-address code, .proof-details code, .calendar-link { overflow-wrap: anywhere; }
.calendar-link { font-size: 0.875rem; }
.calendar-toggle { display: flex; align-items: center; gap: 8px; }
.calendar-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.button-link {
  display: inline-flex; align-items: center; padding: 10px 14px; border-radius: 8px;
  background: var(--color-brand-accent); color: var(--color-text-on-accent); text-decoration: none;
}
.email-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--color-border-hairline); }
.email-status { color: var(--color-brand-accent); font-size: 0.875rem; white-space: nowrap; }
.email-status.pending { color: var(--color-text-secondary); }
.pending-email { padding: 14px 16px; border-radius: 12px; background: var(--color-surface-raised); }
.pending-email p { margin: 10px 0; }
.proof-details { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.proof-details dt { color: var(--color-text-secondary); }
.proof-details dd { margin: 0; }
.profile-email-form { display: flex; align-items: end; gap: 8px; flex-wrap: wrap; }
.profile-email-form label { display: grid; flex: 1 1 260px; gap: 6px; }
.profile-email-form input, .profile-section select {
  padding: 10px 12px; border-radius: 8px; border: 1px solid var(--color-border-hairline);
  background: var(--color-surface-raised); color: var(--color-text-primary);
}

@media (min-width: 960px) {
  .shell { grid-template-columns: 220px 1fr; }
  .rail { border-bottom: 0; border-right: 1px solid var(--color-border-hairline); padding: 24px 16px; }
  .rail-nav { flex-direction: column; }
  .nav-item.selected { background: var(--color-surface-tint); color: var(--color-brand-accent); box-shadow: inset 4px 0 0 var(--color-brand-accent); }
}

@media (max-width: 560px) {
  .plan-heading, .item-heading { align-items: flex-start; }
  .item-actions, .conflict-actions { flex-wrap: wrap; }
  .modal { padding: 12px; place-items: end center; }
  .editor-card { max-height: calc(100vh - 24px); border-radius: 16px 16px 0 0; }
}

.plan-day { font-family: var(--display); font-size: 1.25rem; margin: 32px 0 0; padding-top: 20px; border-top: 1px solid var(--color-border-hairline); }
.trip-view-toggle { display: flex; gap: 8px; margin: 8px 0 4px; }
.trip-view-toggle button[aria-pressed="true"] { background: var(--color-brand-accent); color: var(--color-paper, #fff); border-color: var(--color-brand-accent); }
.day-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.day-thumbs img { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--color-surface-raised); }
.plan-page .item { padding-left: 16px; }
.plan-page .review-note, .plan-page .conflict { border-left: 3px solid var(--color-brand-attention); }

html[data-session="pending"] #app { visibility: hidden; }

/* Logged-out marketing homepage. Direction C. Scoped so the app shell is unchanged. */
.home {
  --home-display: Syne, system-ui, sans-serif;
  --home-narrative: Literata, "Iowan Old Style", Georgia, serif;
  background: var(--color-surface-ground);
  color: var(--color-text-primary);
  font-family: var(--chrome);
}
.home main { max-width: none; margin: 0; padding: 0; }
.home header, .home .hero, .home .line, .home .proof, .home .trust, .home .early-access, .home footer {
  max-width: 1120px; margin-left: auto; margin-right: auto; padding-left: 40px; padding-right: 40px;
}
.home header {
  display: flex; align-items: center; justify-content: space-between; padding-top: 28px; padding-bottom: 28px;
}
.home .brand {
  display: flex; align-items: center; gap: 10px; color: inherit; font-size: inherit; font-weight: inherit;
  text-decoration: none;
}
.home .plate {
  width: 36px; height: 36px; border-radius: 10px; background: var(--color-brand-logo-background);
  display: grid; place-items: center;
}
.home .plate img { width: 26px; height: 26px; }
.home .word {
  font-family: var(--home-display); font-weight: 700; font-size: 22px; letter-spacing: -0.01em;
  color: var(--color-text-primary);
}
.home .head-actions { display: flex; gap: 24px; align-items: center; }
html[data-home-header="pending"] .home .head-actions { visibility: hidden; }
html[data-home-header="1"] .home .header-out { display: none; }
html:not([data-home-header="1"]) .home .header-in { display: none; }
.home .head-actions a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--color-text-secondary); }
.home .head-actions a:hover { color: var(--color-text-primary); }
.home .hero { padding-top: 64px; padding-bottom: 0; }
.home .hero-copy { max-width: 760px; }
.home .eyebrow, .home .when {
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--color-brand-accent); margin: 0 0 20px;
}
.home .when { font-size: 12px; margin: 0 0 8px; }
.home h1 {
  font-family: var(--home-display); font-weight: 700; font-size: 60px; line-height: 1.04;
  letter-spacing: -0.01em; margin: 0 0 24px; color: var(--color-text-primary);
}
.home .sub {
  font-family: var(--home-narrative); font-size: 21px; line-height: 1.6; color: var(--color-text-secondary);
  margin: 0 0 40px; max-width: 32em;
}
.home .early-access { padding-top: 0; padding-bottom: 48px; }
.home .waitlist {
  position: relative; display: grid; width: min(720px, 100%);
  grid-template-columns: 200px 160px auto; justify-content: start;
  gap: 8px 10px; align-items: end;
}
.home .waitlist-hint {
  grid-column: 1 / -1; margin: 0; font-size: 13px; line-height: 1.4; color: var(--color-text-secondary);
}
.home .waitlist-field {
  display: flex; flex-direction: column; gap: 4px; min-width: 0;
  font-size: 12px; font-weight: 600; color: var(--color-text-secondary);
}
.home .waitlist input {
  font: inherit; font-weight: 400; font-size: 14px; color: var(--color-text-primary);
  background: var(--color-surface-raised); border: 1px solid var(--color-border-hairline);
  border-radius: 8px; padding: 8px 10px; width: 100%;
}
.home .waitlist button {
  font: inherit; font-weight: 600; font-size: 14px;
  border: 0; border-radius: 8px; padding: 8px 12px;
  background: var(--color-brand-accent); color: var(--color-text-on-accent);
}
.home .waitlist .turnstile { grid-column: 1 / -1; min-height: 0; }
.home .waitlist input:focus-visible, .home .waitlist button:focus-visible {
  outline: 2px solid var(--color-brand-accent); outline-offset: 2px;
}
.home .waitlist.is-done .waitlist-hint,
.home .waitlist.is-done .waitlist-field,
.home .waitlist.is-done button,
.home .waitlist.is-done .turnstile { display: none; }
.home .waitlist-status { grid-column: 1 / -1; margin: 0; font-size: 14px; font-weight: 500; }
.home .waitlist-status.is-error { color: var(--color-status-destructive); }
.home .hp {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.waitlist-done { max-width: 32em; margin: 0 auto; padding: 64px 20px; font-size: 18px; line-height: 1.5; }
.waitlist-done a { border-bottom: 1px solid var(--color-border-hairline); }
.home .hero-photo { margin: 64px 0 0; }
.home .hero-photo img {
  display: block; width: 100%; height: auto; aspect-ratio: 1024 / 572; border-radius: 16px;
}
.home .line { padding-top: 120px; padding-bottom: 24px; }
.home .line h2 {
  font-family: var(--home-display); font-weight: 700; font-size: 34px; line-height: 1.15;
  letter-spacing: -0.01em; margin: 0 0 16px;
}
.home .lede {
  font-family: var(--home-narrative); font-size: 19px; line-height: 1.6; color: var(--color-text-secondary);
  margin: 0 0 56px; max-width: 34em;
}
.home .stages { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; position: relative; }
.home .stages::before {
  content: ""; position: absolute; top: 12px; left: 12px; right: 12px; height: 1px;
  background: var(--color-border-hairline);
}
.home .dot {
  position: relative; width: 24px; height: 24px; border-radius: 50%; background: var(--color-surface-ground);
  border: 1px solid var(--color-brand-accent); color: var(--color-brand-accent);
  display: grid; place-items: center; font-size: 12px; font-weight: 600; margin-bottom: 24px;
}
.home .stage { display: flex; flex-direction: column; }
.home .stage h3 {
  font-family: var(--home-narrative); font-weight: 600; font-size: 23px; line-height: 1.3; margin: 0 0 12px;
}
.home .stage > p { font-family: var(--home-narrative); font-size: 17px; line-height: 1.65; color: var(--color-text-secondary); margin: 0 0 24px; }
.home .stage-shot { margin: auto 0 0; }
.home .stage-shot img {
  display: block; width: 100%; height: auto; border-radius: 22px;
  box-shadow: 0 16px 40px color-mix(in srgb, var(--color-text-primary) 14%, transparent);
}
.home .proof { padding-top: 104px; }
.home .proof ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.home .proof li { border-top: 1px solid var(--color-border-hairline); padding-top: 20px; font-size: 15px; line-height: 1.55; }
.home .proof li b {
  display: block; font-family: var(--home-narrative); font-weight: 600; font-size: 18px; line-height: 1.35;
  margin-bottom: 8px; color: var(--color-text-primary);
}
.home .proof li span { color: var(--color-text-secondary); }
.home .trust {
  text-align: center; font-family: var(--home-narrative); font-style: italic; font-size: 18px;
  color: var(--color-text-secondary); margin: 0 auto; padding-top: 104px; padding-bottom: 40px;
  max-width: 34em; line-height: 1.65;
}
.home footer {
  border-top: 1px solid var(--color-border-hairline); padding-top: 28px; padding-bottom: 40px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; font-size: 14px;
  color: var(--color-text-secondary); max-width: 1120px;
}
.home footer nav { display: flex; gap: 24px; }
.home footer a { text-decoration: none; }
.home footer a:hover { color: var(--color-text-primary); }
@media (max-width: 900px) {
  .home header, .home .hero, .home .line, .home .proof, .home .trust, .home .early-access, .home footer { padding-left: 16px; padding-right: 16px; }
  .home header { padding-top: 20px; padding-bottom: 20px; }
  .home .head-actions { gap: 16px; }
  .home .hero { padding-top: 32px; }
  .home h1 { font-size: 40px; line-height: 1.06; }
  .home .sub { font-size: 18px; margin-bottom: 32px; }
  .home .waitlist { grid-template-columns: 1fr; width: 100%; }
  .home .waitlist button { justify-self: start; }
  .home .hero-photo { margin-top: 40px; }
  .home .line { padding-top: 80px; }
  .home .line h2 { font-size: 28px; }
  .home .lede { font-size: 18px; margin-bottom: 40px; }
  .home .stages { grid-template-columns: 1fr; gap: 56px; }
  .home .stages::before { display: none; }
  .home .proof { padding-top: 72px; }
  .home .proof ul { grid-template-columns: 1fr; gap: 24px; }
  .home .trust { padding-top: 72px; padding-bottom: 32px; font-size: 17px; }
  .home .early-access { padding-bottom: 36px; }
}
