/*
 * legal.css — shared stylesheet for the static legal pages (privacy.html, terms.html).
 *
 * These two pages are deliberately plain HTML rather than React routes, so that a
 * legal document is readable with JavaScript disabled and cannot be broken by an
 * SPA bundle failing to load. The cost of that is this file: the tokens below are
 * a hand-copy of the ones in src/App.css.
 *
 * ⚠️ If the design system in src/App.css changes, change the :root block here too.
 *    Nothing enforces it — that is the trade for keeping these pages JS-free.
 */

:root {
  /* ── Surfaces ── */
  --bg-root:     #020617;
  --bg:          #0f172a;
  --surface:     #1e293b;
  --surface-2:   #334155;
  --surface-3:   #475569;

  /* ── Accent ── */
  --blue:        #0ea5e9;
  --blue-mid:    #38bdf8;
  --blue-dark:   #0284c7;
  --blue-light:  rgba(14, 165, 233, 0.15);
  --blue-subtle: rgba(14, 165, 233, 0.08);

  /* Wordmark blue — matches the "It" in <Logo /> (src/components/Logo.jsx) */
  --brand:       #185FA5;

  /* ── Text ── */
  --text:        #f1f5f9;
  --text-2:      #94a3b8;
  --text-3:      #475569;

  /* ── Borders ── */
  --border:      rgba(51, 65, 85, 0.7);
  --border-2:    #334155;

  /* ── Shadows ── */
  --shadow-xs:   0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm:   0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);

  /* ── Radius ── */
  --radius:      8px;
  --radius-lg:   12px;

  /* ── Fonts ── */
  --font:        'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:   'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
}

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

html {
  background-color: var(--bg-root);
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) transparent;
}

body {
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ───────────────────────────────────────────
   Header — mirrors the marketing nav
─────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  height: 58px;
  gap: 2rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-word {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
}
.logo-word span { color: var(--brand); }

.site-nav {
  display: flex;
  gap: 1.5rem;
  margin-left: 1rem;
  flex: 1;
}
.site-nav a {
  font-size: 14px;
  color: var(--text-2);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.15s;
}
.site-nav a:hover { color: var(--text); }

.site-header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

/* ───────────────────────────────────────────
   Buttons — copied from .btn in src/App.css
─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 13px;
  font-family: var(--font);
  font-weight: 500;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s;
  letter-spacing: 0.01em;
  line-height: 1;
}
.btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(14, 165, 233, 0.3);
}

.btn-primary {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.btn-primary:hover { background: var(--blue-dark); box-shadow: var(--shadow-sm); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid transparent;
}
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }

/* ───────────────────────────────────────────
   Document body
─────────────────────────────────────────── */
.wrap {
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 4rem;
}

h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.5px;
  margin-bottom: 0.5rem;
}

.meta {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 1rem;
}

p strong, li strong { color: var(--text); font-weight: 600; }

ul {
  margin: 0.5rem 0 1.25rem;
  padding-left: 1.25rem;
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.75;
}
ul li { margin-bottom: 0.4rem; }
ul li::marker { color: var(--text-3); }

a { color: var(--blue-mid); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--blue); }

/* Callout — matches .info-box in src/App.css */
.notice {
  background: var(--blue-subtle);
  border: 1px solid rgba(14, 165, 233, 0.25);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 13px;
  color: var(--blue-mid);
  line-height: 1.7;
  margin: 0 0 2rem;
}

/* ───────────────────────────────────────────
   Tables
─────────────────────────────────────────── */
.table-scroll { overflow-x: auto; margin: 1rem 0 1.5rem; }

table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}
th {
  text-align: left;
  padding: 10px 12px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 600;
  border-bottom: 1px solid var(--border-2);
  white-space: nowrap;
}
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  vertical-align: top;
  line-height: 1.6;
}
tr:last-child td { border-bottom: none; }

/* ───────────────────────────────────────────
   Footer — mirrors the marketing footer
─────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 2.5rem 1.5rem;
}
.site-footer-inner { max-width: 1080px; margin: 0 auto; }

.footer-cols {
  display: flex;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-bottom: 2rem;
}
.footer-brand { min-width: 180px; flex: 1; }
.footer-brand p {
  font-size: 13px;
  color: var(--text-2);
  margin-top: 0.75rem;
  line-height: 1.6;
  max-width: 220px;
}
.footer-col { min-width: 130px; }
.footer-col h3 {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.footer-col a {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  text-decoration: none;
  margin-bottom: 6px;
}
.footer-col a:hover { color: var(--text); text-decoration: none; }

.footer-base {
  border-top: 1px solid var(--border);
  padding-top: 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}
.footer-base p { font-size: 12px; color: var(--text-3); margin: 0; }
.footer-base a { color: var(--text-3); text-decoration: none; }

/* ───────────────────────────────────────────
   Responsive
─────────────────────────────────────────── */
@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-header-inner { gap: 1rem; }
  .wrap { padding: 2rem 1.25rem 3rem; }
  h1 { font-size: 23px; }
}
