/* ============================================================
   Legal / compliance page layout
   Editorial long-form style, matches article.css conventions
   ============================================================ */

.legal-hero {
  background: var(--bg-2);
  border-bottom: 1px solid var(--rule);
  padding: 72px 40px 56px;
}
.legal-hero-inner { max-width: 920px; margin: 0 auto; }
.legal-hero .kicker { margin-bottom: 20px; }
.legal-hero h1 {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin-bottom: 20px;
  color: var(--ink);
}
.legal-hero h1 em { font-style: italic; color: var(--plum); }
.legal-hero .lede {
  font-family: var(--font-display);
  font-size: 22px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
  margin-bottom: 28px;
}
.legal-hero .meta-row {
  display: flex;
  gap: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  flex-wrap: wrap;
}
.legal-hero .meta-row strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--ink);
  letter-spacing: -0.01em;
  text-transform: none;
  font-weight: 500;
  margin-top: 6px;
}

/* Layout with sticky TOC */
.legal-layout {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 40px 96px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
  align-items: start;
}
.legal-toc {
  position: sticky;
  top: 88px;
  font-size: 13px;
}
.legal-toc h5 {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  font-weight: 500;
}
.legal-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid var(--rule);
}
.legal-toc li { margin: 0; }
.legal-toc a {
  display: block;
  padding: 8px 0 8px 16px;
  margin-left: -1px;
  border-left: 1px solid transparent;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.35;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.legal-toc a:hover { color: var(--plum); }
.legal-toc a.active {
  color: var(--plum);
  border-left-color: var(--plum);
  font-weight: 500;
}

/* Body copy */
.legal-body { max-width: 720px; font-family: var(--font-body); }
.legal-body section { margin-bottom: 56px; scroll-margin-top: 88px; }
.legal-body h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 8px;
}
.legal-body .sec-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 14px;
  display: block;
}
.legal-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 28px 0 10px;
}
.legal-body p {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink-2);
  margin: 0 0 14px;
}
.legal-body ul, .legal-body ol {
  padding-left: 20px;
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}
.legal-body li { margin-bottom: 6px; }
.legal-body li::marker { color: var(--muted); }
.legal-body strong { color: var(--ink); font-weight: 600; }
.legal-body a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.legal-body a:hover { color: var(--plum-deep); }

/* Callout / important box */
.callout {
  background: var(--bg-2);
  border-left: 3px solid var(--plum);
  padding: 20px 24px;
  margin: 20px 0 24px;
  border-radius: 0 var(--r-card) var(--r-card) 0;
}
.callout .callout-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  margin-bottom: 8px;
  display: block;
  font-weight: 500;
}
.callout p:last-child { margin-bottom: 0; }

/* Definition list for data categories */
.dl-data {
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  overflow: hidden;
  margin: 16px 0 20px;
  background: var(--surface);
}
.dl-data .dl-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 24px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  font-size: 14px;
}
.dl-data .dl-row:last-child { border-bottom: 0; }
.dl-data dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--plum);
  padding-top: 2px;
}
.dl-data dd {
  margin: 0;
  color: var(--ink-2);
  font-size: 14px;
  line-height: 1.6;
}

/* Rights table for CCPA/state privacy */
.rights-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 16px 0 24px;
}
.right-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 20px;
}
.right-card .rt {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.right-card p { font-size: 14px; margin: 0; line-height: 1.55; }

/* Contact card at bottom */
.legal-contact {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 28px 32px;
  margin-top: 32px;
}
.legal-contact h3 { margin-top: 0; }
.legal-contact .contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 16px;
}
.legal-contact .cg-item strong {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
}

