/* ==========================================================================
   Hearth: sayhearth.com
   A fork of steady-site's system: the same paper, ink, Georgia, named-line grid,
   theme toggle and rise motion, with Hearth's sage accent. The tokens are spec section 6,
   plus the -ink shades from the design board (design/index.html :root) for small
   text on paper. No webfonts and no build step; the CSP allows this origin only.
   Order: tokens, base, type, the spread, header, buttons and lists, footer, legal
   pages, motion and material, print. Task 4 appends the landing page and Task 7
   the invite page.
   ========================================================================== */

:root {
  /* surfaces */
  --paper:       #f5f0e8;
  --surface:     #fbf7f0;
  --sunk:        #efe8dc;
  /* ink */
  --ink:         #2a2520;
  --ink-soft:    #5a5147;
  --muted:       #6f665a;
  --muted-line:  #8b8275;
  /* lines */
  --line:        #e2dacb;
  --line-strong: #d4c8b3;
  /* sage */
  --accent:      #4e6b4b;
  --accent-ink:  #3f5a3d;
  --on-accent:   #ffffff;
  --accent-soft: #dfe6d5;
  /* over budget (terracotta, a nod to Steady) and the pot (mustard) */
  --over:        #b3583a;
  --over-soft:   #f3dfd5;
  --pot:         #a07a2c;
  --pot-soft:    #f1e6cc;
  /* chrome */
  --glow:        rgba(78, 107, 75, 0.38);
  --paper-0:     rgba(245, 240, 232, 0);
  --header-bg:   rgba(245, 240, 232, 0.82);
  --shadow-card: 0 2px 6px rgba(42, 37, 32, 0.05);
  --shadow-lift: 0 12px 32px -12px rgba(42, 37, 32, 0.22);

  /* shape (spec section 6: 14 to 16 for cards, 999 for pills) */
  --r-sm: 8px; --r-md: 14px; --r-lg: 16px; --r-2xl: 24px; --r-full: 999px;

  /* rhythm */
  --measure: 56ch;
  --text-col: 660px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-gap: clamp(56px, 8vw, 104px);
  --section-gap-major: clamp(76px, 11vw, 146px);
  --head-gap: 18px;

  /* the spread: rail | read | hang */
  --rail: 152px;
  --read: 620px;
  --hang: 300px;
  --col-gap: 32px;
  --h1-size: 6rem;

  /* type */
  --serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;

  /* motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);

  color-scheme: light;
}

/* Dark applies when the OS says so and the reader has not picked light, or when the
   reader has picked dark. The two blocks must stay identical (style.test.mjs). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #1c1814;
    --surface:     #25201b;
    --sunk:        #171310;
    --ink:         #f0e8db;
    --ink-soft:    #c4b8a4;
    --muted:       #9a9080;
    --muted-line:  #8a8071;
    --line:        #3a332c;
    --line-strong: #4a4038;
    --accent:      #9bb88f;
    --accent-ink:  #b5cfa9;
    --on-accent:   #1c1814;
    --accent-soft: #2c3a2b;
    --over:        #e0906f;
    --over-soft:   #3d2820;
    --pot:         #d8b56a;
    --pot-soft:    #3a3120;
    --glow:        rgba(155, 184, 143, 0.30);
    --paper-0:     rgba(28, 24, 20, 0);
    --header-bg:   rgba(28, 24, 20, 0.82);
    --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.32);
    --shadow-lift: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --paper:       #1c1814;
  --surface:     #25201b;
  --sunk:        #171310;
  --ink:         #f0e8db;
  --ink-soft:    #c4b8a4;
  --muted:       #9a9080;
  --muted-line:  #8a8071;
  --line:        #3a332c;
  --line-strong: #4a4038;
  --accent:      #9bb88f;
  --accent-ink:  #b5cfa9;
  --on-accent:   #1c1814;
  --accent-soft: #2c3a2b;
  --over:        #e0906f;
  --over-soft:   #3d2820;
  --pot:         #d8b56a;
  --pot-soft:    #3a3120;
  --glow:        rgba(155, 184, 143, 0.30);
  --paper-0:     rgba(28, 24, 20, 0);
  --header-bg:   rgba(28, 24, 20, 0.82);
  --shadow-card: 0 2px 6px rgba(0, 0, 0, 0.32);
  --shadow-lift: 0 12px 32px -12px rgba(0, 0, 0, 0.55);
  color-scheme: dark;
}

/* ---------- base ---------- */

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--accent-ink); text-underline-offset: 0.18em; }
a:hover { color: var(--accent); }

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

