/* Look and feel follow the iOS app (DesignSystem/Theme.swift): pale sage ground, forest for actions,
   marigold when something came up, soft borderless cards, square buttons with a solid edge underneath.
   Atkinson Hyperlegible for everything; Newsreader Italic only for the parent's own words. */

@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 400; font-style: normal; font-display: swap; src: url("/AtkinsonHyperlegible-Regular.woff2") format("woff2"); }
@font-face { font-family: "Atkinson Hyperlegible"; font-weight: 700; font-style: normal; font-display: swap; src: url("/AtkinsonHyperlegible-Bold.woff2") format("woff2"); }
@font-face { font-family: "Newsreader"; font-weight: 400; font-style: italic; font-display: swap; src: url("/Newsreader-Italic.woff2") format("woff2"); }

:root {
  --bg: #EEF2EC;
  --card: #FBFCFA;
  --secondary: #E3E8E2;
  --secondary-edge: #A3AFA7;
  --ink: #1D2B24;
  --muted: #56655D;
  --outline: #7D8A83;
  --rail: #B9C8BF;
  --forest: #2F5D4A;
  --forest-fill: #2F5D4A;
  --forest-edge: #1E3D30;
  --forest-soft: #DBE7DF;
  --on-fill: #FFFFFF;
  --marigold: #D9922E;
  --marigold-text: #9A5F10;
  --marigold-soft: #FBF0DE;
  --red: #B5452F;
  --red-text: #A13A26;
  --shadow: rgb(29 43 36 / 0.06);
  --frame: #1D2B24;
  --font: "Atkinson Hyperlegible", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --quote: "Newsreader", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111814;
    --card: #1A2420;
    --secondary: #2A3631;
    --secondary-edge: #0B100D;
    --ink: #E4ECE7;
    --muted: #9DAEA5;
    --outline: #6B7A72;
    --rail: #3A4A42;
    --forest: #8FCBAD;
    --forest-fill: #3A7159;
    --forest-edge: #234636;
    --forest-soft: #20352B;
    --marigold-text: #E9B66C;
    --marigold-soft: #2E2416;
    --red-text: #F29A85;
    --shadow: rgb(0 0 0 / 0.3);
    --frame: #000000;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.55;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } }

.wrap { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }
main { max-width: 44rem; margin: 0 auto; padding: 1.5rem 1.25rem 3.5rem; }
main.home { max-width: 64rem; }

a { color: var(--forest); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--marigold); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -999px; top: 0; background: var(--card); padding: 0.5rem 1rem; }
.skip:focus { left: 1rem; top: 1rem; z-index: 10; }

h1, h2, h3 { font-weight: 700; line-height: 1.2; margin: 2rem 0 0.75rem; }
h1 { font-size: 2rem; margin-top: 1rem; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.0625rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: 0.4rem; }
.lede { font-size: 1.1875rem; color: var(--muted); }
.muted { color: var(--muted); }
small, .small { font-size: 0.9rem; }

/* header */
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1.25rem; padding-top: 1rem; padding-bottom: 0.5rem; }
.brand { font-weight: 700; font-size: 1.1875rem; color: var(--ink); text-decoration: none; display: inline-flex; align-items: center; gap: 0.6rem; }
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 22%; }
.site-header nav { display: flex; gap: 0.25rem 1.25rem; flex-wrap: wrap; }
.site-header nav a { font-weight: 700; text-decoration: none; padding: 0.35rem 0; }
.site-header nav a:hover { text-decoration: underline; }

/* square buttons: 4px corners, a solid 3px edge underneath that the face sinks onto when pressed */
.button {
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  min-height: 52px; padding: 0.7rem 1rem;
  font-weight: 700; line-height: 1.25; text-decoration: none;
  border-radius: 4px;
  background: var(--forest-fill); color: var(--on-fill);
  box-shadow: 0 3px 0 var(--forest-edge);
  margin-bottom: 3px;
}
.button.secondary { background: var(--secondary); color: var(--ink); box-shadow: 0 3px 0 var(--secondary-edge); }
.button:active { transform: translateY(3px); box-shadow: none; }
.buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; max-width: 26rem; margin: 1.5rem 0 0; }

