:root {
  --cream: #FAF8F4;
  --cream-2: #FFFBF7;
  --paper: #F6EFE5;
  --ink: #171415;
  --ink-soft: #524A40;
  --muted: #9A9187;
  --terracotta: #DD420E;
  --terracotta-dark: #B8340A;
  --terracotta-soft: #F4E0D6;
  --amber: #B8922E;
  --amber-soft: #F0E5C5;
  --rose-soft: #F5D8D2;
  --blue-soft: #DDE7F0;
  --green-soft: #DFE8D8;
  --rule: #E4DCCE;
  --shadow: 0 22px 70px rgba(23, 20, 21, 0.09);
  --max: 1120px;
  --radius: 22px;
  --font-sans: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 300;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(23, 20, 21, 0.018) 1px, transparent 0);
  background-size: 4px 4px;
  pointer-events: none;
  z-index: 0;
}
body > * { position: relative; z-index: 1; }

img, svg { max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }

/* Keyboard focus visibility (mouse users unaffected) */
:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; border-radius: 6px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .button:focus-visible, .option:focus-visible, .choice:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid var(--terracotta); outline-offset: 2px; }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: .8rem 1rem;
  z-index: 999;
}
.skip-link:focus { left: 1rem; top: 1rem; }

.container { width: min(var(--max), calc(100% - 2rem)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 2rem)); margin: 0 auto; }
.display { font-family: var(--font-display); font-weight: 500; letter-spacing: -0.035em; }
.serif { font-family: var(--font-serif); }
.rx { font-family: var(--font-serif); font-style: italic; font-weight: 700; color: var(--terracotta); }
.label {
  font-family: var(--font-sans);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .68rem;
  color: var(--muted);
}
.soft { color: var(--ink-soft); }
.muted { color: var(--muted); }
.terracotta { color: var(--terracotta); }
.italic { font-family: var(--font-serif); font-style: italic; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  background: rgba(250, 248, 244, .88);
  border-bottom: 1px solid var(--rule);
}
.nav {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  display: inline-flex;
  align-items: baseline;
  gap: .7rem;
  text-decoration: none;
}
.logo .mark { font-size: 1.8rem; line-height: 1; }
.logo .word { font-family: var(--font-display); font-weight: 600; letter-spacing: .02em; }
.logo .sub { color: var(--muted); font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; }
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-links a {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: .88rem;
  padding: .75rem .9rem;
  border-radius: 999px;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--terracotta); background: rgba(221, 66, 14, .06); }
.nav-toggle { display: none; align-items: center; justify-content: center; background: none; border: 1px solid var(--rule); border-radius: 12px; padding: .5rem .72rem; font-size: 1.2rem; line-height: 1; color: var(--ink); }
.nav-toggle:hover { border-color: var(--terracotta); color: var(--terracotta); }

.btn, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  text-decoration: none;
  padding: .92rem 1.25rem;
  font-weight: 600;
  letter-spacing: .01em;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover, .button:hover { transform: translateY(-1px); }
