/* Annie · Unstuck: shared styles. Matches the workbook's design system. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("../fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Cormorant Garamond";
  src: url("../fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2");
  font-weight: 500; font-style: italic; font-display: swap;
}

:root {
  --paper: #FAF7F1;
  --oat: #F2ECE1;
  --oat-deep: #E6DDCD;
  --sage: #55654E;
  --sage-dark: #46543F;
  --sage-tint: #E7ECE2;
  --terracotta: #A9533B;
  --ink: #2A2D2E;
  --ink-soft: #4E5354;
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --sans: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gutter: 1.25rem;
  --measure: 34rem;
  --radius: 1rem;
  color-scheme: light;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.25rem;          /* 20px: large print for older eyes */
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--sage-dark); text-underline-offset: 0.18em; text-decoration-thickness: 1.5px; }

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
  font-variant-numeric: lining-nums;   /* Cormorant defaults to old-style figures */
}
h1 { font-size: clamp(2.6rem, 10vw, 4rem); }
h2 { font-size: clamp(2rem, 7vw, 2.75rem); }
h3 { font-size: 1.65rem; line-height: 1.15; }

p { margin: 0; text-wrap: pretty; }

.wrap { width: 100%; max-width: calc(var(--measure) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.stack > * + * { margin-top: 1.1rem; }

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

/* Header */
.site-header { padding: 1.1rem 0 0.4rem; }
.wordmark {
  font-family: var(--serif); font-style: italic; font-weight: 500;
  font-size: 1.9rem; line-height: 1; color: var(--ink); text-decoration: none;
}

/* Buttons */
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  width: 100%; min-height: 3.75rem; padding: 0.95rem 1.5rem;
  border: 0; border-radius: var(--radius);
  background: var(--sage); color: var(--paper);
  font: 700 1.15rem/1.2 var(--sans); text-align: center; text-decoration: none;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: background-color 120ms ease;
}
.btn:hover { background: var(--sage-dark); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { background: var(--oat-deep); color: var(--ink-soft); cursor: not-allowed; transform: none; }
.btn-light { background: var(--paper); color: var(--sage-dark); }
.btn-light:hover { background: var(--oat); }

.link-btn {
  background: none; border: 0; padding: 0.75rem 0.25rem; min-height: 3rem;
  font: 700 1.05rem/1.2 var(--sans); color: var(--sage-dark);
  text-decoration: underline; text-underline-offset: 0.2em; cursor: pointer;
}

/* The arch: Annie's frame. */
.arch {
  position: relative;
  isolation: isolate;
}
.arch::before {                  /* offset backing arch */
  content: ""; position: absolute; inset: 0.9rem -0.9rem -0.9rem 0.9rem; z-index: -1;
  border-radius: 100vmax 100vmax 0 0; background: var(--sage-tint);
}
.arch img, .arch .arch-fill {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  border-radius: 100vmax 100vmax 0 0;
}
.arch-caption { margin-top: 1.6rem; font-size: 1rem; color: var(--ink-soft); }

/* Safety line */
.care { color: var(--terracotta); }
.care strong { font-weight: 700; }

/* Footer */
.site-footer {
  margin-top: 4rem; padding: 2rem 0 3rem; border-top: 1px solid var(--oat-deep);
  font-size: 1rem; color: var(--ink-soft);
}
.site-footer p + p { margin-top: 0.6rem; }

/* ---------- Homepage ---------- */
.hero { padding: 0.6rem 0 0; }
.hero-figure { margin: 0; }
.hero .arch { max-width: 15.5rem; }   /* small enough that the button shows on a phone's first screen */
.hero .arch-caption { margin-top: 1.4rem; font-size: 0.95rem; }
.hero-text { margin-top: 1.5rem; }
.hero h1 { font-size: clamp(3.1rem, 14vw, 4.75rem); line-height: 0.95; }
.hero .lede { margin-top: 1rem; font-size: 1.4rem; line-height: 1.4; }
.hero .btn { margin-top: 1.6rem; }
.hero .small { margin-top: 0.8rem; font-size: 1.05rem; color: var(--ink-soft); }

.section { margin-top: 5rem; }
.section > .btn { margin-top: 2rem; }

.check-list { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: 1.1rem; }
.check-list li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1.1rem; align-items: center; }
.thumb {
  width: 5.5rem; aspect-ratio: 3 / 4; background: var(--oat);
  border-radius: 100vmax 100vmax 0.4rem 0.4rem; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center; padding: 0.6rem 0.4rem 0.3rem;
}
.thumb img { width: 100%; height: 100%; object-fit: contain; }
.check-list strong { display: block; font-family: var(--serif); font-size: 1.55rem; line-height: 1.1; font-weight: 600; }
.check-list span { display: block; color: var(--ink-soft); font-size: 1.1rem; margin-top: 0.15rem; }
.aside { margin-top: 2rem; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.65rem; line-height: 1.25; color: var(--sage-dark); }

.how-steps { list-style: none; padding: 0; margin: 1.8rem 0 0; counter-reset: how; }
.how-steps li { counter-increment: how; position: relative; padding-left: 3.4rem; }
.how-steps li + li { margin-top: 1.6rem; }
.how-steps li::before {
  content: counter(how); position: absolute; left: 0; top: -0.1rem;
  width: 2.4rem; height: 2.9rem; border-radius: 100vmax 100vmax 0.3rem 0.3rem;
  background: var(--sage); color: var(--paper);
  font: 600 1.6rem/3.1rem var(--serif); text-align: center; font-variant-numeric: lining-nums;
}
.how-steps h3 { font-size: 1.7rem; }
.how-steps p { margin-top: 0.3rem; color: var(--ink-soft); }

.letter { display: grid; gap: 2.2rem; }
.letter-photo { max-width: 11rem; }
.letter-text p { margin-top: 1rem; }
.signoff-inline { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.9rem; line-height: 1.15; color: var(--sage-dark); }
.signoff-inline span { display: block; font-size: 1.4rem; color: var(--ink-soft); margin-top: 0.2rem; }

.book-band { margin-top: 5rem; background: var(--sage); color: var(--paper); padding: 3.2rem 0 3.4rem; }
.book-band h2 { color: var(--paper); margin-top: 0.4rem; }
.book-band .soon { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 1.6rem; color: var(--sage-tint); }
.book-band p { color: #F4F1EA; }
.book-points { list-style: none; padding: 0; margin: 1.6rem 0 0; }
.book-points li { position: relative; padding-left: 1.7rem; color: #F4F1EA; }
.book-points li + li { margin-top: 0.7rem; }
.book-points li::before {
  content: ""; position: absolute; left: 0; top: 0.4em; width: 0.8rem; height: 1rem;
  border-radius: 100vmax 100vmax 0.1rem 0.1rem; background: var(--sage-tint);
}
.price-line { margin-top: 1.6rem; font-weight: 700; }
.book-band .btn { margin-top: 1.6rem; }

.faq details { border-bottom: 1px solid var(--oat-deep); }
.faq details:first-of-type { margin-top: 1.4rem; border-top: 1px solid var(--oat-deep); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 3.75rem; padding: 0.9rem 0; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 2.2rem; height: 2.2rem; border-radius: 50%;
  background: var(--oat); color: var(--sage-dark); font: 400 1.6rem/2.2rem var(--sans); text-align: center;
}
.faq details[open] summary::after { content: "\2212"; background: var(--sage-tint); }
.faq details p { padding-bottom: 1rem; }
.faq details p + p { margin-top: -0.2rem; }

@media (min-width: 900px) {
  :root { --measure: 64rem; }
  .hero { padding-top: 1.5rem; }
  .hero-grid { display: grid; grid-template-columns: 0.85fr 1fr; gap: 4.5rem; align-items: center; }
  .hero .arch { max-width: 26rem; }
  .hero-text { margin-top: 0; max-width: 30rem; }
  .hero .btn, .section > .btn, .book-band .btn { width: auto; min-width: 22rem; display: inline-flex; }
  .section > h2, .aside, .how-steps, .faq > *, .book-band .wrap > * { max-width: 40rem; }
  .check-list { grid-template-columns: 1fr 1fr; column-gap: 2.5rem; }
  .letter { grid-template-columns: 15rem minmax(0, 36rem); gap: 4rem; align-items: center; }
  .letter-photo { max-width: none; }
  .quiz, .prose { max-width: calc(34rem + 2 * var(--gutter)); }
}

/* ---------- The check (quiz) ---------- */
.quiz { padding-bottom: 2rem; }
.quiz [tabindex="-1"]:focus { outline: none; }

.progress { display: flex; align-items: center; gap: 0.9rem; margin: 0.8rem 0 1.6rem; }
.progress-arches { display: flex; gap: 0.4rem; }
.progress-arches span {
  width: 1.45rem; height: 1.85rem; border: 2px solid var(--sage);
  border-radius: 100vmax 100vmax 0.2rem 0.2rem; background: transparent;
}
.progress-arches span.done { background: var(--sage); }
.progress-arches span.now { background: var(--sage-tint); border-width: 3px; }
.progress-text { font-size: 1.05rem; color: var(--ink-soft); }

.intro .arch { max-width: 10rem; margin: 0.6rem 0 2rem; }
.intro .arch img { aspect-ratio: 4 / 4.6; object-position: 50% 20%; }
.figure {
  background: var(--oat); border-radius: 1.25rem; padding: 1rem 1rem 0.6rem; margin: 1.4rem 0 1.5rem;
}
.figure img { width: 100%; }

.steps { margin: 0; padding-left: 1.6rem; }
.steps li { padding-left: 0.3rem; }
.steps li + li { margin-top: 0.55rem; }
.steps li::marker { font-family: var(--serif); font-weight: 600; font-size: 1.35rem; color: var(--sage); font-variant-numeric: lining-nums; }

.units { display: inline-flex; margin-top: 1.4rem; border: 2px solid var(--sage); border-radius: 0.8rem; overflow: hidden; }
.units label { position: relative; }
.units input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.units span { display: block; padding: 0.45rem 1.1rem; font-size: 1.05rem; font-weight: 700; color: var(--sage-dark); }
.units input:checked + span { background: var(--sage); color: var(--paper); }
.units input:focus-visible + span { outline: 3px solid var(--terracotta); outline-offset: -3px; }

fieldset.question { border: 0; padding: 0; margin: 1.8rem 0 0; min-width: 0; }
fieldset.question legend { padding: 0; font-family: var(--serif); font-weight: 600; font-size: 1.9rem; line-height: 1.1; margin-bottom: 1rem; }

.options { display: grid; gap: 0.7rem; }
.option {
  position: relative; display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.9rem; align-items: start;
  padding: 1rem 1.1rem; min-height: 4rem;
  background: var(--oat); border: 2px solid transparent; border-radius: var(--radius);
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option .dot {
  width: 1.6rem; height: 1.6rem; margin-top: 0.05rem; border-radius: 50%;
  border: 2px solid var(--sage); background: var(--paper);
  display: grid; place-items: center;
}
.option .dot::after { content: ""; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: transparent; }
.option .label { display: block; font-weight: 400; line-height: 1.3; }
.option .label:has(+ .measure) { font-weight: 700; }   /* short labels with a measurement line get weight */
.option .measure { display: block; font-size: 1.05rem; color: var(--ink-soft); margin-top: 0.15rem; }
.option:has(input:checked) { background: var(--sage-tint); border-color: var(--sage); }
.option:has(input:checked) .dot { background: var(--sage); }
.option:has(input:checked) .dot::after { background: var(--paper); }
.option:has(input:focus-visible) { outline: 3px solid var(--terracotta); outline-offset: 2px; }
.option.is-checked { background: var(--sage-tint); border-color: var(--sage); }   /* fallback for old browsers */
.option.is-checked .dot { background: var(--sage); }
.option.is-checked .dot::after { background: var(--paper); }

.care-line { margin-top: 1.2rem; font-size: 1.05rem; }

.nav { display: flex; align-items: center; gap: 1rem; margin-top: 1.8rem; }
.nav .btn { flex: 1; }

/* Score */
.score-arch {
  position: relative; isolation: isolate; width: 13.5rem; margin: 0.6rem 0 2rem;
}
.score-arch::before {
  content: ""; position: absolute; inset: 0.75rem -0.75rem -0.75rem 0.75rem; z-index: -1;
  border-radius: 100vmax 100vmax 0 0; background: var(--sage-tint);
}
.score-arch .arch-fill {
  aspect-ratio: 4 / 5; border-radius: 100vmax 100vmax 0 0; background: var(--oat);
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; padding-bottom: 1.6rem;
}
.score-num { font-family: var(--serif); font-weight: 600; font-size: 7.5rem; line-height: 0.85; color: var(--sage-dark); font-variant-numeric: lining-nums; }
.score-of { font-size: 1.1rem; color: var(--ink-soft); margin-top: 0.5rem; }

.band-name { font-size: clamp(2.6rem, 11vw, 3.4rem); }
.verdict { margin-top: 0.9rem; }

.breakdown { list-style: none; padding: 0; margin: 2rem 0 0; border-top: 1px solid var(--oat-deep); }
.breakdown li {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem 0; border-bottom: 1px solid var(--oat-deep);
}
.breakdown .name { font-weight: 700; }
.breakdown .name em { font-style: normal; font-weight: 400; color: var(--terracotta); font-size: 1rem; margin-left: 0.4rem; }
.pips { display: flex; gap: 0.3rem; }
.pips i {
  width: 0.95rem; height: 1.2rem; border: 2px solid var(--sage);
  border-radius: 100vmax 100vmax 0.15rem 0.15rem;
}
.pips i.on { background: var(--sage); }

.stiffest { margin-top: 2rem; }
.stiffest h2 { font-size: 2rem; }
.stiffest p { margin-top: 0.7rem; }

.email-card { margin-top: 2.4rem; background: var(--oat); border-radius: 1.25rem; padding: 1.6rem 1.25rem 1.5rem; }
.email-card h2 { font-size: 2.1rem; }
.email-card > p { margin-top: 0.7rem; }
.email-card form { margin-top: 1.3rem; }
.field-label { display: block; font-weight: 700; margin-bottom: 0.4rem; }
.field {
  width: 100%; min-height: 3.75rem; padding: 0.8rem 1rem;
  font: 400 1.25rem/1.3 var(--sans); color: var(--ink);
  background: #fff; border: 2px solid #B9B1A2; border-radius: 0.8rem;
}
.field:focus { border-color: var(--sage); outline: 3px solid var(--sage-tint); outline-offset: 0; }
.field[aria-invalid="true"] { border-color: var(--terracotta); }
.email-card .btn { margin-top: 0.9rem; }
.form-error { margin-top: 0.7rem; color: var(--terracotta); font-weight: 700; font-size: 1.05rem; }
.consent { margin-top: 0.9rem; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.45; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Plan */
.moves { list-style: none; padding: 0; margin: 2rem 0 0; counter-reset: move; }
.moves > li { counter-increment: move; }
.moves > li + li { margin-top: 2.2rem; }
.move-head { display: flex; align-items: baseline; gap: 0.7rem; }
.move-head::before {
  content: counter(move); font-family: var(--serif); font-weight: 600; font-size: 2.2rem; line-height: 1; color: var(--sage);
  font-variant-numeric: lining-nums;
}
.move-head h2 { font-size: 1.8rem; line-height: 1.1; }
.moves .figure { margin: 0.9rem 0 0.9rem; }
.dose { display: inline-block; margin-top: 0.6rem; padding: 0.2rem 0.75rem; background: var(--sage-tint); border-radius: 0.5rem; font-weight: 700; font-size: 1.05rem; color: var(--sage-dark); }

.study { margin-top: 2.2rem; padding: 1.2rem 1.25rem; border-left: 3px solid var(--sage); background: var(--sage-tint); border-radius: 0 0.8rem 0.8rem 0; font-size: 1.1rem; }
.study cite { display: block; margin-top: 0.5rem; font-style: normal; font-size: 0.95rem; color: var(--ink-soft); }

.signoff { margin-top: 2.4rem; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 2rem; line-height: 1.15; color: var(--sage-dark); }
.signoff span { display: block; font-size: 1.5rem; color: var(--ink-soft); margin-top: 0.3rem; }

.plan-book { margin-top: 3rem; background: var(--sage); color: var(--paper); border-radius: 1.25rem; padding: 1.8rem 1.25rem; }
.plan-book h2 { color: var(--paper); font-size: 2.2rem; }
.plan-book p { margin-top: 0.8rem; color: #F4F1EA; }
.plan-book .btn { margin-top: 1.4rem; }
.plan-book .fine { font-size: 1rem; color: var(--sage-tint); }

.restart { margin-top: 2rem; }

/* Plain text pages */
.prose { padding-top: 1rem; }
.prose h1 { font-size: clamp(2.4rem, 9vw, 3.2rem); }
.prose h2 { font-size: 1.8rem; margin-top: 2.2rem; }
.prose p, .prose ul { margin-top: 0.9rem; }
.prose ul { padding-left: 1.3rem; }
.prose li + li { margin-top: 0.4rem; }

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

/* Additions: reassurance under the start button */
.reassure { margin-top: 0.8rem; font-size: 1.05rem; color: var(--ink-soft); }
.consent strong { color: var(--ink); }
