/* Legal pages — /privacy and /terms.
 *
 * Standalone rather than reusing styles.css: the app's sheet is a
 * single-page-app layout (fixed rail, statusbar, panels) and a long legal
 * document wants none of it. The palette is copied so the two read as one site;
 * a second full stylesheet is a smaller cost than making the app's layout
 * survive a page it was never shaped for.
 *
 * The reading measure is the point of this file: legal text is read linearly and
 * at length, so it gets a narrow column, generous leading, and a size that does
 * not require zooming on a phone.
 */
:root {
  --ink: #eaf2ff;
  --dim: #7f8db3;
  --dimmer: #55618a;
  --bg: #05060c;
  --line: rgba(255, 255, 255, 0.085);
  --line-2: rgba(255, 255, 255, 0.16);
  --cyan: #4cc9f0;
  --violet: #a06bff;
  --magenta: #ff5ea8;
  --grad: linear-gradient(100deg, var(--cyan), var(--violet) 48%, var(--magenta));
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15.5px/1.72 var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* A soft wash so the page is not a flat black rectangle, matching the app. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 500px at 12% -10%, rgba(76, 201, 240, 0.10), transparent 60%),
    radial-gradient(800px 520px at 88% 0%, rgba(255, 94, 168, 0.09), transparent 62%);
}

.legalbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 18px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 8, 16, 0.82);
  backdrop-filter: blur(14px);
}
.legalbrand {
  font-size: 13px; font-weight: 700; letter-spacing: 0.22em;
  text-decoration: none; color: transparent;
  background: var(--grad); -webkit-background-clip: text; background-clip: text;
}
.legalbar nav { margin-left: auto; display: flex; gap: 18px; }
.legalbar nav a {
  font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--dim); text-decoration: none;
}
.legalbar nav a:hover { color: var(--ink); }

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 46px 26px 80px;
}

.legal h1 {
  font-size: 27px; line-height: 1.25; margin: 0 0 26px;
  letter-spacing: -0.01em;
}
.legal h2 {
  font-size: 17px; margin: 42px 0 12px; padding-top: 18px;
  border-top: 1px solid var(--line);
  letter-spacing: 0.01em;
}
.legal h3 { font-size: 15px; margin: 26px 0 8px; color: var(--ink); }
.legal h4 { font-size: 14px; margin: 20px 0 6px; color: var(--dim); }

.legal p { margin: 0 0 14px; color: #cfd9f2; }
.legal strong { color: var(--ink); }
.legal em { color: var(--dim); font-style: italic; }
.legal code {
  font-family: var(--mono); font-size: 0.88em;
  background: rgba(255, 255, 255, 0.06);
  padding: 1px 5px; border-radius: 4px;
}
.legal a { color: var(--cyan); text-decoration: none; border-bottom: 1px solid rgba(76, 201, 240, 0.3); }
.legal a:hover { border-bottom-color: var(--cyan); }

.legal ul { margin: 0 0 16px; padding-left: 20px; }
.legal li { margin-bottom: 7px; color: #cfd9f2; }

.legal hr { border: 0; border-top: 1px solid var(--line); margin: 34px 0; }

/* Tables carry the third-party list in the privacy policy, which is the section
   people actually come to read — so they get room rather than a scroll box. */
.legal table {
  width: 100%; border-collapse: collapse; margin: 18px 0 24px;
  font-size: 14px;
}
.legal th {
  text-align: left; padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--line-2);
  font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--dim);
  font-weight: 600;
}
.legal td {
  padding: 11px 12px 11px 0; vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: #cfd9f2;
}
.legal td:first-child { color: var(--ink); white-space: nowrap; }

.legalfoot {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 26px; border-top: 1px solid var(--line);
  font-size: 12px; color: var(--dimmer);
}
.legalfoot b { color: var(--dim); font-weight: 600; }
.legalfoot a { color: var(--dim); text-decoration: none; }
.legalfoot a:hover { color: var(--ink); }
.legalfoot .sep { color: var(--dimmer); }

@media (max-width: 620px) {
  .legal { padding: 32px 18px 60px; }
  .legal h1 { font-size: 23px; }
  .legal td:first-child { white-space: normal; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal td, .legal th { display: block; }
  .legal thead { display: none; }
  .legal tr { border-bottom: 1px solid var(--line); padding: 10px 0; }
  .legal td { border: 0; padding: 3px 0; }
}
