/* Shared styling for the legal pages (privacy, terms, refund).
   Extracted from tutorial.html so the three documents stay identical without
   triplicating ~250 lines; index.html and tutorial.html keep their inline
   styles because their layouts are one-offs. */

:root {
  --bg: #0d0b08;
  --bg-raise: #16130e;
  --ink: #ece5d8;
  --ink-dim: #97907f;
  --ink-faint: #5c564a;
  --amber: #ffb224;
  --amber-deep: #cc8400;
  --green: #7fd88f;
  --red: #ff6b57;
  --line: #2a251c;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.65;
  overflow-x: hidden;
}
::selection { background: var(--amber); color: #1a1204; }

body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    radial-gradient(1200px 700px at 70% -10%, rgba(255,178,36,.07), transparent 60%),
    radial-gradient(900px 600px at -10% 100%, rgba(255,178,36,.04), transparent 55%);
  pointer-events: none; z-index: 0;
}
main, header, footer { position: relative; z-index: 1; }
.wrap { max-width: 820px; margin: 0 auto; padding: 0 28px; }

a { color: var(--amber); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

kbd {
  font-family: var(--mono);
  font-size: .82em;
  padding: 2px 7px 3px;
  border: 1px solid var(--line);
  border-bottom-width: 2.5px;
  border-radius: 6px;
  background: var(--bg-raise);
  color: var(--ink);
  white-space: nowrap;
}

/* ── header ─────────────────────────────────────────────── */
header { padding: 26px 0; z-index: 100; }
header .wrap { display: flex; align-items: baseline; justify-content: space-between; max-width: 1060px; }
.wordmark {
  font-family: var(--serif); font-weight: 700; font-size: 22px;
  color: var(--ink); letter-spacing: -.01em;
}
.wordmark:hover { text-decoration: none; }
.wordmark .tick { color: var(--amber); }
nav { display: flex; gap: 26px; font-size: 13px; }
nav a { color: var(--ink-dim); }
nav a:hover { color: var(--amber); }
nav a.here { color: var(--ink); }

.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 34px; height: 34px; padding: 6px;
  background: none; border: 0; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.nav-burger span {
  display: block; height: 2px; width: 100%;
  background: var(--ink-dim); border-radius: 2px;
  transition: transform .22s ease, opacity .22s ease, background .22s ease;
}
.nav-burger[aria-expanded="true"] span { background: var(--amber); }
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── page head ──────────────────────────────────────────── */
.lede { padding: 40px 0 8px; }
.lede .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--amber-deep); margin-bottom: 14px;
}
.lede h1 {
  font-family: var(--serif); font-weight: 560;
  font-size: clamp(32px, 5vw, 48px); line-height: 1.08;
  letter-spacing: -.015em; max-width: 18ch;
}
.lede h1 em { font-style: italic; color: var(--amber); }
.lede p { margin-top: 22px; max-width: 62ch; color: var(--ink-dim); font-size: 15px; }
.lede p strong { color: var(--ink); font-weight: 500; }
.updated {
  margin-top: 20px; font-size: 12px; color: var(--ink-faint);
  letter-spacing: .04em;
}

/* The plain-language summary that opens each document. Not a substitute for
   the terms below it — the pages say so explicitly. */
.summary {
  margin-top: 28px;
  border: 1px solid rgba(255,178,36,.28);
  background: linear-gradient(170deg, rgba(255,178,36,.07), var(--bg-raise) 60%);
  border-radius: 12px;
  padding: 20px 22px;
}
.summary .label {
  font-size: 11px; font-weight: 600; letter-spacing: .16em;
  text-transform: uppercase; color: var(--amber-deep); margin-bottom: 10px;
}
.summary ul { list-style: none; }
.summary li {
  position: relative; padding: 5px 0 5px 24px;
  color: var(--ink-dim); font-size: 14px; max-width: 66ch;
}
.summary li::before { content: "→"; position: absolute; left: 0; color: var(--amber); }
.summary li strong { color: var(--ink); font-weight: 500; }