/* pills and chips */
.pill { display: inline-block; font-size: 0.8125rem; font-weight: 700; line-height: 1.3; color: var(--forest); background: var(--forest-soft); border-radius: 999px; padding: 0.35rem 0.85rem; }
.pill.neutral { color: var(--muted); background: var(--secondary); }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; list-style: none; padding: 0; margin: 0; }
.chips li { margin: 0; background: var(--secondary); border-radius: 999px; padding: 0.3rem 0.85rem; font-size: 0.95rem; }

/* cards: soft, borderless, 22px corners */
.card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: 0 2px 10px var(--shadow);
  padding: 1.25rem;
  margin: 1.5rem 0;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card.concern, .note { background: var(--marigold-soft); }
.note { border-radius: 22px; padding: 1.1rem 1.25rem; margin: 1.5rem 0; box-shadow: 0 2px 10px var(--shadow); }
.note > :last-child { margin-bottom: 0; }
.card-head { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 1.0625rem; font-weight: 700; line-height: 1.3; margin: 0 0 0.75rem; }
.card-head svg { flex: none; width: 1.3rem; height: 1.3rem; margin-top: 0.05rem; }
.card-head.forest { color: var(--forest); }
.card-head.marigold { color: var(--marigold-text); }
h2.card-head { font-size: 1.25rem; }
h2.card-head svg { width: 1.5rem; height: 1.5rem; margin-top: 0; }
.card ul { padding-left: 1.2rem; }

/* the parent's own words */
.quote { border-left: 3px solid var(--outline); padding-left: 0.9rem; margin: 0 0 0.9rem; }
.quote .who { font-size: 0.875rem; color: var(--muted); margin: 0 0 0.15rem; }
.quote .words { font-family: var(--quote); font-style: italic; font-size: 1.1875rem; line-height: 1.35; margin: 0; }

/* home: hero */
.hero { display: grid; gap: 2.5rem; align-items: center; padding: 0.5rem 0 1rem; }
.hero .kicker { color: var(--muted); margin: 0.5rem 0 0.25rem; }
.hero h1 { font-size: 2.25rem; margin: 0 0 0.9rem; }
.hero .pill { margin-bottom: 1.1rem; }
.hero .lede { max-width: 32rem; }
@media (min-width: 52rem) {
  .hero { grid-template-columns: 1.15fr 0.85fr; gap: 3rem; padding-top: 2rem; }
  .hero h1 { font-size: 3.1rem; }
}

/* phone frame around an app screenshot */
.phone {
  margin: 0 auto; width: min(100%, 17rem);
  border: 9px solid var(--frame); border-radius: 44px; overflow: hidden;
  background: var(--frame);
  box-shadow: 0 18px 40px rgb(29 43 36 / 0.18);
}
.phone img { display: block; width: 100%; height: auto; border-radius: 35px; }
@media (min-width: 52rem) { .phone { width: 19rem; } }

.home section { margin: 3.5rem 0; }
.home section > h2:first-child, .home .split h2:first-child { margin-top: 0; }
.prose { max-width: 40rem; }
.split { display: grid; gap: 1.5rem 3rem; align-items: start; }
@media (min-width: 52rem) { .split { grid-template-columns: 1fr 1fr; } }

/* home: how it works, drawn like the Today timeline */
.timeline { list-style: none; padding: 1.4rem 1.25rem 0.2rem; margin: 0; }
.timeline li { position: relative; padding: 0 0 1.4rem 2.6rem; margin: 0; }
.timeline li::after { content: ""; position: absolute; left: 0.75rem; top: 1.85rem; bottom: 0.3rem; border-left: 2px dashed var(--rail); transform: translateX(-1px); }
.timeline li:last-child::after { display: none; }
.timeline .node { position: absolute; left: 0; top: 0.05rem; width: 1.5rem; height: 1.5rem; }
.timeline .node svg { display: block; width: 100%; height: 100%; }
.timeline h3 { font-size: 1.1875rem; margin: 0 0 0.2rem; }
.timeline p { color: var(--muted); margin: 0 0 0.35rem; }
.timeline .flag { color: var(--marigold-text); font-weight: 700; display: flex; align-items: center; gap: 0.5rem; }
.timeline .flag svg { width: 1.2rem; height: 1.2rem; flex: none; }