::selection { background: var(--accent-soft); color: var(--ink); }

/* the join page toggles [hidden] on elements that also set display */
[hidden] { display: none !important; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
  font-size: 0.9em;
  background: var(--sunk);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0.08em 0.34em;
}

/* fixed, not absolute: an absolute skip link lands off-screen once the page has scrolled */
.skip {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  border-radius: 0 0 var(--r-sm) 0;
}
.skip:focus { left: 0; }

/* visually hidden, still read by screen readers */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ---------- type ---------- */

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.2rem, 1rem + 5.4vw, 4.5rem); line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.25rem); line-height: 1.2; }
h3 { font-size: 1.125rem; line-height: 1.3; }

@media (min-width: 760px) {
  h1 { line-height: 1.04; }
  h2 { line-height: 1.14; }
}

p { margin: 0 0 1.05em; color: var(--ink-soft); max-width: var(--measure); }

.lede {
  font-size: clamp(1.0625rem, 1rem + 0.45vw, 1.3125rem);
  line-height: 1.58;
  color: var(--ink-soft);
  max-width: 46ch;
}

.muted { color: var(--muted); font-size: 0.8125rem; }

/* spec section 6: tracked uppercase, 11px / 600 / 0.14em, muted */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
}
.eyebrow--accent { color: var(--accent-ink); }

.sub-italic {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.0625rem, 0.95rem + 0.6vw, 1.375rem);
  line-height: 1.45;
  color: var(--accent-ink);
  max-width: 36ch;
}

.fine { font-size: 0.75rem; line-height: 1.5; color: var(--muted); margin: 14px 0 0; max-width: 62ch; }

/* ---------- the spread: one named-line grid for every section, the header and the footer ---------- */

section { padding-block: calc(var(--section-gap) / 2); }
.section--major { padding-block: calc(var(--section-gap-major) / 2); }

/* bleeds need the page to clip: clip, not hidden, or the sticky header stops sticking */
main > section { position: relative; overflow-x: clip; }

.spread,
header.site .bar,
.foot-top,
.foot-base {
  display: grid;
  column-gap: var(--col-gap);
  width: 100%;
  max-width: 2000px;
  margin-inline: auto;
  grid-template-columns:
    [full-start] minmax(var(--gutter), 1fr)
    [rail-start] var(--rail)
    [read-start] minmax(0, var(--read))
    [read-end]   var(--hang)
    [hang-end]   minmax(var(--gutter), 1fr) [full-end];
}

/* anything not placed explicitly lands in the readable column */
.spread > *, .foot-top > *, .foot-base > * { grid-column: read-start / read-end; }

@media (max-width: 1279px) { :root { --rail: 88px; --read: 520px; --hang: 200px; --col-gap: 22px; --h1-size: 5rem; } }
@media (max-width: 1023px) { :root { --rail: 72px; --read: 470px; --hang: 150px; --col-gap: 18px; --h1-size: 4rem; } }

/* Phones: the rail and the hang collapse to zero width but keep their names, so no
   placement needs a phone override. */
@media (max-width: 899px) {
  :root { --h1-size: clamp(2.5rem, 1rem + 6.4vw, 3.5rem); }
  .spread,
  header.site .bar,
  .foot-top,
  .foot-base {
    column-gap: 0;
    grid-template-columns:
      [full-start] var(--gutter)
      [rail-start] 0
      [read-start] minmax(0, 1fr)
      [read-end]   0
      [hang-end]   var(--gutter) [full-end];
  }
}

.wrap-text {
  width: 100%;
  max-width: calc(var(--text-col) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* the rail mark: an italic numeral over a tiny label, with a hairline that runs out through the left trim */
.mark {
  grid-column: rail-start / read-start;
  align-self: start;
  position: relative;
  margin: 0;
  max-width: none;
  padding-top: 4px;
  font-family: var(--sans);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--muted);
}

.mark-n {
  display: block;
  margin-bottom: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--accent-ink);
}

