/* The plain pages around the reader: the landing page at the site root, the manifesto, the FAQ, the privacy policy,
   account deletion and the admin invoices page. One calm, editorial look for all of them (since 7 Oct 2026): one ink
   blue accent on warm off-white by day, a soft blue on ink by night, used only for buttons, links and small marks.
   Every page has the landing page's header and footer, the same markup on each (test/hosting.test.js checks it). */
/* The reader's own faces (app/fonts, OFL), so the site matches the app: Literata for headings, Figtree for the rest.
   Served from the app's folder, so there is one copy of each file; the pages' policy (default-src 'self') lets them in. */
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/app/dist/literata-latin-400-normal.XO4P34YW.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/app/dist/literata-latin-400-italic.Q22IDJIF.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Literata";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/dist/literata-latin-700-normal.NLWKW42Y.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/app/dist/figtree-latin-400-normal.PORFSHKN.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/app/dist/figtree-latin-600-normal.5C6Z7QEI.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/app/dist/figtree-latin-700-normal.M33EANAW.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
  --bg: #f7f3ec; --fg: #1b1f24; --muted: #5d636c; --soft: #efe9de; --line: rgba(27, 31, 36, 0.12);
  --accent: #1f3a5f; --on-accent: #ffffff; --link: #1f3a5f; --frame: #1b1f24; --shadow: rgba(27, 31, 36, 0.22);
  --warn: #a8361b;
  --serif: Literata, "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: Figtree, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b; --fg: #ece7de; --muted: #a3a8b0; --soft: #1a2027; --line: rgba(236, 231, 222, 0.12);
    --accent: #a9c1e3; --on-accent: #0f1722; --link: #a9c1e3; --frame: #2a313a; --shadow: rgba(0, 0, 0, 0.5);
    --warn: #f2a385;
  }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 var(--sans);
}
main { max-width: 42rem; margin: 0 auto; padding: 2.5rem 1rem 4rem; }
h1 { font: 700 2rem/1.2 var(--serif); margin: 0 0 0.25rem; }
h2 { font: 700 1.3rem/1.3 var(--serif); margin: 2rem 0 0.5rem; }
a { color: var(--link); text-underline-offset: 0.18em; }
.muted { color: var(--muted); }
.small { font-size: 0.9rem; }

/* The header every page shares: the mark and name, then Manifesto, FAQ, Pro and the way into the app. The page you are
   on is marked aria-current and underlined in the accent. */
.top {
  max-width: 68rem; margin: 0 auto; padding: 1rem; box-sizing: border-box;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: 0.5rem; color: var(--fg); text-decoration: none;
  font: 700 1.2rem var(--serif); letter-spacing: -0.01em;
}
.brand img { border-radius: 8px; }
.top nav { display: flex; align-items: center; gap: 1.5rem; }
.top nav a { color: var(--fg); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover { color: var(--link); }
.top nav a[aria-current="page"] { color: var(--link); text-decoration: underline 2px; text-underline-offset: 0.4em; }
.top nav .nav-cta { padding: 0.45rem 1rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 600; }
.top nav .nav-cta:hover { color: var(--on-accent); opacity: 0.88; }

/* A phone too narrow for the wordmark and four links keeps the icon alone; the name stays for screen readers. */
@media (max-width: 480px) {
  .brand-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .top nav { gap: 0.9rem; }
  .top nav a { font-size: 0.9rem; }
  .top nav .nav-cta { padding: 0.4rem 0.8rem; }
}
@media (max-width: 440px) {
  .top { flex-wrap: nowrap; gap: 0.5rem; }
  .brand { gap: 0.35rem; }
  .brand img { width: 28px; height: 28px; }
  .top nav a { white-space: nowrap; }
}
@media (max-width: 370px) {
  .top { padding: 1rem 0.75rem; }
}
@media (max-width: 350px) {
  .top nav { gap: 0.6rem; }
  .top nav a { font-size: 0.84rem; }
}
@media (max-width: 340px) {
  .top { flex-wrap: wrap; }
}

/* The footer every page shares. */
footer {
  max-width: 68rem; margin: 3rem auto 0; padding: 1.5rem 1rem 3rem; box-sizing: border-box; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; font-size: 0.9rem;
}
footer a { color: var(--muted); }
footer a[aria-current="page"] { color: var(--fg); }

@media (min-width: 760px) {
  .top { padding: 1.25rem 2rem; }
  footer { padding-left: 2rem; padding-right: 2rem; }
}

/* Buttons: an outline, and the filled accent one for the main action. */
.btn {
  display: inline-block; padding: 0.8rem 1.5rem; border-radius: 999px; border: 1px solid var(--fg);
  background: transparent; color: var(--fg); font-weight: 600; text-decoration: none;
}
.btn.primary {
  padding: 1rem 1.9rem; border-color: var(--accent); background: var(--accent); color: var(--on-accent);
  font-size: 1.05rem; box-shadow: 0 10px 24px -12px var(--shadow);
}
.btn:hover { opacity: 0.88; }

/* The landing page (rebuilt 7 Oct 2026 from docs/landing-copy.md). Mobile first: one column, then from 760 px the words
   beside a phone. The phones hold screenshots of the app; the ask one is drawn in the page. */
.landing main { max-width: 68rem; padding: 0.5rem 1rem 1rem; overflow-x: clip; }
.landing p { max-width: 34rem; }

.landing section { margin-top: 5.5rem; }
.landing .hero { display: grid; gap: 3rem; align-items: center; margin-top: 1.75rem; }
.landing h1 {
  max-width: 13ch; margin: 0 0 1.25rem; font: 700 clamp(2.5rem, 9.5vw, 4.4rem)/1.04 var(--serif);
  letter-spacing: -0.025em; text-wrap: balance;
}
.landing h2 { margin: 0 0 1rem; font: 700 clamp(1.7rem, 5.4vw, 2.45rem)/1.12 var(--serif); letter-spacing: -0.015em; text-wrap: balance; }
.landing h2::before { display: block; width: 2rem; height: 2px; margin-bottom: 1.2rem; background: var(--accent); content: ""; }
.landing h3 { margin: 0 0 0.4rem; font: 700 1.1rem/1.35 var(--serif); }
.landing .lede { margin: 0; font-size: 1.15rem; line-height: 1.65; }

.landing .cta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.9rem; margin-top: 2rem; }
.landing .cta-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.92rem; }

