:root {
  color-scheme: light;
  --ink: #173c37;
  --ink-soft: #47625e;
  --forest: #204c46;
  --forest-deep: #153b36;
  --sage: #d9e7de;
  --sage-soft: #eef5f0;
  --cream: #f8f5ee;
  --paper: #fffdf8;
  --line: #d7e0da;
  --gold: #c99d55;
  --rose: #c98272;
  --shadow: 0 22px 70px rgba(32, 76, 70, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--ink);
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.ambient {
  position: fixed;
  z-index: -1;
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.62;
}

.ambient-one {
  width: 28rem;
  height: 28rem;
  top: -16rem;
  right: -10rem;
  background: #c8dfd0;
}

.ambient-two {
  width: 24rem;
  height: 24rem;
  bottom: -15rem;
  left: -12rem;
  background: #eadfc7;
}

.app-shell {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem 1rem 7rem;
}

.onboarding-shell {
  width: min(100%, 48rem);
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
}

.onboarding-topbar,
.onboarding-card-header,
.onboarding-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.onboarding-topbar {
  padding: 0.25rem 0 1rem;
}

.preview-chip {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 0.42rem 0.68rem;
  border-radius: 999px;
  background: #efe5d2;
  color: #735929;
  font-size: 0.7rem;
  font-weight: 850;
}

.onboarding-card {
  overflow: hidden;
  border: 1px solid rgba(215, 224, 218, 0.95);
  border-radius: 1.55rem;
  background: rgba(255, 253, 248, 0.97);
  box-shadow: var(--shadow);
}

.onboarding-card-header {
  align-items: flex-start;
  padding: 1.1rem;
  border-bottom: 1px solid var(--line);
  background: #f6faf7;
}

.onboarding-card-header h1 {
  font-size: clamp(1.85rem, 7vw, 2.7rem);
}

.onboarding-conversation {
  display: grid;
  align-content: start;
  gap: 0.75rem;
  min-height: clamp(18rem, 52vh, 34rem);
  max-height: 58vh;
  overflow-y: auto;
  padding: 1.1rem;
  background:
    radial-gradient(circle at 86% 4%, rgba(217, 231, 222, 0.65), transparent 13rem),
    var(--paper);
  scroll-behavior: smooth;
}

.onboarding-message {
  max-width: 91%;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
  background: var(--sage-soft);
  color: var(--ink-soft);
  line-height: 1.55;
  white-space: pre-wrap;
}

.onboarding-message.participant {
  justify-self: end;
  border-radius: 1.1rem 1.1rem 0.35rem 1.1rem;
  background: var(--forest);
  color: white;
}

.onboarding-message.system {
  justify-self: center;
  border: 1px solid #dfd5c2;
  border-radius: 999px;
  background: #fbf7ee;
  color: #6f6048;
  font-size: 0.75rem;
  font-weight: 750;
  text-align: center;
}

.onboarding-controls {
  border-top: 1px solid var(--line);
  background: white;
  padding: 1rem;
}

.predictive-responses {
  display: grid;
  gap: 0.55rem;
}

.predictive-response {
  width: 100%;
  min-height: 3.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: white;
  color: var(--forest);
  padding: 0.75rem 0.9rem;
  font-weight: 780;
  line-height: 1.35;
  text-align: left;
  transition: 160ms ease;
}

.predictive-response:hover,
.predictive-response:focus-visible {
  border-color: #8faf9e;
  background: var(--sage-soft);
  box-shadow: 0 8px 25px rgba(32, 76, 70, 0.09);
  transform: translateY(-1px);
}

.predictive-response.recommended::after {
  content: "Recommended";
  float: right;
  margin-left: 0.6rem;
  color: #647a73;
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.onboarding-composer {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 0.65rem;
}

.onboarding-composer textarea {
  min-height: 4rem;
  max-height: 12rem;
}

.onboarding-composer .primary-button {
  min-width: 6.5rem;
}

.onboarding-guidance {
  margin: 0.65rem 0 0;
  color: #6c7d79;
  font-size: 0.76rem;
}

.onboarding-footer {
  min-height: 4.2rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--line);
  background: #f9fbf9;
}

.onboarding-progress {
  display: grid;
  flex: 1;
  gap: 0.35rem;
  max-width: 13rem;
  color: var(--forest);
  font-size: 0.7rem;
  font-weight: 800;
}

.onboarding-progress-track {
  height: 0.36rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e2eae4;
}

.onboarding-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 220ms ease;
}

.privacy-note {
  margin-left: auto;
  color: #71827e;
  font-size: 0.68rem;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.25rem 0 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.9rem;
  background: var(--forest);
  color: white;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: -0.025em;
}

.brand small {
  margin-top: 0.1rem;
  color: var(--ink-soft);
  font-size: 0.7rem;
}