.mark::before {
  content: "";
  position: absolute;
  right: calc(100% + 18px);
  top: 2.9em;
  width: 60vw;
  height: 1px;
  background: var(--line-strong);
}

/* the 88 px and 72 px rails: smaller, tighter labels that wrap between words, never inside one */
@media (max-width: 1279px) {
  .mark { font-size: 0.5rem; letter-spacing: 0.12em; }
  .mark-n { font-size: 1.25rem; }
}

@media (max-width: 899px) {
  .mark { grid-column: read-start / read-end; font-size: 0.625rem; letter-spacing: 0.2em; }
  .mark-n { font-size: 1.5rem; }
  .mark::before { right: auto; left: calc(var(--gutter) * -1); width: 40vw; }
}

/* ---------- header ---------- */

header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms linear;
}

/* once the page has moved, the header is a solid edge rather than a pane things swim under */
body.scrolled header.site { background: var(--paper); border-bottom-color: var(--line); }

header.site .bar { padding: 6px 0; align-items: center; }

header.site .brand {
  grid-column: rail-start / read-end;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  font-family: var(--serif);
  font-size: 1.125rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  flex: none;
  box-shadow: 0 1px 3px rgba(42, 37, 32, 0.18);
}

header.site nav {
  grid-column: read-end / hang-end;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.4vw, 26px);
}

/* 14px text in a 44px target */
header.site nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.875rem;
}
header.site nav a:hover { color: var(--accent-ink); }
header.site nav a[aria-current="page"] { color: var(--ink); }

@media (max-width: 899px) {
  header.site .bar { display: flex; justify-content: space-between; padding: 4px var(--gutter); }
}

/* a landscape phone should not spend a sixth of its height on chrome */
@media (max-height: 480px) {
  header.site { position: static; }
}

/* The theme toggle follows the phone until the reader picks, like the app's own
   system | light | dark setting. A 44px target around a 36px ring. */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: var(--r-full);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.theme-toggle::before {
  content: "";
  grid-area: 1 / 1;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  transition: border-color 200ms linear, background-color 200ms linear;
}
.theme-toggle svg { grid-area: 1 / 1; width: 17px; height: 17px; display: block; }
.theme-toggle:hover { color: var(--accent-ink); }
.theme-toggle:hover::before { border-color: var(--line-strong); background: var(--surface); }

/* one icon at a time: the theme the button would switch to */
.theme-toggle .to-light { display: none; }
:root[data-theme="dark"] .theme-toggle .to-dark { display: none; }
:root[data-theme="dark"] .theme-toggle .to-light { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .to-dark { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .to-light { display: block; }
}

/* ---------- buttons and lists ---------- */

/* the primary call to action: sage, with the sage glow spec section 6 allows under it */
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 24px;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-full);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  box-shadow: 0 12px 28px -12px var(--glow);
  transition: transform 200ms var(--ease), background-color 200ms linear;
}
.cta:hover { background: var(--accent-ink); color: var(--on-accent); transform: translateY(-1px); }
.cta:active { transform: none; }

.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 32px; }
.cta-note { font-size: 0.8125rem; color: var(--muted); margin: 0; max-width: none; }

ul.marks { list-style: none; margin: 0; padding: 0; }

ul.marks li {
  position: relative;
  padding: 13px 0 13px 26px;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 0.9375rem;
  line-height: 1.58;
}
ul.marks li:last-child { border-bottom: 1px solid var(--line); }

ul.marks li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 22px;
  width: 7px;
  height: 7px;
  border-radius: var(--r-full);
  background: var(--accent);
}

/* "isn't" and "never" read as absence: hollow marks */
ul.marks.hollow li::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted-line); }

/* ---------- footer: a colophon, not a link strip ---------- */

footer.site { padding: 0 0 52px; color: var(--muted); font-size: 0.8125rem; }

.foot-inner {
  grid-column: rail-start / hang-end;
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr;
  gap: clamp(32px, 5vw, 72px);
  padding-block: clamp(48px, 6vw, 80px) clamp(32px, 4vw, 48px);
}

.foot-word {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.3rem + 1.9vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 18px;
}

.foot-desc { margin: 0 0 22px; max-width: 32ch; font-size: 0.9375rem; line-height: 1.62; color: var(--ink-soft); }

