/* Helpings' site pages (SITE=helpings; README → Deployments → Site pages), in the app's design (CLAUDE.md → Design): warm paper, blue-black ink, one ballpoint-blue
   accent. Newsreader for words and big numbers, IBM Plex Mono for labels, prices and buttons, Source Serif 4 for italic
   running text. Ruled lines instead of cards. No scripts and no motion.
   The tokens repeat the top of src/styles.css; keep the two in step. The brand is `.brand` below; the Worker writes
   the deployment's mark (BRAND) into its `[data-brand-mark]`, drawn in currentColor and var(--accent) as in the app. */

/* ---------- Tokens ---------- */
:root {
  --paper: #f6f1e7;
  --paper-2: #eee7d8;
  --ink: #16171d;
  --ink-2: #44454d;
  --muted: #6c685f;
  --rule: rgba(22, 23, 29, 0.12);
  --rule-strong: rgba(22, 23, 29, 0.32);
  --accent: #2443c9;
  --accent-ink: #ffffff;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --italic: "Source Serif 4", var(--serif);
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --page: 1040px;
  --read: 680px;
  --gutter: 20px;

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121318;
    --paper-2: #1a1b21;
    --ink: #ece7dc;
    --ink-2: #bdb8ad;
    --muted: #8a877f;
    --rule: rgba(236, 231, 220, 0.11);
    --rule-strong: rgba(236, 231, 220, 0.3);
    --accent: #8fa3ff;
    --accent-ink: #0f1226;
    color-scheme: dark;
  }
}

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

html,
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.5;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

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

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

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

q {
  font-family: var(--italic);
  font-style: italic;
  color: var(--ink);
}