/* home: sample note, drawn like the app's call screen */
.sample { margin: 0; }
.sample .day { font-size: 1.75rem; font-weight: 700; line-height: 1.15; margin: 0 0 0.2rem; }
.sample .meta { color: var(--muted); margin: 0 0 1rem; }
.sample .card { margin: 0 0 1rem; }
.sample .mood { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; margin: 0 0 0.6rem; }
.sample .ack { display: flex; align-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.95rem; }
.sample .ack svg { width: 1.1rem; height: 1.1rem; flex: none; }
.sample .talked { font-size: 1.1875rem; font-weight: 700; margin: 1.25rem 0 0.6rem; }
.sample figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 1rem; }

/* home: price, drawn like the paywall */
.plans { display: grid; gap: 0.9rem; margin: 0 0 1.25rem; max-width: 34rem; }
.plan { display: flex; justify-content: space-between; align-items: center; gap: 1rem; background: var(--card); border: 1.5px solid var(--outline); border-radius: 8px; padding: 1rem 1.2rem; }
.plan.best { background: var(--forest-soft); border: 2.5px solid var(--forest-fill); }
.plan b { display: block; font-size: 1.1875rem; }
.plan span { display: block; color: var(--muted); }
.plan .cost { text-align: right; }
.plan .cost b { white-space: nowrap; }
.terms { font-weight: 700; max-width: 34rem; }

/* legal pages */
.legal h2 { border-top: 1px solid var(--rail); padding-top: 1.5rem; }
.toc { font-size: 1rem; }
.toc ol { padding-left: 1.3rem; margin: 0; }
.table-scroll { overflow-x: auto; margin: 0 0 1rem; background: var(--card); border-radius: 16px; }
table { border-collapse: collapse; width: 100%; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.75rem; border-bottom: 1px solid var(--secondary); }
tr:last-child td { border-bottom: 0; }
th { font-weight: 700; }

/* support questions: grouped rows like the app's settings lists */
details { background: var(--card); padding: 0.9rem 1.1rem; border-top: 1px solid var(--secondary); }
:not(details) + details { border-top: 0; border-top-left-radius: 16px; border-top-right-radius: 16px; }
details:has(+ :not(details)), details:last-child { border-bottom-left-radius: 16px; border-bottom-right-radius: 16px; margin-bottom: 1.5rem; }
summary { cursor: pointer; font-weight: 700; }
details[open] summary { margin-bottom: 0.6rem; }
details > :last-child { margin-bottom: 0; }

/* footer */
.site-footer { color: var(--muted); font-size: 0.9rem; padding: 2rem 0 2.5rem; border-top: 1px solid var(--rail); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem; margin-bottom: 0.8rem; }
.site-footer nav a { font-weight: 700; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }
.site-footer p { margin: 0; max-width: 44rem; }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* inline icons (colours from classes: the CSP blocks inline styles) */
.i-forest { fill: var(--forest-fill); }
.i-marigold { fill: var(--marigold-text); }
.i-muted { fill: var(--muted); }
.i-red { fill: none; stroke: var(--red-text); stroke-width: 2; }
.i-ring { fill: none; stroke: var(--forest); stroke-width: 2; stroke-dasharray: 3.2 3; }
.i-mark { fill: none; stroke: var(--on-fill); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.i-mark.alt { stroke: var(--card); }
.split > .card { margin: 0; }
@media (min-width: 52rem) { .home h2 { font-size: 1.6rem; } .home h2.card-head { font-size: 1.35rem; } }