.foot-mail {
  display: inline-block;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 3px;
}
.foot-mail:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }

.foot-col { display: flex; flex-direction: column; align-items: flex-start; }
.foot-col .eyebrow { margin-bottom: 8px; }
.foot-col a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.9375rem;
}
.foot-col a:hover { color: var(--accent-ink); }

/* the hairline spans the content block, not the viewport: an absolutely positioned
   child of a grid takes its grid area as the containing block */
.foot-base { position: relative; padding-top: 26px; }
.foot-base::before {
  content: "";
  grid-column: rail-start / hang-end;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line);
}
.foot-base .colophon { grid-column: rail-start / read-end; margin: 0; max-width: none; color: var(--muted); font-size: 0.8125rem; }
.foot-base .built {
  grid-column: read-end / hang-end;
  justify-self: end;
  text-align: right;
  margin: 0;
  max-width: none;
  color: var(--muted);
  font-size: 0.8125rem;
}
.foot-base a { color: var(--ink-soft); text-decoration: none; border-bottom: 1px solid var(--line-strong); padding-bottom: 1px; }
.foot-base a:hover { color: var(--accent-ink); border-bottom-color: var(--accent); }

@media (max-width: 899px) {
  .foot-inner { grid-template-columns: 1fr 1fr; gap: 36px 24px; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-base .colophon,
  .foot-base .built { grid-column: read-start / read-end; justify-self: start; text-align: left; }
  .foot-base .built { margin-top: 10px; }
}

/* the two link columns sit side by side down to the narrowest phones */
@media (max-width: 359px) {
  .foot-inner { grid-template-columns: 1fr; }
}

/* ---------- legal and support pages ---------- */

/* the measure lives on the container, not on p, so lists run no wider than paragraphs */
.legal {
  max-width: calc(var(--text-col) + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(40px, 7vw, 72px) var(--gutter) var(--section-gap);
  font-size: 0.9375rem;
}
.legal h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); margin-bottom: 20px; }
.legal h2 { font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem); margin-top: 48px; margin-bottom: 10px; }
.legal h3 { margin-top: 28px; margin-bottom: 8px; }
.legal p,
.legal li,
.legal dd { font-size: 0.9375rem; line-height: 1.7; color: var(--ink-soft); max-width: none; }
.legal ul,
.legal ol { padding-left: 22px; }
.legal li { margin-bottom: 8px; }
.legal .lede { font-size: 1.0625rem; color: var(--ink); max-width: none; }
.legal .updated {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 28px;
}

/* in-page wayfinding for the long documents */
.toc { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 20px 0; margin: 32px 0 8px; }
.toc h2 {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
}
.toc ol { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 32px; }
.toc li { margin-bottom: 6px; break-inside: avoid; }
.toc a { color: var(--ink-soft); text-decoration: none; font-size: 0.875rem; }
.toc a:hover { color: var(--accent-ink); text-decoration: underline; }
@media (max-width: 560px) { .toc ol { columns: 1; } }

