/* Shared by index.html, privacy.html and terms.html.
   Self-hosted and deliberately small: these pages are what an App Review
   engineer opens from inside the app, often on a slow connection, and a
   webfont or a CDN that fails to load turns a required disclosure into a blank
   screen. No build step, no dependencies. */

:root {
  color-scheme: light dark;

  /* Lifted verbatim from Theme.swift so the site and the app are one brand.
     `brand` is 0x8A6329 rather than the lighter brass of the icon because the
     lighter value measures 3.3:1 on white and fails WCAG AA; this one clears
     it at 5.39:1 and is still recognisably brass. The gradient keeps the
     lighter stops — it is only ever a fill behind white text. */
  --brand: #8A6329;
  --brand-strong: #6F4E1F;
  --grad-from: #D9A44E;
  --grad-to: #A76E2C;
  --brand-wash: rgba(138, 99, 41, 0.07);

  /* Pure white, not the app's parchment canvas. A document people read for
     several minutes wants the plainest background there is. */
  --canvas: #FFFFFF;
  --surface: #FDFCFA;
  --rule: #E7E2D9;

  --ink: #17161A;
  --ink-soft: #5A5650;
  --ink-faint: #6E6A62;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(23, 22, 26, 0.04), 0 8px 24px rgba(23, 22, 26, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #E0A94F;
    --brand-strong: #EEC079;
    --grad-from: #E9BC6A;
    --grad-to: #C08A38;
    --brand-wash: rgba(224, 169, 79, 0.10);

    --canvas: #0E0E10;
    --surface: #1B1B1E;
    --rule: #323236;

    --ink: #F2F2F7;
    --ink-soft: #B4B4BC;
    --ink-faint: #92929C;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI",
    system-ui, "Helvetica Neue", sans-serif;
  background: var(--canvas);
  color: var(--ink);
  max-width: 46rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
  line-height: 1.9;
  font-size: 1.0625rem;
}

/* ---- Document pages -------------------------------------------------- */

header { border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; margin-bottom: 1.75rem; }

.crest {
  width: 56px;
  height: 56px;
  border-radius: 22.37%;   /* the iOS icon squircle, near enough */
  display: block;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

h1 { font-size: 1.75rem; line-height: 1.4; margin: 0 0 0.35rem; letter-spacing: -0.01em; }
h2 {
  font-size: 1.2rem;
  margin: 2.5rem 0 0.6rem;
  padding-top: 0.25rem;
  letter-spacing: -0.005em;
}
.updated { color: var(--ink-faint); font-size: 0.9rem; margin: 0; }

p { margin: 0 0 1rem; }
ul { padding-inline-start: 1.35rem; margin: 0 0 1rem; }
li { margin-bottom: 0.45rem; }
strong { font-weight: 650; }

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

.note {
  border-inline-start: 3px solid var(--brand);
  background: var(--brand-wash);
  padding: 1rem 1.15rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.97rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
}
th, td {
  text-align: start;
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
}
tr:last-child td { border-bottom: 0; }
th { font-weight: 650; background: var(--brand-wash); }

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--ink-faint);
  font-size: 0.93rem;
}
footer p { margin: 0 0 0.4rem; }

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

.landing { text-align: center; padding-top: 3.5rem; }
.landing header { border: 0; padding: 0; margin: 0 0 1.75rem; }

.landing .crest {
  width: 104px;
  height: 104px;
  margin: 0 auto 1.5rem;
}

.landing h1 { font-size: 2.5rem; margin-bottom: 0.5rem; }

.tagline {
  color: var(--brand);
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0;
}

.lede {
  color: var(--ink-soft);
  font-size: 1.1rem;
  max-width: 34rem;
  margin: 0 auto 2.5rem;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 0.85rem;
  margin: 0 0 2.75rem;
  padding: 0;
  list-style: none;
  text-align: start;
}
.features li {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  margin: 0;
  line-height: 1.7;
}
.features b { display: block; font-size: 1.02rem; margin-bottom: 0.15rem; }
.features span { color: var(--ink-soft); font-size: 0.95rem; }

.actions {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  background: var(--surface);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); color: var(--ink); }

.btn-primary {
  background: linear-gradient(135deg, var(--grad-from), var(--grad-to));
  color: #fff;
  border-color: transparent;
}
/* White on the gradient's darkest stop measures 4.6:1 — the reason the flat
   brand colour is never used as a fill behind white text. */
.btn-primary:hover { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .btn, .btn:hover { transition: none; transform: none; }
}

@media (max-width: 30rem) {
  .landing { padding-top: 2.25rem; }
  .landing h1 { font-size: 2rem; }
  .actions { flex-direction: column; }
  .btn { width: 100%; }
}
