/* ════════════════════════════════════════════════════════════
   legal.css — public Terms / Privacy pages (/terms, /privacy)
   Landing-styled, readable, print-friendly.
════════════════════════════════════════════════════════════ */
.tc-legal {
  padding: clamp(90px, 12vh, 130px) 0 70px;
  min-height: 70vh;
}
.tc-legal-grid {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

/* ── Sidebar ─────────────────────────────────────────── */
.tc-legal-side { position: sticky; top: 96px; }
.tc-legal-switch {
  display: flex; gap: 6px; padding: 5px;
  background: var(--tc-surface, rgba(255,255,255,.6));
  border: 1px solid var(--tc-border, rgba(255,255,255,.84));
  border-radius: 999px; margin-bottom: 20px;
}
.tc-legal-switch a {
  flex: 1; text-align: center;
  padding: 8px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 800; color: var(--tc-muted, #7a8fa0);
  text-decoration: none; transition: background .15s, color .15s;
}
.tc-legal-switch a.active {
  background: linear-gradient(135deg, #3de8c8, #00c4e8);
  color: #05231d;
}
.tc-legal-toc { display: flex; flex-direction: column; gap: 2px; }
.tc-legal-toc-h {
  font-size: 11px; font-weight: 900; letter-spacing: .07em;
  text-transform: uppercase; color: var(--tc-muted, #7a8fa0);
  margin-bottom: 8px;
}
.tc-legal-toc a {
  font-size: 13px; font-weight: 700; color: var(--tc-muted, #7a8fa0);
  text-decoration: none; padding: 5px 10px; border-left: 2px solid transparent;
  border-radius: 0 8px 8px 0; line-height: 1.35;
  transition: color .15s, background .15s, border-color .15s;
}
.tc-legal-toc a:hover {
  color: var(--tc-text, #343e48);
  background: rgba(0,196,180,.08);
  border-left-color: var(--tc-accent, #00d4b4);
}

/* ── Document ────────────────────────────────────────── */
.tc-legal-doc {
  background: var(--tc-surface-solid, rgba(255,255,255,.78));
  border: 1px solid var(--tc-border, rgba(255,255,255,.84));
  border-radius: 24px;
  box-shadow: 0 24px 64px rgba(0,80,130,.14);
  padding: clamp(24px, 4vw, 48px);
}
.tc-legal-head { border-bottom: 1px solid rgba(200,218,232,.5); padding-bottom: 20px; margin-bottom: 26px; }
.tc-legal-head h1 {
  font-size: clamp(26px, 4.5vw, 36px); font-weight: 900;
  color: var(--tc-text, #343e48); margin: 0 0 12px; line-height: 1.15;
}
.tc-legal-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px;
  font-size: 13px; font-weight: 700; color: var(--tc-muted, #7a8fa0);
}
.tc-legal-meta i { margin-right: 3px; }
.tc-legal-ver {
  font-size: 11.5px; font-weight: 800;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(0,196,180,.12); color: #00a892;
}
.tc-legal-print {
  margin-left: auto; border: none; cursor: pointer;
  background: rgba(200,218,232,.3); color: var(--tc-muted, #7a8fa0);
  font-family: inherit; font-size: 13px; font-weight: 800;
  padding: 7px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 5px;
}
.tc-legal-print:hover { color: var(--tc-text, #343e48); }

/* ── Body content (admin-authored HTML) ──────────────── */
.tc-legal-body { color: var(--tc-text, #343e48); font-size: 15.5px; line-height: 1.75; }
.tc-legal-body .legal-lead { font-size: 16.5px; color: #33475b; margin-bottom: 26px; }
.tc-legal-body h2 {
  font-size: 20px; font-weight: 900; color: var(--tc-text, #343e48);
  margin: 32px 0 12px; scroll-margin-top: 96px; line-height: 1.25;
}
.tc-legal-body h2:first-child { margin-top: 0; }
.tc-legal-body p  { margin: 0 0 14px; }
.tc-legal-body ul { margin: 0 0 16px; padding-left: 22px; }
.tc-legal-body li { margin-bottom: 8px; }
.tc-legal-body strong { font-weight: 800; color: var(--tc-text, #343e48); }
.tc-legal-body a { color: #00a892; font-weight: 700; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 860px) {
  .tc-legal-grid { grid-template-columns: 1fr; gap: 22px; }
  .tc-legal-side { position: static; }
  .tc-legal-toc { display: none; }        /* long ToC is noise on mobile */
}

/* ── Dark mode ───────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .tc-legal-body { color: #dfe8f0; }
  .tc-legal-body .legal-lead { color: #b9c9d8; }
  .tc-legal-body h2, .tc-legal-body strong, .tc-legal-head h1 { color: #eef4f9; }
}

/* ── Print ───────────────────────────────────────────── */
@media print {
  .tc-nav, .tc-footer, .tc-legal-side, .tc-legal-print { display: none !important; }
  .tc-legal { padding: 0; }
  .tc-legal-grid { display: block; }
  .tc-legal-doc { box-shadow: none; border: none; border-radius: 0; padding: 0; }
  body { background: #fff; }
}
