:root {
  --ink: #17313b;
  --ink-soft: #4d6269;
  --cream: #fffaf3;
  --paper: #fffdf8;
  --coral: #ef745d;
  --coral-dark: #d95d47;
  --peach: #f9c8a9;
  --mint: #a8d8c8;
  --yellow: #f3ca68;
  --blue: #a9c9df;
  --line: #dfd8cc;
  --shadow: 0 18px 55px rgba(23, 49, 59, 0.11);
  --radius: 24px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: "DM Sans", system-ui, sans-serif;
  line-height: 1.55;
}

button, a { font: inherit; }

a { color: inherit; }

button { color: inherit; }

:focus-visible {
  outline: 3px solid rgba(239, 116, 93, 0.45);
  outline-offset: 4px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  background:
    radial-gradient(circle at 82% 18%, rgba(249, 200, 169, 0.55), transparent 31%),
    radial-gradient(circle at 18% 60%, rgba(168, 216, 200, 0.28), transparent 26%),
    var(--cream);
}

.hero::after {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(23, 49, 59, 0.08);
  border-radius: 50%;
  right: -100px;
  top: 120px;
  pointer-events: none;
}

.nav {
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 49, 59, 0.1);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  font-family: "Fraunces", serif;
  font-size: 20px;
}

.nav-link {
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  border: 1px solid currentColor;
  border-radius: 999px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 1.03fr) minmax(340px, 0.97fr);
  align-items: center;
  gap: 72px;
  padding: 96px 0 84px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--coral-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
}

h1, h2, h3 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  line-height: 1.05;
  letter-spacing: -0.035em;
}

h1 { font-size: clamp(48px, 6.3vw, 78px); }

h1 em {
  color: var(--coral);
  font-style: italic;
  font-weight: 600;
}

