/* readmyinvoice.com
   The palette and the proportions come straight from the SwiftUI app so the
   site and the product read as one thing: accent rgb(0.12,0.35,0.28), page
   background rgb(0.96,0.97,0.95), 16pt corners, a 760px reading column.

   Audience is 55+ and not especially comfortable with technology. That drives
   three rules here: type never smaller than 17px, tap targets never smaller
   than 44px, and no animation beyond a colour change. */

:root {
  color-scheme: light dark;

  /* Brand values from docs/design/brand-2026-09-06: forest green #1F5740,
     ivory #FAF7F0, warm timber #F0B883. The timber tone is the logo's third
     colour and is used sparingly, never as a second call to action. */
  --bg: #faf7f0;
  --surface: #ffffff;
  --surface-sunken: #f1ede3;
  --accent: #1f5740;
  --accent-hover: #143d2c;
  --accent-ink: #ffffff;
  --timber: #f0b883;
  --ink: #191d1a;
  --ink-muted: #4c554f;
  --line: #e0dacb;
  --attention: #8a4a0c;
  --attention-bg: #fdf3e6;
  --positive: #1f5740;

  --radius: 16px;
  --radius-sm: 10px;
  --column: 47rem;
  --gap: 1.75rem;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141815;
    --surface: #1d231f;
    --surface-sunken: #232a25;
    --accent: #7cc3a9;
    --accent-hover: #9ad5bf;
    --accent-ink: #10231b;
    --timber: #f0b883;
    --ink: #e9eee9;
    --ink-muted: #a9b4ac;
    --line: #313a34;
    --attention: #e8b57c;
    --attention-bg: #2b241a;
    --positive: #7cc3a9;
  }
}

*, *::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.125rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: anywhere;
}

/* ---------- links, focus, motion ---------- */

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

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

/* Keep anchor and keyboard navigation immediate, including long mobile pages. */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.85rem 1.25rem;
  border-radius: 0 0 var(--radius-sm) 0;
  z-index: 10;
}
.skip-link:focus { left: 0; }

/* ---------- layout ---------- */

.wrap {
  width: 100%;
  max-width: var(--column);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 1.5rem);
}

main { display: block; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  padding-block: 1.15rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--accent);
  text-decoration: none;
  margin-inline-end: auto;
}
.brand img { width: 2.25rem; height: 2.25rem; border-radius: 22%; flex: none; }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.35rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 1.0625rem;
}
.site-nav a:hover, .site-nav a[aria-current="page"] {
  color: var(--accent);
  text-decoration: underline;
}

/* ---------- hero ---------- */

.hero { padding-block: 3.5rem 2rem; }

/* The brand square carries its own background, so it is clipped rather than
   tinted. 22% matches BrandMark in the app. */
.hero-mark {
  display: block;
  width: 6.75rem;
  height: 6.75rem;
  border-radius: 22%;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 6.5vw, 3.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  white-space: pre-line;
}

