/* Static legal pages (terms.html, privacy.html, legal.html). Plain CSS, no external fonts or scripts.
   Same look as the game (dark slate, cyan/emerald accents) but a normal scrolling document: game.css locks
   body scrolling for the 3D scene, so it is deliberately NOT loaded on these pages. */
:root {
    --bg: #020617;
    --panel: #0f172a;
    --panel-2: #131f38;
    --line: rgba(148, 163, 184, 0.25);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --cyan: #22d3ee;
    --emerald: #34d399;
    --amber: #fbbf24;
    --red: #fca5a5;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    overflow-wrap: anywhere;
}
a { color: var(--cyan); text-underline-offset: 2px; }
a:hover { color: #67e8f9; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
    outline: 2px solid var(--emerald); outline-offset: 2px; border-radius: 3px;
}

.page { max-width: 46rem; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; align-items: center; font-size: 0.85rem; margin-bottom: 1.5rem; padding-bottom: 0.9rem; border-bottom: 1px solid var(--line); }
.site-nav .brand { font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text); text-decoration: none; margin-right: auto; }
.site-nav a[aria-current="page"] { color: var(--text); text-decoration: none; font-weight: 700; }

h1 { font-size: 1.75rem; line-height: 1.2; margin: 0 0 0.35rem; letter-spacing: 0.02em; }
h2 { font-size: 1.15rem; margin: 2rem 0 0.5rem; color: #a5f3fc; scroll-margin-top: 4rem; }
h3 { font-size: 1rem; margin: 1.25rem 0 0.35rem; color: var(--text); }
p, ul, ol { margin: 0.6rem 0; }
ul, ol { padding-left: 1.3rem; }
li { margin: 0.3rem 0; }
.lede { color: var(--muted); margin-top: 0; }
.version-line { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.9rem; }
.note { background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--cyan); border-radius: 0.5rem; padding: 0.7rem 0.9rem; font-size: 0.95rem; }
.note.warn { border-left-color: var(--amber); }
.toc { background: var(--panel); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.7rem 1rem 0.7rem 1.2rem; font-size: 0.92rem; columns: 2 16rem; }
.toc ol { margin: 0; padding-left: 1.2rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th { text-align: left; padding: 0.45rem 0.6rem; border-bottom: 1px solid #334155; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; }
.data-table td { padding: 0.45rem 0.6rem; border-bottom: 1px solid #1e293b; vertical-align: top; }
.data-table td:first-child { white-space: nowrap; }
@media (max-width: 480px) { .data-table td:first-child { white-space: normal; } }
.contact-box { background: var(--panel-2); border: 1px solid var(--line); border-radius: 0.5rem; padding: 0.7rem 0.9rem; font-size: 0.95rem; }
.contact-box dt { font-weight: 700; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; margin-top: 0.5rem; }
.contact-box dt:first-child { margin-top: 0; }
.contact-box dd { margin: 0.1rem 0 0; white-space: pre-line; }

/* Request forms (legal.html) */
.report-form { background: var(--panel); border: 1px solid var(--line); border-radius: 0.75rem; padding: 1rem; margin: 1rem 0; }
.report-form fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.field { margin: 0.9rem 0; }
.field label, .field .label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.25rem; }
.field .hint { display: block; font-size: 0.8rem; color: var(--muted); font-weight: 400; margin-top: 0.1rem; }
.field input[type="text"], .field input[type="email"], .field textarea {
    width: 100%; background: rgba(0, 0, 0, 0.45); color: var(--text); border: 1px solid #334155; border-radius: 0.5rem;
    padding: 0.55rem 0.7rem; font: inherit; font-size: 0.95rem;
}
.field textarea { min-height: 7rem; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--cyan); }
.field [aria-invalid="true"] { border-color: #ef4444; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 0.8rem 0; font-size: 0.92rem; }
.check input { flex: none; width: 1.1rem; height: 1.1rem; margin-top: 0.2rem; accent-color: var(--cyan); }
/* leave room when a field is scrolled into view */
.field, .check, .form-result { scroll-margin-top: 1.5rem; }
.field input, .field textarea { scroll-margin-top: 1.5rem; }
.field-error { color: var(--red); font-size: 0.82rem; margin: 0.25rem 0 0; }
.field-error:empty { display: none; }
.btn { font: inherit; font-size: 0.85rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.7rem 1.2rem; border-radius: 0.5rem; color: #a7f3d0; background: rgba(16, 185, 129, 0.2); border: 1px solid rgba(16, 185, 129, 0.55); cursor: pointer; }
.btn:hover:not(:disabled) { background: rgba(16, 185, 129, 0.35); border-color: var(--emerald); }
.btn:disabled { opacity: 0.5; cursor: wait; }
.form-result { margin: 0.9rem 0 0; padding: 0.7rem 0.9rem; border-radius: 0.5rem; font-size: 0.95rem; border: 1px solid var(--line); }
.form-result:empty { display: none; }
.form-result[data-kind="success"] { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.45); color: #6ee7b7; }
.form-result[data-kind="error"] { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.45); color: var(--red); }
.form-result strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; user-select: all; }

.footer { margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }

/* Copyright line (owner decision 2026-10-13): every supporting page that is not gameplay itself (this page,
   plus the login screen in index.html) gets this centered credit line at the very bottom. Separate from
   .footer (that's a left-aligned row of cross-page links) so it stays centered regardless of how many links
   are in the row above it. Year is filled in by js/legal-pages.js (setFooterYear) so this never goes stale. */
.footer-copyright { margin-top: 0.75rem; text-align: center; font-size: 0.8rem; color: var(--muted); }

@media (max-width: 480px) {
    body { font-size: 15.5px; }
    h1 { font-size: 1.5rem; }
    .report-form { padding: 0.8rem; }
    .site-nav .brand { flex-basis: 100%; }
    .toc { columns: 1; }
}