/* support.html: each question is a real h3 */
.legal .faq-q {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin-top: 30px;
  margin-bottom: 6px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

/* privacy.html: each vendor, what it does, and what it does not receive */
.legal .vendors dt { margin-top: 22px; font-weight: 600; color: var(--ink); }
.legal .vendors dd { margin: 6px 0 0; }
.legal .vendors dd p { margin: 0 0 6px; }
.legal .vendors .not { color: var(--ink); }

hr { border: 0; border-top: 1px solid var(--line); margin: 40px 0; }

/* ==========================================================================
   MOTION AND MATERIAL
   Nothing a reader came for is hidden behind an animation. Motion is armed by
   .js-motion, which site.js adds only once it can also remove it. So a failed or
   blocked script, an old browser, or Reduce Motion all get the complete page.
   Only transform and opacity animate (spec section 6: a 520 ms fade and a 12 px rise).
   ========================================================================== */

/* paper grain: flat cream fields band on an OLED phone; a faint turbulence gives the paper a tooth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] body::before { opacity: 0.05; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) body::before { opacity: 0.05; } }

.js-motion .rise { opacity: 0; transform: translateY(12px); }
.js-motion .rise.in { opacity: 1; transform: none; transition: opacity 520ms var(--ease), transform 520ms var(--ease); }

/* list rows and strip tiles come in on a short stagger; site.js sets --i per row */
.js-motion ul.marks li, .js-motion .strip li { opacity: 0; transform: translateY(10px); }
.js-motion ul.marks li.in, .js-motion .strip li.in {
  opacity: 1;
  transform: none;
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  transition-delay: calc(var(--i, 0) * 55ms);
}

/* the rail mark's hairline draws out through the trim */
.js-motion .mark.rise::before { transform: scaleX(0); transform-origin: right center; }
.js-motion .mark.rise.in::before { transform: scaleX(1); transition: transform 700ms var(--ease) 140ms; }
@media (max-width: 899px) { .js-motion .mark.rise::before { transform-origin: left center; } }

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

/* ---------- print: the legal pages get saved as PDFs, and a dark reader would print pale text ---------- */

@media print {
  :root, :root[data-theme], :root:not([data-theme="light"]) {
    --paper: #ffffff; --surface: #ffffff; --sunk: #ffffff;
    --ink: #000000; --ink-soft: #1a1a1a; --muted: #444444;
    --line: #cccccc; --accent: #000000; --accent-ink: #000000;
    --shadow-card: none; --shadow-lift: none;
    color-scheme: light;
  }
  header.site, footer.site, .skip, .toc, body::before { display: none; }
  body { background: #ffffff; color: #000000; font-size: 11pt; }
  .legal { max-width: none; padding: 0; }
  .legal h2, .legal h3, .legal .faq-q { break-after: avoid; }
  a { color: #000000; text-decoration: underline; }
}

/* ==========================================================================
   LANDING (index.html)
   ========================================================================== */

/* ---------- the section pattern: rail mark, heading copy, then the body ---------- */

.sec .spread { row-gap: clamp(26px, 3.4vw, 44px); }
.sec .mark { grid-row: 1; }
.sec .sec-copy { grid-column: read-start / hang-end; grid-row: 1; }
.sec .sec-body { grid-column: rail-start / hang-end; grid-row: 2; }
.sec-copy h2 + .lede { margin-top: 20px; }
.sec-copy .lede { margin-bottom: 0; max-width: 52ch; }

/* on a phone the rail is gone, so the mark and the heading would share a cell */
@media (max-width: 899px) {
  .sec .sec-copy { grid-column: read-start / read-end; grid-row: 2; }
  .sec .sec-body { grid-row: 3; }
}

/* ---------- hero: the typographic event, with the product's own answer beside it ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  padding-top: clamp(28px, 6vw, 96px);
  padding-bottom: calc(var(--section-gap-major) / 2);
}

/* the lamp: a soft sage light behind the headline */
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: -14%;
  left: -10%;
  width: min(900px, 90vw);
  height: min(900px, 90vw);
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 62%);
  opacity: 0.6;
}
:root[data-theme="dark"] .hero::before { opacity: 0.45; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero::before { opacity: 0.45; } }

.hero-grid { row-gap: clamp(22px, 3vw, 36px); align-items: start; }
.hero h1 {
  grid-column: rail-start / read-end;
  grid-row: 1;
  font-size: var(--h1-size);
  line-height: 0.98;
  letter-spacing: -0.035em;
}
.hero-copy { grid-column: read-start / read-end; grid-row: 2; }
.hero-copy .lede { margin: 0; }
.hero-copy .sub-italic { margin: 18px 0 0; }
.hero .specimen {
  grid-column: read-end / full-end;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  width: min(100%, 320px);
}
@media (max-width: 1023px) {
  .hero .specimen { grid-column: read-start / read-end; grid-row: 3; }
}

/* the hero plays on load, in one pass */
.js-motion .hero h1.in { transition-delay: 40ms; }
.js-motion .hero-copy .rise:nth-child(1).in { transition-delay: 150ms; }
.js-motion .hero-copy .rise:nth-child(2).in { transition-delay: 230ms; }
.js-motion .hero-copy .rise:nth-child(3).in { transition-delay: 310ms; }
.js-motion .hero .specimen.in { transition-delay: 380ms; }

/* ---------- specimens: the app's own screens rebuilt as plain HTML. They are samples,
   not controls, so nothing in them is focusable or hovers. ---------- */

.specimen {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-lift);
}
.specimen p { margin: 0; max-width: none; }
.spec-said { font-family: var(--serif); font-style: italic; font-size: 0.8125rem; color: var(--muted); }
.spec-card { display: grid; gap: 4px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.spec-amt { font-family: var(--serif); font-size: 1.375rem; line-height: 1.1; color: var(--ink); }
.spec-amt span { color: var(--accent); }
.spec-meta { font-size: 0.75rem; line-height: 1.4; color: var(--ink-soft); }
.spec-left { font-family: var(--serif); font-size: 0.875rem; color: var(--ink-soft); }
.spec-toast {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  padding: 9px 12px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
  font-size: 0.8125rem;
}
.spec-toast b { color: var(--paper); }

.specimen--join { gap: 12px; }
.spec-title { font-family: var(--serif); font-size: 1.5rem; line-height: 1.15; color: var(--ink); }
.spec-rows { list-style: none; margin: 0; padding: 4px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); }
.spec-rows li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.spec-rows li:first-child { border-top: 0; }
.spec-rows .is-on .av { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.av {
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-full);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.8125rem;
  font-weight: 600;
}
.who { display: grid; font-size: 0.875rem; line-height: 1.3; color: var(--ink); }
.who small { font-size: 0.75rem; color: var(--muted); }
.spec-button {
  padding: 11px 16px;
  text-align: center;
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--r-full);
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ---------- why talking beats typing (design section 0) ---------- */

