/* Legal pages (privacy-policy.html, terms.html) for Fandom Ship Names Generator.
   Ported from the claude.ai Design canvas board "Legal" (Legal.dc.html, -Mobile, -Dark) and
   the tokens in sng.css; only what this layout uses. Theme: data-theme on <html> (legal.js,
   localStorage "sng-theme", shared with the landing page), else prefers-color-scheme. */

/* ---- fonts (self-hosted, shared with the landing page) ---- */
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/inter-400.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/inter-500.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("fonts/inter-600.woff2") format("woff2");
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/inter-700.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/libre-caslon-text-400.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text"; font-style: italic; font-weight: 400; font-display: swap;
  src: url("fonts/libre-caslon-text-400i.woff2") format("woff2");
}
@font-face {
  font-family: "Libre Caslon Text"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/libre-caslon-text-700.woff2") format("woff2");
}

/* ---- tokens (sng.css, light) ---- */
:root {
  color-scheme: light;
  --rose-300: #f697ca;
  --rose-400: #ee6cb0;
  --rose-600: #cc2f7f;
  --rose-700: #ab1f68;
  --plum-500: #9243c9;
  --plum-600: #7730aa;
  --plum-700: #5b2484;
  --plum-800: #3f1860;
  --iris-300: #bdb0ff;
  --iris-600: #5a3fd1;

  --colorAccent: var(--rose-700);
  --colorAccentLight: var(--rose-400);
  --accent-cool-ink: var(--iris-600);
  --primary_text: #271828;
  --secondary_text: #7a6180;
  --on-accent: #ffffff;
  --surface-app: #fdf7fc;
  --surface-card: #ffffff;
  --surface-alt: #faeef6;
  --hairline: #ecd0e2;
  --focus-ring: var(--plum-500);
  --w-ink: var(--colorAccent);

  --grad-brand: linear-gradient(135deg, var(--rose-600) 0%, var(--plum-600) 100%);
  --grad-cta: linear-gradient(118deg, var(--rose-600) 0%, var(--plum-600) 55%,
    var(--iris-600) 100%);
  --grad-hero: radial-gradient(120% 90% at 50% 32%, var(--rose-700) 0%, var(--plum-700) 50%,
    var(--plum-800) 100%);
  --shadow-sm: 0 1px 2px rgba(43, 24, 32, 0.10), 0 1px 3px rgba(43, 24, 32, 0.06);

  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Libre Caslon Text", "Hoefler Text", "Big Caslon", Baskerville, Georgia, serif;
  --type-caption-size: 12px;
  --type-label-size: 14px;
  --type-body-size: 16px;
  --type-body-lg-size: 18px;
  --type-headline-size: 28px;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --leading-tight: 1.08;
  --leading-snug: 1.25;
  --leading-normal: 1.5;
  --tracking-tight: -0.01em;
  --tracking-caps: 0.12em;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --radius-xs: 6px;
  --radius-md: 16px;
  --radius-pill: 999px;
}