.hero-body {
  font-size: clamp(1.25rem, 3vw, 1.4rem);
  color: var(--ink-muted);
  margin: 0 0 2rem;
  max-width: 34rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

/* ---------- buttons ---------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3.25rem;
  padding: 0.75rem 1.6rem;
  border-radius: var(--radius-sm);
  border: 2px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }
.button[disabled] { opacity: 0.55; cursor: default; }

.button-secondary {
  background: transparent;
  color: var(--accent);
}
.button-secondary:hover { background: var(--surface); color: var(--accent-hover); }

/* ---------- page body ---------- */

.page-head { padding-block: 3rem 0.5rem; }
.page-head h1 {
  font-size: clamp(1.9rem, 5.5vw, 2.6rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}
.lead {
  font-size: 1.25rem;
  color: var(--ink-muted);
  margin: 0;
}

.prose { padding-block: 1rem 3rem; }

.prose h2 {
  font-size: 1.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.85rem;
}
.prose h3 {
  font-size: 1.2rem;
  margin: 2rem 0 0.6rem;
}
.prose > h2:first-child { margin-top: 1rem; }
.prose p { margin: 0 0 1.1rem; max-width: 38rem; }
.prose ul, .prose ol { margin: 0 0 1.4rem; padding-inline-start: 1.4rem; max-width: 38rem; }
.prose li { margin-bottom: 0.55rem; }

/* ---------- cards, steps, lists ---------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
}

.note {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin: 1.75rem 0 2rem;
}
.note h3 { margin: 0 0 0.5rem; font-size: 1.125rem; }
.note p { margin: 0; }

.steps { list-style: none; margin: 0 0 2rem; padding: 0; counter-reset: step; }
.steps > li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.25rem 1rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}
.steps > li:last-child { border-bottom: 0; }
.steps > li::before {
  content: counter(step);
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.steps b { font-size: 1.125rem; }
.steps span { color: var(--ink-muted); }

.marklist { list-style: none; margin: 0 0 2rem; padding: 0; }
.marklist > li {
  display: grid;
  grid-template-columns: 1.85rem minmax(0, 1fr);
  gap: 0.2rem 0.9rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.marklist > li:last-child { border-bottom: 0; }
.marklist svg { grid-row: 1 / span 2; width: 1.6rem; height: 1.6rem; margin-top: 0.15rem; }
.marklist b { font-size: 1.0625rem; }
.marklist span { color: var(--ink-muted); }
.marklist.is-positive svg { color: var(--positive); }
.marklist.is-negative svg { color: var(--ink-muted); }

.cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.cards b { display: block; margin-bottom: 0.35rem; font-size: 1.0625rem; }
.cards span { color: var(--ink-muted); font-size: 1.0625rem; }

/* ---------- guided panel ---------- */

/* The one thing on the page that should be impossible to miss. Numbered,
   short, and ending in a button rather than another paragraph. */
.panel {
  background: var(--surface);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  margin: 0 0 2.5rem;
}
.panel-title { margin: 0 0 1.25rem; font-size: 1.375rem; }

.panel-steps { list-style: none; margin: 0 0 1.5rem; padding: 0; counter-reset: pstep; }
.panel-steps > li {
  counter-increment: pstep;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 0.15rem 1rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
}
.panel-steps > li:last-child { border-bottom: 0; padding-bottom: 0; }
.panel-steps > li::before {
  content: counter(pstep);
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 1.25rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.panel-steps b { font-size: 1.1875rem; line-height: 1.35; }
.panel-steps span { color: var(--ink-muted); }

.panel-cta { width: 100%; font-size: 1.125rem; min-height: 3.5rem; }
.panel-note {
  margin: 1rem 0 0;
  font-size: 1rem;
  color: var(--ink-muted);
  text-align: center;
}

/* ---------- collapsible detail ---------- */

.collapse {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 2rem;
}
.collapse > summary {
  cursor: pointer;
  padding: 1.15rem 1.4rem;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 3rem;
}
.collapse > summary::-webkit-details-marker { display: none; }
.collapse > summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  flex: none;
}
.collapse[open] > summary::after { content: "\2212"; }
.collapse-body { padding: 0 1.4rem 1.25rem; }
.collapse-body > *:last-child { margin-bottom: 0; }
.collapse-body .marklist > li:first-child { padding-top: 0; }

/* ---------- FAQ ---------- */

.faq { margin: 0 0 2rem; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
}
.faq summary {
  cursor: pointer;
  padding: 1.1rem 1.35rem;
  font-weight: 600;
  font-size: 1.0625rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  min-height: 3rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1;
  flex: none;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > p { margin: 0; padding: 0 1.35rem 1.25rem; color: var(--ink-muted); }

/* ---------- guides index ---------- */

.guides { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; gap: 0.75rem; }
.guides a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  text-decoration: none;
  color: inherit;
}
.guides a:hover { border-color: var(--accent); }
.guides b { display: block; color: var(--accent); font-size: 1.125rem; margin-bottom: 0.3rem; }
.guides span { color: var(--ink-muted); font-size: 1.0625rem; }

/* ---------- market table ---------- */

.markets { list-style: none; margin: 0 0 2rem; padding: 0; }
.markets > li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.markets > li:last-child { border-bottom: 0; }
.markets .market-name { font-weight: 600; font-size: 1.0625rem; }
.markets .market-name a { text-decoration: none; }
.markets .market-name a:hover { text-decoration: underline; }

.badge {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.9375rem;
  font-weight: 600;
  white-space: normal;
}
.badge-live { background: var(--accent); color: var(--accent-ink); }
.badge-planned { background: var(--surface-sunken); color: var(--ink-muted); border: 1px solid var(--line); }

/* ---------- plans ---------- */

.plans {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  margin: 0 0 2rem;
  padding: 0;
  list-style: none;
}
.plan { display: flex; flex-direction: column; gap: 0.75rem; }
.plan h3 { margin: 0; font-size: 1.25rem; }
.plan .amount { font-size: 1.9rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.plan .amount small { font-size: 1rem; font-weight: 400; color: var(--ink-muted); }
.plan ul { margin: 0; padding-inline-start: 1.2rem; color: var(--ink-muted); }
.plan form { margin-top: auto; }
.plan .button { width: 100%; }

/* ---------- sources ---------- */

.sources {
  background: var(--surface-sunken);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin: 2.5rem 0 0;
}
.sources h2 { margin: 0 0 0.75rem; font-size: 1.125rem; }
.sources ul { margin: 0; padding-inline-start: 1.2rem; }
.sources li { margin-bottom: 0.5rem; }
.sources li:last-child { margin-bottom: 0; }

.reviewed {
  font-size: 1rem;
  color: var(--ink-muted);
  margin: 0.5rem 0 0;
}

/* ---------- availability ---------- */
.availability {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem;
  margin: 2.5rem 0 1rem;
  scroll-margin-top: 1.5rem;
}
.availability h2 { margin: 0 0 0.6rem; font-size: 1.5rem; }
.availability p, .hero-status { color: var(--ink-muted); max-width: 42rem; }
.availability-label { font-weight: 600; color: var(--accent); margin: 0 0 1rem; }

/* ---------- language switcher and footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface-sunken);
  padding-block: 2.5rem 3rem;
  margin-top: 3rem;
}
.site-footer h2 { font-size: 1rem; margin: 0 0 0.75rem; color: var(--ink-muted); font-weight: 600; }
.site-footer ul { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.site-footer a { color: var(--ink); }
.footer-note { color: var(--ink-muted); font-size: 1rem; margin: 0 0 0.75rem; max-width: 38rem; }
.footer-meta { color: var(--ink-muted); font-size: 1rem; margin: 0; }

.langs { list-style: none; margin: 0 0 1.75rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.langs a {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  text-decoration: none;
  font-size: 1rem;
}
.langs a[aria-current="true"] { border-color: var(--accent); color: var(--accent); font-weight: 600; }

/* ---------- print ---------- */

@media print {
  .site-header, .site-footer, .availability, .hero-actions { display: none; }
  body { background: #fff; color: #000; font-size: 11pt; }
  a::after { content: " (" attr(href) ")"; font-size: 9pt; }
}

/* Reflow without reducing the reader's chosen text size. */
.brand span { min-width: 0; }
.field input, .field select { min-width: 0; max-width: 100%; }
@media (max-width: 480px) {
  .panel, .availability, .card, .note, .sources { padding: 1rem; }
  .panel-steps > li { grid-template-columns: minmax(0, 1fr); }
  .panel-steps > li::before { grid-row: auto; margin-bottom: 0.5rem; }
  .button { max-width: 100%; text-align: center; }
  .field-consent .hint { grid-column: 1 / -1; }
}

/* Structural lists must not inherit the prose list indentation. */
.prose .plans, .prose .cards, .prose .panel-steps, .prose .marklist,
.prose .steps, .prose .guides, .prose .markets {
  padding-inline-start: 0;
  max-width: none;
}
/* Keep the mark stable while the reader enlarges the adjacent text. */
.brand img { width: 36px; height: 36px; }
.hero-mark { width: 108px; height: 108px; }
.prose, .page-head, .hero { hyphens: auto; }
