/* ================= Next Steps — recovery guide ================= */
:root {
  color-scheme: light;
  --paper: #faf7f1;
  --paper-tint: #f0efe6;
  --ink: #24312b;
  --ink-soft: #4f5e56;
  --ink-faint: #77857d;
  --green: #3f6b5c;
  --green-deep: #2c4a40;
  --green-soft: #dcE8e0;
  --amber: #c97f35;
  --amber-soft: #f4d8ae;
  --card: #ffffff;
  --line: #e2ded2;
  --radius: 18px;
  --shadow: 0 14px 36px -20px rgba(44, 74, 64, 0.35);
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
}

.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1.5rem; }
.wrap-narrow { max-width: 46rem; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 0.6em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.3rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--green-deep); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 10px 0; z-index: 100; text-decoration: none;
}
.skip-link:focus { left: 0; }

a { color: var(--green); }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 241, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.85rem; padding-bottom: 0.85rem; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; color: var(--green-deep); }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: var(--green-soft); color: var(--green-deep); }
.brand-name { font-family: var(--font-display); font-size: 1.2rem; font-weight: 600; }
.site-nav { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.site-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover { color: var(--green-deep); }
.nav-help {
  background: var(--amber); color: #fff !important;
  padding: 0.45rem 0.9rem; border-radius: 999px; font-weight: 600 !important;
}
.nav-help:hover { background: #b26e2a; }

/* ---------- hero ---------- */
.hero { padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(2.5rem, 6vw, 4.5rem); }
.hero-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 3rem; align-items: center; }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.78rem;
  font-weight: 700; color: var(--amber); margin-bottom: 1rem;
}
.eyebrow-light { color: var(--amber-soft); }
h1 em { font-style: italic; color: var(--green); }
.lede, .section-lede { font-size: 1.15rem; color: var(--ink-soft); max-width: 38rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin: 1.6rem 0 1rem; }
.hero-note { color: var(--ink-faint); font-size: 0.95rem; font-style: italic; }
.hero-art svg { width: 100%; height: auto; display: block; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.8rem 1.5rem; border-radius: 999px; border: 2px solid transparent;
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  font-family: var(--font-body); transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--green-deep); color: #fff; }
.btn-primary:hover { background: var(--green); }
.btn-ghost { border-color: var(--green-deep); color: var(--green-deep); background: transparent; }
.btn-ghost:hover { background: var(--green-soft); }
.btn-light { background: var(--amber-soft); color: var(--green-deep); }
.btn-light:hover { background: #efc98f; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5rem) 0; }
.section-tint { background: var(--paper-tint); }
.section-head { margin-bottom: 2.5rem; }
.section-deep { background: var(--green-deep); color: #f3efe6; }
.section-deep .section-lede { color: #cfdcd3; }

/* ---------- roadmap ---------- */
.roadmap { list-style: none; margin: 0; padding: 0; position: relative; }
.roadmap::before {
  content: ""; position: absolute; left: 25px; top: 10px; bottom: 10px;
  width: 3px; background: linear-gradient(var(--green-soft), var(--amber-soft));
  border-radius: 3px;
}
.stage { display: grid; grid-template-columns: 52px 1fr; gap: 1.4rem; padding: 0 0 2.2rem; position: relative; }
.stage:last-child { padding-bottom: 0; }
.stage-marker {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--card); border: 3px solid var(--green);
  display: grid; place-items: center; z-index: 1;
  font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; color: var(--green-deep);
}
.stage:nth-child(4) .stage-marker, .stage:nth-child(5) .stage-marker { border-color: var(--amber); }
.stage-body {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.7rem; box-shadow: var(--shadow);
}
.stage-when { text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.74rem; font-weight: 700; color: var(--amber); margin-bottom: 0.35rem; }
.stage-body h3 { margin-bottom: 0.4rem; }
.stage-body > p { color: var(--ink-soft); }
.stage-list { margin: 0.8rem 0 0; padding: 0; list-style: none; }
.stage-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.45rem; color: var(--ink); font-size: 0.98rem; }
.stage-list li::before { content: "→"; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* ---------- anchors ---------- */
.anchors-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.anchors-progress { margin-bottom: 1.4rem; }
.progress-track { height: 12px; border-radius: 999px; background: var(--paper-tint); overflow: hidden; border: 1px solid var(--line); }
.progress-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--amber));
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.progress-label { margin: 0.55rem 0 0; font-size: 0.9rem; font-weight: 600; color: var(--ink-soft); }
.anchors-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.anchor {
  display: flex; gap: 0.9rem; align-items: flex-start; cursor: pointer;
  padding: 0.85rem 1rem; border-radius: 14px; border: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}