/* ---- tokens (sng.css, dark): explicit choice, or the OS when no choice is stored ---- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --colorAccent: #b82a78;
  --accent-cool-ink: var(--iris-300);
  --primary_text: #f7e8f4;
  --secondary_text: #c8a6c4;
  --surface-app: #150b18;
  --surface-card: #241430;
  --surface-alt: #2c1838;
  --hairline: #3c2440;
  --focus-ring: var(--rose-300);
  --w-ink: var(--rose-300);
  --grad-hero: radial-gradient(120% 90% at 50% 32%, #b8267a 0%, #5e1768 48%, #34174e 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --colorAccent: #b82a78;
    --accent-cool-ink: var(--iris-300);
    --primary_text: #f7e8f4;
    --secondary_text: #c8a6c4;
    --surface-app: #150b18;
    --surface-card: #241430;
    --surface-alt: #2c1838;
    --hairline: #3c2440;
    --focus-ring: var(--rose-300);
    --w-ink: var(--rose-300);
    --grad-hero: radial-gradient(120% 90% at 50% 32%, #b8267a 0%, #5e1768 48%, #34174e 100%);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.45);
  }
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--surface-app);
  color: var(--primary_text);
  font-family: var(--font-ui);
  font-size: var(--type-body-size);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
}
h1, h2, h3, p, ul, ol { margin: 0; }
a { color: var(--accent-cool-ink); text-underline-offset: 3px; }
a:hover { color: var(--w-ink); }
:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px;
  border-radius: var(--radius-xs); }
svg { display: block; }
button { font: inherit; color: inherit; }
[hidden] { display: none !important; }

.w-skip {
  position: absolute; left: var(--space-4); top: -100px; z-index: 50;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--space-4);
  border-radius: var(--radius-pill); background: var(--surface-card); color: var(--primary_text);
  font-weight: var(--font-weight-semibold); box-shadow: var(--shadow-sm);
}
.w-skip:focus { top: var(--space-2); }

.w-wrap { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 var(--space-5); }

/* ---- nav (as Landing) ---- */
.w-nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--surface-app) 86%, transparent);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}
.w-nav-in { display: flex; align-items: center; gap: var(--space-5); min-height: 64px; }
a.w-brand {
  display: flex; align-items: center; gap: 10px; margin-right: auto; min-height: 44px;
  color: var(--primary_text); text-decoration: none;
}
.w-brand-mark {
  width: 30px; height: 30px; flex: none; border-radius: 9px; background: var(--grad-brand);
  display: grid; place-items: center;
}
.w-brand-mark svg { width: 16px; height: 16px; fill: #fff; }
.w-brand-name {
  font-family: var(--font-display); font-size: var(--type-body-lg-size);
  letter-spacing: var(--tracking-tight);
}
.w-nav-cta {
  display: inline-flex; align-items: center; height: 44px; padding: 0 20px;
  border-radius: var(--radius-pill); background: var(--grad-cta); color: var(--on-accent);
  font-weight: var(--font-weight-semibold); font-size: var(--type-label-size);
  text-decoration: none; box-shadow: var(--shadow-sm);
}
.w-nav-cta:hover { color: var(--on-accent); filter: brightness(1.06); }
.w-theme {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0;
  border: 1px solid var(--hairline); border-radius: var(--radius-pill);
  background: var(--surface-card); color: var(--primary_text); cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.w-theme svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
/* the sun shows in dark (switch to light), the moon in light */
.w-theme .i-sun { display: none; }
:root[data-theme="dark"] .w-theme .i-sun { display: block; }
:root[data-theme="dark"] .w-theme .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .w-theme .i-sun { display: block; }
  :root:not([data-theme="light"]) .w-theme .i-moon { display: none; }
}

/* ---- doc header ---- */
.l-head {
  padding: var(--space-7) 0 var(--space-6);
  border-bottom: 1px solid var(--hairline);
  background: radial-gradient(60% 120% at 50% 0%,
    color-mix(in srgb, var(--colorAccentLight) 18%, transparent), transparent 70%);
}
.l-kicker {
  font-size: var(--type-caption-size); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--w-ink); font-weight: var(--font-weight-medium);
}
.l-h1 {
  font-family: var(--font-display); font-weight: 400; font-size: clamp(36px, 5vw, 56px);
  line-height: var(--leading-tight); letter-spacing: var(--tracking-tight);
  margin: var(--space-2) 0 var(--space-3);
}
.l-meta { color: var(--secondary_text); font-size: var(--type-label-size); }
.l-tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.l-tab {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  border: 1.5px solid var(--hairline); border-radius: var(--radius-pill);
  color: var(--secondary_text); font-size: var(--type-label-size);
  font-weight: var(--font-weight-medium); text-decoration: none;
}
.l-tab:hover { border-color: var(--w-ink); color: var(--primary_text); }
.l-tab[aria-current="page"] {
  background: var(--grad-brand); border-color: transparent; color: var(--on-accent);
}

/* ---- body: contents list + reading column ---- */
.l-body {
  display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--space-7);
  padding-top: var(--space-7); padding-bottom: var(--space-8);
}
.l-toc { position: sticky; top: 88px; align-self: start; max-height: calc(100vh - 104px);
  overflow-y: auto; }
.l-toc-title {
  font-size: var(--type-caption-size); letter-spacing: var(--tracking-caps);
  text-transform: uppercase; color: var(--secondary_text); margin: 0 0 var(--space-2);
}
.l-toc ol {
  list-style: none; margin: 0; padding: 0; display: grid; gap: 2px;
  border-left: 2px solid var(--hairline);
}
.l-toc a {
  display: flex; align-items: center; min-height: 44px; padding: 4px var(--space-3);
  margin-left: -2px; border-left: 2px solid transparent; color: var(--secondary_text);
  font-size: var(--type-label-size); line-height: 1.35; text-decoration: none;
}
.l-toc a:hover { color: var(--primary_text); border-left-color: var(--w-ink); }
.l-toc-mobile { display: none; }

.l-doc {
  max-width: 68ch; color: var(--primary_text); font-size: var(--type-body-size);
  line-height: 1.65; overflow-wrap: break-word;
}
.l-doc h2 {
  font-family: var(--font-display); font-weight: 400; font-size: var(--type-headline-size);
  line-height: var(--leading-snug); letter-spacing: var(--tracking-tight);
  margin: var(--space-7) 0 var(--space-3); scroll-margin-top: 88px;
}
.l-doc h2:first-of-type { margin-top: var(--space-6); }
.l-doc h3 {
  font-size: var(--type-body-lg-size); font-weight: var(--font-weight-semibold);
  line-height: var(--leading-snug); margin: var(--space-5) 0 var(--space-2);
}
.l-doc p, .l-doc ul { margin: 0 0 var(--space-4); }
.l-doc ul { padding-left: 1.25em; list-style: disc; }
.l-doc li { margin-bottom: var(--space-2); }
.l-doc li::marker { color: var(--w-ink); }
.l-doc strong { font-weight: var(--font-weight-semibold); }
.l-doc .l-sources { color: var(--secondary_text); font-size: var(--type-label-size); }