/* ── table of contents ──────────────────────────────────── */
.toc { margin-top: 30px; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.toc a {
  font-size: 12.5px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 99px;
  padding: 5px 13px; background: var(--bg-raise);
}
.toc a:hover { color: var(--amber); border-color: var(--ink-faint); text-decoration: none; }

/* ── sections ───────────────────────────────────────────── */
section { padding: 52px 0 0; }
section > .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .18em;
  text-transform: uppercase; color: var(--amber-deep); margin-bottom: 12px;
}
h2 {
  font-family: var(--serif); font-weight: 560;
  font-size: clamp(23px, 3.2vw, 30px); letter-spacing: -.01em;
  line-height: 1.15; scroll-margin-top: 24px;
}
h3 { font-family: var(--serif); font-weight: 600; font-size: 18px; margin: 28px 0 6px; }
p { color: var(--ink-dim); max-width: 66ch; margin-top: 14px; }
p strong, li strong { color: var(--ink); font-weight: 500; }
p code, li code, td code { color: var(--amber); }

ul.notes { list-style: none; margin-top: 18px; }
ul.notes li {
  position: relative; padding: 6px 0 6px 26px;
  color: var(--ink-dim); font-size: 14px; max-width: 66ch;
}
ul.notes li::before { content: "→"; position: absolute; left: 0; color: var(--amber); }

/* ── tables ─────────────────────────────────────────────── */
.tbl {
  margin-top: 22px; width: 100%;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 16px; vertical-align: top; }
th {
  font-weight: 600; color: var(--ink-dim); background: var(--bg-raise);
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase;
}
tbody tr { border-top: 1px solid var(--line); }
td { color: var(--ink-dim); }
td:first-child { color: var(--ink); }

.callout {
  margin-top: 24px;
  border: 1px solid rgba(255,178,36,.28);
  background: linear-gradient(170deg, rgba(255,178,36,.07), var(--bg-raise) 60%);
  border-radius: 12px;
  padding: 18px 20px;
  font-size: 14px; color: var(--ink-dim);
}
.callout b { color: var(--ink); font-weight: 600; }

/* Statutory / all-caps disclaimer blocks. Deliberately quieter than the amber
   callout: legally required, not something to draw the eye. */
.legalese {
  margin-top: 22px;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--bg-raise);
  padding: 18px 20px;
  font-size: 12.5px; line-height: 1.75; color: var(--ink-dim);
  max-width: none;
}

/* Cross-links to the sibling legal documents, at the foot of each page. */
.siblings { margin-top: 52px; display: flex; flex-wrap: wrap; gap: 10px; }
.siblings a {
  font-size: 13px; color: var(--ink-dim);
  border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 16px; background: var(--bg-raise);
}
.siblings a:hover { color: var(--amber); border-color: var(--ink-faint); text-decoration: none; }

footer { padding: 64px 0 60px; margin-top: 40px; border-top: 1px solid var(--line); }
footer .wrap {
  display: flex; justify-content: space-between; gap: 16px;
  font-size: 12px; color: var(--ink-faint); flex-wrap: wrap; max-width: 1060px;
}
footer a { color: var(--ink-dim); }

@media (max-width: 720px) {
  header .wrap { align-items: center; }
  .nav-burger { display: flex; }
  nav {
    position: absolute; top: calc(100% + 6px); right: 28px; left: 28px;
    flex-direction: column; gap: 0;
    background: var(--bg-raise); border: 1px solid var(--line);
    border-radius: 12px; padding: 8px; font-size: 15px;
    box-shadow: 0 18px 40px rgba(0,0,0,.5);
    opacity: 0; transform: translateY(-6px); pointer-events: none;
    transition: opacity .18s ease, transform .18s ease; z-index: 20;
  }
  nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  nav a { padding: 11px 12px; border-radius: 8px; color: var(--ink); }
  nav a.here { color: var(--amber); }
  nav a:hover { background: rgba(255,255,255,.04); }
}
