/*
 * 360ops legal pages — shared stylesheet, on the 360ops brand
 * (standards/branding.md 2.0.0). Tokens, fonts and the Dark / Light / System
 * theme come from @360ops/design-tokens via the portal root layout. The names
 * below are this sheet's own aliases of brand tokens; no values here.
 */

:root, [data-theme="dark"], [data-theme="light"] {
  --bg-deep: var(--bg);
  --bg-base: var(--surface);
  --bg-card: var(--surface-2);
  --text-soft: var(--text-subtle);
  --accent-hot: var(--accent-hover);
  --orange: var(--accent-text);
  --font-body: var(--font-ui);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.legal-page {
  min-height: 100vh;
  padding: 48px 24px 96px;
}

.legal-container {
  max-width: 760px;
  margin: 0 auto;
}

/* ── Header (brand mark + section tag) ───────────────────── */
.legal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.brand-mark-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}

/* v1.1 logo lockup — uses the no-bg variant of the 12-segment ring SVG so
   the colored segments stand out against the page background. The logo
   files with the baked-in dark/light rect would camouflage on a matching
   page bg and look like an empty square. */
.brand-logo {
  width: 52px;
  height: 52px;
  display: inline-block;
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.01em;
  line-height: 1;
}

.brand-wordmark em {
  font-style: italic;
  color: var(--accent);
}

.brand-mark-link {
  gap: 14px;
}

/* Tagline strip directly under the page title */
.legal-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 0 0 12px;
}

/* Three-pillars summary at top of every legal page */
.pillars-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 0 56px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg-card);
}
.pillar {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
}
.pillar-name {
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 4px;
}
.pillar-line {
  color: var(--text-muted);
  line-height: 1.5;
}
@media (max-width: 640px) {
  .pillars-strip { grid-template-columns: 1fr; gap: 14px; }
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-soft);
}


/* ── Headlines (Newsreader, italic accent for emphasis) ───── */
h1 {
  font-family: var(--font-display);
  font-size: 48px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

h1 em {
  font-style: italic;
  color: var(--accent);
}

.legal-effective {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 56px;
  letter-spacing: 0.04em;
}

/* ── Body sections ───────────────────────────────────────── */
section {
  margin-bottom: 40px;
}

h2 {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin: 32px 0 14px;
  font-weight: 500;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

h2:first-of-type {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}

h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  margin: 24px 0 10px;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 16px;
  color: var(--text);
}

ul, ol {
  margin: 0 0 16px;
  padding-left: 24px;
}

li {
  margin-bottom: 8px;
  color: var(--text);
}

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

em {
  font-style: italic;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}

a:hover {
  border-bottom-color: var(--accent);
}

/* ── Tables (sub-processor + tier lists) ─────────────────── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 24px;
  font-size: 14px;
}

th, td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}

th {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  font-weight: 500;
}

td { color: var(--text); }

td:first-child {
  font-weight: 500;
}

/* ── Disclaimer block ────────────────────────────────────── */
.legal-disclaimer {
  margin: 32px 0;
  padding: 18px 20px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.7;
  color: var(--text-muted);
}

.legal-disclaimer strong {
  color: var(--text);
}

/* ── Footer ──────────────────────────────────────────────── */
.legal-footer {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.legal-footer a {
  font-family: var(--font-mono);
}

.legal-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .legal-page { padding: 32px 18px 64px; }
  h1 { font-size: 36px; }
  h3 { font-size: 19px; }
  table { font-size: 13px; }
  th, td { padding: 8px 10px; }
}