.hero-lead {
  max-width: 590px;
  margin: 26px 0 30px;
  color: var(--ink-soft);
  font-size: 19px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 54px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover { transform: translateY(-2px); }

.button-primary {
  background: var(--ink);
  color: #fff;
  box-shadow: 0 10px 24px rgba(23, 49, 59, 0.2);
}

.button-primary:hover { background: #0d252e; }

.microcopy {
  margin: 14px 0 0;
  color: #6b797d;
  font-size: 12px;
}

.week-preview {
  position: relative;
  min-height: 390px;
  isolation: isolate;
}

.preview-card {
  position: absolute;
  width: 220px;
  height: 116px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 22px;
  border: 1px solid rgba(23, 49, 59, 0.09);
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(23, 49, 59, 0.13);
}

.preview-card span { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; }
.preview-card strong { font-family: "Fraunces", serif; font-size: 21px; }
.preview-card-1 { top: 8px; left: 18px; background: #fff; transform: rotate(-5deg); }
.preview-card-2 { top: 45px; right: 3px; background: var(--peach); transform: rotate(5deg); }
.preview-card-3 { top: 144px; left: 68px; background: var(--mint); transform: rotate(-2deg); z-index: 2; }
.preview-card-4 { top: 232px; right: 8px; background: var(--yellow); transform: rotate(4deg); }
.preview-card-5 { top: 270px; left: 7px; background: var(--blue); transform: rotate(-5deg); z-index: 3; }

.how-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(23, 49, 59, 0.12);
}

.how-strip > div {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 28px 32px 30px 0;
}

.how-strip > div + div { padding-left: 32px; border-left: 1px solid rgba(23, 49, 59, 0.12); }
.how-strip span { color: var(--coral-dark); font-size: 12px; font-weight: 700; }
.how-strip p { margin: 0; font-size: 14px; }

.challenge {
  max-width: 1160px;
  margin: 0 auto;
  padding: 92px 24px 100px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}

.section-heading h2, .finish h2 { font-size: clamp(36px, 5vw, 56px); }

.text-button {
  border: 0;
  padding: 6px 0;
  background: transparent;
  color: #6c7b80;
  cursor: pointer;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.progress-panel {
  margin-bottom: 38px;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.progress-copy { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 14px; font-size: 14px; }
.progress-copy span { font-weight: 700; color: var(--coral-dark); }
.progress-copy strong { font-weight: 500; }
.progress-track { height: 9px; overflow: hidden; background: #eee9e0; border-radius: 99px; }
.progress-track span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--coral), #f1a25f); border-radius: inherit; transition: width 400ms ease; }

.community-nudge {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: -18px 0 32px;
  padding: 18px 22px;
  background: #e1f0eb;
  border: 1px solid rgba(23, 49, 59, 0.1);
  border-radius: 16px;
}
.community-nudge[hidden] { display: none; }
.community-nudge p { margin: 0; font-size: 14px; }
.community-nudge a { flex: 0 0 auto; font-size: 13px; font-weight: 700; text-underline-offset: 4px; }

.day-tabs {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.day-tab {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 14px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 160ms ease, border 160ms ease, transform 160ms ease;
}

.day-tab:hover { transform: translateY(-2px); border-color: #c8bdb0; }
.day-tab.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.day-status { flex: 0 0 auto; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: rgba(23, 49, 59, 0.08); font-size: 13px; font-weight: 700; }
.day-tab.is-active .day-status { background: var(--coral); }
.day-tab.is-complete:not(.is-active) .day-status { background: var(--mint); color: var(--ink); }
.day-tab.is-complete .day-status::before { content: "✓"; }
.day-tab.is-complete .day-status { font-size: 0; }
.day-tab.is-complete .day-status::before { font-size: 14px; }
.day-tab small { display: block; margin-bottom: 1px; opacity: 0.7; font-size: 9px; font-weight: 700; letter-spacing: 0.1em; }
.day-tab > span:last-child { overflow: hidden; font-size: 13px; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; }

.day-panels { min-height: 530px; }

.day-panel {
  padding: clamp(26px, 5vw, 54px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: panelIn 220ms ease both;
}

@keyframes panelIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.day-intro { max-width: 720px; margin-bottom: 32px; }
.day-number { margin: 0 0 9px; color: var(--coral-dark); font-size: 11px; font-weight: 700; letter-spacing: 0.13em; }
.day-intro h3 { font-size: clamp(32px, 4vw, 45px); }
.day-intro > p:last-child { margin: 16px 0 0; color: var(--ink-soft); font-size: 16px; }

.task-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 16px; }
.prompt-card, .support-card { padding: 24px; border-radius: 18px; }
.prompt-card { background: #f6eee3; }
.support-card { background: #e1f0eb; }
.card-label { margin: 0 0 15px; font-size: 10px; font-weight: 700; letter-spacing: 0.13em; }
.prompt-card ol { margin: 0; padding-left: 21px; }
.prompt-card li + li { margin-top: 10px; }
.support-card > p:last-child { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.support-card span { padding: 7px 10px; background: rgba(255,255,255,0.7); border-radius: 9px; font-size: 13px; }

.choice-card { display: grid; gap: 10px; }
.choice-card label { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,0.62); border-radius: 10px; cursor: pointer; }
.choice-card input { margin-top: 5px; accent-color: var(--coral); }

.word-set { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; }
.word-set strong { padding: 11px 14px; background: #fff; border-radius: 12px; font-family: "Fraunces", serif; font-size: 20px; }
.shuffle-button { border: 0; border-bottom: 1px solid currentColor; padding: 3px 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.reflection-card p { display: block !important; margin-bottom: 12px !important; }
.reflection-card strong { display: block; font-family: "Fraunces", serif; font-size: 20px; line-height: 1.25; }

.action-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.timer { display: flex; align-items: center; gap: 14px; }
.timer-readout { min-width: 68px; font-family: "Fraunces", serif; font-size: 24px; font-variant-numeric: tabular-nums; }
.timer-button { border: 0; border-bottom: 1px solid currentColor; padding: 4px 0; background: transparent; cursor: pointer; font-size: 13px; font-weight: 700; }
.complete-button { min-height: 48px; padding: 12px 20px; border: 0; border-radius: 999px; background: var(--coral); color: #fff; cursor: pointer; font-weight: 700; transition: background 160ms ease, transform 160ms ease; }
.complete-button:hover { transform: translateY(-2px); background: var(--coral-dark); }
.complete-button.is-complete { background: var(--ink); }

.finish {
  margin: -18px 0 38px;
  padding: clamp(28px, 5vw, 54px);
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.finish[hidden] { display: none; }
.finish-intro { display: grid; grid-template-columns: 150px minmax(0, 1fr); align-items: start; gap: clamp(28px, 5vw, 58px); }

.finish-badge { width: 140px; height: 140px; display: grid; place-items: center; border-radius: 50%; background: var(--coral); font-family: "Fraunces", serif; font-size: 42px; transform: rotate(-7deg); box-shadow: 12px 12px 0 rgba(168,216,200,0.85); }
.finish .eyebrow { color: var(--peach); }
.finish h2 { max-width: 800px; font-size: clamp(34px, 4.5vw, 52px); }
.finish-intro p:not(.eyebrow) { max-width: 760px; margin: 16px 0 0; color: #d8e0e2; }
.finish-intro .finish-principle { color: #fff; font-weight: 700; }
.finish-programs { margin-top: 42px; padding-top: 36px; border-top: 1px solid rgba(255,255,255,0.17); }
.finish-programs > h3 { margin-bottom: 22px; font-size: clamp(27px, 3vw, 36px); }
.finish-program-grid { display: grid; grid-template-columns: 1.15fr 0.925fr 0.925fr; gap: 14px; align-items: stretch; }
.finish-program-card { display: flex; flex-direction: column; padding: 24px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16); border-radius: 18px; }
.finish-program-primary { background: var(--coral); border-color: var(--coral); }
.finish-program-card .card-label { margin-bottom: 12px; color: var(--peach); }
.finish-program-primary .card-label { color: #fff; }
.finish-program-card h4 { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: 26px; line-height: 1.08; }
.finish-program-card > p:not(.card-label) { flex: 1; margin: 14px 0 22px; color: #d8e0e2; font-size: 14px; }
.finish-program-primary > p:not(.card-label) { color: #fff; }
.button-light { background: #fff; color: var(--ink); }
.button-light:hover { background: var(--cream); }
.finish-program-link { color: #fff; font-size: 13px; font-weight: 700; text-underline-offset: 4px; }

footer { display: flex; justify-content: space-between; gap: 20px; padding: 24px max(24px, calc((100vw - 1160px) / 2)); background: #10262e; color: #b9c5c8; font-size: 12px; }
footer a { text-underline-offset: 3px; }

.toast { position: fixed; left: 50%; bottom: 26px; z-index: 10; max-width: calc(100vw - 36px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 700; opacity: 0; pointer-events: none; transform: translate(-50%, 20px); transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 46px; padding: 72px 0 58px; }
  .hero-copy { max-width: 680px; }
  .week-preview { max-width: 560px; width: 100%; margin: 0 auto; }
  .day-tabs { display: flex; overflow-x: auto; padding: 3px 3px 9px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .day-tabs::-webkit-scrollbar { display: none; }
  .day-tab { flex: 0 0 154px; scroll-snap-align: start; }
}

@media (max-width: 680px) {
  .hero { padding: 0 18px; }
  .nav { height: 68px; }
  .brand { gap: 9px; font-size: 13px; }
  .brand-mark { width: 32px; height: 32px; }
  .nav-link { padding: 8px 13px; font-size: 12px; }
  .hero-content { padding: 56px 0 46px; }
  h1 { font-size: clamp(43px, 13vw, 58px); }
  .hero-lead { font-size: 17px; }
  .button-primary { width: 100%; }
  .week-preview { min-height: 315px; }
  .preview-card { width: 178px; height: 96px; padding: 16px; }
  .preview-card strong { font-size: 17px; }
  .preview-card-1 { left: 0; }
  .preview-card-2 { right: 0; top: 35px; }
  .preview-card-3 { left: 45px; top: 116px; }
  .preview-card-4 { right: 0; top: 187px; }
  .preview-card-5 { left: 0; top: 218px; }
  .how-strip { grid-template-columns: 1fr; }
  .how-strip > div { padding: 18px 0; }
  .how-strip > div + div { padding-left: 0; border-left: 0; border-top: 1px solid rgba(23,49,59,0.1); }
  .challenge { padding: 68px 18px 74px; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: 12px; margin-bottom: 24px; }
  .progress-copy { flex-direction: column; gap: 3px; }
  .progress-panel { padding: 18px; }
  .community-nudge { align-items: flex-start; flex-direction: column; gap: 10px; margin-top: -20px; padding: 17px 18px; }
  .day-panels { min-height: 0; }
  .day-panel { padding: 26px 19px; }
  .day-intro { margin-bottom: 24px; }
  .task-grid { grid-template-columns: 1fr; }
  .prompt-card, .support-card { padding: 20px; }
  .action-row { align-items: stretch; flex-direction: column; }
  .timer { justify-content: space-between; padding: 0 3px; }
  .complete-button { width: 100%; }
  .finish { margin-top: -20px; padding: 30px 20px; }
  .finish-intro { grid-template-columns: 1fr; gap: 30px; }
  .finish-badge { width: 112px; height: 112px; font-size: 34px; box-shadow: 9px 9px 0 rgba(168,216,200,0.85); }
  .finish-programs { margin-top: 34px; padding-top: 30px; }
  .finish-program-grid { grid-template-columns: 1fr; }
  .finish-program-card { padding: 22px 19px; }
  .button-light { width: 100%; }
  footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 390px) {
  .brand > span:last-child { max-width: 120px; line-height: 1.05; }
  .week-preview { transform: scale(0.92); transform-origin: top left; width: 108.7%; margin-bottom: -24px; }
}

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