.vs { display: flex; flex-direction: column; gap: clamp(36px, 5vw, 56px); }
.vs-row { display: grid; grid-template-columns: minmax(0, 240px) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 899px) { .vs-row { grid-template-columns: minmax(0, 1fr); gap: 18px; } }
.vs-label h3 { font-size: 1.5rem; line-height: 1.2; margin: 6px 0 12px; }
.vs-stat {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.vs-stat small { font-family: var(--sans); font-size: 0.875rem; letter-spacing: 0; color: var(--muted); }
.vs-note { margin: 0; font-size: 0.875rem; color: var(--ink-soft); }

/* one tile per screen; one dot per tap, terracotta for the typing app, one sage bar for the hold */
.strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.strip li {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 14px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.strip p { margin: 0; max-width: none; font-size: 0.8125rem; line-height: 1.45; color: var(--ink-soft); }
.strip b { font-weight: 600; color: var(--ink); }
.strip--hearth li { background: var(--accent-soft); border-color: transparent; }
.dots { display: flex; flex-wrap: wrap; gap: 4px; min-height: 10px; }
.dot { width: 10px; height: 10px; border-radius: var(--r-full); background: var(--over); }
.dot--hold { width: 34px; background: var(--accent); }

.cmp-wrap { padding: 4px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.cmp { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 0.875rem; }
.cmp thead td { width: 26%; }
.cmp thead th {
  padding: 12px 10px;
  text-align: left;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cmp tbody th,
.cmp tbody td { padding: 13px 10px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; line-height: 1.45; color: var(--ink-soft); }
.cmp tbody th { font-weight: 600; color: var(--ink); }
.cmp .hh { font-family: var(--serif); font-size: 0.96875rem; color: var(--ink); }
.cmp thead .hh { font-family: var(--sans); font-size: 0.6875rem; color: var(--accent-ink); }
/* three narrow columns on a phone rather than a table that scrolls sideways */
@media (max-width: 599px) {
  .cmp-wrap { padding: 2px 6px; }
  .cmp { font-size: 0.8125rem; }
  .cmp tbody th,
  .cmp tbody td { padding: 11px 6px; }
  .cmp .hh { font-size: 0.875rem; }
}

/* ---------- how it works ---------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
@media (max-width: 899px) { .steps { grid-template-columns: minmax(0, 1fr); } }
.steps li { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--line); }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 2rem;
  line-height: 1;
  color: var(--accent-ink);
}
.steps h3 { font-size: 1.3125rem; margin-bottom: 10px; }
.steps p { margin: 0; font-size: 0.9375rem; }

/* ---------- tenets: the asymmetry states the hierarchy ---------- */

.two-col { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(40px, 6vw, 72px); }
.tenets .two-col { grid-column: rail-start / hang-end; }
@media (min-width: 860px) {
  .tenets .two-col { grid-template-columns: 0.78fr 1fr; column-gap: clamp(48px, 6vw, 88px); align-items: start; }
  .tenets .col--isnt { margin-top: 76px; }
}
.col h2 { margin-bottom: 24px; }
.tenets .col--isnt h2 { color: var(--ink-soft); }

/* ---------- family ---------- */

.family-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: clamp(32px, 5vw, 72px); align-items: start; }
@media (max-width: 899px) {
  .family-grid { grid-template-columns: minmax(0, 1fr); }
  .specimen--join { max-width: 340px; }
}

/* ---------- pricing (design frame 14) ---------- */

.price-card {
  max-width: 760px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
  box-shadow: var(--shadow-card);
}
.price-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 4vw, 48px); }
@media (max-width: 559px) { .price-cols { grid-template-columns: minmax(0, 1fr); } }
.price-cols .eyebrow { margin-bottom: 8px; }
.price-cols ul.marks li { padding-block: 9px; }
.price-cols ul.marks li::before { top: 18px; }
.plan {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px 24px;
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--paper);
  border: 2px solid var(--accent);
  border-radius: var(--r-lg);
}
.plan p { margin: 0; max-width: none; }
.plan .plan-amt { margin-top: 6px; font-family: var(--serif); font-size: 2.25rem; line-height: 1.1; color: var(--ink); }
.plan-amt small { font-family: var(--sans); font-size: 0.9375rem; color: var(--muted); }
.plan-per { font-size: 0.9375rem; color: var(--ink-soft); }
.plan-monthly { margin: 16px 0 0; font-size: 0.9375rem; color: var(--ink); }