.primary-nav {
  position: fixed;
  z-index: 20;
  left: 50%;
  bottom: 0.7rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: min(calc(100% - 1.2rem), 35rem);
  padding: 0.4rem;
  border: 1px solid rgba(215, 224, 218, 0.9);
  border-radius: 1.25rem;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 16px 50px rgba(23, 60, 55, 0.18);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.nav-item {
  display: grid;
  place-items: center;
  gap: 0.15rem;
  min-height: 3.6rem;
  border: 0;
  border-radius: 0.95rem;
  background: transparent;
  color: #71827e;
  font-size: 0.72rem;
  font-weight: 750;
}

.nav-item span {
  font-size: 1.1rem;
}

.nav-item.active {
  background: var(--sage-soft);
  color: var(--forest);
}

.screen {
  display: none;
}

.screen.active {
  display: block;
  animation: reveal 220ms ease-out;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}

.welcome-row,
.section-heading {
  margin: 1.5rem 0;
}

.welcome-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.eyebrow,
.label,
.question-number {
  margin: 0 0 0.4rem;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  line-height: 1.12;
}

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.05rem, 8vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.045em;
}

h2 {
  font-size: 1.25rem;
  letter-spacing: -0.025em;
}

h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

p {
  color: var(--ink-soft);
  line-height: 1.55;
}

.window-chip,
.done-chip,
.status-pill,
.mode-label {
  display: inline-flex;
  align-items: center;
  width: max-content;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
}

.window-chip {
  padding: 0.45rem 0.7rem;
  background: #efe5d2;
  color: #735929;
}

.mission-ribbon,
.coach-card,
.receipt-card,
.mission-detail-card,
.kickoff-card,
.confirmation-card,
.settings-card {
  border: 1px solid rgba(215, 224, 218, 0.95);
  background: rgba(255, 253, 248, 0.95);
  box-shadow: var(--shadow);
}

.mission-ribbon {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 1.2rem;
}

.mission-ribbon p {
  margin-bottom: 0;
}

.mission-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.8rem;
  background: var(--sage);
  color: var(--forest);
  font-size: 1.2rem;
}

.coach-card,
.kickoff-card {
  overflow: hidden;
  border-radius: 1.55rem;
}

.coach-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--line);
  background: #f6faf7;
}

.coach-header p {
  flex: 1;
  margin: 0;
  color: var(--forest);
  font-size: 0.78rem;
  font-weight: 850;
}

.presence {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #5b9676;
  box-shadow: 0 0 0 5px rgba(91, 150, 118, 0.13);
}

.mode-label {
  padding: 0.35rem 0.55rem;
  background: var(--sage);
  color: var(--forest);
}

.conversation {
  display: grid;
  gap: 0.7rem;
  min-height: 7rem;
  padding: 1rem;
  background:
    radial-gradient(circle at 86% 4%, rgba(217, 231, 222, 0.65), transparent 12rem),
    var(--paper);
}

.message {
  max-width: 90%;
  padding: 0.9rem 1rem;
  border-radius: 1.1rem 1.1rem 1.1rem 0.35rem;
  background: var(--sage-soft);
}

.message p:last-child {
  margin-bottom: 0;
}

.message strong {
  color: var(--ink);
}

.participant-message {
  justify-self: end;
  border-radius: 1.1rem 1.1rem 0.35rem 1.1rem;
  background: var(--forest);
}

.participant-message p {
  color: white;
}

.choice-grid {
  display: grid;
  gap: 0.6rem;
  padding: 1rem;
}

.choice-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 4.4rem;
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  background: white;
  color: var(--ink);
  padding: 0.72rem;
  text-align: left;
  transition: 160ms ease;
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: #8faf9e;
  box-shadow: 0 8px 25px rgba(32, 76, 70, 0.09);
  transform: translateY(-1px);
}

.choice-card strong,
.choice-card small {
  display: block;
}

.choice-card strong {
  margin-bottom: 0.18rem;
}

.choice-card small,
.list-button small {
  color: var(--ink-soft);
  line-height: 1.35;
}

.choice-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 0.85rem;
  font-size: 1.05rem;
  font-weight: 900;
}

.practical {
  background: #e2ead8;
  color: #4f6e3e;
}

.settle {
  background: #e8e0ef;
  color: #6d5680;
}

.both {
  background: #efe4cf;
  color: #805f2b;
}

.unsure {
  background: #e6ecea;
  color: #536b66;
}

.okay {
  background: #dcece2;
  color: #3f7557;
}

.human {
  background: #f0e1dc;
  color: #835d52;
}

.route-panel {
  padding: 0 1rem 1rem;
}

.route-box {
  padding: 1rem;
  border: 1px solid #cddbd2;
  border-radius: 1.1rem;
  background: #f4f9f5;
}

.route-box h3 {
  margin-bottom: 0.5rem;
}

.route-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.route-option {
  min-height: 3rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: white;
  color: var(--forest);
  padding: 0.72rem;
  font-weight: 750;
  text-align: left;
}

.route-option.recommended {
  border-color: #8faf9e;
  background: var(--sage-soft);
}

