:root {
  --ink: #0b2835;
  --deep: #063243;
  --teal: #0f7d76;
  --mint: #bdf3d4;
  --lime: #dff36a;
  --cream: #fff9e8;
  --coral: #ff6f61;
  --gold: #ffc857;
  --white: #fffef8;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--deep); color: var(--ink); font-family: var(--font-geist), Arial, sans-serif; }
button, a { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }
.app-shell { min-height: 100dvh; background: var(--deep); }
.story { height: 100dvh; overflow-y: auto; overscroll-behavior-y: contain; scroll-snap-type: y mandatory; scrollbar-width: none; }
.story::-webkit-scrollbar { display: none; }
.story-progress { position: fixed; inset: max(10px, env(safe-area-inset-top)) 12px auto; z-index: 50; display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px; max-width: 520px; margin: auto; }
.progress-segment { height: 3px; border: 0; border-radius: 999px; background: rgba(255,255,255,.28); padding: 0; }
.progress-segment.is-active { background: var(--white); }
.story-panel { min-height: 100dvh; scroll-snap-align: start; scroll-snap-stop: always; display: grid; place-items: center; position: relative; overflow: hidden; padding: calc(36px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); }
.panel-inner { width: min(100%, 480px); margin: auto; position: relative; z-index: 2; }
h1, h2, p { margin-top: 0; }
h1 { max-width: 390px; font-size: clamp(2.55rem, 11vw, 4.2rem); line-height: .96; letter-spacing: -.065em; margin-bottom: 22px; }
h2 { font-size: clamp(2.15rem, 9.5vw, 3.5rem); line-height: .98; letter-spacing: -.055em; margin: 14px 0 20px; }
.lead { font-size: 1.12rem; line-height: 1.45; color: rgba(11,40,53,.78); }
.eyebrow { font-size: .78rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; margin-bottom: 10px; }
.brand-chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(11,40,53,.14); border-radius: 999px; padding: 8px 12px; font-size: .72rem; font-weight: 700; margin-bottom: 28px; }
.official-logo { display: block; width: 76px; height: 76px; object-fit: contain; margin-bottom: 12px; filter: drop-shadow(0 8px 16px rgba(11,40,53,.12)); }
.welcome-slide { background: radial-gradient(circle at 90% 18%,rgba(255,200,87,.55),transparent 24%), radial-gradient(circle at 8% 83%,rgba(15,125,118,.24),transparent 28%), var(--cream); }
.welcome-slide::after { content: ""; position: absolute; width: 230px; height: 230px; border: 2px solid rgba(15,125,118,.16); border-radius: 44% 56% 61% 39%; top: -100px; right: -80px; transform: rotate(22deg); }
.welcome-mark { position: absolute; right: 0; top: 55px; font-size: 3.3rem; transform-origin: 80% 80%; animation: wave 1.8s ease-in-out infinite; }
@keyframes wave { 0%,60%,100%{transform:rotate(0)} 70%{transform:rotate(18deg)} 80%{transform:rotate(-8deg)} 90%{transform:rotate(12deg)} }
.goal-stack { display: grid; gap: 9px; margin: 22px 0; }
.goal-stack div { display: flex; align-items: center; gap: 12px; background: rgba(255,255,255,.68); border: 1px solid rgba(11,40,53,.08); border-radius: 15px; padding: 11px 14px; }
.goal-stack span { font-size: 1.35rem; }
.time-pill { display: inline-flex; border-radius: 999px; background: var(--mint); padding: 8px 13px; font-size: .86rem; gap: 4px; margin-bottom: 18px; }
.primary-button, .secondary-button { width: 100%; min-height: 56px; border: 0; border-radius: 17px; display: flex; justify-content: center; align-items: center; gap: 9px; text-decoration: none; font-weight: 850; cursor: pointer; transition: transform 160ms ease, box-shadow 160ms ease; }
.primary-button { background: var(--ink); color: white; box-shadow: 0 12px 30px rgba(11,40,53,.2); }
.secondary-button { background: var(--white); color: var(--ink); border: 1px solid rgba(11,40,53,.12); }
.primary-button:active, .secondary-button:active { transform: scale(.98); }
.swipe-hint { text-align: center; font-size: .7rem; margin: 13px 0 0; opacity: .52; }
.top-label { display: flex; align-items: center; gap: 10px; text-transform: uppercase; font-size: .72rem; font-weight: 850; letter-spacing: .14em; }
.top-label span { display: grid; place-items: center; min-width: 35px; height: 35px; border-radius: 50%; background: var(--ink); color: white; letter-spacing: 0; }
.top-label p { margin: 0; }
.deadline-slide { background: var(--coral); }
.date-card { width: 122px; height: 142px; margin: 30px 0 24px; border-radius: 18px; background: var(--white); display: grid; place-items: center; padding: 12px 0; box-shadow: 9px 9px 0 rgba(11,40,53,.92); transform: rotate(-3deg); }
.date-card span, .date-card small { font-weight: 850; letter-spacing: .15em; }
.date-card strong { font-size: 4.3rem; line-height: .8; }
.impact-card { display: flex; align-items: flex-start; gap: 12px; border-radius: 17px; padding: 15px; background: rgba(255,255,255,.78); margin: 20px 0; }
.impact-card span { font-size: 1.3rem; }
.impact-card p { line-height: 1.38; margin: 0; }
.impact-card.dark { background: var(--ink); color: white; }
.credits-slide { background: radial-gradient(circle at 0 0,rgba(255,255,255,.32),transparent 25%), var(--mint); }
.number-pair { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; margin: 20px 0; }
.number-pair > div { min-height: 130px; border: 2px solid var(--ink); border-radius: 22px; display: grid; place-items: center; align-content: center; background: rgba(255,255,255,.35); text-align: center; }
.number-pair strong { font-size: 3.4rem; line-height: 1; }
.number-pair div span { max-width: 90px; font-size: .73rem; font-weight: 750; }
.or { font-size: .7rem; font-weight: 850; }
.rule-callout { background: var(--ink); color: white; border-radius: 15px; padding: 12px 14px; font-size: .9rem; }
.prompt { font-size: .78rem; font-weight: 750; margin-bottom: 8px; }
.segmented-control { display: grid; grid-template-columns: 1fr 1.45fr; border: 1px solid rgba(11,40,53,.2); padding: 4px; border-radius: 14px; gap: 4px; background: rgba(255,255,255,.28); }
.segmented-control button { min-height: 42px; border: 0; border-radius: 10px; background: transparent; font-size: .78rem; font-weight: 750; }
.segmented-control button.selected { background: var(--white); box-shadow: 0 4px 12px rgba(11,40,53,.1); }
.track-answer { margin-top: 10px; border-radius: 14px; padding: 13px; background: rgba(255,255,255,.62); }
.track-answer strong, .track-answer p, .track-answer small { display: block; }
.track-answer p { margin: 4px 0; font-size: .85rem; }
.track-answer small { line-height: 1.35; opacity: .72; }
.documents-slide { background: var(--cream); }
.check-progress { margin-bottom: 15px; }
.check-progress span { font-size: .72rem; font-weight: 800; }
.check-progress div { height: 7px; border-radius: 99px; background: #e8dfc7; margin-top: 7px; overflow: hidden; }
.check-progress i { display: block; height: 100%; border-radius: inherit; background: var(--teal); transition: width 220ms ease; }
.checklist { display: grid; gap: 8px; }
.check-item { width: 100%; min-height: 48px; border: 1px solid rgba(11,40,53,.11); border-radius: 14px; background: var(--white); color: var(--ink); text-align: left; padding: 9px 12px; display: flex; gap: 10px; align-items: center; font-size: .78rem; font-weight: 670; }
.check-item span { flex: 0 0 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; background: #efe8d6; font-size: .72rem; }
.check-item.checked { border-color: var(--teal); background: #effdf4; text-decoration: line-through; color: rgba(11,40,53,.62); }
.check-item.checked span { background: var(--teal); color: white; }
.fine-print { font-size: .66rem; line-height: 1.35; opacity: .65; margin: 12px 0 0; }
.rules-slide { background: var(--lime); }
.flag-column { display: grid; gap: 12px; margin-top: 30px; }
.flag-card { min-height: 116px; border-radius: 20px; padding: 16px; display: flex; gap: 14px; align-items: flex-start; background: var(--white); border: 2px solid var(--ink); }
.flag-card .flag-icon { flex: 0 0 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; color: white; font-size: 1.35rem; font-weight: 900; }
.flag-card.green .flag-icon { background: #16805b; }
.flag-card.red .flag-icon { background: #d8443d; }
.flag-card.amber .flag-icon { background: #c87b00; }
.flag-card strong { font-size: 1rem; }
.flag-card p { font-size: .78rem; line-height: 1.4; margin: 6px 0 0; }
.approval-slide { background: radial-gradient(circle at 96% 12%,rgba(255,111,97,.22),transparent 25%), var(--deep); color: white; }
.approval-slide .top-label span { background: var(--lime); color: var(--ink); }
.approval-stamp { position: absolute; right: 2px; top: 26px; border: 3px solid var(--coral); color: var(--coral); border-radius: 50%; width: 86px; height: 86px; display: grid; place-items: center; text-align: center; font-size: .68rem; line-height: 1.05; font-weight: 900; transform: rotate(10deg); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 9px; margin: 30px 0 24px; }
.tag-cloud span { border: 1px solid rgba(255,255,255,.34); border-radius: 999px; padding: 10px 13px; font-size: .8rem; background: rgba(255,255,255,.08); }
.limits-slide { background: var(--gold); }
.limit-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 24px 0 14px; }
.limit-grid article { min-height: 180px; background: var(--white); border: 2px solid var(--ink); border-radius: 20px; padding: 15px; display: flex; flex-direction: column; }
.limit-grid article > span { font-size: 1.5rem; }
.limit-grid p { font-size: .72rem; font-weight: 750; margin: 14px 0 2px; }
.limit-grid strong { font-size: 1.45rem; line-height: 1; }
.limit-grid small { font-size: .68rem; line-height: 1.35; margin-top: 10px; }
.mini-rule { border-radius: 13px; background: rgba(255,255,255,.75); padding: 11px 13px; font-size: .76rem; line-height: 1.35; margin-top: 8px; }
.mini-rule.danger { background: var(--coral); font-weight: 760; }
.location-slide { background: var(--mint); }
.location-orbit { position: relative; width: 130px; height: 130px; margin: 26px auto 18px; border: 2px dashed rgba(11,40,53,.35); border-radius: 50%; display: grid; place-items: center; }
.location-orbit span { font-size: 3.7rem; }
.location-orbit b { position: absolute; top: 5px; right: 0; font-size: 1.7rem; animation: orbit 5s linear infinite; }
@keyframes orbit { from{transform:rotate(0deg) translateX(10px) rotate(0deg)} to{transform:rotate(360deg) translateX(10px) rotate(-360deg)} }
.travel-list { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 8px; }
.travel-list li { background: rgba(255,255,255,.58); border-radius: 12px; padding: 10px 12px; font-size: .76rem; font-weight: 650; }
.travel-list li::before { content: "✓"; font-weight: 900; margin-right: 9px; color: var(--teal); }
.final-slide { background: radial-gradient(circle at 50% 5%,rgba(223,243,106,.42),transparent 34%), var(--deep); color: white; text-align: center; }
.final-logo-wrap { width: 104px; height: 104px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: white; box-shadow: 0 14px 34px rgba(0,0,0,.2); }
.final-logo-wrap img { width: 82px; height: 82px; object-fit: contain; }
.final-checks { text-align: left; display: grid; gap: 9px; margin: 28px 0; }
.final-checks p { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 11px; display: flex; align-items: center; gap: 10px; margin: 0; font-size: .78rem; text-align: left; }
.final-checks span { display: grid; place-items: center; flex: 0 0 28px; height: 28px; background: var(--lime); color: var(--ink); border-radius: 50%; font-weight: 900; }
.final-slide .primary-button { background: var(--lime); color: var(--ink); }
.text-link { display: inline-block; color: white; font-weight: 750; margin-top: 18px; }
.legal-note { max-width: 390px; margin: 20px auto 0; font-size: .68rem; line-height: 1.4; opacity: .58; }
.restart-button { border: 0; background: transparent; color: white; text-decoration: underline; margin-top: 18px; font-size: .78rem; opacity: .78; }
.story-nav { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 18px; }
.story-nav button { width: 38px; height: 38px; border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 50%; cursor: pointer; }
.story-nav span { font-size: .63rem; font-weight: 750; text-transform: uppercase; letter-spacing: .12em; opacity: .6; }

/* Clickable calendar card */
a.date-card,
a.date-card:link,
a.date-card:visited,
a.date-card:hover,
a.date-card:active {
  color: inherit;
  text-decoration: none !important;
}

/* Expandable approval bubbles */
/* Approval bubbles */
.approval-accordion {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 9px;
  margin: 24px 0 18px;
  max-height: 43vh;
  overflow-y: auto;
  padding: 2px 4px 8px 0;
}

.approval-accordion details {
  flex: 0 0 auto;
  width: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

/* Give the expanded information a complete row */
.approval-accordion details[open] {
  flex-basis: 100%;
  width: 100%;
}

.approval-accordion summary {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: white;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.approval-accordion summary::-webkit-details-marker {
  display: none;
}

.approval-accordion summary::after {
  content: "+";
  position: static;
  margin-left: 8px;
  color: var(--lime);
  font-size: 1rem;
  line-height: 1;
  transform: none;
}

/* Selected bubble */
.approval-accordion details[open] summary {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
}

.approval-accordion details[open] summary::after {
  content: "−";
  color: var(--ink);
}

/* Information displayed beneath the bubble */
.approval-details {
  width: 100%;
  margin-top: 9px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 0.76rem;
  line-height: 1.45;
}

.approval-details ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.approval-details li {
  margin-bottom: 6px;
}

.approval-details p {
  margin: 7px 0 0;
}


/* Expandable Book / Equipment bubble */
.expandable-impact {
  display: block;
  padding: 0;
  overflow: hidden;
}

.expandable-impact summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.expandable-impact summary::-webkit-details-marker {
  display: none;
}

.expandable-impact summary > span {
  font-size: 1.4rem;
}

.expandable-impact summary p {
  flex: 1;
  margin: 0;
}

.expandable-impact summary small {
  display: block;
  margin-top: 3px;
  font-size: 0.68rem;
  font-weight: 600;
  opacity: 0.7;
}

.expandable-impact summary::after {
  content: "+";
  font-size: 1.3rem;
  font-weight: 700;
}

.expandable-impact[open] summary::after {
  content: "−";
}

.expandable-impact-content {
  padding: 13px 14px 15px;
  border-top: 1px solid rgba(11, 40, 53, 0.14);
}

.expandable-impact-content p {
  margin: 0 0 12px;
  font-size: 0.8rem;
  line-height: 1.45;
}

.portal-button {
  display: inline-flex;
  padding: 9px 13px;
  border-radius: 999px;
  background: var(--deep);
  color: white !important;
  font-size: 0.75rem;
  font-weight: 750;
  text-decoration: none !important;
}

@media (min-width:700px) {
  body { background: radial-gradient(circle at 25% 20%,#155b66,transparent 30%),#031c27; }
  .app-shell { width: 520px; margin: auto; box-shadow: 0 0 80px rgba(0,0,0,.35); }
  .story-progress { width: 496px; }
}
@media (max-height:720px) {
  h1 { font-size: 2.35rem; } h2 { font-size: 2rem; margin-bottom: 14px; }
  .brand-chip { margin-bottom: 18px; } .goal-stack { margin: 15px 0; gap: 7px; }
  .goal-stack div { padding: 8px 12px; } .date-card { width: 100px; height: 116px; margin: 18px 0; }
  .date-card strong { font-size: 3.5rem; } .flag-card { min-height: 96px; padding: 12px; }
  .check-item { min-height: 42px; } .location-orbit { width: 100px; height: 100px; margin: 18px auto 10px; }
  .location-orbit span { font-size: 3rem; }
}
@media (prefers-reduced-motion:reduce) {
  *,*::before,*::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
