/* Shared by every page in site/. No scripts, and nothing fetched from
   another host: a privacy policy should not phone anyone. The two fonts
   are served from this site's own fonts/ folder (SIL Open Font License,
   fonts/OFL.txt), the same files the app bundles.

   The colours, radii and rules are the app's own (app/lib/ui/tokens.dart):
   stone grounds, ink text, one moss accent, a heavier "manifest" rule
   where things are counted, monospace only for figures you can check. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/AtkinsonHyperlegibleNext.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Atkinson Hyperlegible Mono";
  src: url("fonts/AtkinsonHyperlegibleMono.ttf") format("truetype");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #e8e9e5;
  --surface: #f6f6f3;
  --ink: #22252a;
  --muted: #5a6066;
  --line: #d0d1cb;
  --accent: #3e5f3c;
  --on-accent: #ffffff;
  --warn: #8f6210;
  --dot: #8e928c;

  --text: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Atkinson Hyperlegible Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-tile: 3px;
  --r-control: 12px;
  --r-card: 14px;
  --r-sheet: 20px;
  --rule: 1.5px;
  --gutter: 1.25rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171918;
    --surface: #212422;
    --ink: #e6e7e3;
    --muted: #a0a6a2;
    --line: #333734;
    --accent: #8db38a;
    --on-accent: #10140f;
    --warn: #d9a441;
    --dot: #6b706c;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.55 var(--text);
  font-variant-numeric: tabular-nums;
  overflow-wrap: break-word;
}

/* ---------- Shared pieces ---------- */

.skip {
  position: absolute;
  left: 0.75rem;
  top: -4rem;
  z-index: 2;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-control);
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
}

.skip:focus {
  top: 0.75rem;
}

a {
  color: var(--accent);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 0.14em;
}

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

