/* ============================================================
   InTheMude — Legal pages layout (terms / privacy / content-policy)
   Page-specific prose layout ONLY. All colors, fonts, spacing,
   radii, motion come from /styles.css design tokens — nothing
   new is invented here. Loaded AFTER /styles.css so it can lean
   on every :root custom property.
   No inline styles anywhere (strict CSP).
   ============================================================ */

/* ---------- Page intro band ---------- */
.legal-hero {
  padding-block: clamp(56px, 9vw, 104px) clamp(28px, 5vw, 56px);
}

.legal-hero h1 {
  font-size: var(--fs-h1);
  max-width: 16ch;
}

.legal-hero .lead {
  margin-top: var(--sp-5);
  max-width: 60ch;
}

.legal-hero .accent-rule {
  margin-top: var(--sp-5);
  margin-bottom: 0;
}

/* "Effective date" / meta line under the title */
.legal-meta {
  margin-top: var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  color: var(--muted-2);
  font-size: var(--fs-small);
}

/* ---------- Lawyer-review / status callout ---------- */
.legal-note {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-4);
  margin-bottom: var(--sp-7);
  padding: var(--sp-5);
  border: 1px solid var(--brass-line);
  border-radius: var(--radius);
  background:
    radial-gradient(140% 120% at 0% 0%, rgba(201, 166, 107, 0.10), transparent 60%),
    var(--bg-raise);
  box-shadow: var(--shadow-sm);
}

.legal-note .mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--brass-line);
  color: var(--brass);
  background: var(--brass-soft);
  font-weight: 700;
}

.legal-note h2 {
  font-size: 1.12rem;
  margin-bottom: var(--sp-1);
}

.legal-note p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* The section that holds the document sits flush under the hero,
   so it drops its own top padding (the hero already breathes). */
.legal-body {
  padding-top: 0;
}

/* ---------- Document body ---------- */
.legal-doc {
  display: grid;
  gap: var(--sp-7);
}

.legal-section {
  display: grid;
  gap: var(--sp-4);
  scroll-margin-top: 96px;
}

.legal-section h2 {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  font-size: var(--fs-h3);
  font-weight: 600;
}

.legal-section h2 .legal-section__num {
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brass);
}

.legal-section h3 {
  font-size: 1.06rem;
  margin-top: var(--sp-2);
}

.legal-section p,
.legal-section li {
  color: var(--muted);
  font-size: var(--fs-body);
  line-height: 1.7;
}

.legal-section p strong,
.legal-section li strong {
  color: var(--cream);
  font-weight: 600;
}

.legal-section a {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-section a:hover,
.legal-section a:focus-visible {
  color: var(--cream);
}

/* Bulleted lists inside a legal section, brass-dot styled to match
   the storefront's .trial-rules / .price-card lists. */
.legal-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-2);
}

.legal-list li {
  position: relative;
  padding-left: 22px;
}

.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brass);
}

/* Placeholder fields the lawyer fills in (governing law, contact, etc.) */
.legal-placeholder {
  font-style: italic;
  color: var(--brass);
}

/* ---------- Intensity-tier explainer (content policy) ---------- */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-4);
  margin-top: var(--sp-2);
}

.tier-card {
  display: grid;
  gap: var(--sp-3);
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
}

.tier-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.tier-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.94rem;
}

/* ---------- Quick "on this page" nav ---------- */
.legal-toc {
  align-self: start;
  padding: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raise);
}

.legal-toc h2 {
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-bottom: var(--sp-3);
}

.legal-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: var(--sp-2);
}

.legal-toc a {
  color: var(--muted);
  font-size: 0.92rem;
}

.legal-toc a:hover,
.legal-toc a:focus-visible {
  color: var(--cream);
}

/* Two-column layout: sticky contents rail + document */
.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
}

.legal-layout .legal-toc {
  position: sticky;
  top: 88px;
}

/* Cross-links between the three legal docs */
.legal-crosslinks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-top: var(--sp-6);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .legal-layout {
    grid-template-columns: 1fr;
  }
  .legal-layout .legal-toc {
    position: static;
    top: auto;
  }
  .tier-grid {
    grid-template-columns: 1fr;
  }
}
