:root {
  color: #201d50;
  background: #201d50;
  font-family: "Source Sans Pro", sans-serif;
  font-size: 17px;
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

body {
  margin: 0;
  min-height: 100vh;
  background: #201d50;
}

.app-shell {
  width: min(100%, 32rem);
  min-height: 100vh;
  margin: 0 auto;
  background: #ffffff;
}

h1, h2, h3, .display, .button, .nav-label, label {
  font-family: Futura, sans-serif;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: .5rem; font-size: clamp(2.15rem, 10vw, 3.25rem); line-height: 1; }
h2 { margin-bottom: .45rem; font-size: 1.65rem; line-height: 1.08; }
h3 { margin-bottom: .35rem; font-size: 1.1rem; }
p { line-height: 1.45; }

.screen {
  min-height: 100vh;
  padding: max(1.15rem, env(safe-area-inset-top)) 1.15rem 6.6rem;
  background: #ffffff;
}

.screen.onboarding {
  display: flex;
  flex-direction: column;
  padding-bottom: 1.25rem;
}

.brand-lockup {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.wordmark { margin: 0; font-family: Futura, sans-serif; font-weight: 800; letter-spacing: -.02em; }
.wordmark span { color: #004ea8; }
.prototype-chip { padding: .35rem .55rem; border: 1px solid #95a7cb; color: #201d50; font-size: .72rem; font-weight: 700; }

.eyebrow {
  margin-bottom: .45rem;
  color: #004ea8;
  font-family: Futura, sans-serif;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.hero-copy { margin-bottom: 1.25rem; }
.hero-copy p:last-child { margin-bottom: 0; }

.trip-card {
  margin: 0 0 1rem;
  padding: 1.15rem;
  border: 2px solid #201d50;
  background: #ffffff;
}

.trip-card.navy { background: #201d50; color: #ffffff; }
.trip-card .trip-code { color: #95a7cb; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.trip-card h2 { margin-bottom: .35rem; }
.trip-card p:last-child { margin-bottom: 0; }

.button {
  width: 100%;
  min-height: 3.25rem;
  padding: .8rem 1rem;
  border: 2px solid #004ea8;
  background: #004ea8;
  color: #ffffff;
  font-weight: 800;
}

.button:hover, .button:focus-visible, .nav-button:focus-visible, .icon-button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, .choice:focus-visible {
  outline: 4px solid #95a7cb;
  outline-offset: 2px;
}

.button.secondary { background: #ffffff; color: #004ea8; }
.button.navy { border-color: #201d50; background: #201d50; }
.button.red { border-color: #b8222f; background: #b8222f; }
.button + .button { margin-top: .7rem; }

.fine-print { margin: .85rem 0 0; color: #201d50; font-size: .78rem; text-align: center; }
.onboarding-footer { margin-top: auto; padding-top: 1.2rem; }

.progress { display: flex; gap: .35rem; margin-bottom: 1.4rem; }
.progress span { width: 2rem; height: .3rem; background: #bfc4d9; }
.progress span.active { background: #004ea8; }

.code-box {
  margin: 1rem 0;
  padding: 1.15rem;
  border: 3px solid #004ea8;
  color: #201d50;
  text-align: center;
}

.code-box span { display: block; color: #004ea8; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.code-box strong { display: block; margin-top: .3rem; font-family: Futura, sans-serif; font-size: 2rem; letter-spacing: .08em; }

.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-bottom: .7rem; }
.share-grid .button { min-height: 4rem; }

.field { margin: 0 0 1rem; }
label { display: block; margin-bottom: .4rem; font-size: .88rem; font-weight: 800; }
input, select, textarea {
  width: 100%;
  min-height: 3.1rem;
  padding: .75rem;
  border: 2px solid #95a7cb;
  border-radius: 0;
  background: #ffffff;
  color: #201d50;
}
textarea { min-height: 6rem; resize: vertical; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.choice {
  min-height: 5rem;
  padding: .75rem;
  border: 2px solid #95a7cb;
  background: #ffffff;
  color: #201d50;
  font-family: Futura, sans-serif;
  font-weight: 800;
}
.choice.selected { border-color: #004ea8; background: #004ea8; color: #ffffff; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: -1.15rem -1.15rem 0;
  padding: max(1rem, env(safe-area-inset-top)) 1.15rem 1rem;
  background: #201d50;
  color: #ffffff;
}
.app-header p { margin: 0; }
.trip-selector { color: #bfc4d9; font-size: .78rem; }
.icon-button { position: relative; width: 2.75rem; height: 2.75rem; border: 2px solid #95a7cb; background: #201d50; color: #ffffff; font-size: 1.2rem; }
.icon-button b { position: absolute; top: -.4rem; right: -.4rem; display: grid; place-items: center; min-width: 1.3rem; height: 1.3rem; padding: 0 .25rem; background: #b8222f; color: #ffffff; font-size: .68rem; }

.status-strip { margin: 0 -1.15rem 1.2rem; padding: .65rem 1.15rem; background: #004ea8; color: #ffffff; font-size: .8rem; font-weight: 700; }
.view-heading { margin: 0 0 1rem; }

.now-card { margin-bottom: .85rem; border: 2px solid #201d50; background: #ffffff; }
.now-card.primary { border-width: 3px; }
.now-card-header { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem .85rem; background: #201d50; color: #ffffff; }
.now-card-header p { margin: 0; font-family: Futura, sans-serif; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.now-card-header .countdown { color: #bfc4d9; }
.now-card-body { padding: 1rem; }
.now-card-body p { margin-bottom: .35rem; }
.now-card-body p:last-child { margin-bottom: 0; }
.location { color: #004ea8; font-weight: 800; }
.instruction { padding-top: .65rem; border-top: 2px solid #bfc4d9; font-weight: 700; }

.urgent-card { margin: 1rem 0; padding: 1rem; border: 3px solid #b8222f; }
.urgent-card .eyebrow { color: #b8222f; }
.urgent-card .button { margin-top: .5rem; }

.section-title { display: flex; align-items: end; justify-content: space-between; gap: .8rem; margin: 1.4rem 0 .7rem; }
.section-title h2, .section-title p { margin: 0; }
.text-link { border: 0; background: transparent; color: #004ea8; font-weight: 800; }

.feed { display: grid; gap: .75rem; }
.feed-card { padding: 1rem; border-left: 5px solid #004ea8; background: #ffffff; outline: 1px solid #bfc4d9; }
.feed-card.urgent { border-left-color: #b8222f; }
.feed-card p { margin-bottom: .35rem; }
.feed-card p:last-child { margin-bottom: 0; }
.meta { color: #004ea8; font-size: .76rem; font-weight: 800; }

.timeline { margin-top: 1rem; border-left: 3px solid #004ea8; }
.timeline-item { position: relative; padding: 0 0 1.3rem 1.25rem; }
.timeline-item::before { content: ""; position: absolute; top: .15rem; left: -.48rem; width: .75rem; height: .75rem; border: 2px solid #004ea8; background: #ffffff; }
.timeline-item.current::before { background: #004ea8; }
.timeline-item p { margin-bottom: .25rem; }

.explore-card { min-height: 15rem; padding: 1.25rem; border: 3px solid #201d50; background: #004ea8; color: #ffffff; }
.explore-card .eyebrow { color: #ffffff; }
.passport-mark { display: grid; place-items: center; width: 5rem; height: 5rem; margin: 1.5rem 0; border: 3px solid #ffffff; border-radius: 50%; font-family: Futura, sans-serif; font-size: 1.6rem; font-weight: 800; transform: rotate(-8deg); }

.settings-list { display: grid; gap: .65rem; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; min-height: 3.5rem; padding: .75rem; border: 2px solid #bfc4d9; background: #ffffff; color: #201d50; text-align: left; }
.settings-row strong { display: block; font-family: Futura, sans-serif; }
.settings-row span { color: #004ea8; font-size: .8rem; }
.settings-row span:first-child { color: #201d50; }
.settings-row small { display: block; margin-top: .2rem; color: #004ea8; font-size: .74rem; }

.header-actions { display: flex; align-items: center; gap: .45rem; }
.menu-button { font-size: .8rem; letter-spacing: -.08em; }

.channel-list { display: grid; gap: .65rem; margin-top: 1rem; }
.channel-row {
  display: grid;
  grid-template-columns: 2.55rem 1fr auto;
  align-items: center;
  gap: .75rem;
  width: 100%;
  min-height: 4.5rem;
  padding: .7rem;
  border: 2px solid #bfc4d9;
  background: #ffffff;
  color: #201d50;
  text-align: left;
}
.channel-row.private { border-color: #201d50; }
.channel-symbol {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  background: #004ea8;
  color: #ffffff;
  font-family: Futura, sans-serif;
  font-size: .8rem;
  font-weight: 800;
}
.channel-row.private .channel-symbol { background: #201d50; }
.channel-copy strong { display: block; font-family: Futura, sans-serif; }
.channel-copy span { display: block; margin-top: .15rem; color: #004ea8; font-size: .74rem; line-height: 1.25; }
.channel-status { color: #b8222f; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.back-link { margin-bottom: 1rem; padding: 0; border: 0; background: #ffffff; color: #004ea8; font-weight: 800; }
.channel-audience { margin: .75rem 0 1rem; padding: .75rem; border-left: 5px solid #95a7cb; outline: 1px solid #bfc4d9; font-size: .8rem; }
.chat-thread { display: grid; gap: .65rem; }
.chat-bubble { padding: .85rem; border: 2px solid #bfc4d9; }
.chat-bubble.mine { border-color: #004ea8; }
.chat-bubble p { margin-bottom: .25rem; }
.chat-bubble p:last-child { margin-bottom: 0; }
.chat-composer { margin-top: 1rem; padding-top: 1rem; border-top: 3px solid #201d50; }
.chat-composer textarea { margin: .45rem 0 .65rem; }
.chat-composer .meta { margin: .45rem 0 0; text-align: center; }

.form-list .settings-row { min-height: 4.6rem; }
.form-list .status-pill { flex: 0 0 auto; padding: .3rem .45rem; border: 1px solid #004ea8; color: #004ea8; font-weight: 800; }
.form-list .urgent-status { border-color: #b8222f; color: #b8222f; }
.form-list .complete-status { border-color: #201d50; color: #201d50; }
.restricted-card { margin-top: 1.35rem; padding: 1rem; border: 3px solid #201d50; }
.restricted-card p { margin-bottom: .65rem; }
.restricted-summary { display: grid; grid-template-columns: auto 1fr auto 1fr; align-items: end; gap: .35rem .45rem; margin: 1rem 0; padding: .75rem 0; border-top: 2px solid #bfc4d9; border-bottom: 2px solid #bfc4d9; }
.restricted-summary strong { font-family: Futura, sans-serif; font-size: 1.5rem; }
.restricted-summary span { color: #004ea8; font-size: .72rem; font-weight: 800; }

/* Warmer group-app direction */
.home-view { margin: -1.1rem; }
.trip-hero {
  position: relative;
  min-height: 15.5rem;
  overflow: hidden;
  padding: 6.2rem 1.2rem 1.2rem;
  background: #004ea8;
  color: #ffffff;
}
.trip-hero::before, .trip-hero::after { content: ""; position: absolute; right: -2rem; bottom: -5rem; width: 17rem; height: 17rem; border: 2rem solid #95a7cb; border-radius: 50%; }
.trip-hero::after { right: 8rem; bottom: -8rem; width: 12rem; height: 12rem; border-color: #201d50; }
.hero-content { position: relative; z-index: 2; max-width: 20rem; }
.hero-content h1 { max-width: 18rem; margin-bottom: .45rem; font-size: 2.75rem; }
.hero-content p { margin-bottom: 0; }
.hero-kicker { font-family: Futura, sans-serif; font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.hero-weather { position: absolute; z-index: 3; top: 1rem; right: 1rem; display: grid; padding: .55rem .7rem; border: 2px solid #ffffff; border-radius: 1rem; text-align: center; }
.hero-weather strong { font-family: Futura, sans-serif; font-size: 1.25rem; }
.hero-weather span { font-size: .68rem; }
.hero-sun { position: absolute; top: 1.3rem; left: 1.2rem; width: 4.4rem; height: 4.4rem; border: .8rem solid #ffffff; border-radius: 50%; }
.monument { position: absolute; z-index: 1; top: 1.2rem; left: 7.6rem; width: 0; height: 0; border-right: 1.2rem solid transparent; border-bottom: 8rem solid #201d50; border-left: 1.2rem solid transparent; }

.welcome-row { display: flex; align-items: center; gap: .75rem; padding: 1.1rem 1.1rem .7rem; }
.welcome-row p { margin-bottom: .1rem; }
.avatar { display: grid; flex: 0 0 auto; place-items: center; width: 2.7rem; height: 2.7rem; border: 3px solid #ffffff; border-radius: 50%; background: #201d50; color: #ffffff; font-family: Futura, sans-serif; font-size: .74rem; font-weight: 800; outline: 2px solid #95a7cb; }
.avatar-lg { width: 3.4rem; height: 3.4rem; background: #b8222f; }

.where-card { position: relative; margin: .25rem 1.1rem 1rem; padding: 1.15rem; border-radius: 1.2rem; background: #201d50; color: #ffffff; box-shadow: 0 .45rem 0 #95a7cb; }
.where-top { display: flex; align-items: center; gap: .45rem; margin-bottom: .8rem; color: #ffffff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.where-top p { flex: 1; margin: 0; }
.pulse-dot { width: .65rem; height: .65rem; border: 2px solid #ffffff; border-radius: 50%; background: #b8222f; }
.where-card h2 { max-width: 14rem; font-size: 2rem; }
.countdown-display { position: absolute; top: 3.2rem; right: 1.1rem; display: grid; text-align: center; }
.countdown-display strong { font-family: Futura, sans-serif; font-size: 2.8rem; line-height: .9; }
.countdown-display span { color: #95a7cb; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.where-note { margin: 1rem 0; padding-top: .8rem; border-top: 1px solid #95a7cb; font-size: .85rem; }
.where-actions { display: grid; grid-template-columns: 1.5fr 1fr; gap: .55rem; }
.where-actions .button { min-height: 2.9rem; border-radius: .8rem; }
.where-actions .secondary { border-color: #ffffff; background: #ffffff; color: #201d50; }

.day-path { display: grid; grid-template-columns: 1fr 2rem 1fr 2rem 1fr; align-items: start; margin: 1.4rem 1.1rem; }
.path-stop { display: grid; justify-items: center; text-align: center; }
.path-stop span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; margin-bottom: .35rem; border: 2px solid #bfc4d9; border-radius: 50%; background: #ffffff; font-weight: 800; }
.path-stop strong { font-family: Futura, sans-serif; font-size: .75rem; }
.path-stop small { color: #004ea8; font-size: .7rem; }
.path-stop.done span { border-color: #004ea8; background: #004ea8; color: #ffffff; }
.path-stop.active span { border: 4px solid #95a7cb; background: #201d50; color: #ffffff; }
.path-line { margin-top: 1.05rem; border-top: 3px solid #bfc4d9; }
.path-line.active { border-color: #004ea8; }
.home-view > .section-title { margin-right: 1.1rem; margin-left: 1.1rem; }

.social-update { display: flex; gap: .75rem; margin: 0 1.1rem; padding: 1rem; border: 2px solid #bfc4d9; border-radius: 1rem; }
.social-update p { margin-bottom: .35rem; }
.reaction-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.reaction-row button { padding: .35rem .55rem; border: 1px solid #95a7cb; border-radius: 1rem; background: #ffffff; color: #004ea8; font-size: .72rem; font-weight: 800; }
.celebration-strip { display: flex; align-items: center; gap: .7rem; margin: .8rem 1.1rem 1.2rem; padding: .8rem; border-radius: .8rem; background: #bfc4d9; }
.celebration-strip > span { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: #004ea8; color: #ffffff; }
.celebration-strip strong, .celebration-strip small { display: block; }
.celebration-strip small { margin-top: .15rem; color: #004ea8; font-size: .7rem; }

.channel-tabs { display: flex; gap: .45rem; margin: 0 -1.1rem 1rem; padding: 0 1.1rem .35rem; overflow-x: auto; }
.channel-tab { flex: 0 0 auto; padding: .55rem .8rem; border: 2px solid #bfc4d9; border-radius: 1rem; background: #ffffff; color: #201d50; font-size: .75rem; font-weight: 800; }
.channel-tab.active { border-color: #004ea8; background: #004ea8; color: #ffffff; }
.channel-title { display: flex; align-items: start; justify-content: space-between; gap: .7rem; }
.channel-title p { margin-bottom: .2rem; font-size: .82rem; }
.private-chip { padding: .3rem .45rem; border-radius: .7rem; background: #201d50; color: #ffffff; font-size: .65rem; font-weight: 800; }
.audience-line { margin-bottom: 1rem; color: #004ea8; font-size: .72rem; font-weight: 800; }
.chat-bubble { border-radius: 1rem; }
.chat-bubble.mine { margin-left: 2.2rem; background: #bfc4d9; }
.photo-message { padding: .65rem; }
.message-person { display: flex; align-items: center; gap: .6rem; margin-bottom: .65rem; }
.message-person .avatar { width: 2.2rem; height: 2.2rem; }
.message-person p { margin: 0; }
.shared-photo { display: block; width: 100%; padding: 0; overflow: hidden; border: 0; border-radius: .8rem; background: #201d50; }
.shared-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo-message > p { margin: .7rem .25rem .35rem; }
.photo-gallery-link { display: grid; grid-template-columns: 2.5rem 1fr; align-items: center; width: 100%; margin-bottom: .8rem; padding: .7rem; border: 2px solid #95a7cb; border-radius: .9rem; background: #ffffff; color: #201d50; text-align: left; }
.photo-gallery-link > span { grid-row: 1 / 3; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .6rem; background: #004ea8; color: #ffffff; }
.photo-gallery-link strong, .photo-gallery-link small { display: block; }
.photo-gallery-link small { color: #004ea8; font-size: .7rem; }
.composer-actions { display: grid; grid-template-columns: 1fr 1.5fr; gap: .55rem; }
.composer-actions .button { min-height: 3rem; border-radius: .8rem; }
.attach-button { min-height: 3rem; padding: .55rem; border: 2px solid #004ea8; border-radius: .8rem; background: #ffffff; color: #004ea8; font-family: Futura, sans-serif; font-size: .78rem; font-weight: 800; }
.attach-button span { display: inline-block; margin-right: .25rem; }

.tool-feature { display: grid; grid-template-columns: auto 1fr; gap: .8rem; padding: 1rem; border-radius: 1rem; background: #201d50; color: #ffffff; }
.tool-feature > span { display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: #b8222f; font-size: 1.4rem; }
.tool-feature h2, .tool-feature p { margin-bottom: .3rem; }
.tool-feature .button { grid-column: 1 / -1; border-radius: .8rem; }

.data-source {
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  border-left: 5px solid #95a7cb;
  background: #ffffff;
  outline: 1px solid #bfc4d9;
  font-size: .78rem;
}
.data-source strong { color: #004ea8; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .55rem;
  margin-bottom: 1rem;
}
.stat {
  min-height: 5.3rem;
  padding: .75rem;
  border: 2px solid #bfc4d9;
  background: #ffffff;
}
.stat strong { display: block; font-family: Futura, sans-serif; font-size: 1.8rem; line-height: 1; }
.stat span { display: block; margin-top: .35rem; color: #004ea8; font-size: .76rem; font-weight: 800; text-transform: uppercase; }

.action-grid { display: grid; gap: .7rem; margin-bottom: 1rem; }
.action-card {
  width: 100%;
  padding: 1rem;
  border: 2px solid #004ea8;
  background: #ffffff;
  color: #201d50;
  text-align: left;
}
.action-card strong { display: block; margin-bottom: .25rem; font-family: Futura, sans-serif; font-size: 1.05rem; }
.action-card span { color: #004ea8; font-size: .8rem; font-weight: 700; }
.action-card.urgent { border-color: #b8222f; }
.action-card.urgent span { color: #b8222f; }

.portal-section { margin-top: 1.2rem; }
.portal-card { margin-bottom: .65rem; padding: 1rem; border: 2px solid #bfc4d9; }
.portal-card-top { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.portal-card h3, .portal-card p { margin-bottom: .25rem; }
.portal-card .source-tag { color: #004ea8; font-size: .7rem; font-weight: 800; text-transform: uppercase; }
.portal-card .button { margin-top: .75rem; }

.composer { margin-top: 1rem; padding: 1rem; border: 2px solid #201d50; }
.preview-box { margin: 1rem 0; padding: .85rem; border-left: 5px solid #b8222f; background: #ffffff; outline: 1px solid #bfc4d9; }

.bottom-nav {
  position: fixed;
  z-index: 10;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 32rem);
  margin: 0 auto;
  padding: .35rem .25rem max(.35rem, env(safe-area-inset-bottom));
  border-top: 2px solid #bfc4d9;
  background: #ffffff;
}
.nav-button { position: relative; min-height: 4.2rem; padding: .25rem .1rem; border: 0; background: #ffffff; color: #201d50; }
.nav-icon { display: block; min-height: 1.6rem; color: #201d50; font-size: 1.35rem; line-height: 1.2; }
.nav-label { display: block; margin-top: .15rem; font-size: .66rem; font-weight: 800; }
.nav-button.active .nav-icon, .nav-button.active .nav-label { color: #004ea8; }
.nav-button .badge { position: absolute; top: .15rem; left: 55%; display: grid; place-items: center; min-width: 1.2rem; height: 1.2rem; padding: 0 .2rem; background: #b8222f; color: #ffffff; font-size: .64rem; font-weight: 800; }

.toast { position: fixed; z-index: 30; right: 1rem; bottom: 6rem; left: 1rem; max-width: 28rem; margin: auto; padding: .9rem 1rem; background: #201d50; color: #ffffff; text-align: center; font-weight: 800; }

@media (min-width: 40rem) {
  body { padding: 1.5rem 0; }
  .app-shell, .screen { min-height: calc(100vh - 3rem); }
  .bottom-nav { bottom: 1.5rem; }
}

@media (min-width: 26rem) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