h1,
h2,
h3 {
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  margin: 2.5rem 0 0.5rem;
  font-size: 2.1rem;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

h2 {
  margin: 2.75rem 0 0.5rem;
  font-size: 1.3rem;
  line-height: 1.25;
}

h3 {
  margin: 1.6rem 0 0.25rem;
  font-size: 1.0625rem;
  line-height: 1.3;
}

p,
ul,
ol,
table {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.4rem;
}

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

strong {
  font-weight: 650;
}

code,
.data {
  font-family: var(--mono);
  font-size: 0.92em;
}

.data {
  color: var(--muted);
}

.page,
.wrap {
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.page {
  max-width: 44rem;
  padding-top: 1.25rem;
  padding-bottom: 3rem;
}

.wrap {
  max-width: 68rem;
}

/* Header: the route-line mark, the name, three links. */

header.site {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.wrap > header.site {
  padding-top: 1.25rem;
}

header.site .name {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
}

.mark {
  width: 2.6rem;
  height: auto;
  flex: none;
}

header.site nav,
footer.site nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

header.site nav a,
footer.site nav a {
  display: inline-block;
  padding: 0.35rem 0;
  color: var(--ink);
  text-decoration: none;
}

header.site nav a:hover,
footer.site nav a:hover {
  text-decoration: underline;
}

header.site nav a[aria-current="page"],
footer.site nav a[aria-current="page"] {
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 0.14em;
}

footer.site {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: var(--rule) solid var(--ink);
  color: var(--muted);
  font-size: 0.95rem;
}

.wrap > footer.site {
  padding-bottom: 3rem;
}

footer.site p {
  margin: 0.5rem 0 0;
}

/* Inline drawings share the palette through these classes. */

.ink-stroke {
  fill: none;
  stroke: var(--ink);
}

.accent-stroke {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fill-bg {
  fill: var(--bg);
}

.fill-surface {
  fill: var(--surface);
}

.fill-dot {
  fill: var(--dot);
}

.fill-accent {
  fill: var(--accent);
}

.fill-line {
  fill: var(--line);
}

/* ---------- Support, privacy and terms ---------- */

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

.lede {
  font-size: 1.2rem;
  line-height: 1.45;
}

.page main > h2 {
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.summary,
.warning,
.status {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  background: var(--surface);
}

.summary > :last-child,
.warning > :last-child,
.status > :last-child {
  margin-bottom: 0;
}

/* The app's one "this needs you" colour, used as a rule, never as text. */
.warning {
  border-left: 4px solid var(--warn);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  border-top: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
  font-size: 0.97rem;
}

th,
td {
  padding: 0.65rem 0.9rem 0.65rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

tbody tr:last-child td {
  border-bottom: 0;
}

th {
  font-weight: 650;
}

/* ---------- Landing page ---------- */

.hero {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: 2.5rem 0 3rem;
}

.hero h1 {
  margin-top: 0;
  font-size: clamp(2.1rem, 1.2rem + 4.2vw, 3.5rem);
  line-height: 1.06;
  letter-spacing: -0.015em;
}

.hero .lede {
  max-width: 34rem;
  margin-top: 1rem;
  color: var(--ink);
}

.hero-art,
.art {
  display: block;
  width: 100%;
  height: auto;
}

/* Where the store links go. Today both are plain statements. */

.stores {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.75rem 0 0.75rem;
  padding: 0;
  list-style: none;
}

.stores li {
  margin: 0;
}

.store {
  display: inline-block;
  padding: 0.7rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--r-control);
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
}

a.store {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

a.store:hover {
  text-decoration: underline;
}

.note {
  max-width: 34rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.facts {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
}

.facts li {
  margin: 0;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
}

.facts li:first-child {
  border-top: 0;
}

.facts strong {
  display: block;
}

.facts span {
  color: var(--muted);
  font-size: 0.97rem;
}

.band {
  display: grid;
  gap: 1.75rem;
  align-items: center;
  padding: 3.25rem 0;
  border-top: 1px solid var(--line);
}

.facts + .band {
  border-top: 0;
}

.band h2,
.block h2 {
  margin: 0 0 0.9rem;
  font-size: clamp(1.55rem, 1.2rem + 1.4vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.band .copy > :last-child {
  margin-bottom: 0;
}

.band .copy p,
.band .copy li {
  max-width: 36rem;
}

.points {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
}

.points li {
  position: relative;
  margin: 0 0 0.75rem;
  padding-left: 1.4rem;
}

.points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.8rem;
  height: 0.16rem;
  border-radius: 1px;
  background: var(--accent);
}

/* The stage a drawing sits on: a raised surface, like a sheet in the app. */

.stage {
  margin: 0;
  padding: 1.25rem;
  border-radius: var(--r-sheet);
  background: var(--surface);
}

.stage figcaption {
  margin-top: 0.9rem;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: center;
}

/* A phone screen, drawn like the two phones in the mark: an ink outline. */

.screen {
  max-width: 19rem;
  margin: 0 auto;
  padding: 1.25rem 1.1rem;
  border: 1.6px solid var(--ink);
  border-radius: 1.6rem;
  background: var(--bg);
}

.screen > :last-child {
  margin-bottom: 0;
}

.screen-title {
  margin: 0 0 0.75rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.2;
}

.screen-small {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.screen-title--prompt {
  margin-bottom: 1.25rem;
  font-weight: 400;
  text-align: center;
}

.screen-link {
  margin-top: 1rem;
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
}

.after {
  margin-top: 1.5rem;
}

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  align-items: stretch;
}

.pair > div {
  display: flex;
  flex-direction: column;
}

.pair .screen {
  display: flex;
  flex: 1;
  flex-direction: column;
  width: 100%;
  padding: 0.9rem 0.75rem 1rem;
  border-radius: 1.25rem;
}

.pair .screen-title {
  font-size: 1rem;
}

.pair-label {
  margin: 0.6rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.35;
  text-align: center;
}

.grid-art {
  display: block;
  width: 100%;
  max-width: 9rem;
  height: auto;
  margin: 0 auto 0.75rem;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3px;
}

.tiles span {
  aspect-ratio: 1;
  border-radius: var(--r-tile);
  background: linear-gradient(135deg, #b99a78, #6f7445);
}

.tiles span:nth-child(3n + 2) {
  background: linear-gradient(135deg, #7ba3ba, #474272);
}

.tiles span:nth-child(3n) {
  background: linear-gradient(135deg, #79bb90, #426f70);
}

.tiles span:nth-child(4) {
  background: linear-gradient(135deg, #9a7cc0, #6f3f6b);
}

.tiles span:nth-child(6) {
  background: linear-gradient(135deg, #bd8a78, #74693d);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 0.75rem;
  padding: 0.2rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.85rem;
}

.pill::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
}

/* The checklist voice: a heavier rule above and below, a hairline between,
   and monospace for the figures. */

.manifest {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
}

.manifest li {
  position: relative;
  margin: 0;
  padding: 0.75rem 0 0.75rem 2.25rem;
  border-top: 1px solid var(--line);
  font-weight: 650;
  line-height: 1.3;
}

.manifest li:first-child {
  border-top: 0;
}

.manifest li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75rem;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  background: var(--accent);
}

.manifest li::after {
  content: "";
  position: absolute;
  left: 0.47rem;
  top: 0.98rem;
  width: 0.42rem;
  height: 0.72rem;
  border: solid var(--on-accent);
  border-width: 0 0.15rem 0.15rem 0;
  transform: rotate(40deg);
}

.manifest .data,
.manifest .aside {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  font-weight: 400;
}

.manifest .aside {
  color: var(--muted);
  font-size: 0.85rem;
}

.banner {
  margin: 0 0 1rem;
  padding: 0.8rem 1rem;
  border-radius: var(--r-card);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.92rem;
  line-height: 1.4;
}

.banner strong {
  display: block;
  font-size: 1.05rem;
}

.count {
  margin: 0.75rem 0 0;
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.count + .screen-small {
  margin-bottom: 0.9rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1.25rem;
  margin: 0;
  font-size: 0.88rem;
}

.kv dt {
  color: var(--muted);
}

.kv dd {
  margin: 0;
  font-family: var(--mono);
}

.words {
  margin: 0;
  padding: 0.35rem 0;
  list-style: none;
  columns: 2;
  column-gap: 1rem;
  counter-reset: word;
  border-top: var(--rule) solid var(--ink);
  border-bottom: var(--rule) solid var(--ink);
  font-family: var(--mono);
  font-size: 0.95rem;
}

.words li {
  margin: 0;
  padding: 0.4rem 0;
  white-space: nowrap;
  break-inside: avoid;
  counter-increment: word;
}

.words li::before {
  content: counter(word);
  display: inline-block;
  width: 1.6rem;
  color: var(--muted);
  font-size: 0.85em;
}

.stack {
  display: grid;
  gap: 1rem;
}

.stack .screen {
  width: 100%;
}

/* Free and Pro */

.block {
  padding: 3.25rem 0;
  border-top: 1px solid var(--line);
}

.block > p {
  max-width: 44rem;
}

.plans {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

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

.plan--pro {
  border: var(--rule) solid var(--accent);
}

.plan h3 {
  margin: 0;
  font-size: 1.3rem;
}

.plan .price {
  margin: 0.15rem 0 1rem;
  color: var(--muted);
}

.plan ul {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.plan li {
  margin: 0;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
}

.plan li:last-child {
  border-bottom: 0;
}

/* Plain facts */

.cannot {
  display: grid;
  gap: 0 2.5rem;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  border-top: var(--rule) solid var(--ink);
}

.cannot li {
  margin: 0;
  padding: 1rem 0 1rem 1rem;
  border-bottom: 1px solid var(--line);
  border-left: 3px solid var(--warn);
}

.cannot strong {
  display: block;
  margin-bottom: 0.15rem;
}

.cannot span {
  color: var(--muted);
}

/* Questions */

.faq {
  max-width: 46rem;
  margin-top: 1.5rem;
  border-top: var(--rule) solid var(--ink);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  position: relative;
  padding: 0.95rem 2.25rem 0.95rem 0;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 0.25rem;
  top: 0.75rem;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 1.3rem;
  font-weight: 400;
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > :not(summary) {
  max-width: 40rem;
}

.faq details > :last-child {
  margin-bottom: 1.1rem;
}

/* 404 */

.lost {
  padding: 3rem 0 1rem;
}

.lost .art {
  max-width: 22rem;
  margin: 0 0 1.5rem;
}

/* ---------- The narrowest phones ---------- */

@media (max-width: 23rem) {
  .stage {
    padding: 0.75rem;
  }

  .screen {
    padding: 1.1rem 0.9rem;
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 40rem) {
  :root {
    --gutter: 2rem;
  }

  .facts {
    grid-template-columns: repeat(3, 1fr);
  }

  .facts li {
    padding: 1.1rem 1.5rem 1.1rem 0;
    border-top: 0;
  }

  .facts li + li {
    padding-left: 1.5rem;
    border-left: 1px solid var(--line);
  }

  .plans {
    grid-template-columns: 1fr 1fr;
  }

  .cannot {
    grid-template-columns: 1fr 1fr;
  }

  .stage {
    padding: 2rem;
  }
}

@media (min-width: 56rem) {
  .hero {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    gap: 3rem;
    padding: 4rem 0 4.5rem;
  }

  .band {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 4rem;
    padding: 4.5rem 0;
  }

  .band--flip .copy {
    order: 2;
  }

  .block {
    padding: 4.5rem 0;
  }
}

/* ---------- Motion: one line, drawn once, only if motion is welcome ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hero-art .route {
    stroke-dasharray: 1;
    animation: route 2.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0.3s both;
  }

  @keyframes route {
    from {
      stroke-dashoffset: 1;
    }

    to {
      stroke-dashoffset: 0;
    }
  }
}

/* ---------- Print: the legal pages are meant to be printable ---------- */

@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --ink: #000000;
    --muted: #333333;
    --line: #999999;
    --accent: #000000;
    --on-accent: #ffffff;
    --warn: #000000;
    --dot: #666666;
  }

  .skip,
  header.site nav,
  footer.site nav {
    display: none;
  }

  body {
    font-size: 11pt;
  }

  .page,
  .wrap {
    max-width: none;
    padding: 0;
  }

  h2,
  h3 {
    break-after: avoid;
  }

  .summary,
  .warning,
  .status,
  tr,
  .faq details,
  .plan {
    break-inside: avoid;
  }

  .hero-art .route {
    animation: none;
  }
}
