:root {
  --bg: #ffffff;
  --fg: #14181c;
  --muted: #5b6670;
  --line: #e4e8ec;
  --accent: #3f7d34;
  --card: #f7f9f8;
  --max: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1211;
    --fg: #e9eeec;
    --muted: #9aa6a2;
    --line: #232a28;
    --accent: #8fc47f;
    --card: #161c1a;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 0 1.25rem 4rem;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--max); margin: 0 auto; }

/* ---- hero ---- */
header.hero { text-align: center; padding: 4rem 0 2.5rem; }

header.hero img { width: 104px; height: 104px; }

header.hero h1 {
  margin: 1.25rem 0 0.4rem;
  font-size: 2.15rem;
  letter-spacing: -0.02em;
}

header.hero p.tagline {
  margin: 0 auto;
  max-width: 30rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ---- features ---- */
ul.features {
  list-style: none;
  margin: 2.75rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

ul.features li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: 1rem 1.15rem;
}

ul.features strong { display: block; margin-bottom: 0.15rem; }
ul.features span { color: var(--muted); font-size: 0.94rem; }

/* ---- store buttons ---- */
.stores {
  margin: 2.5rem 0 0;
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stores a {
  display: inline-block;
  padding: 0.7rem 1.35rem;
  border-radius: 0.6rem;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

.stores a[aria-disabled="true"] {
  background: var(--card);
  color: var(--muted);
  border: 1px dashed var(--line);
  cursor: default;
  font-weight: 500;
}

/* ---- support ---- */
.support {
  margin-top: 3rem;
  padding: 1.25rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.support h2 { margin: 0 0 0.35rem; font-size: 1rem; }
.support p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* ---- footer ---- */
footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

footer a { color: var(--muted); }
footer nav { margin-bottom: 0.6rem; display: flex; gap: 1.25rem; justify-content: center; flex-wrap: wrap; }
footer nav a { color: var(--accent); font-weight: 500; text-decoration: none; }
footer nav a:hover { text-decoration: underline; }

/* ---- legal documents ---- */
.doc { padding-top: 3rem; }

.doc .back {
  display: inline-block;
  margin-bottom: 2rem;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.94rem;
}

.doc h1 { font-size: 1.85rem; letter-spacing: -0.02em; margin: 0 0 0.4rem; }
.doc .updated { color: var(--muted); font-size: 0.9rem; margin: 0 0 2.5rem; }

.doc h2 {
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 1.2rem;
}

.doc h3 { margin: 1.75rem 0 0.5rem; font-size: 1.02rem; }
.doc ul, .doc ol { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.4rem; }

.doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.93rem;
}

.doc th, .doc td {
  border: 1px solid var(--line);
  padding: 0.55rem 0.7rem;
  text-align: left;
  vertical-align: top;
}

.doc th { background: var(--card); font-weight: 600; }

/* wide tables must scroll themselves, never the page */
.scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.doc blockquote {
  margin: 1.25rem 0;
  padding: 0.9rem 1.1rem;
  background: var(--card);
  border-left: 3px solid var(--accent);
  border-radius: 0 0.5rem 0.5rem 0;
}

.doc blockquote p { margin: 0; }

/* unfilled placeholders — deliberately loud so they cannot ship unnoticed */
.todo {
  background: #ffe9a8;
  color: #6b4e00;
  padding: 0.05rem 0.35rem;
  border-radius: 0.25rem;
  font-weight: 600;
  font-size: 0.92em;
}

@media (prefers-color-scheme: dark) {
  .todo { background: #6b5300; color: #ffe9a8; }
}

a { color: var(--accent); }