.scaffold-composer {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.scaffold-composer label {
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
}

.scaffold-composer textarea {
  width: 100%;
  resize: vertical;
}

.kickoff-scaffold-choices {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.coach-footer {
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.8rem 1rem 1rem;
  border-top: 1px solid var(--line);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
}

.receipt-card,
.mission-detail-card,
.confirmation-card,
.settings-card {
  margin-top: 1rem;
  padding: 1.1rem;
  border-radius: 1.35rem;
}

.receipt-heading,
.settings-heading,
.progress-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.done-chip {
  padding: 0.4rem 0.65rem;
  background: var(--sage);
  color: var(--forest);
}

dl {
  margin: 0;
}

dl div {
  display: grid;
  grid-template-columns: 7.2rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
}

dt {
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

dd {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
}

.section-heading p:last-child {
  max-width: 36rem;
  margin-top: 0.8rem;
}

.status-pill {
  padding: 0.42rem 0.68rem;
}

.status-pill.confirmed,
.status-pill.active {
  background: #dbeadd;
  color: #3d6b49;
}

.mission-detail-card > h2 {
  max-width: 32rem;
  margin: 0.55rem 0 1rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.55rem;
  font-weight: 500;
}

.mission-grid {
  display: grid;
  gap: 0.65rem;
  margin: 1rem 0;
}

.mission-grid div {
  padding: 0.85rem;
  border-radius: 0.9rem;
  background: var(--sage-soft);
}

.mission-grid span,
.window-list span {
  color: var(--ink-soft);
  font-size: 0.76rem;
  font-weight: 750;
}

.mission-grid p {
  margin: 0.25rem 0 0;
  color: var(--ink);
}

.quiet-button,
.primary-button,
.control-button,
.list-button {
  min-height: 3rem;
  border-radius: 999px;
  font-weight: 800;
}

.quiet-button {
  border: 1px solid #c8d8ce;
  background: var(--sage-soft);
  color: var(--forest);
  padding: 0.7rem 1rem;
}

.quiet-button.compact {
  min-height: 2.45rem;
  padding: 0.5rem 0.8rem;
  font-size: 0.75rem;
}

.primary-button {
  border: 0;
  background: var(--forest);
  color: white;
  padding: 0.75rem 1.1rem;
}

.full {
  width: 100%;
}

.kickoff-card {
  margin-top: 1rem;
  padding: 1.1rem;
}

.progress-header span {
  flex: 0 0 auto;
  color: var(--forest);
  font-size: 0.76rem;
  font-weight: 800;
}

.progress-track {
  height: 0.42rem;
  margin: 0.9rem 0 1.4rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e5ece7;
}

.progress-track span {
  display: block;
  width: 5.56%;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  transition: width 220ms ease;
}

.question-help {
  font-size: 0.84rem;
}

textarea,
input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: white;
  color: var(--ink);
  outline: none;
  padding: 0.8rem;
}

textarea {
  resize: vertical;
}

textarea:focus,
input:focus,
select:focus {
  border-color: #7da48e;
  box-shadow: 0 0 0 4px rgba(125, 164, 142, 0.16);
}

label {
  display: grid;
  gap: 0.35rem;
  margin: 0.8rem 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 750;
}

.kickoff-actions,
.button-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.kickoff-actions .primary-button,
.button-row .primary-button {
  margin-left: auto;
}

.window-list {
  margin: 1rem 0;
  border-top: 1px solid var(--line);
}

.window-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--line);
}

.control-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}

.control-button {
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--sage-soft);
  color: var(--forest);
  padding: 0.65rem;
  font-size: 0.78rem;
}

.control-button.danger {
  background: #fbefec;
  color: #8a493d;
}

.inline-control {
  margin-top: 0.8rem;
  padding: 0.9rem;
  border-radius: 0.9rem;
  background: #f5f8f5;
}

.list-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: 0.6rem;
  border: 1px solid var(--line);
  border-radius: 0.95rem;
  background: white;
  color: var(--ink);
  padding: 0.85rem;
  text-align: left;
}

.list-button strong,
.list-button small {
  display: block;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  padding: 0.3rem;
  border-radius: 0.95rem;
  background: var(--sage-soft);
}

.segmented button {
  min-height: 2.5rem;
  border: 0;
  border-radius: 0.75rem;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 750;
}

.segmented button.selected {
  background: white;
  color: var(--forest);
  box-shadow: 0 5px 15px rgba(32, 76, 70, 0.09);
}

.toast {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 5.5rem;
  max-width: calc(100% - 2rem);
  padding: 0.8rem 1rem;
  border-radius: 999px;
  background: var(--forest-deep);
  color: white;
  font-size: 0.82rem;
  font-weight: 750;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.5rem);
  transition: 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

[hidden] {
  display: none !important;
}

@media (min-width: 42rem) {
  .app-shell {
    padding: 1.5rem 1.5rem 7rem;
  }

  .onboarding-shell {
    padding: 1.5rem;
  }

  .mission-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .welcome-row,
  .section-heading {
    margin-top: 2.2rem;
  }
}

@media (max-width: 32rem) {
  .onboarding-composer {
    grid-template-columns: 1fr;
  }

  .onboarding-composer .primary-button {
    width: 100%;
  }

  .onboarding-footer {
    flex-wrap: wrap;
  }

  .privacy-note {
    width: 100%;
    text-align: left;
  }
}

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