/* Server-rendered legal pages (/legal/:doc). Matches the product look: dark, one warm light, one cool accent. */
@import url("https://fonts.googleapis.com/css2?family=Onest:wght@400..700&display=swap");

:root {
  color-scheme: dark;
  --bg: #09090b; --bg-2: #0e0e11; --surface: #141418; --surface-2: #1a1a20;
  --line: rgba(255, 255, 255, 0.09); --line-2: rgba(255, 255, 255, 0.17);
  --text: #f6f1e7; --text-2: #bdb8ad; --text-3: #9a958b;
  --amber: #f5b544; --amber-2: #ffd27f; --amber-ink: #1b1204; --teal: #3ccfc4;
  --ff-d: "Unbounded", "Onest", system-ui, sans-serif;
  --ff-t: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --pad: clamp(16px, 4vw, 32px);
}
*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(60% 420px at 50% 0, rgba(245, 181, 68, 0.1), transparent 70%), var(--bg); color: var(--text); font: 400 1.0625rem/1.7 var(--ff-t); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: var(--amber-2); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--amber); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(245, 181, 68, 0.34); }

/* header */
.lg-head { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 0 var(--pad); background: rgba(9, 9, 11, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.lg-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 1.1rem/1 var(--ff-d); letter-spacing: -0.02em; }
.lg-brand:hover { color: var(--text); }
.lg-brand::before { content: ""; width: 28px; height: 28px; background: url(/assets/icon.svg) center / contain no-repeat; border-radius: 8px; flex: none; }
.lg-head nav { display: inline-flex; gap: 2px; color: var(--text-3); font-size: 0.8125rem; }
.lg-head nav a { color: var(--text-2); text-decoration: none; font-weight: 600; letter-spacing: 0.06em; padding: 8px 10px; border-radius: 8px; }
.lg-head nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.lg-head nav a[aria-current="page"] { color: var(--amber-2); background: rgba(245, 181, 68, 0.12); }

/* document */
.lg-doc { flex: 1; width: 100%; max-width: calc(70ch + 2 * var(--pad)); margin: 0 auto; padding: clamp(32px, 6vw, 72px) var(--pad) clamp(48px, 8vw, 96px); overflow-wrap: break-word; }
.lg-doc > :first-child { margin-top: 0; }
.lg-doc h1 { font: 500 clamp(1.6rem, 1rem + 2.8vw, 2.5rem) / 1.12 var(--ff-d); letter-spacing: -0.025em; margin: 0 0 0.9em; text-wrap: balance; }
.lg-doc h1::after { content: ""; display: block; width: 72px; height: 3px; margin-top: 18px; border-radius: 3px; background: linear-gradient(90deg, var(--amber), transparent); }
.lg-doc h2 { font: 500 clamp(1.2rem, 1rem + 1vw, 1.5rem) / 1.25 var(--ff-d); letter-spacing: -0.015em; margin: 2.2em 0 0.7em; padding-top: 1.1em; border-top: 1px solid var(--line); }
.lg-doc h3 { font: 600 1.1rem/1.35 var(--ff-t); margin: 1.8em 0 0.5em; color: var(--text); }
.lg-doc h4 { font: 600 0.8125rem/1.4 var(--ff-t); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 1.6em 0 0.4em; }
.lg-doc p { margin: 0 0 1em; color: var(--text-2); }
.lg-doc strong { color: var(--text); font-weight: 600; }
.lg-doc ul, .lg-doc ol { margin: 0 0 1.2em; padding-left: 1.4em; color: var(--text-2); }
.lg-doc li { margin: 0.35em 0; padding-left: 0.2em; }
.lg-doc li::marker { color: var(--amber); }
.lg-doc code { font: 0.9em ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--surface-2); border: 1px solid var(--line); padding: 0.1em 0.4em; border-radius: 6px; color: var(--amber-2); }
.lg-doc hr { border: 0; height: 12px; margin: 2.4em 0; background: var(--amber); opacity: 0.4; -webkit-mask: url(/assets/strip.svg) 0 0 / 28px 12px repeat-x; mask: url(/assets/strip.svg) 0 0 / 28px 12px repeat-x; }
.lg-doc blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--amber); border-radius: 0 12px 12px 0; background: rgba(245, 181, 68, 0.07); color: var(--text); }
.lg-doc table { display: block; width: 100%; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.4em 0; font-size: 0.9375rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); -webkit-overflow-scrolling: touch; }
.lg-doc th, .lg-doc td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); min-width: 8ch; }
.lg-doc th { font: 600 0.75rem/1.3 var(--ff-t); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); background: var(--bg-2); white-space: nowrap; }
.lg-doc td { color: var(--text-2); }
.lg-doc tr:last-child td { border-bottom: 0; }
.lg-doc :target { animation: lg-flash 1.6s ease-out; }
@keyframes lg-flash { from { background: rgba(245, 181, 68, 0.22); } }

/* footer */
.lg-foot { padding: 28px var(--pad) calc(28px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid var(--line); background: var(--bg-2); text-align: center; font-size: 0.875rem; color: var(--text-3); line-height: 2; }
.lg-foot a { color: var(--text-2); text-decoration: none; padding: 6px 4px; }
.lg-foot a:hover { color: var(--amber-2); text-decoration: underline; }

@media (max-width: 479px) { .lg-head { flex-wrap: wrap; padding-block: 8px; } .lg-head nav { margin-left: auto; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; } html { scroll-behavior: auto; } }
@media print {
  :root { color-scheme: light; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .lg-head, .lg-foot { display: none; }
  .lg-doc { max-width: none; padding: 0; }
  .lg-doc p, .lg-doc li, .lg-doc td { color: #111; }
  .lg-doc h1::after, .lg-doc hr { display: none; }
  .lg-doc th { background: #eee; color: #000; }
  .lg-doc table { border-color: #999; display: table; }
  a { color: #000; }
}
