/* Gapfyre — shared styles for the published legal and support pages.
 *
 * Warm neutrals and the app's flame accent, defined light-first on :root so a
 * viewer with no explicit preference gets a readable long-form page. The dark
 * block only redefines tokens; no colour has its only definition there.
 */

:root {
  --bg:        #fbf8f5;
  --surface:   #ffffff;
  --border:    #e6ddd3;
  --text:      #1d1815;
  --muted:     #6b5f54;
  --primary:   #c8410d;
  --primary-h: #a5340a;
  --rule:      #efe7de;
  --mark:      #14110f;

  --measure: 34rem;
  --radius: 10px;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
          'Helvetica Neue', Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #14110f;
    --surface:   #1f1a16;
    --border:    #3d332b;
    --text:      #f5ece1;
    --muted:     #a89988;
    --primary:   #ff7d47;
    --primary-h: #ffa079;
    --rule:      #2b2420;
    --mark:      #f5ece1;
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  font-synthesis-weight: none;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem 5rem;
}

/* ---- masthead ---------------------------------------------------------- */

header.top {
  border-bottom: 1px solid var(--rule);
  margin-bottom: 3rem;
}

header.top .wrap {
  padding-top: 1.75rem;
  padding-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
}

.wordmark {
  font-size: 1.0625rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--mark);
  text-decoration: none;
  margin-right: auto;
}

.wordmark:hover { color: var(--primary); }

nav.top-nav {
  display: flex;
  gap: 1.25rem;
  font-size: 0.9375rem;
}

nav.top-nav a {
  color: var(--muted);
  text-decoration: none;
}

nav.top-nav a:hover { color: var(--primary); }
nav.top-nav a[aria-current='page'] { color: var(--text); font-weight: 500; }

/* ---- type -------------------------------------------------------------- */

h1 {
  font-size: 2rem;
  line-height: 1.15;
  letter-spacing: -0.022em;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.1875rem;
  line-height: 1.3;
  letter-spacing: -0.012em;
  font-weight: 600;
  margin: 2.75rem 0 0.75rem;
  scroll-margin-top: 1.5rem;
}

h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.75rem 0 0.5rem;
}

p, ul, ol { margin: 0 0 1.05rem; }

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

li { margin-bottom: 0.45rem; }

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

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--primary-h); }

strong { font-weight: 600; }

code {
  font: 0.875em var(--mono);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}

.lede {
  font-size: 1.0625rem;
  color: var(--muted);
  margin-bottom: 1.75rem;
}

.updated {
  font-size: 0.875rem;
  color: var(--muted);
  margin: 0 0 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--rule);
}

/* ---- table of contents ------------------------------------------------- */

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  margin: 0 0 2.5rem;
}

.toc h2 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.625rem;
  font-weight: 600;
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.toc li { margin-bottom: 0.3rem; }

/* ---- callout ----------------------------------------------------------- */

.note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}

.note p:last-child { margin-bottom: 0; }

/* ---- summary table ----------------------------------------------------- */

.scroll-x { overflow-x: auto; margin: 0 0 1.5rem; }

table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.9375rem;
  min-width: 30rem;
}

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

th {
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom-color: var(--border);
}

/* ---- home index -------------------------------------------------------- */

.cards { display: grid; gap: 0.75rem; margin: 2rem 0 0; padding: 0; list-style: none; }

.cards a {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.125rem 1.25rem;
  text-decoration: none;
  color: inherit;
}

.cards a:hover { border-color: var(--primary); }

.cards strong { display: block; margin-bottom: 0.2rem; color: var(--primary); }
.cards span { color: var(--muted); font-size: 0.9375rem; }

/* ---- footer ------------------------------------------------------------ */

footer.bottom {
  border-top: 1px solid var(--rule);
  margin-top: 4rem;
  padding-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--muted);
}

footer.bottom p { margin-bottom: 0.4rem; }

@media (max-width: 30rem) {
  body { font-size: 16px; }
  h1 { font-size: 1.625rem; }
  .wrap { padding-bottom: 3.5rem; }
}