/* Hub / compliance-index page */
.hub {
  max-width: 1280px;
  margin: 0 auto;
  padding: 72px 40px 96px;
}
.hub-head { margin-bottom: 48px; }
.hub-head .kicker { margin-bottom: 20px; }
.hub-head h1 {
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 0 0 20px;
  color: var(--ink);
  max-width: 20ch;
}
.hub-head h1 em { font-style: italic; color: var(--plum); }
.hub-head .lede {
  font-family: var(--font-display);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 62ch;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 56px;
}
.hub-card {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 32px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}
.hub-card:hover {
  border-color: var(--plum);
  transform: translateY(-3px);
  box-shadow: 0 20px 40px var(--plum-tint);
}
.hub-card .hc-num {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 32px;
}
.hub-card h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  line-height: 1.15;
}
.hub-card h3 em { font-style: italic; color: var(--plum); }
.hub-card p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  margin: 0 0 24px;
  flex-grow: 1;
}
.hub-card .hc-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 16px;
  border-top: 1px solid var(--rule);
}
.hub-card .hc-meta .updated {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.hub-card .hc-meta .go {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--plum);
  display: flex;
  align-items: center;
  gap: 6px;
}
.hub-card .hc-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--success);
  margin-bottom: 20px;
}
.hub-card .hc-status .dot {
  width: 6px;
  height: 6px;
  background: var(--success);
  border-radius: 50%;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  left: 24px;
  right: 24px;
  bottom: 24px;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--r-card);
  padding: 24px 28px;
  box-shadow: 0 20px 60px rgba(31,26,20,0.18);
  z-index: 100;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
  animation: cookie-in 0.35s var(--ease-out);
}
@keyframes cookie-in {
  from { transform: translateY(24px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
.cookie-banner .cb-text .kicker { margin-bottom: 10px; font-size: 10px; }
.cookie-banner .cb-text h4 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  color: var(--ink);
}
.cookie-banner .cb-text h4 em { font-style: italic; color: var(--plum); }
.cookie-banner .cb-text p {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  max-width: 60ch;
}
.cookie-banner .cb-text a { color: var(--plum); text-decoration: underline; text-underline-offset: 3px; }
.cookie-banner .cb-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 180px;
}
.cookie-banner .btn { justify-content: center; width: 100%; }

.cookie-banner.hidden { display: none; }

/* Cookie preferences modal */
.cookie-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,10,36,0.5);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cookie-modal-backdrop.open { display: flex; }
.cookie-modal {
  background: var(--surface);
  border-radius: var(--r-card);
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow: auto;
  border: 1px solid var(--rule);
}
.cookie-modal-head {
  padding: 28px 32px 20px;
  border-bottom: 1px solid var(--rule);
}
.cookie-modal-head .kicker { margin-bottom: 12px; }
.cookie-modal-head h3 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.cookie-modal-head h3 em { font-style: italic; color: var(--plum); }
.cookie-modal-head p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
}
.cookie-modal-body { padding: 8px 32px 24px; }
.cookie-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.cookie-row:last-child { border-bottom: 0; }
.cookie-row .cr-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: var(--ink);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}
.cookie-row .cr-desc {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0 0 6px;
}
.cookie-row .cr-vendors {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Toggle switch */
.tog {
  position: relative;
  width: 40px;
  height: 22px;
  background: var(--rule);
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.tog::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s var(--ease-out);
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.tog.on { background: var(--plum); }
.tog.on::after { transform: translateX(18px); }
.tog.locked {
  background: var(--plum);
  opacity: 0.5;
  cursor: not-allowed;
}
.tog.locked::after { transform: translateX(18px); }

.cookie-modal-foot {
  padding: 20px 32px 28px;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.cookie-modal-foot .foot-left {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  align-self: center;
}
.cookie-modal-foot .foot-actions { display: flex; gap: 8px; }

/* Legal utility: dense list of definitions */
.definitions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 16px 0 24px;
  border-top: 1px solid var(--rule);
}
.definitions dt {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  padding: 14px 0 4px;
  letter-spacing: -0.01em;
}
.definitions dd {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--ink-2);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
}

/* Compliance footer strip on hub */
.compliance-strip {
  background: var(--bg-2);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 40px;
}
.compliance-strip-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.cs-item .cs-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.cs-item .cs-value {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--ink);
  line-height: 1.15;
}
.cs-item .cs-note {
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  margin-top: 6px;
}

@media (max-width: 900px) {
  .legal-layout { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px 64px; }
  .legal-toc { position: static; }
  .legal-hero { padding: 48px 24px 40px; }
  .legal-hero h1 { font-size: 44px; }
  .hub { padding: 48px 24px 64px; }
  .hub-head h1 { font-size: 44px; }
  .hub-grid { grid-template-columns: 1fr; }
  .compliance-strip-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .rights-grid { grid-template-columns: 1fr; }
  .cookie-banner { grid-template-columns: 1fr; gap: 16px; padding: 20px; left: 12px; right: 12px; bottom: 12px; }
  .cookie-banner .cb-actions { min-width: 0; }
  .dl-data .dl-row { grid-template-columns: 1fr; gap: 6px; }
  .legal-hero .meta-row { gap: 20px; }
}
