/* Shared styles for DUO legal pages (Terms, Privacy) */
:root {
  --lavender: #EFEAFB;
  --lavender-deep: #E2DAF7;
  --ink: #0F0A2E;
  --ink-soft: #4A4370;
  --duo-blue: #2C4BFF;
  --duo-pink: #E859B8;
  --match: #3D1B7A;
  --rule: rgba(61,27,122,.14);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--lavender); color: var(--ink); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
body { min-height: 100vh; }
::selection { background: var(--duo-pink); color: #fff; }

.wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* Nav (mirrors landing) */
nav.legal-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand img { width: 36px; height: 36px; display: block; }
.brand .word {
  font-family: var(--serif); font-size: 30px; letter-spacing: 0.5px;
  color: var(--ink); line-height: 1;
}
.brand .word em { font-style: italic; color: var(--match); }
.legal-nav .back {
  font-size: 14px; color: var(--ink-soft); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color .2s;
}
.legal-nav .back:hover { color: var(--ink); }

/* Header */
header.legal-header {
  padding: 56px 0 48px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 56px;
}
.legal-header .eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--match); font-weight: 500; margin-bottom: 24px;
}
.legal-header .eyebrow::before {
  content: ""; width: 28px; height: 1px; background: var(--match);
}
.legal-header h1 {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(48px, 7vw, 88px); line-height: 1.0;
  letter-spacing: -0.02em;
}
.legal-header h1 em { font-style: italic; color: var(--match); }
.legal-header .meta {
  margin-top: 24px;
  display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
  font-size: 14px; color: var(--ink-soft);
}
.legal-header .meta strong { color: var(--ink); font-weight: 500; }

/* Layout: sidebar TOC + content */
.legal-grid {
  display: grid; grid-template-columns: 260px 1fr;
  gap: 64px;
  padding-bottom: 96px;
}
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 32px; }
  aside.toc { display: none; }
}

aside.toc {
  position: sticky; top: 32px; align-self: start;
  max-height: calc(100vh - 64px); overflow-y: auto;
  font-size: 13px;
  padding-right: 8px;
}
aside.toc .toc-label {
  font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--match); font-weight: 500; margin-bottom: 14px;
}
aside.toc ol {
  list-style: none; counter-reset: toc;
  display: flex; flex-direction: column; gap: 4px;
}
aside.toc li { counter-increment: toc; }
aside.toc a {
  display: flex; gap: 12px; padding: 6px 0;
  text-decoration: none; color: var(--ink-soft);
  line-height: 1.4; transition: color .2s;
}
aside.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--serif); font-style: italic; color: var(--match);
  font-size: 14px; flex-shrink: 0; width: 22px;
}
aside.toc a:hover { color: var(--ink); }
aside.toc a.active { color: var(--ink); font-weight: 500; }

/* Article content */
article.legal {
  max-width: 720px;
  font-size: 16px; line-height: 1.65; color: var(--ink-soft);
}
article.legal h2 {
  font-family: var(--serif); font-weight: 400;
  font-size: 36px; line-height: 1.1; letter-spacing: -0.01em;
  color: var(--ink);
  margin: 56px 0 20px;
  scroll-margin-top: 24px;
  display: flex; gap: 16px; align-items: baseline;
}
article.legal h2:first-child { margin-top: 0; }
article.legal h2 .num {
  font-family: var(--serif); font-style: italic; color: var(--match);
  font-size: 22px;
}
article.legal h3 {
  font-family: var(--sans); font-weight: 600;
  font-size: 16px; letter-spacing: -0.005em;
  color: var(--ink);
  margin: 28px 0 10px;
}
article.legal h4 {
  font-family: var(--sans); font-weight: 500;
  font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--match);
  margin: 20px 0 8px;
}
article.legal p { margin-bottom: 16px; }
article.legal ul {
  list-style: none; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
article.legal ul li {
  padding-left: 22px; position: relative;
}
article.legal ul li::before {
  content: ""; position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--match);
  opacity: .55;
}
article.legal a { color: var(--match); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
article.legal a:hover { color: var(--duo-pink); }
article.legal strong { color: var(--ink); font-weight: 500; }

article.legal .callout {
  background: #fff; border-radius: 20px; padding: 24px 28px;
  border: 1px solid var(--rule);
  margin: 24px 0;
  font-size: 15px;
}
article.legal .callout p:last-child { margin-bottom: 0; }
article.legal .callout strong { color: var(--match); }

article.legal .legal-caps {
  font-size: 14px; line-height: 1.7;
}

/* Footer (mirrors landing) */
footer.legal-foot {
  background: var(--ink); color: rgba(255,255,255,.55);
  padding: 40px 0 48px; font-size: 13px;
}
footer.legal-foot .wrap { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; }
footer.legal-foot .links { display: flex; gap: 24px; }
footer.legal-foot a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
footer.legal-foot a:hover { color: #fff; }
footer.legal-foot .mark { display: flex; align-items: center; gap: 10px; }
footer.legal-foot .mark img { width: 22px; height: 22px; opacity: .9; }
