:root {
  color-scheme: light;
  --ink: #182124;
  --muted: #627074;
  --line: #d9e1de;
  --surface: #ffffff;
  --surface-soft: #f5f8f6;
  --warm-surface: #fff7ed;
  --teal: #0f766e;
  --teal-dark: #115e59;
  --teal-soft: #e8f6f1;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --orange: #ea580c;
  --orange-soft: #ffedd5;
  --red: #b91c1c;
  --red-soft: #fef2f2;
  --shadow: 0 16px 40px rgba(36, 52, 47, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  background: #f5f7f4;
}

body {
  margin: 0;
  background: #f5f7f4;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", sans-serif;
  line-height: 1.55;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: var(--teal);
  color: #fff;
  font-weight: 750;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

button:hover {
  background: var(--teal-dark);
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.32);
  outline-offset: 2px;
}

button:disabled {
  cursor: wait;
  opacity: 0.58;
}

.button-secondary {
  background: #e8efec;
  color: var(--teal-dark);
  box-shadow: none;
}

.button-secondary:hover {
  background: #dbe7e2;
  box-shadow: none;
}

.button-quiet {
  background: transparent;
  color: var(--teal-dark);
  box-shadow: inset 0 0 0 1px var(--line);
}

.button-quiet:hover {
  background: var(--surface-soft);
  box-shadow: inset 0 0 0 1px #aebdb7;
}

.hidden {
  display: none !important;
}

.mode-banner {
  min-height: 36px;
  padding: 8px 16px;
  background: #172554;
  color: #dbeafe;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.shell {
  width: min(1160px, calc(100% - 24px));
  margin: 0 auto;
  padding: 24px 0 32px;
}

.landing-hero {
  display: grid;
  gap: 24px;
  padding: 28px 0 20px;
}

.eyebrow,
.section-index {
  display: block;
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 14px;
  font-size: 44px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 12px;
  font-size: 30px;
  line-height: 1.2;
}

h3 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.28;
}

.lede {
  max-width: 680px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 18px;
}

.preview-days {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.preview-days li {
  display: grid;
  gap: 4px;
  min-height: 74px;
  border-left: 3px solid var(--orange);
  padding: 10px 12px;
  background: var(--surface);
}

.preview-days span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 800;
}

.preview-days strong {
  font-size: 15px;
}