.l-summary {
  background: var(--surface-card); border: 1px solid var(--hairline);
  border-radius: var(--radius-md); padding: var(--space-5); box-shadow: var(--shadow-sm);
}
.l-summary-title {
  display: block; font-family: var(--font-display); font-weight: 400;
  font-size: var(--type-body-lg-size); margin-bottom: var(--space-2);
}
.l-doc .l-summary ul { margin: 0; }
.l-doc .l-summary li:last-child { margin-bottom: 0; }

.l-table-wrap {
  overflow-x: auto; margin: 0 0 var(--space-5); border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}
.l-table {
  width: 100%; min-width: 600px; border-collapse: collapse;
  font-size: var(--type-label-size); line-height: 1.5;
}
.l-table caption {
  caption-side: top; text-align: left; padding: var(--space-3) var(--space-4);
  color: var(--secondary_text); border-bottom: 1px solid var(--hairline);
}
.l-table th, .l-table td {
  text-align: left; vertical-align: top; padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--hairline);
}
.l-table thead th {
  background: var(--surface-alt); font-weight: var(--font-weight-semibold); white-space: nowrap;
}
.l-table tbody th { font-weight: var(--font-weight-semibold); }
.l-table tr:last-child td, .l-table tr:last-child th { border-bottom: 0; }

.l-contact {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3);
  margin-top: var(--space-5); padding: var(--space-5); border-radius: var(--radius-md);
  background: var(--grad-hero); color: #fff;
}
.l-doc .l-contact p { margin: 0; flex: 1; min-width: 220px; }
.l-contact a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px;
  border-radius: var(--radius-pill); background: #fff; color: var(--plum-700);
  font-weight: var(--font-weight-semibold); text-decoration: none;
}
.l-contact a:hover { color: var(--plum-700); text-decoration: underline; }
.l-contact a:focus-visible { outline-color: #fff; }

/* ---- footer (as Landing) ---- */
.w-foot { padding: var(--space-6) 0; border-top: 1px solid var(--hairline); }
.w-foot-in {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-5);
  color: var(--secondary_text); font-size: var(--type-caption-size);
}
.w-foot-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-4); margin-left: auto; }
.w-foot a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--secondary_text);
  text-decoration: none;
}
.w-foot a:hover { color: var(--w-ink); text-decoration: underline; }

/* ---- phone width ---- */
@media (max-width: 820px) {
  .w-nav-cta { display: none; }
  .l-head { padding: var(--space-6) 0 var(--space-5); }
  .l-body { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: var(--space-5); }
  .l-toc { display: none; }
  .l-toc-mobile {
    display: block; margin-bottom: var(--space-5); background: var(--surface-card);
    border: 1px solid var(--hairline); border-radius: var(--radius-md);
  }
  .w-foot-links { margin-left: 0; }
}
@media (max-width: 400px) {
  .w-wrap { padding: 0 var(--space-4); }
  .l-summary, .l-contact { padding: var(--space-4); }
}
.l-toc-mobile summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; min-height: 52px; padding: 0 var(--space-4);
  font-weight: var(--font-weight-semibold); font-size: var(--type-label-size);
  border-radius: var(--radius-md);
}
.l-toc-mobile summary::-webkit-details-marker { display: none; }
.l-toc-mobile summary::after {
  content: ""; width: 9px; height: 9px; margin-top: -4px;
  border-right: 2px solid var(--w-ink); border-bottom: 2px solid var(--w-ink);
  transform: rotate(45deg);
}
.l-toc-mobile[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
.l-doc .l-toc-mobile ol {
  margin: 0; padding: 0 var(--space-4) var(--space-3) 2.2em; font-size: var(--type-label-size);
}
.l-doc .l-toc-mobile li { margin: 0; min-height: 44px; display: list-item; }
.l-toc-mobile a { display: inline-flex; align-items: center; min-height: 44px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---- print: the document only, black on white ---- */
@media print {
  :root, :root[data-theme="dark"] { color-scheme: light; }
  html, body { background: #fff !important; color: #000 !important; }
  .w-nav, .w-skip, .l-tabs, .l-toc, .l-toc-mobile, .w-foot { display: none !important; }
  .l-head { background: none; border-bottom: 1px solid #000; padding: 0 0 12pt; }
  .l-body { display: block; padding: 12pt 0 0; }
  .w-wrap { max-width: none; padding: 0; }
  .l-doc { max-width: none; font-size: 11pt; line-height: 1.5; }
  .l-kicker, .l-meta, .l-doc, .l-doc *, .l-head * { color: #000 !important; }
  .l-summary, .l-table-wrap { box-shadow: none; border-color: #000; background: #fff; }
  .l-table-wrap { overflow: visible; }
  .l-table { min-width: 0; }
  .l-table th, .l-table td, .l-table caption { border-color: #000; }
  .l-table thead th { background: #fff; }
  .l-contact { background: none; color: #000; padding: 0; }
  .l-contact a { background: none; padding: 0; min-height: 0; color: #000; }
  .l-doc h2, .l-doc h3 { break-after: avoid; }
  .l-doc a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; }
  }