.btn-primary { background: var(--terracotta); color: var(--cream); box-shadow: 0 10px 30px rgba(221, 66, 14, .18); }
.btn-primary:hover { background: var(--terracotta-dark); }
.btn-secondary { border-color: var(--rule); color: var(--ink); background: rgba(255,255,255,.2); }
.btn-secondary:hover { border-color: rgba(221, 66, 14, .45); color: var(--terracotta); background: var(--terracotta-soft); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-small { padding: .65rem .9rem; font-size: .85rem; }

.hero { padding: clamp(3.5rem, 8vw, 7rem) 0 3.5rem; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, .8fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}
.kicker { display: flex; align-items: center; gap: .65rem; margin-bottom: 1.25rem; }
.kicker .pill-dot { width: .55rem; height: .55rem; border-radius: 999px; background: var(--terracotta); box-shadow: 0 0 0 7px rgba(221, 66, 14, .08); }
.hero h1 {
  font-size: clamp(3.3rem, 9vw, 7rem);
  line-height: .9;
  margin: 0 0 1.35rem;
  max-width: 800px;
}
.hero .lede {
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.62;
  color: var(--ink-soft);
  max-width: 640px;
  margin: 0 0 1.6rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.8rem; }
.hero-note { margin-top: 1.25rem; color: var(--muted); font-size: .9rem; line-height: 1.5; }

.phone-shell {
  position: relative;
  width: min(390px, 100%);
  margin-left: auto;
  border: 1px solid rgba(23, 20, 21, .12);
  background: linear-gradient(180deg, var(--cream-2), var(--paper));
  border-radius: 36px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.phone-screen {
  border: 1px solid var(--rule);
  background: var(--cream);
  border-radius: 28px;
  padding: 1rem;
  min-height: 560px;
  overflow: hidden;
}
.phone-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.4rem; }
.fake-dots { display: flex; gap: .25rem; }
.fake-dots span { width: .42rem; height: .42rem; background: var(--rule); border-radius: 50%; display: block; }
.mini-pill-card { border: 1px solid var(--rule); background: var(--cream-2); padding: 1rem; border-radius: 18px; margin-bottom: .8rem; }
.mini-pill-card.hero-card { background: var(--ink); color: var(--cream); border-color: var(--ink); padding: 1.25rem; }
.hero-card .label { color: rgba(255,251,238,.62); }
.hero-card .card-title { font-size: 1.7rem; line-height: 1.05; margin: .7rem 0; }
.hero-card p { color: rgba(255,251,238,.78); line-height: 1.55; margin: 0; }
.card-chip-row { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: 1rem; }
.chip { display: inline-flex; align-items: center; padding: .42rem .62rem; border: 1px solid var(--rule); border-radius: 999px; font-size: .78rem; color: var(--ink-soft); background: rgba(255,255,255,.22); }
.hero-card .chip { border-color: rgba(255,251,238,.24); color: rgba(255,251,238,.82); }

.section { padding: clamp(3.25rem, 7vw, 6.5rem) 0; border-top: 1px solid var(--rule); }
.section-head { max-width: 750px; margin-bottom: 2rem; }
.section h2 { font-size: clamp(2.1rem, 5vw, 4.2rem); line-height: .98; margin: .65rem 0 1rem; }
.section p.section-lede { font-size: 1.12rem; line-height: 1.68; color: var(--ink-soft); margin: 0; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.card {
  border: 1px solid var(--rule);
  background: rgba(255, 251, 247, .64);
  border-radius: var(--radius);
  padding: clamp(1.25rem, 3vw, 2rem);
}
.card h3 { margin: .5rem 0 .65rem; font-size: 1.35rem; line-height: 1.18; }
.card p { color: var(--ink-soft); line-height: 1.62; margin: 0; }
.card .rx { font-size: 2rem; display: inline-block; line-height: 1; }

.step-card { min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; }
.step-num { color: var(--terracotta); font-weight: 700; letter-spacing: .1em; font-size: .72rem; text-transform: uppercase; }

.pill-type-card { background: var(--cream-2); }
.pill-type-card:nth-child(2) { background: var(--paper); }
.pill-type-card:nth-child(3) { background: var(--terracotta-soft); }

.quote-band {
  background: var(--ink);
  color: var(--cream);
  border-radius: calc(var(--radius) + 8px);
  padding: clamp(2rem, 5vw, 4.5rem);
  display: grid;
  grid-template-columns: .85fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}
.quote-band h2 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.2rem); line-height: .98; }
.quote-band p { color: rgba(255,251,238,.76); font-size: 1.08rem; line-height: 1.65; margin: 0; }
.quote-band .label { color: rgba(255,251,238,.55); }

