/* Life After Weed, option B: warm and friendly, professional.
   Figtree (OFL) for all text: a clean modern geometric sans with soft,
   open letterforms. Reads friendly without being rounded or cute. */

@font-face {
  font-family: "Figtree";
  src: url("fonts/Figtree-Variable.ttf") format("truetype");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #1F3FBF;
  --blue-deep: #18309A;
  --blue-tint: #E9EDFB;
  --blue-band: #CDD6F6;
  --paper: #F6F6F3;
  --white: #FFFFFF;
  --peach: #FBEADF;
  --peach-line: #F0D3C0;
  --red: #D8261C;
  --ink: #161B2E;
  --muted: #4B5167;
  --line: #E3E1DA;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-pill: 999px;
  --wrap: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; }
li { list-style: none; }

a { color: var(--blue); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--blue-deep); }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 40px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px;
  background: var(--blue); color: #fff; padding: 10px 16px; border-radius: 10px;
  z-index: 10;
}
.skip:focus { top: 16px; }

/* Header */
.site-header { padding: 22px 0; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.logo { display: block; line-height: 0; }
.logo img { width: 196px; height: auto; }

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  display: inline-block;
  padding: 9px 14px;
  border-radius: var(--radius-pill);
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
}
.nav a:hover { background: rgba(31, 63, 191, 0.07); color: var(--blue); }
.nav .nav-cta {
  margin-left: 8px;
  background: var(--blue-tint);
  color: var(--blue);
  font-weight: 650;
}
.nav .nav-cta:hover { background: var(--blue-band); color: var(--blue-deep); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 6fr 6fr;
  column-gap: 64px;
  row-gap: 36px;
  align-items: start;
  padding-top: 80px;
  padding-bottom: 72px;
}
.hero h1 { grid-column: 1 / -1; max-width: 1000px; }
.hero-text { max-width: 560px; }
.hero .signup { padding-top: 6px; }
h1 {
  font-size: clamp(2.6rem, 7vw, 6.1rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.02;
  color: var(--ink);
}
.lede {
  max-width: 560px;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Signup */
.signup { max-width: 640px; }
.signup label {
  display: block;
  font-weight: 650;
  font-size: 1rem;
  margin-bottom: 10px;
}
.field-row {
  display: flex;
  gap: 6px;
  padding: 6px;
  background: var(--white);
  border: 1.5px solid #D5D7E2;
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 2px rgba(22, 27, 46, 0.04), 0 8px 24px -12px rgba(31, 63, 191, 0.18);
  transition: border-color .15s;
}
.field-row:focus-within { border-color: var(--blue); }
.field-row input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 1.05rem;
  color: var(--ink);
  padding: 12px 18px;
  border-radius: var(--radius-pill);
}
.field-row input::placeholder { color: #6B7084; }
.field-row input:focus-visible { outline: 2px solid var(--blue); outline-offset: 0; }
.field-row button {
  flex: 0 0 auto;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-weight: 650;
  font-size: 1.02rem;
  color: #fff;
  background: var(--blue);
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  transition: background .15s;
}
.field-row button:hover { background: var(--blue-deep); }
.field-row button:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.fine {
  margin-top: 12px;
  text-wrap: pretty;
  font-size: 0.93rem;
  color: var(--muted);
  padding-left: 18px;
}

/* Panels */
.panel { border-radius: var(--radius-lg); }
.panel-warm { background: var(--white); border: 1px solid var(--line); }
.panel-blue { background: var(--blue-tint); }
.panel-sand { background: var(--peach); }

/* First month */
.month .panel { padding: 48px 48px 40px; }
.month-head {
  display: flex; justify-content: space-between; align-items: end; gap: 24px;
  margin-bottom: 32px;
}
.month-head h2 { font-size: 1.9rem; font-weight: 700; max-width: 560px; }
.month-note { color: var(--muted); font-size: 0.95rem; max-width: 300px; text-align: right; }

.chart {
  position: relative;
  margin: 0;
  height: 200px;
  padding-left: 64px;
}
.chart-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart .grid line { stroke: #E7E5DF; stroke-width: 1; vector-effect: non-scaling-stroke; stroke-dasharray: 3 5; }
.chart .band { fill: var(--blue-tint); }
.chart .line { fill: none; stroke: var(--blue); stroke-width: 2.5; stroke-linecap: round; }
.chart .base { stroke: #CFCDC5; stroke-width: 1; }
.chart-y {
  position: absolute; left: 0; top: 4px;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
  letter-spacing: 0.01em;
}
.chart-y-low { top: auto; bottom: 0; }
.chart-end {
  position: absolute; right: -10px; bottom: -26px;
  font-size: 0.8rem; font-weight: 600; color: var(--muted);
}
.dot-end {
  position: absolute; right: -7px; bottom: 9px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 6px rgba(31, 63, 191, 0.14);
}

.phases {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-left: 64px;
  margin-top: 18px;
  padding-right: 48px;
}
.phases li { padding: 0 24px 0 0; }
.when {
  display: inline-block;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue);
  margin-bottom: 6px;
}
.phases p { color: var(--ink); font-size: 1rem; line-height: 1.5; max-width: 240px; }

.anyday {
  display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap;
  margin-top: 36px;
  padding: 18px 24px;
  border-radius: var(--radius-md);
  background: var(--paper);
}
.anyday p { flex: 1 1 360px; }
.when-red { color: var(--ink); margin: 0; position: relative; padding-left: 18px; }
.when-red::before {
  content: ""; position: absolute; left: 0; top: 50%;
  width: 9px; height: 9px; margin-top: -4px; border-radius: 50%;
  background: var(--red);
}
.text-link { font-weight: 650; }

/* How we work */
.split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 24px;
}
.how h2 { font-size: 1.9rem; font-weight: 700; }
.btn-outline {
  display: inline-block;
  padding: 12px 22px;
  border: 1.5px solid var(--blue);
  border-radius: var(--radius-pill);
  font-weight: 650;
  text-decoration: none;
}
.btn-outline:hover { background: var(--blue); color: #fff; }

.how { padding: 44px 8px; }
.principles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
  margin-top: 8px;
}
.principles > div { padding: 22px 0; border-bottom: 1px solid var(--line); }
.principles > div:nth-last-child(-n+2) { border-bottom: 0; }
.principles dt { font-weight: 700; font-size: 1.08rem; }
.principles dd { margin-top: 4px; color: var(--muted); font-size: 0.98rem; }

/* Help now */
.help { margin-top: 24px; }
.help-inner {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 40px;
  padding: 44px;
}
.help-head h2 { font-size: 1.9rem; font-weight: 700; }
.help-head p { margin-top: 12px; color: #4A4340; max-width: 360px; }
.lines { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.line-group h3 {
  font-size: 0.95rem; font-weight: 700; letter-spacing: 0;
  padding-bottom: 10px; margin-bottom: 6px;
  border-bottom: 1px solid var(--peach-line);
}
.line-group p { padding: 8px 0; display: flex; flex-direction: column; }
.line-group a {
  font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em;
  color: var(--ink); text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.line-group a:hover { color: var(--blue); text-decoration: underline; }
.line-group span { font-size: 0.93rem; color: #4A4340; }

/* Closing */
.closing {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  padding-top: 96px; padding-bottom: 96px;
}
.closing h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 28px; }
.signup-compact { width: 100%; max-width: 560px; }
.signup-compact .fine { padding-left: 0; }

/* Inner pages (thanks, plan, about, privacy, sources, 404) */
.nav a[aria-current="page"] { color: var(--blue); }
.page { padding-top: 64px; padding-bottom: 88px; }
.page-head { max-width: 760px; }
.page-head h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.page-head .lede { margin-top: 18px; }
.updated { margin-top: 14px; font-size: 0.93rem; color: var(--muted); }

.prose { max-width: 700px; margin-top: 40px; }
.prose > p, .prose > ul { margin-top: 14px; }
.prose h2 { font-size: 1.5rem; font-weight: 700; margin-top: 48px; }
.prose h2:first-child { margin-top: 0; }

.bullets li { position: relative; padding-left: 22px; margin-top: 8px; }
.bullets li::before {
  content: ""; position: absolute; left: 4px; top: 0.68em;
  width: 7px; height: 7px; border-radius: 50%; background: var(--blue);
}

.btn {
  display: inline-block;
  padding: 15px 28px;
  border-radius: var(--radius-pill);
  background: var(--blue);
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
.btn:hover { background: var(--blue-deep); color: #fff; }
.download { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; margin-top: 32px; }
.fine-print { margin-top: 12px; font-size: 0.93rem; color: var(--muted); }

.note-panel { margin-top: 48px; max-width: 700px; padding: 36px 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.note-panel h2 { font-size: 1.5rem; font-weight: 700; }
.note-panel p { color: var(--muted); }
.note-panel .btn-outline { margin-top: 8px; }

/* /plan/ */
.plan-top { display: grid; grid-template-columns: 7fr 4fr; gap: 64px; align-items: start; }
.plan-thumb { display: block; border-radius: var(--radius-md); overflow: hidden; border: 1px solid var(--line); box-shadow: 0 12px 32px -18px rgba(22, 27, 46, 0.3); }
.plan-thumb img { display: block; width: 100%; height: auto; }
.minute { margin-top: 64px; padding: 44px 48px; }
.minute h2 { font-size: 1.9rem; font-weight: 700; }
.phases-plain { grid-template-columns: repeat(3, 1fr); margin: 24px 0 0; padding: 0; }
.minute-tips { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); columns: 2; column-gap: 40px; }
.minute-tips li { break-inside: avoid; margin: 0 0 10px; }
.help-page { margin-top: -64px; padding-bottom: 88px; }
.help-head .bullets li::before { background: var(--ink); }
.help-head .bullets { margin-top: 16px; }
.help-head .help-note { margin-top: 16px; font-weight: 600; color: var(--ink); max-width: none; }

/* /about/ */
.principles-stack { grid-template-columns: 1fr; margin-top: 12px; }
.principles-stack > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }

/* /sources/ */
.src-group { margin-top: 48px; }
.src-list { margin-top: 8px; }
.src-list li { padding: 16px 0; border-bottom: 1px solid var(--line); }
.src-list li:last-child { border-bottom: 0; }
.src-cite { line-height: 1.5; }
.src-link { margin-top: 4px; font-size: 0.93rem; overflow-wrap: anywhere; }
.src-use { margin-top: 4px; font-size: 0.93rem; color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0 36px; font-size: 0.93rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-row ul { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-row a { color: var(--ink); }

/* Tablet */
@media (max-width: 960px) {
  .plan-top { grid-template-columns: 1fr; gap: 40px; }
  .plan-thumb { max-width: 360px; }
  .hero { grid-template-columns: 1fr; }
  .split, .help-inner { grid-template-columns: 1fr; }
  .how { padding: 24px 4px 8px; }
}

/* Phone */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .wrap { padding: 0 16px; }
  .site-header { padding: 16px 0; }
  .logo img { width: 150px; }
  .nav li:not(:last-child) { display: none; }
  .nav .nav-cta { margin-left: 0; padding: 8px 14px; font-size: 0.9rem; }

  .hero { padding-top: 36px; padding-bottom: 40px; gap: 28px; }
  h1 { font-size: 2.6rem; }
  .lede { font-size: 1.1rem; margin-top: 16px; }

  .field-row { flex-direction: column; border-radius: 22px; gap: 4px; }
  .field-row input { padding: 14px 14px; }
  .field-row button { width: 100%; padding: 15px 20px; border-radius: 16px; }
  .fine { padding-left: 4px; }

  .month .panel { padding: 28px 20px 24px; border-radius: 22px; }
  .month-head { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 20px; }
  .month-head h2, .how h2, .help-head h2 { font-size: 1.5rem; }
  .month-note { text-align: left; }
  .chart { height: 120px; padding-left: 0; }
  .chart-y { display: none; }
  .chart-end { right: 0; bottom: -24px; }
  .phases { grid-template-columns: 1fr; margin-left: 0; margin-top: 28px; padding-right: 0; }
  .phases li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 92px 1fr; gap: 12px; }
  .phases .when { margin: 0; }
  .anyday { margin-top: 12px; padding: 16px; }

  .split { margin-top: 16px; gap: 8px; }
  .principles { grid-template-columns: 1fr; }
  .principles > div:nth-last-child(2) { border-bottom: 1px solid var(--line); }

  .help { margin-top: 16px; }
  .help-inner { padding: 28px 20px; gap: 24px; border-radius: 22px; }
  .lines { grid-template-columns: 1fr; gap: 20px; }

  .closing { padding-top: 64px; padding-bottom: 64px; }

  .page { padding-top: 36px; padding-bottom: 56px; }
  .page-head h1 { font-size: 2.4rem; }
  .prose { margin-top: 28px; }
  .prose h2 { font-size: 1.35rem; margin-top: 36px; }
  .note-panel { margin-top: 36px; padding: 28px 20px; border-radius: 22px; }
  .download .btn { width: 100%; text-align: center; }
  .minute { margin-top: 40px; padding: 28px 20px; border-radius: 22px; }
  .minute h2 { font-size: 1.5rem; }
  .phases-plain { grid-template-columns: 1fr; }
  .phases-plain li { grid-template-columns: 92px 1fr; }
  .minute-tips { columns: 1; }
  .help-page { margin-top: -40px; padding-bottom: 56px; }
}
