/* FirstKey website. Colours match the app: spruce green, mist, and key-tag yellow on white.
   Layout: one calm column of bands; the yellow key tag in the hero is the only loud thing. */
:root {
  --paper: #ffffff;
  --mist: #eef2f0;
  --ink: #15211d;
  --muted: #55655f;
  --line: #d6dfdb;
  --spruce: #1f4a3f;
  --spruce-soft: #e1ece8;
  --on-spruce: #ffffff;
  --tag: #f2c230;
  --tag-ink: #2a2200;
  --alert: #b3362b;
  --alert-soft: #f8e3e0;
  --sun: #f2b630;
  --display: "Zilla Slab", "Rockwell", "Roboto Slab", Georgia, serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0f1715; --mist: #17221f; --ink: #e7efec; --muted: #9fb1aa; --line: #2a3a35;
    --spruce: #7cc4ad; --spruce-soft: #1d332c; --on-spruce: #0f1715; --tag: #f2c230; --tag-ink: #2a2200;
    --alert: #ff8a7d; --alert-soft: #3a1e1b; --sun: #f2b630;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0f1715; --mist: #17221f; --ink: #e7efec; --muted: #9fb1aa; --line: #2a3a35;
  --spruce: #7cc4ad; --spruce-soft: #1d332c; --on-spruce: #0f1715; --tag: #f2c230; --tag-ink: #2a2200;
  --alert: #ff8a7d; --alert-soft: #3a1e1b; --sun: #f2b630;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
a { color: var(--spruce); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.1; text-wrap: balance; margin: 0; color: var(--ink); }
h1 { font-size: clamp(2.3rem, 5.2vw, 3.6rem); font-weight: 700; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.35rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0; }

.wrap {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}

/* ---------- Header and footer ---------- */
.top { border-bottom: 1px solid var(--line); background: var(--paper); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .draw { width: 34px; height: 34px; color: var(--spruce); }
.brand span { font-family: var(--display); font-weight: 700; font-size: 1.45rem; letter-spacing: -0.01em; }
.nav { display: flex; gap: 6px 18px; flex-wrap: wrap; font-size: 0.98rem; }
.nav a { color: var(--ink); text-decoration: none; padding: 4px 0; }
.nav a:hover { color: var(--spruce); text-decoration: underline; }

.foot { border-top: 1px solid var(--line); background: var(--mist); color: var(--muted); font-size: 0.95rem; }
.foot .wrap { display: grid; gap: 14px; padding-block: 28px 36px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--ink); }

/* ---------- Drawings (the app's own line drawings) ---------- */
.draw { display: inline-flex; color: var(--spruce); flex: none; }
.draw svg { width: 100%; height: 100%; }
.draw svg * { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.draw svg .f { fill: var(--spruce-soft); }
.draw svg .dot { fill: currentColor; stroke: none; }
.draw svg .sun { fill: var(--sun); stroke: var(--sun); }
.draw svg .ray { stroke: var(--sun); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: 10px; font-weight: 700; font-size: 1rem; text-decoration: none;
  border: 2px solid var(--spruce); color: var(--spruce); background: transparent; font-family: var(--body);
}
.btn.solid { background: var(--spruce); color: var(--on-spruce); }
.btn:hover { filter: brightness(1.06); text-decoration: none; }

/* ---------- Legal pages ---------- */
.doc { padding-block: 40px 64px; }
.doc article { max-width: 70ch; display: grid; gap: 14px; }
.doc .updated { color: var(--muted); }
.doc h1 { font-size: clamp(2rem, 4.4vw, 2.8rem); }
.doc h2 { font-size: 1.45rem; margin-top: 22px; }
.doc ul, .doc ol { margin: 0; padding-left: 1.3em; display: grid; gap: 6px; }
.doc li::marker { color: var(--spruce); }
.doc .note { background: var(--mist); border-left: 4px solid var(--spruce); padding: 14px 16px; border-radius: 0 10px 10px 0; }
.doc .warn { background: var(--alert-soft); border-left-color: var(--alert); }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.98rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 700; background: var(--mist); }
.scroll-x { overflow-x: auto; }
.contact { font-weight: 700; user-select: all; }