.sample-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.daily-card {
  background: var(--cream-2);
  border: 1px solid var(--rule);
  border-radius: 24px;
  padding: clamp(1.35rem, 4vw, 2.3rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.daily-card::after {
  content: "℞";
  position: absolute;
  right: -1rem;
  bottom: -2.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 10rem;
  color: rgba(221,66,14,.08);
  line-height: 1;
}
.daily-card > * { position: relative; z-index: 1; }
.daily-card .pill-name { font-size: clamp(2rem, 5vw, 3.15rem); line-height: .98; margin: .8rem 0; }
.daily-card .why { border-top: 1px solid var(--rule); padding-top: 1rem; margin-top: 1rem; color: var(--ink-soft); line-height: 1.62; }
.meta-row { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.meta { display: inline-flex; align-items: center; gap: .35rem; padding: .44rem .68rem; border-radius: 999px; background: var(--paper); color: var(--ink-soft); font-size: .82rem; }
.daily-card.dark { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.daily-card.dark p, .daily-card.dark .why { color: rgba(255,251,238,.74); border-color: rgba(255,251,238,.16); }
.daily-card.dark .meta { background: rgba(255,251,238,.09); color: rgba(255,251,238,.74); }
.daily-card.dark .label { color: rgba(255,251,238,.55); }

.form-card { background: var(--cream-2); border: 1px solid var(--rule); border-radius: 28px; padding: clamp(1.35rem, 4vw, 2.6rem); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .45rem; }
.field label { font-weight: 600; font-size: .86rem; }
.field input, .field textarea, .field select {
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--cream);
  color: var(--ink);
  border-radius: 14px;
  padding: .92rem 1rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--terracotta); box-shadow: 0 0 0 4px rgba(221,66,14,.09); }
.field textarea { min-height: 110px; resize: vertical; }
.hidden-field { display: none !important; }

.footer { padding: 2rem 0 3rem; border-top: 1px solid var(--rule); color: var(--muted); font-size: .86rem; }
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.footer a { text-decoration: none; border-bottom: 1px dotted rgba(154,145,135,.7); }
.footer a:hover { color: var(--terracotta); border-color: var(--terracotta); }

/* Start flow */
.flow-page { min-height: 100vh; }
.flow-wrap { width: min(880px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 5vw, 4rem) 0 5rem; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; margin: 1.3rem 0 2.2rem; }
.progress span { height: 4px; border-radius: 99px; background: var(--rule); }
.progress span.active { background: var(--terracotta); }
.flow-panel { border: 1px solid var(--rule); background: rgba(255,251,247,.7); border-radius: 30px; padding: clamp(1.35rem, 5vw, 3rem); box-shadow: var(--shadow); }
.flow-panel h1 { font-size: clamp(2.35rem, 6vw, 4.6rem); line-height: .98; margin: .35rem 0 1rem; }
.flow-panel .lede { color: var(--ink-soft); line-height: 1.66; font-size: 1.04rem; max-width: 640px; }
.option-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; margin-top: 1.5rem; }
.option {
  border: 1px solid var(--rule);
  background: var(--cream);
  border-radius: 18px;
  padding: 1rem;
  min-height: 92px;
  display: flex;
  align-items: flex-end;
  text-align: left;
  color: var(--ink);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.option:hover { border-color: rgba(221,66,14,.7); transform: translateY(-1px); }
.option.selected { background: var(--terracotta-soft); border-color: var(--terracotta); color: var(--terracotta-dark); }
.controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.75rem; }
.segmented { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.segmented button { border: 1px solid var(--rule); border-radius: 999px; padding: .75rem 1rem; background: var(--cream); color: var(--ink-soft); }
.segmented button.selected { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.result-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.35rem; }
.reflection { margin-top: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.5rem; }
.share-copy { background: var(--paper); border: 1px dashed var(--muted); border-radius: 18px; padding: 1rem; color: var(--ink-soft); line-height: 1.55; margin-top: 1rem; }

.legal-page main, .plain-page main { width: min(760px, calc(100% - 2rem)); margin: 0 auto; padding: 4rem 0 6rem; }
.legal-page h1, .plain-page h1 { font-size: clamp(2.6rem, 7vw, 5rem); line-height: .95; margin: .4rem 0 1rem; }
.legal-page h2, .plain-page h2 { font-size: 1.45rem; margin-top: 2.2rem; }
.legal-page p, .legal-page li, .plain-page p { line-height: 1.72; color: var(--ink-soft); }
.legal-page a, .plain-page a { color: var(--terracotta); text-decoration: none; border-bottom: 1px dotted var(--terracotta); }

@media (max-width: 900px) {
  .hero-grid, .quote-band, .sample-grid { grid-template-columns: 1fr; }
  .phone-shell { margin: 1rem auto 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
  .nav { min-height: 64px; }
  .logo .sub { display: none; }
  .hero { padding-top: 3rem; }
  .hero h1 { font-size: clamp(3rem, 15vw, 5rem); }
  .phone-screen { min-height: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .option-grid { grid-template-columns: 1fr; }
  .controls { flex-direction: column-reverse; align-items: stretch; }
  .controls .btn { width: 100%; }
}
@media (max-width: 820px) {
  .logo .sub { display: none; }
  .site-header .nav { position: relative; }
  .nav-toggle { display: inline-flex; }
  .nav-links { position: absolute; top: calc(100% + .4rem); right: 0; min-width: 230px; flex-direction: column; align-items: stretch; gap: .15rem; background: var(--cream-2); border: 1px solid var(--rule); border-radius: 18px; padding: .6rem; box-shadow: var(--shadow); display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: .8rem 1rem; border-radius: 12px; }
  .nav-links a.nav-cta { margin-top: .3rem; justify-content: center; }
}
.btn:disabled, .button:disabled { opacity: .42; cursor: not-allowed; transform: none !important; box-shadow: none; }