/* The Google Play badge, in the badge's own black whatever the theme; play-badge.js shows it to Android visitors. */
.landing .play-badge {
  display: inline-flex; flex-direction: column; justify-content: center; height: 3rem; padding: 0 1.1rem;
  box-sizing: border-box; border: 1px solid #a6a6a6; border-radius: 9px; background: #000000; color: #ffffff;
  text-decoration: none; line-height: 1.1;
}
.landing .play-badge[hidden] { display: none; }
.landing .play-small { font-size: 0.68rem; letter-spacing: 0.02em; }
.landing .play-big { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.01em; }

.landing .phone {
  width: min(100%, 16.5rem); margin: 0 auto; padding: 0.55rem; box-sizing: border-box; border-radius: 2.4rem;
  background: var(--frame); box-shadow: 0 34px 60px -28px var(--shadow), 0 0 0 1px var(--line);
}
.landing .phone img { display: block; width: 100%; height: auto; border-radius: 1.9rem; }
.landing .ask-sheet {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 0.7rem; aspect-ratio: 390 / 844; padding: 1rem 0.85rem;
  box-sizing: border-box; overflow: hidden; border-radius: 1.9rem; background: var(--soft); font-size: 0.8rem; line-height: 1.45;
}
.landing .ask-sheet p { margin: 0; }
.landing .ask-title { color: var(--muted); font-weight: 600; }
.landing .ask-sheet .ask-q {
  max-width: 85%; margin-left: auto; padding: 0.55rem 0.8rem; border-radius: 16px 16px 4px 16px;
  background: var(--accent); color: var(--on-accent); font-weight: 600;
}
.landing .ask-a { padding: 0.75rem 0.85rem; border-radius: 16px 16px 16px 4px; background: var(--bg); }
.landing .ask-a blockquote { margin: 0.55rem 0; padding-left: 0.7rem; border-left: 2px solid var(--accent); font: italic 0.86rem/1.45 var(--serif); }
.landing .ask-source { color: var(--link); font-size: 0.75rem; font-weight: 600; }

.landing .feature { display: grid; gap: 2.75rem; align-items: center; }
.landing .feature-text p { font-size: 1.08rem; line-height: 1.7; }

.landing .extras ul { display: grid; margin: 1.75rem 0 0; padding: 0; list-style: none; }
.landing .extras li { padding: 1rem 0; border-top: 1px solid var(--line); }
.landing .extras b { font-weight: 650; }

