/*
 * Ampe Rush legal pages: one shared stylesheet for /legal/*.html.
 * Brand tokens match the landing page. Fonts come from /assets/fonts.css (Bungee, Bricolage Grotesque, Manrope);
 * every stack falls back to system-ui. No external requests, no JavaScript required.
 */
:root {
  --bg: #22140D;
  --panel: #2E1C12;
  --deep: #1B0E08;
  --line: #4A3222;
  --ink: #FBEFD9;
  --muted: #E3D2B4;
  --gold: #F4B63B;
  --green: #1F7A4D;
  --clay: #B8432A;
  --blue: #2B5D8C;
  --font-brand: "Bungee", "Bricolage Grotesque", system-ui, sans-serif;
  --font-head: "Bricolage Grotesque", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --col: 760px;
  --radius: 14px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  overflow-wrap: break-word;
}

/* ── Skip link and focus ─────────────────────────────────────────────── */
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--gold); color: var(--deep);
  font-weight: 800; padding: 12px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.btn-play:focus-visible, .card:focus-visible, .btn:focus-visible { outline-color: var(--ink); }

/* ── Top bar ─────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: var(--deep);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 1080px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px;
}
.wordmark {
  font-family: var(--font-brand); font-weight: 400;
  font-size: 22px; letter-spacing: .04em; line-height: 1;
  color: var(--gold); text-decoration: none;
  display: inline-flex; align-items: center; min-height: 44px;
}
.wordmark span { color: var(--ink); margin-left: .32em; }
.topnav { display: flex; align-items: center; gap: 6px; }
.topnav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: 15px; }
.topnav .navlink { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; border-radius: 10px; }
.topnav .navlink:hover { background: var(--panel); }
.btn-play {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; min-width: 76px; padding: 0 18px;
  background: var(--gold); color: var(--deep) !important;
  font-family: var(--font-head); font-weight: 800; font-size: 16px;
  border-radius: 12px; box-shadow: 0 3px 0 #9C6B12;
}
.btn-play:hover { filter: brightness(1.06); }

.kente {
  height: 14px;
  background: repeating-linear-gradient(90deg,
    #F4B63B 0 22px, #1F7A4D 22px 36px, #1B0E08 36px 42px, #B8432A 42px 64px,
    #1B0E08 64px 70px, #2B5D8C 70px 84px, #1B0E08 84px 90px);
}

/* ── Document column ─────────────────────────────────────────────────── */
main { display: block; }
.doc { max-width: var(--col); margin: 0 auto; padding: 32px 16px 72px; }
.eyebrow {
  margin: 0 0 6px; color: var(--gold);
  font: 800 13px/1.2 var(--font-body); letter-spacing: .14em; text-transform: uppercase;
}
h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 800; line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(30px, 6vw, 42px); margin: 0 0 10px; letter-spacing: -.01em; }
h2 { font-size: 23px; margin: 44px 0 10px; padding-top: 6px; }
h2 .num { color: var(--gold); margin-right: .35em; }
h3 { font-size: 18.5px; margin: 26px 0 6px; color: var(--gold); }
h4 { font-size: 16.5px; margin: 18px 0 4px; }
p { margin: 0 0 14px; }
ul, ol { padding-left: 24px; margin: 0 0 14px; }
li { margin: 5px 0; }
li::marker { color: var(--gold); }
strong { font-weight: 800; }
a { color: var(--gold); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: #FFD27A; }
small, .small { font-size: 14.5px; color: var(--muted); }
.dates { color: var(--muted); font-size: 15px; margin: 0 0 22px; }
.dates strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 32px 0; }
code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9em;
  background: var(--deep); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px;
}
.path { font-weight: 700; color: var(--ink); }

/* "The short version" box */
.short {
  background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--green);
  border-radius: var(--radius); padding: 18px 20px 6px; margin: 0 0 26px;
}
.short h2 { margin: 0 0 8px; padding: 0; font-size: 20px; color: var(--gold); }
.short ul { padding-left: 20px; }

/* Callouts */
.note {
  background: var(--deep); border: 1px solid var(--line); border-left: 6px solid var(--blue);
  border-radius: var(--radius); padding: 14px 18px 2px; margin: 18px 0;
}
.note.warn { border-left-color: var(--clay); }
.note.gold { border-left-color: var(--gold); }

/* Table of contents */
.toc {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px 8px; margin: 0 0 12px; background: var(--deep);
}
.toc h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 4px; padding: 0; }
.toc ol { list-style: none; padding: 0; margin: 0; columns: 2 260px; column-gap: 24px; }
.toc li { margin: 0; break-inside: avoid; }
.toc a {
  display: flex; align-items: center; min-height: 44px; gap: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15.5px; line-height: 1.3;
}
.toc a .num { color: var(--gold); font-weight: 800; min-width: 1.8em; }
.toc a:hover { color: var(--gold); }