/* ---------- maker: the one human voice on the page gets a punctuation mark, not a card ---------- */

.maker-quote {
  grid-column: rail-start / read-end;
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--read));
  column-gap: var(--col-gap);
  margin: 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.1875rem, 1rem + 1.1vw, 1.75rem);
  line-height: 1.5;
  color: var(--ink);
}
.q-glyph { grid-column: 1; justify-self: end; font-family: var(--serif); font-size: 5rem; line-height: 0.72; color: var(--accent); }
.maker-quote p,
.maker-quote .signoff { grid-column: 2; }
.maker-quote p { margin: 0; max-width: none; color: inherit; }
.maker-quote .signoff {
  display: block;
  margin-top: 20px;
  font-family: var(--sans);
  font-style: normal;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 899px) {
  .maker-quote { grid-template-columns: minmax(0, 1fr); }
  .q-glyph { justify-self: start; font-size: 3.5rem; margin-bottom: -8px; }
  .maker-quote p,
  .maker-quote .signoff { grid-column: 1; }
}

/* ---------- closer: the accent line, once, at page width, on the last thing read ---------- */

.closer { text-align: center; background: var(--surface); }
.closer::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 2px; background: var(--accent); }
.closer-mark { width: 44px; height: 44px; margin: 0 auto 22px; border-radius: 11px; box-shadow: 0 2px 8px rgba(42, 37, 32, 0.2); }
.closer .eyebrow { margin-bottom: var(--head-gap); }
.closer h2 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3.25rem); }
.closer .cta-row { justify-content: center; }
.closer p { max-width: none; margin-inline: auto; }
.closer .contact { margin-top: 28px; }

/* ==========================================================================
   INVITE FALLBACK (j/index.html). With Hearth installed, iOS opens the app
   before this page loads; this page is for everyone else.
   ========================================================================== */

.join {
  max-width: calc(520px + var(--gutter) * 2);
  margin-inline: auto;
  padding: clamp(40px, 8vw, 88px) var(--gutter) var(--section-gap);
}
.join h1 { margin: var(--head-gap) 0 16px; font-size: clamp(2rem, 1.4rem + 2.6vw, 2.75rem); }
.join .lede { margin: 0; }

.code-box {
  margin-top: 28px;
  padding: 22px 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-2xl);
}
.code-box p { max-width: none; margin-inline: auto; }
.code-box .code {
  margin: 8px 0 18px;
  font-family: var(--serif);
  font-size: 2.5rem;
  line-height: 1.1;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.code-box .fine { margin: 14px auto 0; }

.join .later { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); }
.join .later h2 { margin-bottom: 10px; }
