:root {
  --ink: #15312e;
  --muted: #667875;
  --cream: #f6f2e9;
  --paper: #fffdf8;
  --line: #dce2dc;
  --green: #1d5d54;
  --green-dark: #173f3a;
  --gold: #d9a441;
  --shadow: 0 18px 60px rgba(27, 54, 49, 0.12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, rgba(215, 164, 65, 0.18), transparent 28rem),
    linear-gradient(160deg, #f8f5ed 0%, #eef3ee 100%);
  font-family: "Segoe UI", system-ui, sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1120px;
  margin: auto;
  padding: 24px 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--green);
  font-family: "Newsreader", serif;
  font-size: 21px;
}

.privacy { color: var(--muted); font-size: 13px; }
.privacy::before { content: "\2022"; color: #58a273; margin-right: 8px; }

.hero {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 60px;
  align-items: center;
  max-width: 1120px;
  margin: 62px auto 0;
  padding: 20px 28px 90px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

h1, h2, .result-stage {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 600;
  line-height: .98;
}

h1 { max-width: 720px; font-size: clamp(50px, 7vw, 82px); letter-spacing: -.035em; }
.hero-copy { max-width: 610px; margin: 25px 0 34px; color: var(--muted); font-size: 18px; line-height: 1.65; }

.primary, .secondary, .ghost {
  border: 0;
  border-radius: 999px;
  padding: 15px 24px;
  font-weight: 700;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.primary { color: white; background: var(--green); box-shadow: 0 9px 24px rgba(29,93,84,.2); }
.primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(29,93,84,.28); }
.secondary { color: var(--green-dark); background: #e3ebe5; }
.ghost { padding: 12px 16px; color: var(--muted); background: transparent; }
.ghost:hover { color: var(--ink); background: rgba(255,255,255,.6); }

.path-card {
  padding: 29px;
  border: 1px solid rgba(29,93,84,.13);
  border-radius: 28px;
  background: rgba(255,253,248,.82);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.path-row { display: flex; align-items: center; gap: 16px; padding: 10px 0; }
.path-row + .path-row { border-top: 1px solid var(--line); }
.path-letter { display: grid; flex: 0 0 38px; height: 38px; place-items: center; border-radius: 12px; color: white; background: var(--stage); font-weight: 700; }
.path-name { display: block; font-weight: 700; }
.path-note { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; }

.checkin { max-width: 900px; margin: auto; padding: 12px 28px 70px; }
.progress-wrap { position: sticky; z-index: 5; top: 0; padding: 16px 0 14px; background: rgba(246,242,233,.93); backdrop-filter: blur(12px); }
.progress-meta { display: flex; justify-content: space-between; margin-bottom: 9px; color: var(--muted); font-size: 13px; font-weight: 600; }
.progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dfe5de; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--stage); transition: width .35s ease, background .35s ease; }

.stage-card { margin-top: 34px; padding: clamp(24px, 5vw, 52px); border: 1px solid rgba(22,53,49,.1); border-radius: 30px; background: var(--paper); box-shadow: var(--shadow); }
.stage-heading { display: flex; gap: 18px; align-items: flex-start; }
.stage-number { display: grid; flex: 0 0 58px; height: 58px; place-items: center; border-radius: 18px; color: white; background: var(--stage); font-size: 25px; font-weight: 700; }
.stage-card h2 { font-size: clamp(36px, 6vw, 58px); color: var(--stage); }
.stage-description { max-width: 660px; margin: 20px 0 30px; color: var(--muted); line-height: 1.65; }
.prompt { margin: 0 0 14px; font-weight: 700; }

.feelings { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.feeling { position: relative; }
.feeling input { position: absolute; opacity: 0; pointer-events: none; }
.feeling label { display: flex; min-height: 58px; align-items: center; gap: 12px; padding: 13px 14px; border: 1px solid var(--line); border-radius: 14px; color: #344d49; background: #fff; line-height: 1.35; transition: .16s ease; cursor: pointer; }
.feeling label::before { content: ""; flex: 0 0 21px; height: 21px; border: 1.5px solid #a8b5b1; border-radius: 6px; background: white; }
.feeling input:focus-visible + label { outline: 3px solid rgba(29,93,84,.2); outline-offset: 2px; }
.feeling input:checked + label { border-color: var(--stage); color: var(--ink); background: color-mix(in srgb, var(--stage) 8%, white); }
.feeling input:checked + label::before { content: "\2713"; display: grid; place-items: center; border-color: var(--stage); color: white; background: var(--stage); font-size: 14px; font-weight: 700; }
.stage-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 32px; }
.selection-count { color: var(--muted); font-size: 13px; }

.result { max-width: 980px; margin: 25px auto 70px; padding: 0 28px; }
.result-hero { position: relative; overflow: hidden; padding: clamp(30px, 6vw, 66px); border-radius: 34px; color: white; background: var(--stage); box-shadow: var(--shadow); }
.result-hero::after { content: attr(data-letter); position: absolute; right: -10px; bottom: -90px; color: rgba(255,255,255,.08); font-family: "Newsreader",serif; font-size: 310px; line-height: 1; }
.result .eyebrow { color: rgba(255,255,255,.7); }
.result-stage { position: relative; z-index: 1; font-size: clamp(48px, 8vw, 80px); }
.result-summary { position: relative; z-index: 1; max-width: 610px; margin: 22px 0 0; color: rgba(255,255,255,.85); font-size: 18px; line-height: 1.6; }
.result-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 20px; margin-top: 20px; }
.panel { padding: 28px; border: 1px solid rgba(22,53,49,.1); border-radius: 24px; background: var(--paper); }
.panel h3 { margin: 0 0 8px; font-family: "Newsreader",serif; font-size: 27px; }
.panel-copy { margin: 0 0 22px; color: var(--muted); line-height: 1.55; }
.signal-row { display: grid; grid-template-columns: 112px 1fr 30px; gap: 12px; align-items: center; margin-top: 13px; font-size: 13px; }
.signal-label { font-weight: 600; }
.signal-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e6e9e4; }
.signal-fill { height: 100%; min-width: 0; border-radius: inherit; background: var(--bar); }
.next-step { padding: 18px; border-left: 4px solid var(--stage); border-radius: 0 14px 14px 0; background: #f0f4ef; line-height: 1.55; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.disclaimer { margin: 22px auto 0; max-width: 760px; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.empty-state { max-width: 650px; margin: 70px auto; padding: 42px; border-radius: 28px; text-align: center; background: var(--paper); box-shadow: var(--shadow); }
.empty-state h2 { margin-bottom: 16px; font-size: 44px; }
.empty-state p { color: var(--muted); line-height: 1.6; }

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 35px; margin-top: 25px; padding-bottom: 55px; }
  .path-card { padding: 20px; }
  .feelings, .result-grid { grid-template-columns: 1fr; }
  .stage-heading { display: block; }
  .stage-number { margin-bottom: 18px; }
  .privacy { font-size: 0; }
  .privacy::before { font-size: 13px; }
  .privacy::after { content: "Private"; font-size: 13px; }
}

@media print {
  body { background: white; }
  .topbar, .result-actions { display: none; }
  .result { margin: 0 auto; }
  .result-hero, .panel { box-shadow: none; }
}