.landing .plans-box { padding: 2.25rem 1.25rem; border-radius: 1.5rem; background: var(--soft); }
.landing .plan-cards { display: grid; gap: 1rem; margin: 1.75rem 0; }
.landing .plan { max-width: none; margin: 0; padding: 1.25rem 1.35rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--bg); }
.landing .plan + .plan { border-color: var(--accent); }
.landing .plans-box p:last-child { margin-bottom: 0; }

.landing .faq-list { display: grid; margin-top: 1.75rem; }
.landing .faq-list > div { padding: 1.25rem 0; border-top: 1px solid var(--line); }
.landing .faq-list p { margin: 0; color: var(--muted); }

.landing .closing { padding: 1rem 0 2rem; text-align: center; }
.landing .closing h2 { margin: 0 auto 1.75rem; }
.landing .closing h2::before { display: none; }
.landing .closing p { margin: 0 auto; }
.landing footer { max-width: 68rem; box-sizing: border-box; }

@media (min-width: 760px) {
  .landing main { padding: 1rem 2rem 2rem; }
  .landing section { margin-top: 8rem; }
  .landing .hero { grid-template-columns: 1.3fr 1fr; gap: 4rem; margin-top: 3.5rem; }
  .landing .feature { grid-template-columns: 1fr 1fr; gap: 5rem; }
  .landing .feature.flip .feature-text { order: 2; }
  .landing .phone { width: 18.5rem; }
  .landing .extras ul { grid-template-columns: repeat(2, 1fr); column-gap: 3rem; }
  .landing .plans-box { padding: 3.5rem; }
  .landing .plan-cards { grid-template-columns: 1fr 1fr; }
  .landing .faq-list { grid-template-columns: 1fr 1fr; column-gap: 3rem; }
  .landing .closing { padding-top: 2rem; }
}

/* The reading pages (FAQ, privacy, account deletion, the manifesto): one column of long text at a comfortable line
   length, headings in the book face with the landing page's small accent rule above them, lists that breathe. */
.doc main { max-width: 34rem; padding: 2rem 1rem 1rem; font-size: 1.0625rem; }
.doc h1 {
  margin: 0 0 1rem; font: 700 clamp(2.1rem, 7vw, 3rem)/1.08 var(--serif); letter-spacing: -0.02em; text-wrap: balance;
}
.doc h2 {
  margin: 3rem 0 0.85rem; font: 700 clamp(1.35rem, 4.2vw, 1.65rem)/1.25 var(--serif); letter-spacing: -0.01em;
  text-wrap: balance;
}
.doc h2::before { display: block; width: 2rem; height: 2px; margin-bottom: 1rem; background: var(--accent); content: ""; }
.doc p { margin: 0 0 1rem; line-height: 1.7; }
.doc ul, .doc ol { margin: 0 0 1.25rem; padding-left: 1.4rem; line-height: 1.65; }
.doc li { padding-left: 0.3rem; }
.doc li + li { margin-top: 0.55rem; }
.doc li::marker { color: var(--accent); }
.doc strong { font-weight: 650; }
.doc a { overflow-wrap: anywhere; }

@media (min-width: 760px) {
  .doc main { padding: 3.5rem 2rem 1rem; }
}

/* The manifesto (3 Oct 2026): an opening line in the book face, and the way into the app at the end. */
.manifesto h1 { font-size: clamp(2.2rem, 7vw, 3.2rem); line-height: 1.05; margin-bottom: 1.25rem; }
.manifesto .lede { font: italic 1.25rem/1.55 var(--serif); }
.manifesto h2 { margin-top: 2.4rem; }
.manifesto .ctas { margin-top: 2.5rem; }
.manifesto .signoff { margin-top: 2rem; font: italic 1.15rem var(--serif); }

/* The admin invoices page (admin/invoices/) */
.gst-page { max-width: 64rem; }
.gst-page form { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: center; margin: 1rem 0; }
.gst-page input { padding: 0.6rem 0.8rem; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--fg); font: 500 1rem var(--sans); }
.gst-page .btn { padding: 0.6rem 1.2rem; font: 600 0.95rem var(--sans); cursor: pointer; }
.gst-page .gst-csv { margin: 0.5rem 0.5rem 0 0; }
.gst-table { overflow-x: auto; }
.gst-page table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.gst-page th, .gst-page td { padding: 0.4rem 0.6rem; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.gst-page th:first-child, .gst-page td:first-child { text-align: left; }
.gst-page tfoot td { font-weight: 700; }
.gst-warn { color: var(--warn); font-weight: 650; }
.gst-page [hidden] { display: none; }