.skip {
  position: absolute;
  top: -80px;
  left: var(--gutter);
  z-index: 1;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.skip:focus {
  top: 12px;
}

/* ---------- Page ---------- */
.page {
  max-width: calc(var(--page) + 2 * var(--gutter));
  min-height: 100dvh;
  margin: 0 auto;
  padding: env(safe-area-inset-top) max(var(--gutter), env(safe-area-inset-right)) env(safe-area-inset-bottom)
    max(var(--gutter), env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0 12px;
  border-bottom: 1px solid var(--rule);
}

/* The wordmark: the mark and the name in Newsreader italic, as in the app's header. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink);
  font-size: 25px;
  font-style: italic;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.brand .mark,
.brand .mark svg {
  display: block;
  width: 26px;
  height: 26px;
}

.nav {
  display: flex;
  gap: 20px;
}

.nav a,
.foot a {
  padding: 10px 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.nav a:hover,
.foot a:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot a[aria-current="page"] {
  color: var(--ink);
}

.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 4px;
}

.foot {
  margin-top: 24px;
  padding: 14px 0 24px;
  border-top: 1px solid var(--rule);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
}

.foot-who {
  margin: 6px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

/* ---------- Type ---------- */
.title {
  font-size: clamp(38px, 5.4vw, 58px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.prose .title {
  font-size: clamp(36px, 4.6vw, 48px);
}

.lede {
  margin: 18px 0 0;
  max-width: 33em;
  color: var(--ink-2);
  font-family: var(--italic);
  font-size: 19px;
  font-style: italic;
  line-height: 1.5;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hint {
  margin: 18px 0 0;
  color: var(--muted);
  font-family: var(--italic);
  font-size: 15px;
  font-style: italic;
}

.text {
  margin: 16px 0 0;
  max-width: 36em;
  color: var(--ink-2);
}

.small {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Buttons and links (as in the app) ---------- */
.btn {
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.12s, background 0.15s, color 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.link {
  padding: 10px 2px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.link:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cta {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
}

/* ---------- Home ---------- */
.hero {
  display: grid;
  gap: 44px;
  padding: clamp(36px, 8vh, 80px) 0 52px;
}

.shot {
  margin: 0;
  justify-self: center;
  width: min(280px, 100%);
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 390 / 844;
  border-radius: 30px;
  box-shadow: 0 0 0 1px var(--rule-strong);
}

.shot figcaption {
  margin-top: 14px;
  color: var(--muted);
  font-family: var(--italic);
  font-size: 15px;
  font-style: italic;
  text-align: center;
}

/* A section starts under a heavy rule, like a meal in the diary; at desktop widths its label hangs to the left. */
.section {
  padding: 16px 0 44px;
  border-top: 1.5px solid var(--ink);
}

.section-body {
  margin-top: 18px;
}

.features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
}

.features li {
  padding: 18px 0 20px;
}

.features li:first-child {
  padding-top: 0;
}

.features li + li {
  border-top: 1px solid var(--rule);
}

.features h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.features p {
  margin: 6px 0 0;
  color: var(--ink-2);
}

/* Prices: ruled rows with a dotted leader, like a line in the diary. */
.prices {
  margin: 0;
  padding: 0;
  max-width: 520px;
  list-style: none;
}

.prices li {
  padding: 14px 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 10px;
  border-bottom: 1px solid var(--rule);
}

.prices li:first-child {
  padding-top: 0;
}

.plan {
  font-size: 22px;
}

/* A note under a row (the annual saving), on a line of its own so the leader starts right after the plan's name. */
.prices li small {
  flex-basis: 100%;
  color: var(--muted);
  font-family: var(--italic);
  font-size: 15px;
  font-style: italic;
}

.leader {
  flex: 1;
  min-width: 16px;
  border-bottom: 1px dotted var(--rule-strong);
}

.amount {
  font-family: var(--mono);
  font-size: 22px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

.per {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: center;
    gap: 80px;
  }

  .section {
    padding-top: 20px;
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr);
    gap: 0 40px;
  }

  .section > .eyebrow {
    padding-top: 5px;
  }

  .section-body {
    margin-top: 0;
  }

  .features {
    grid-template-columns: 1fr 1fr;
    column-gap: 48px;
  }

  .features li:nth-child(2) {
    padding-top: 0;
    border-top: 0;
  }
}

/* ---------- Reading pages (pricing, support, legal) ---------- */
.prose {
  max-width: var(--read);
  padding: clamp(32px, 7vh, 64px) 0 40px;
}

.prose .prices {
  margin-top: 32px;
  padding-left: 0;
}

.prose .prices li + li {
  margin-top: 0;
}

.updated {
  margin: 14px 0 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.prose h2 {
  margin: 40px 0 0;
  padding-top: 14px;
  border-top: 1.5px solid var(--ink);
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.prose h3 {
  margin: 26px 0 0;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
}

.prose p,
.prose ul,
.prose ol,
.prose table,
.prose blockquote {
  margin: 12px 0 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3em;
}

.prose li + li {
  margin-top: 6px;
}

.prose li::marker {
  color: var(--muted);
}

.prose strong {
  font-weight: 600;
}

.prose a {
  overflow-wrap: anywhere;
}

.prose hr {
  margin: 36px 0 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.prose blockquote {
  padding-left: 16px;
  border-left: 2px solid var(--rule-strong);
  color: var(--ink-2);
  font-family: var(--italic);
  font-style: italic;
}

.prose code {
  font-family: var(--mono);
  font-size: 0.88em;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  padding: 9px 14px 9px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}

.prose th {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.email {
  font-size: clamp(24px, 6vw, 32px);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.prose .email {
  margin-top: 22px;
}

/* Questions and answers on the support page, ruled like entries in a meal. */
.qa {
  margin-top: 6px;
}

.qa > div {
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.prose .qa h3 {
  margin: 0;
}

.prose .qa p {
  margin: 4px 0 0;
  color: var(--ink-2);
}

/* ---------- Motion and print ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  :root {
    --paper: #fff;
    --ink: #000;
    --ink-2: #222;
    --muted: #555;
    --accent: #000;
  }

  .skip,
  .nav,
  .foot,
  .cta {
    display: none;
  }
}
