/* Legal pages: same tokens and chrome as Discoverly-landing.html (listing design language). */
:root {
  color-scheme: only light;
  --night: #140e2e;
  --indigo: #2b1e5c;
  --violet: #3a2a7a;
  --lime: #c9f24d;
  --lavender: #cfc7ee;
  --lavender-dim: #9d93c9;
  --paper: #f6f5fa;
  --surface: #eeebf5;
  --card: #ffffff;
  --ink: #1a1238;
  --body: #4a4466;
  --muted: #5c5677;
  --hair: rgba(26, 18, 56, .1);
  --hair-dark: rgba(207, 199, 238, .14);
  --dark-bg: radial-gradient(1100px 640px at 82% -12%, #3a2a7a 0%, rgba(58, 42, 122, 0) 62%), linear-gradient(135deg, #2b1e5c 0%, #140e2e 72%);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4vw, 56px);
  --max: 1320px;
  --gap: clamp(16px, 2vw, 28px);
}
@media (prefers-contrast: more) {
  :root {
    --body: #1a1238; --muted: #1a1238;
    --lavender: #ffffff; --lavender-dim: #e4dff7;
    --hair: rgba(26, 18, 56, .45); --hair-dark: rgba(255, 255, 255, .45);
    --dark-bg: #140e2e;
  }
  .gridlines::before { display: none; }
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-padding-top: 24px; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
h1, h2, p, ol, ul, table { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }
:focus { outline: none; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 4px; }
.dark :focus-visible { outline-color: var(--lime); }
p { text-wrap: pretty; }

.wrap { max-width: var(--max); margin: 0 auto; padding-inline: var(--gutter); }
.dark { position: relative; background: var(--dark-bg); background-color: var(--night); color: #fff; isolation: isolate; }
.gridlines::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(var(--hair-dark) 1px, transparent 1px), linear-gradient(90deg, var(--hair-dark) 1px, transparent 1px);
  background-size: 72px 72px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 0%, transparent 78%);
  opacity: .55;
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-weight: 650; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--lime); }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  font: 650 16px/1 var(--font); letter-spacing: -.01em; text-decoration: none;
  background: var(--lime); color: var(--night);
  transition: background-color .15s ease;
}
@media (hover: hover) {
  .btn:hover { background: #d8ff63; }
  .nav-links a:hover { color: #fff; }
  .toc a:hover { color: var(--ink); }
  .clause a:hover, .intro a:hover { text-decoration-thickness: 2.5px; }
  .foot-row a:not(.lockup):hover { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

.lockup { display: inline-flex; align-items: center; gap: 12px; font-weight: 650; font-size: 21px; letter-spacing: -.015em; text-decoration: none; min-height: 44px; color: #fff; }
.lockup svg { width: 36px; height: 36px; border-radius: 9px; flex: none; box-shadow: 0 0 0 1px var(--hair-dark); }
.nav { display: flex; align-items: center; gap: 8px 32px; min-height: 84px; border-bottom: 1px solid var(--hair-dark); }
.nav .brand { margin-right: auto; }
.nav-links { display: flex; gap: 4px 30px; }
.nav-links a { color: var(--lavender); font-weight: 500; font-size: 16px; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* Header */
.doc-head { padding-block: clamp(56px, 7vw, 104px) clamp(56px, 6vw, 88px); }
.doc-head h1 { font-size: clamp(48px, 7vw, 108px); font-weight: 700; letter-spacing: -.05em; line-height: .96; margin: 26px 0 0 -.04em; }
.intro { margin-top: 28px; max-width: 60ch; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: var(--lavender); }
.intro strong { color: #fff; font-weight: 650; }
.meta { margin-top: 22px; font-family: var(--mono); font-size: 14px; color: var(--lavender-dim); }

/* Body: sticky contents on the left, clauses on the right */
.doc { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding-block: clamp(64px, 8vw, 120px) clamp(96px, 11vw, 160px); }
.toc { grid-column: 1 / 4; align-self: start; position: sticky; top: 24px; }
.toc-h { font-size: 13.5px; font-weight: 650; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--ink); }
.toc ol { margin-top: 6px; }
.toc a { display: grid; grid-template-columns: 34px 1fr; align-items: baseline; min-height: 44px; padding: 10px 0; font-size: 15.5px; font-weight: 500; line-height: 1.35; color: var(--body); text-decoration: none; border-bottom: 1px solid var(--hair); }
.toc a span { font-family: var(--mono); font-size: 13px; color: var(--violet); }
.clauses { grid-column: 5 / 13; border-top: 1px solid var(--ink); }
.clause { display: grid; grid-template-columns: 72px minmax(0, 1fr); column-gap: var(--gap); padding: 36px 0 40px; border-bottom: 1px solid var(--hair); }
.clause .num { font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--violet); padding-top: 8px; }
.clause h2 { font-size: clamp(26px, 2.4vw, 34px); font-weight: 650; letter-spacing: -.03em; line-height: 1.15; margin-bottom: 16px; text-wrap: balance; }
.clause .doc-p { color: var(--body); max-width: 68ch; }
.clause .doc-p + .doc-p { margin-top: 16px; }
.clause strong { font-weight: 650; color: var(--ink); }
.clause a, .intro a { color: var(--violet); font-weight: 600; }
.intro a { color: var(--lime); }
.doc-note { margin-top: 18px; font-size: 16px; color: var(--muted); max-width: 68ch; }
.doc-table { width: 100%; border-collapse: collapse; margin-top: 18px; background: var(--card); border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--hair); }
.doc-table th, .doc-table td { text-align: left; vertical-align: top; padding: 14px 18px; font-size: 16px; line-height: 1.5; }
.doc-table th { font-size: 13px; font-weight: 650; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); background: #fbfafd; border-bottom: 1px solid var(--hair); }
.doc-table td { color: var(--body); border-bottom: 1px solid var(--hair); }
.doc-table tr:last-child td { border-bottom: 0; }
.doc-table td:first-child { font-weight: 600; color: var(--ink); }

/* Footer */
.foot { padding-top: clamp(56px, 6vw, 88px); overflow: hidden; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 30px; padding-bottom: 22px; border-bottom: 1px solid var(--hair-dark); font-size: 16px; }
.foot-row .lockup { margin-right: auto; }
.foot-row a:not(.lockup) { color: var(--lavender); font-weight: 500; text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.foot .mark { font-size: 20vw; font-weight: 700; letter-spacing: -.055em; line-height: .76; color: rgba(207, 199, 238, .1); white-space: nowrap; margin: 3vw 0 0 calc(max(0px, (100vw - var(--max)) / 2) + var(--gutter) - .05em); }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .toc { position: static; grid-column: 1 / 13; margin-bottom: 48px; }
  .clauses { grid-column: 1 / 13; }
  .clause { grid-template-columns: 1fr; row-gap: 6px; }
  .clause .num { padding-top: 0; }
  .doc-table th, .doc-table td { padding: 12px 14px; }
}
@media (max-width: 520px) {
  .nav .btn { display: none; }
}
