/* Terms of Service / Privacy Policy (web/terms.html, web/privacy.html).
   Standalone static pages, not part of the SPA shell — reuses styles.css's
   light "workspace" tokens/fonts/.btn for brand consistency, but its own
   layout: a narrow, readable prose column instead of the app's grid/panels.
   Long-form legal text in landing.html's neon-terminal palette would be
   genuinely harder to read at length, so this intentionally does NOT reuse
   landing.css — these are utility pages, not marketing. */

body.legal {
  background: var(--bg);
  min-height: 100vh;
}

.legal-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.legal-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}

.legal-header a.logo-badge {
  text-decoration: none;
}

.legal-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.85rem;
  margin-left: 16px;
}

.legal-header nav a:hover {
  color: var(--fg);
}

.legal-content h1 {
  font-size: 1.6rem;
  margin: 0 0 6px;
}

.legal-content .legal-updated {
  color: var(--dim);
  font-size: 0.82rem;
  margin: 0 0 32px;
}

.legal-content h2 {
  font-size: 1.05rem;
  margin: 36px 0 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.legal-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--fg);
  font-size: 0.92rem;
  line-height: 1.65;
}

.legal-content ul,
.legal-content ol {
  padding-left: 22px;
  margin: 10px 0;
}

.legal-content li + li {
  margin-top: 6px;
}

.legal-content a {
  color: var(--cta);
}

.legal-content a:hover {
  color: var(--cta-hover);
}

.legal-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.8rem;
}

.legal-footer a {
  color: var(--muted);
}

/* Language switcher and prevailing-language notice on the translated legal
   pages (epic:localization #118). Plain links, like the landing page's --
   these pages carry no JavaScript, and a reader who arrived in a language
   they cannot read has no other way out. `width: 100%` with `order: 99`
   drops the row below the logo and nav rather than squeezing in beside
   them. */
.legal-lang {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  width: 100%;
  order: 99;
  padding-top: 10px;
  font-size: 0.78rem;
}

.legal-lang-link {
  color: var(--muted);
  text-decoration: none;
}

.legal-lang-link:hover {
  color: var(--fg);
  text-decoration: underline;
}

.legal-lang-current {
  color: var(--fg);
  font-weight: 600;
}

/* The notice has to be read, not skimmed past: it is the only thing on the
   page telling the reader that what follows is not the document that binds
   them. Given a left rule and its own background so it does not read as
   just another paragraph of preamble. */
.legal-content .legal-notice {
  margin: 0 0 32px;
  padding: 12px 14px;
  border-left: 3px solid var(--cta);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.6;
}

/* CJK has no spaces to break at, so a long Latin run (an email address, a
   region name like eu-west-1) would otherwise push the column sideways. */
.legal-content {
  overflow-wrap: anywhere;
}
