/* ==========================================================================
   Legal documents v2 (/tos/v2, /privacy/v2, /copyright/v2) — Skynet UI

   The prose partials carry NO class attributes at all: everything below styles
   by element, so a document can be edited as words without anyone having to
   know a class vocabulary. Every colour is a Skynet UI token.
   ========================================================================== */

body.lgv2 { background: var(--sk-bg); color: var(--sk-text); }

.lgv2 .hidden { display: none !important; }
.lgv2 [hidden] { display: none !important; }

.lgv2-head > *,
.lgv2-tabs > * { min-width: 0; }

.lgv2-main {
  /* Legal text is read, not scanned — a measure this narrow is the whole
     accessibility story on a page like this. */
  max-width: 820px;
  margin: 0 auto;
  padding: 1.5rem 1rem 4rem;
}

/* ---------- header -------------------------------------------------------- */

.lgv2-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.lgv2-head-text { flex: 1 1 20rem; }
.lgv2-head h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--sk-text);
}
.lgv2-lede { margin: 0 0 0.35rem; color: var(--sk-text-2); line-height: 1.6; }
.lgv2-date { margin: 0; color: var(--sk-muted); font-size: 0.9rem; }
.lgv2-classic { flex: 0 0 auto; }
@media (pointer: coarse) {
  .lgv2-classic { min-height: 44px; }
}

/* ---------- the three tabs ------------------------------------------------ */

.lgv2-tabs { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-bottom: 1.25rem; }
.lgv2-tab {
  display: inline-flex;
  align-items: center;
  /* 44px always, not only on a coarse pointer: Skynet UI sizes tabs for a
     mouse and these are the page's only navigation. */
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--sk-border-2);
  border-radius: 999px;
  background: var(--sk-surface);
  color: var(--sk-text-2);
  font-weight: 600;
  text-decoration: none;
}
.lgv2-tab:hover { border-color: var(--sk-primary); color: var(--sk-text); }
.lgv2-tab.is-on {
  border-color: var(--sk-primary);
  background: var(--sk-primary);
  /* Literal white on a solid accent — every palette clears 4.5:1 against it,
     which `npm run test:themes` measures. */
  color: #fff;
}

/* ---------- the document -------------------------------------------------- */

.lgv2-doc { margin-bottom: 1.25rem; }
.lgv2-prose { padding: 1.75rem; }

.lgv2-prose > :first-child { margin-top: 0; }
.lgv2-prose > :last-child { margin-bottom: 0; }

.lgv2-prose p,
.lgv2-prose li {
  color: var(--sk-text-2);
  line-height: 1.7;
  /* Legal text carries long URLs and addresses; only `anywhere` also shrinks
     min-content width, which is what stops one of them sizing the card. */
  overflow-wrap: anywhere;
}
.lgv2-prose p { margin: 0 0 1rem; }

.lgv2-prose h2, .lgv2-prose h3 {
  margin: 1.75rem 0 0.6rem;
  font-weight: 700;
  color: var(--sk-text);
}
.lgv2-prose h2 { font-size: 1.2rem; }
.lgv2-prose h3 { font-size: 1.05rem; }

.lgv2-prose ol, .lgv2-prose ul { margin: 0 0 1rem; padding-left: 1.4rem; }
.lgv2-prose li { margin-bottom: 0.6rem; }
/* The classic pages number their clauses, and people cite them by number. */
.lgv2-prose ol { list-style: decimal; }
.lgv2-prose ul { list-style: disc; }

.lgv2-prose strong { color: var(--sk-text); font-weight: 700; }
/* Skynet UI paints <a> with --sk-primary, which is a FILL token and measures
   about 2.8:1 as text on a card. --sk-primary-text is the readable half. */
.lgv2-prose a, .lgv2-foot a { color: var(--sk-primary-text); }

.lgv2-foot { margin: 0; color: var(--sk-muted); line-height: 1.6; }

@media (max-width: 480px) {
  .lgv2-main { padding-left: 0.75rem; padding-right: 0.75rem; }
  .lgv2-prose { padding: 1.25rem; }
}