.anchor:hover { background: var(--paper-tint); }
.anchor input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.anchor-box {
  flex: none; width: 26px; height: 26px; margin-top: 2px; border-radius: 9px;
  border: 2px solid var(--green); background: #fff; position: relative;
  transition: background 0.2s, border-color 0.2s;
}
.anchor-box::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 12px; height: 7px; border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg) translateY(-1px) scale(0); transition: transform 0.2s;
}
.anchor input:checked + .anchor-box { background: var(--green); }
.anchor input:checked + .anchor-box::after { transform: rotate(-45deg) translateY(-1px) scale(1); }
.anchor input:focus-visible + .anchor-box { outline: 3px solid var(--amber); outline-offset: 2px; }
.anchor input:checked ~ .anchor-text strong { color: var(--ink-faint); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.anchor-text { display: grid; gap: 0.1rem; }
.anchor-text strong { font-weight: 600; }
.anchor-text small { color: var(--ink-faint); font-size: 0.88rem; }
.anchors-affirm { margin: 1.2rem 0 0; min-height: 1.4em; font-weight: 600; color: var(--green-deep); }

/* ---------- check-in ---------- */
.checkin-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow);
}
.mood-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.7rem; }
.mood {
  display: grid; gap: 0.35rem; justify-items: center;
  padding: 1rem 0.5rem; border-radius: 14px; cursor: pointer;
  background: var(--paper-tint); border: 2px solid transparent;
  font-family: var(--font-body); font-size: 0.92rem; font-weight: 600; color: var(--ink-soft);
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.mood:hover { transform: translateY(-2px); background: var(--green-soft); }
.mood[aria-pressed="true"] { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.mood-face { font-size: 1.7rem; line-height: 1; }
.mood-response {
  margin-top: 1.5rem; padding: 1.3rem 1.5rem; border-radius: 14px;
  background: var(--green-soft); border-left: 5px solid var(--green);
}
.mood-response h3 { margin-bottom: 0.35rem; color: var(--green-deep); }
.mood-response p { color: var(--ink-soft); margin-bottom: 0.6rem; }
.mood-response-link { font-weight: 600; color: var(--green-deep); }

/* ---------- breathing ---------- */
.breathe-inner { text-align: center; }
.breathe-inner .section-head { margin-bottom: 1.5rem; }
.breathe-inner .section-lede { margin-inline: auto; }
.breathe-stage { display: grid; justify-items: center; gap: 1.2rem; }
.breathe-circle {
  width: 190px; height: 190px; border-radius: 50%;
  border: 2px solid rgba(244, 216, 174, 0.5);
  display: grid; place-items: center;
}
.breathe-inner-circle {
  width: 76px; height: 76px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f4d8ae, #c97f35);
  transform: scale(0.72);
  transition: transform 4s cubic-bezier(0.45, 0, 0.55, 1);
  box-shadow: 0 0 50px rgba(244, 216, 174, 0.35);
}
.breathe-circle.inhale .breathe-inner-circle { transform: scale(2.05); transition-duration: 4s; }
.breathe-circle.hold .breathe-inner-circle { transform: scale(2.05); transition-duration: 0.3s; }
.breathe-circle.exhale .breathe-inner-circle { transform: scale(0.72); transition-duration: 6s; }
.breathe-cue { font-family: var(--font-display); font-size: 1.35rem; margin: 0; min-height: 1.5em; color: #f3efe6; }
.breathe-controls { display: grid; gap: 0.4rem; justify-items: center; }
.breathe-count { margin: 0; color: #cfdcd3; font-size: 0.9rem; min-height: 1.3em; }

/* ---------- help ---------- */
.help-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.1rem; }
.help-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.help-urgent { border-top: 5px solid var(--amber); }
.help-card h3 { font-size: 1.08rem; margin-bottom: 0.4rem; display: flex; align-items: baseline; gap: 0.5rem; flex-wrap: wrap; }
.help-region { font-family: var(--font-body); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--amber); background: var(--amber-soft); padding: 0.15rem 0.5rem; border-radius: 999px; }
.help-card p { color: var(--ink-soft); font-size: 0.96rem; flex: 1; }
.help-action { font-weight: 600; color: var(--green-deep); }
.help-disclaimer { margin-top: 2rem; font-size: 0.9rem; color: var(--ink-faint); max-width: 44rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--green-deep); color: #cfdcd3; padding: 2.2rem 0; }
.footer-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.footer-brand { font-family: var(--font-display); font-size: 1.15rem; color: #f3efe6; margin: 0; }
.footer-line { margin: 0; font-size: 0.92rem; }
.footer-hint {
  background: none; border: none; padding: 0 0.2rem; margin-left: 0.35rem;
  color: var(--amber-soft); opacity: 0.55; font-size: 0.95rem; cursor: pointer;
  transition: opacity 0.25s, transform 0.25s; line-height: 1;
}
.footer-hint:hover { opacity: 1; transform: rotate(20deg) scale(1.2); }

/* ---------- easter egg: the Lantern Language ---------- */
.egg-overlay {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: 1.25rem;
  background: rgba(36, 49, 43, 0.6); backdrop-filter: blur(5px);
  overflow-y: auto; animation: egg-fade 0.25s ease-out;
}
.egg-overlay[hidden] { display: none; }
@keyframes egg-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes egg-rise { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }

.egg-modal {
  position: relative; width: min(34rem, 100%);
  max-height: calc(100vh - 2.5rem); overflow-y: auto;
  background: var(--card); border: 1px solid var(--line); border-radius: 22px;
  padding: 2rem 2rem 1.8rem;
  box-shadow: 0 30px 80px -30px rgba(20, 32, 27, 0.7);
  animation: egg-rise 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.egg-modal:focus { outline: none; }
.egg-eyebrow { margin-bottom: 0.5rem; }
.egg-title { margin-bottom: 0.4rem; color: var(--green-deep); }
.egg-lede { color: var(--ink-soft); font-size: 0.98rem; margin-bottom: 1.3rem; }

.egg-close {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--paper);
  font-size: 1.35rem; line-height: 1; color: var(--ink-soft); cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.egg-close:hover { background: var(--green-soft); color: var(--green-deep); }

.egg-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.35rem;
  background: var(--paper-tint); border-radius: 999px; padding: 0.3rem;
  margin-bottom: 1.4rem;
}
.egg-tab {
  border: none; border-radius: 999px; padding: 0.55rem 0.8rem; cursor: pointer;
  background: transparent; font-family: var(--font-body); font-weight: 600;
  font-size: 0.92rem; color: var(--ink-soft); transition: background 0.2s, color 0.2s;
}
.egg-tab[aria-selected="true"] { background: var(--green-deep); color: #fff; }

.egg-label {
  display: block; margin: 0 0 0.4rem;
  font-size: 0.76rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--amber);
}
.egg-textarea, .egg-input {
  width: 100%; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--paper); color: var(--ink);
  font-family: var(--font-body); font-size: 1rem; line-height: 1.5;
  padding: 0.7rem 0.9rem; margin-bottom: 1.1rem; resize: vertical;
}
.egg-textarea:focus, .egg-input:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }

.egg-keyrow { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.8rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.egg-keycol { min-width: 0; }
.egg-chips { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.egg-chip {
  font-family: var(--font-display); font-size: 1rem; font-weight: 600;
  color: var(--green-deep); background: var(--amber-soft);
  padding: 0.3rem 0.75rem; border-radius: 999px;
}
.egg-mini {
  border: 1.5px solid var(--green-deep); background: transparent; color: var(--green-deep);
  border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer;
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
  transition: background 0.2s; flex: none;
}
.egg-mini:hover { background: var(--green-soft); }

.egg-go { width: 100%; }

.egg-result { margin-top: 1.3rem; padding-top: 1.3rem; border-top: 1px dashed var(--line); }
.egg-cipher {
  font-family: var(--font-display); font-style: italic; font-size: 1.12rem;
  color: var(--green-deep); background: var(--paper-tint);
  border-left: 4px solid var(--amber); border-radius: 10px;
  padding: 0.9rem 1.1rem; margin-bottom: 1.1rem;
  overflow-wrap: anywhere; line-height: 1.7; letter-spacing: 0.02em;
  user-select: all;
}
.egg-plain {
  font-size: 1.08rem; color: var(--ink); background: var(--green-soft);
  border-left: 4px solid var(--green); border-radius: 10px;
  padding: 0.9rem 1.1rem; margin: 0; overflow-wrap: anywhere; white-space: pre-wrap;
}
.egg-linkrow { display: flex; gap: 0.5rem; align-items: stretch; }
.egg-linkrow .egg-link { margin-bottom: 0; font-size: 0.85rem; color: var(--ink-soft); flex: 1; min-width: 0; }
.egg-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1rem; }
.egg-wa { background: #1faa55; color: #fff; gap: 0.5rem; font-size: 0.92rem; padding: 0.65rem 1.1rem; flex: 1 1 14rem; }
.egg-wa:hover { background: #178a45; }
.egg-wa-alt { background: var(--green-deep); }
.egg-wa-alt:hover { background: var(--green); }
.egg-tip { margin: 0.9rem 0 0; font-size: 0.85rem; color: var(--ink-faint); font-style: italic; }
.egg-status { margin: 0.8rem 0 0; min-height: 1.3em; font-size: 0.92rem; font-weight: 600; }
.egg-status.is-error { color: #a4432c; }
.egg-status.is-good { color: var(--green-deep); }

@media (max-width: 480px) {
  .egg-modal { padding: 1.5rem 1.2rem 1.3rem; }
  .egg-actions { flex-direction: column; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-art { max-width: 260px; margin: 0 auto; order: -1; }
}
@media (max-width: 640px) {
  .header-inner { flex-direction: column; align-items: flex-start; }
  .mood-grid { grid-template-columns: repeat(2, 1fr); }
  .stage { grid-template-columns: 40px 1fr; gap: 1rem; }
  .stage-marker { width: 40px; height: 40px; font-size: 1rem; }
  .roadmap::before { left: 19px; }
}