/*
 * One stylesheet for every page under /legal. The tokens are the application's
 * own (src/styles/app.css), so the legal pages read as part of drawmebaby
 * rather than as a bolted-on document set.
 *
 * These pages are plain static HTML with no script of their own, which is why
 * each one can carry a strict Content-Security-Policy. Keep it that way: an
 * inline <style> or <script> here would force the policy open again.
 */

:root {
  --ink: #1b1b1f;
  --muted: #6b6b76;
  --line: #d8d8e0;
  --surface: #ffffff;
  --page: #fbfbfd;
  --accent: #4a3aff;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
}

main {
  width: min(44rem, calc(100% - 2.5rem));
  margin: 0 auto;
  padding: 3.5rem 0 5rem;
}

/* The wordmark and its hand-drawn rule, matching src/components/BrandMark.tsx.
   Same paths, same accent: the page signs itself the way the canvas does. */
.mark {
  display: inline-grid;
  justify-items: stretch;
  margin-bottom: 2.75rem;
  text-decoration: none;
}

.mark-word {
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--ink);
  opacity: 0.82;
}

.mark-rule {
  width: 100%;
  height: 0.55rem;
  margin-top: 0.1rem;
  overflow: visible;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
}

.mark:hover .mark-word,
.mark:focus-visible .mark-word {
  opacity: 1;
}

h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.9rem, 5vw, 2.6rem);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h2 {
  margin: 2.75rem 0 0.6rem;
  font-size: 1.15rem;
  line-height: 1.3;
}

h3 {
  margin: 1.75rem 0 0.4rem;
  font-size: 0.95rem;
  line-height: 1.35;
}

p,
li {
  margin: 0 0 0.9rem;
}

ul,
ol {
  margin: 0 0 0.9rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--accent);
  text-underline-offset: 0.16em;
}

code {
  padding: 0.08em 0.35em;
  border: 1px solid var(--line);
  border-radius: 0.3rem;
  background: var(--surface);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.85em;
  overflow-wrap: anywhere;
}

.updated {
  margin-bottom: 2rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* The one-paragraph version, for readers who will not read the rest. */
.summary {
  margin: 0 0 2.5rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 0.4rem 0.9rem 0.9rem 0.4rem;
  background: var(--surface);
}

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

.note {
  margin: 1.5rem 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--surface);
  font-size: 0.92rem;
}

dl {
  margin: 0 0 0.9rem;
}

dt {
  margin-top: 0.9rem;
  font-weight: 600;
}

dd {
  margin: 0.15rem 0 0;
  color: var(--muted);
}

/* Long token lists (storage keys, endpoints) scroll rather than widen the page. */
.scroll {
  margin-bottom: 0.9rem;
  overflow-x: auto;
}

table {
  min-width: 28rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

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

th {
  font-weight: 600;
  white-space: nowrap;
}

footer {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}

footer a {
  color: inherit;
  text-decoration: underline;
}

footer nav {
  display: flex;
  gap: 0.35rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}