.activation-panel {
  max-width: 760px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  margin: 18px 0;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.section-heading p {
  margin-bottom: 0;
  color: var(--muted);
}

.activation-steps {
  display: flex;
  gap: 8px;
  margin: 22px 0;
}

.activation-steps span {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.activation-steps span.active {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.form-stack {
  display: grid;
  gap: 16px;
}

label {
  color: var(--muted);
  font-size: 14px;
}

.form-stack label,
.inline-form label {
  display: grid;
  gap: 7px;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

.saved-code {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border-left: 4px solid var(--teal);
  padding: 12px 14px;
  background: var(--teal-soft);
}

.saved-code span {
  color: var(--muted);
}

.fixed-experience {
  display: grid;
  gap: 5px;
  border: 1px solid var(--teal);
  border-left: 4px solid var(--teal);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--teal-soft);
}

.fixed-experience span {
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 750;
}

.fixed-experience strong {
  color: var(--ink);
  font-size: 18px;
}

.fixed-experience p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.form-actions,
.task-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.task-actions button {
  min-width: 112px;
}

.session-active .landing-hero,
.session-active #page-footer {
  display: none;
}

.session-active .shell {
  width: min(1240px, calc(100% - 24px));
  padding-top: 14px;
}

.session-app {
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.app-header .eyebrow {
  margin-bottom: 2px;
}

.app-header strong {
  font-size: 18px;
}

.app-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.app-header-actions button {
  padding-inline: 12px;
  white-space: nowrap;
}

.review-chip {
  border: 1px solid #93c5fd;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.day-rail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}

.day-rail-item {
  display: grid;
  gap: 2px;
  min-height: 66px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 11px 14px;
  color: #8a9693;
}

.day-rail-item:nth-child(2n) {
  border-right: 0;
}

.day-rail-item:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.day-rail-item span {
  font-size: 12px;
  font-weight: 800;
}

.day-rail-item strong {
  font-size: 15px;
}

.day-rail-item.done {
  color: var(--teal-dark);
  background: #f0f9f6;
}

.day-rail-item.active {
  color: #9a3412;
  background: var(--orange-soft);
}

.onboarding-layout {
  display: grid;
  gap: 28px;
  padding: 24px 18px 28px;
}

.onboarding-intro p {
  max-width: 540px;
  color: var(--muted);
}

.profile-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.profile-line span {
  border: 1px solid #b9d8ce;
  border-radius: 999px;
  padding: 5px 10px;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 700;
}

.onboarding-form {
  display: grid;
  gap: 24px;
}

fieldset {
  min-width: 0;
  border: 0;
  padding: 0;
  margin: 0;
}

legend {
  margin-bottom: 12px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 800;
}

.choice-grid,
.outcome-grid {
  display: grid;
  gap: 9px;
}

.choice-card,
.outcome-card,
.result-option {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px 11px 42px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.choice-card input,
.outcome-card input,
.result-option input {
  position: absolute;
  left: 14px;
  width: 18px;
  min-height: 18px;
  margin: 0;
  accent-color: var(--teal);
}

.choice-card.selected,
.outcome-card.selected,
.result-option.selected {
  border-color: var(--teal);
  background: var(--teal-soft);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.tracker-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 18px;
}

.tracker-heading h2,
.tracker-heading p {
  margin-bottom: 0;
}

.tracker-heading p {
  color: var(--muted);
}

.day-count {
  display: flex;
  align-items: baseline;
  gap: 5px;
  color: var(--muted);
  white-space: nowrap;
}

.day-count strong {
  color: var(--teal);
  font-size: 28px;
}

.tracker-layout {
  display: grid;
  border-top: 1px solid var(--line);
}

.task-list {
  display: grid;
  align-content: start;
  border-bottom: 1px solid var(--line);
  background: #f1f5f3;
}

.task-list-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 74px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  padding: 10px 14px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.task-list-item:last-child {
  border-bottom: 0;
}

.task-list-item:hover,
.task-list-item.active {
  background: #fff;
  box-shadow: inset 4px 0 0 var(--teal);
}

.task-number {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #dce6e2;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.task-list-copy {
  display: grid;
  min-width: 0;
}

.task-list-copy strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.task-list-copy small {
  color: var(--muted);
}

.task-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 26px;
  border-radius: 999px;
  padding: 3px 9px;
  background: #e7ecea;
  color: #52615d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.task-status.scheduled {
  background: var(--blue-soft);
  color: #1d4ed8;
}

.task-status.in-progress {
  background: var(--orange-soft);
  color: #9a3412;
}

.task-status.done {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.task-status.gap {
  background: var(--red-soft);
  color: var(--red);
}

.task-workspace {
  min-width: 0;
  padding: 20px 18px 28px;
}

.task-detail {
  display: grid;
  gap: 22px;
}

.task-detail-heading {
  display: grid;
  gap: 12px;
}

.task-detail-heading h3 {
  margin-top: 10px;
}

.task-detail-heading p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
}

.duration {
  color: var(--orange);
  font-size: 13px;
  font-weight: 800;
}

.task-steps {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: task-step;
}

.task-steps li {
  position: relative;
  min-height: 54px;
  border-top: 1px solid var(--line);
  padding: 15px 8px 13px 46px;
  counter-increment: task-step;
  font-weight: 700;
}

.task-steps li:last-child {
  border-bottom: 1px solid var(--line);
}

.task-steps li::before {
  content: counter(task-step);
  position: absolute;
  left: 6px;
  top: 12px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--teal-soft);
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.pending-task-state,
.scheduled-task-state,
.active-task-state,
.resolved-summary {
  border-left: 4px solid var(--teal);
  padding: 16px;
  background: var(--teal-soft);
}

.scheduled-task-state {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.scheduled-task-state.overdue {
  border-color: var(--orange);
  background: var(--warm-surface);
}

.active-task-state {
  border-color: var(--orange);
  background: var(--orange-soft);
}

.resolved-summary {
  background: #f0f9f6;
}

.pending-task-state > span,
.scheduled-task-state > span,
.active-task-state > span,
.resolved-summary > span {
  display: block;
  margin-bottom: 4px;
  color: var(--teal-dark);
  font-size: 13px;
  font-weight: 850;
}

.scheduled-task-state > strong,
.active-task-state > strong,
.resolved-summary > strong {
  display: block;
  margin-bottom: 6px;
  font-size: 18px;
}

.pending-task-state p,
.scheduled-task-state p,
.active-task-state p,
.resolved-summary p {
  margin-bottom: 14px;
  color: var(--muted);
}

.resolved-summary p {
  margin-bottom: 0;
}

.inline-form,
.result-form {
  display: grid;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.outcome-grid,
.result-options {
  display: grid;
  gap: 9px;
}

.task-timeline {
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.task-timeline h4 {
  margin-bottom: 12px;
}

.task-timeline ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.task-timeline li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  border-left: 3px solid #b9d8ce;
  padding-left: 12px;
}

.task-timeline span {
  font-weight: 750;
}

.task-timeline time {
  color: var(--muted);
  font-size: 13px;
}

.decision-review-block {
  display: grid;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.decision-review-toggle {
  width: fit-content;
}

.decision-review {
  border-left: 4px solid var(--blue);
  padding: 18px;
  background: #f7faff;
}

.decision-review > header {
  margin-bottom: 20px;
}

.decision-review > header span {
  display: block;
  margin-bottom: 4px;
  color: #1d4ed8;
  font-weight: 850;
}

.decision-review > header p {
  margin: 0;
  color: var(--muted);
}

.decision-review-day + .decision-review-day {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 18px;
}

.decision-review-day h4 {
  margin-bottom: 8px;
  font-size: 16px;
}

.decision-review-item {
  display: grid;
  gap: 3px;
  border-top: 1px solid #dfe7e4;
  padding: 11px 0;
}

.decision-review-item:first-child {
  border-top: 0;
}

.decision-review-item > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.decision-review-item span {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.decision-review-item.needs-attention {
  border-left: 3px solid var(--orange);
  padding-left: 10px;
}

.decision-review-item.needs-attention span {
  color: #9a3412;
}

.decision-review-item p,
.decision-review-item small {
  margin: 0;
  color: var(--muted);
}

.waiting-day {
  max-width: 700px;
  padding: 56px 18px 72px;
}

.waiting-day > p {
  color: var(--muted);
}

.unlock-time {
  display: grid;
  gap: 4px;
  border-left: 4px solid var(--blue);
  padding: 14px 16px;
  margin: 26px 0 18px;
  background: var(--blue-soft);
}

.unlock-time span {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.unlock-time strong {
  font-size: 22px;
}

.muted {
  color: var(--muted);
}

.result-layout {
  padding: 24px 18px 32px;
}

.result-header {
  max-width: 760px;
  border-left: 5px solid var(--orange);
  padding-left: 18px;
  margin-bottom: 28px;
}

.result-header h2 {
  font-size: 40px;
}

.result-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
}

.result-columns {
  display: grid;
  gap: 28px;
}

.result-main {
  display: grid;
  gap: 0;
}

.result-block {
  border-top: 1px solid var(--line);
  padding: 22px 0;
}

.result-block h3,
.result-pressure h3 {
  font-size: 19px;
}

.evidence-list,
.next-step-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.evidence-list li::marker {
  color: var(--teal);
}

.next-step-list li::marker {
  color: var(--orange);
  font-weight: 850;
}

.insight-block {
  border-left: 4px solid var(--blue);
  padding: 18px;
  background: var(--blue-soft);
}

.insight-block > span {
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 850;
}

.insight-block p {
  margin: 8px 0;
  color: #1e3a5f;
}

.insight-block small {
  color: #56667a;
}

.result-pressure {
  border-top: 4px solid var(--teal);
  padding: 18px;
  background: #f0f9f6;
}

.pressure-list {
  display: grid;
  gap: 12px;
}

.pressure-list > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 10px;
}

.pressure-list span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
}

.pressure-list strong {
  font-size: 14px;
}

.task-history {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 12px;
}

.task-history summary {
  min-height: 48px;
  color: var(--teal-dark);
  cursor: pointer;
  font-weight: 850;
}

.task-history section {
  padding: 16px 0;
}

.task-history section + section {
  border-top: 1px solid var(--line);
}

.task-history section h3 {
  font-size: 18px;
}

.task-history article {
  display: grid;
  gap: 4px;
  border-top: 1px solid #e7ecea;
  padding: 12px 0;
}

.task-history article > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.task-history article span {
  color: var(--orange);
  font-size: 12px;
  font-weight: 850;
}

.task-history article p,
.task-history article small {
  margin: 0;
  color: var(--muted);
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 20;
  max-width: min(380px, calc(100% - 32px));
  border-left: 4px solid var(--teal);
  border-radius: 6px;
  padding: 13px 16px;
  background: #123b36;
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.toast.error {
  border-color: #f87171;
  background: #611a1a;
}

#page-footer {
  padding: 18px 0;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 720px) {
  .shell {
    width: min(1160px, calc(100% - 48px));
    padding-top: 34px;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.7fr);
    align-items: end;
    padding-top: 48px;
  }

  h1 {
    font-size: 62px;
  }

  .activation-panel {
    padding: 28px;
  }

  .choice-grid,
  .outcome-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .task-detail-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .outcome-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .result-columns {
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 0.65fr);
    align-items: start;
  }
}

@media (min-width: 900px) {
  .session-active .shell {
    width: min(1240px, calc(100% - 48px));
  }

  .day-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .day-rail-item,
  .day-rail-item:nth-child(2n),
  .day-rail-item:nth-last-child(-n + 2) {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .day-rail-item:last-child {
    border-right: 0;
  }

  .onboarding-layout {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.3fr);
    padding: 38px 34px 44px;
  }

  .tracker-heading {
    padding: 26px 30px;
  }

  .tracker-layout {
    grid-template-columns: minmax(290px, 0.72fr) minmax(0, 1.5fr);
    min-height: 590px;
  }

  .task-list {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .task-workspace {
    padding: 30px 34px 42px;
  }

  .result-layout {
    padding: 38px 34px 46px;
  }
}

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