/* Shared styles for Letterbrawl legal pages (privacy, terms, cookies, subprocessors). */
:root {
  --bg: #121213;
  --fg: #f8f8f8;
  --muted: #8a8a8d;
  --panel: #1c1c1e;
  --correct: #1f8a8a;
  --present: #d9822b;
  --line: #2c2c2f;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { --bg:#ffffff; --fg:#1a1a1b; --muted:#5f6066; --panel:#f2f3f5; --correct:#14706f; --line:#d9dade; color-scheme:light; }
}
:root[data-theme="light"] { --bg:#ffffff; --fg:#1a1a1b; --muted:#5f6066; --panel:#f2f3f5; --correct:#14706f; --line:#d9dade; color-scheme:light; }

*, *::before, *::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  overflow-wrap: break-word;
}

.legal-header,
main,
#site-footer {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 16px;
}

.legal-header {
  padding-top: 20px;
  padding-bottom: 8px;
}

.legal-header a.back {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--fg);
  font-weight: 700;
  letter-spacing: .02em;
  text-decoration: none;
}
.legal-header a.back:hover,
.legal-header a.back:focus-visible { color: var(--correct); }

main { padding-bottom: 40px; }

h1 { font-size: 1.8rem; line-height: 1.25; margin: 16px 0 4px; }
h2 { font-size: 1.25rem; line-height: 1.3; margin: 36px 0 8px; padding-top: 8px; border-top: 1px solid var(--line); }
h3 { font-size: 1.05rem; margin: 24px 0 6px; }

p, ul, ol { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }

.updated { color: var(--muted); font-size: .9rem; margin-bottom: 24px; }
.muted { color: var(--muted); }

a { color: var(--correct); text-underline-offset: 2px; }
a:hover { color: #2bb3b3; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--present); outline-offset: 2px; }

strong { color: #fff; }

.note {
  background: var(--panel);
  border-left: 4px solid var(--present);
  border-radius: 6px;
  padding: 12px 14px;
  margin: 16px 0;
}

.toc {
  background: var(--panel);
  border-radius: 8px;
  padding: 12px 16px 4px;
  margin: 16px 0 8px;
}
.toc ol { margin: 0 0 8px; }

/* Tables scroll sideways on narrow screens instead of breaking the layout. */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 12px 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: .9rem;
  line-height: 1.45;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}
th { background: var(--panel); color: var(--fg); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td code, p code, li code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  background: var(--panel);
  padding: 1px 5px;
  border-radius: 4px;
  white-space: nowrap;
}

.btn-inline {
  font: inherit;
  color: var(--correct);
  background: none;
  border: 0;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#site-footer { padding-top: 16px; padding-bottom: 32px; border-top: 1px solid var(--line); }

@media (max-width: 480px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.15rem; }
}