/* Tables */
.table-wrap {
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 14px 0 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--deep);
}
.table-wrap:focus-visible { outline-offset: 2px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; min-width: 560px; }
table.narrow { min-width: 420px; }
caption { text-align: left; padding: 12px 14px 0; color: var(--muted); font-size: 14px; caption-side: top; }
th, td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--line); }
thead th {
  color: var(--gold); font-family: var(--font-head); font-weight: 800; font-size: 14.5px;
  background: var(--panel); position: sticky; top: 0;
}
tbody tr:last-child td, tbody tr:last-child th { border-bottom: 0; }
tbody th { color: var(--ink); font-weight: 800; }
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Definition-style key facts */
dl.facts { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; margin: 12px 0 18px; }
dl.facts dt { font-weight: 800; color: var(--muted); }
dl.facts dd { margin: 0; }
@media (max-width: 480px) { dl.facts { grid-template-columns: 1fr; } dl.facts dd { margin-bottom: 8px; } }

/* Buttons inside documents */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 20px; border-radius: 12px;
  background: var(--gold); color: var(--deep); font-family: var(--font-head); font-weight: 800;
  text-decoration: none; box-shadow: 0 3px 0 #9C6B12; margin: 4px 0 12px;
}
.btn:hover { color: var(--deep); filter: brightness(1.06); }
.btn.secondary { background: var(--green); color: var(--ink); box-shadow: 0 3px 0 #0F4A2D; }
.btn.secondary:hover { color: var(--ink); }

/* Steps */
ol.steps { counter-reset: step; list-style: none; padding: 0; }
ol.steps > li { counter-increment: step; position: relative; padding: 2px 0 8px 48px; min-height: 40px; }
ol.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--ink);
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800;
}

/* Status banner (delete-account confirmation code) */
.status { display: none; }
.status.show { display: block; }

/* ── Legal home card grid ────────────────────────────────────────────── */
.cards { list-style: none; padding: 0; margin: 20px 0 28px; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 228px), 1fr)); }
.cards li { margin: 0; }
.card {
  display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 128px;
  padding: 18px 18px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--ink); text-decoration: none; position: relative; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 5px; background: var(--accent, var(--gold)); }
.card:hover { border-color: var(--gold); color: var(--ink); }
.card .card-title { font-family: var(--font-head); font-weight: 800; font-size: 19px; color: var(--gold); line-height: 1.25; }
.card .card-text { font-size: 15px; color: var(--muted); line-height: 1.5; }
.card .card-go { margin-top: auto; font-weight: 800; font-size: 14px; color: var(--ink); }
.card.green { --accent: var(--green); }
.card.clay { --accent: var(--clay); }
.card.blue { --accent: var(--blue); }

/* ── Footer ──────────────────────────────────────────────────────────── */
.site-footer { background: var(--deep); border-top: 1px solid var(--line); }
.site-footer .inner { max-width: 1080px; margin: 0 auto; padding: 28px 16px 36px; }
.site-footer h2 { font-size: 15px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 0 4px; }
.site-footer li { margin: 0; }
.site-footer a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 8px;
  color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px;
}
.site-footer a:hover { background: var(--panel); color: var(--gold); }
.site-footer a[aria-current="page"] { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.site-footer .legalline { color: var(--muted); font-size: 14.5px; margin: 0; padding: 0 10px; }
.site-footer .legalline a { display: inline; padding: 0; min-height: 0; color: var(--gold); text-decoration: underline; }

/* ── Small screens ───────────────────────────────────────────────────── */
@media (max-width: 400px) {
  body { font-size: 16.5px; }
  .wordmark { font-size: 19px; }
  .topnav .navlink { padding: 0 8px; }
  .btn-play { min-width: 64px; padding: 0 14px; }
  h2 { font-size: 21px; }
}

/* ── Print ───────────────────────────────────────────────────────────── */
@media print {
  :root { color-scheme: light; }
  body { background: #fff !important; color: #000 !important; font-size: 11.5pt; line-height: 1.45; }
  .topbar, .kente, .skip, .site-footer nav, .btn-play, .toc, .btn { display: none !important; }
  .doc { max-width: none; padding: 0; }
  h1, h2, h3, h4, p, li, td, th, dt, dd, .eyebrow, .dates, small, .small, strong, h2 .num, .toc a .num { color: #000 !important; }
  a { color: #000 !important; text-decoration: underline; }
  a[href]:not([href^="#"]):not([href^="mailto:"])::after { content: " (" attr(href) ")"; font-size: 9pt; word-break: break-all; }
  a[href^="/"]:not([href^="#"]):not([href^="mailto:"])::after { content: " (https://ampe.wontah.com" attr(href) ")"; }
  .short, .note, .table-wrap, .card { background: #fff !important; border: 1px solid #000 !important; box-shadow: none !important; }
  thead th { background: #eee !important; color: #000 !important; position: static; }
  .table-wrap { overflow: visible; }
  table { min-width: 0; font-size: 9.5pt; }
  h2, h3 { break-after: avoid; }
  tr, .short, .note { break-inside: avoid; }
  .site-footer { background: #fff; border-top: 1px solid #000; }
  .site-footer .legalline { color: #000; }
}
