/* Core — legal pages. Builds on style.css (tokens, nav, footer, buttons). */

.legal-page { background: var(--bg); }

/* ---------- Hero ---------- */
.lg-hero { position: relative; padding: calc(var(--nav-h) + clamp(56px, 9vw, 120px)) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.lg-hero::before {   /* a low red glow, like light from below the frame */
  content: ""; position: absolute; left: 50%; bottom: -40%; width: min(1100px, 140vw); height: 80%; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(255,59,47,.13), transparent 70%); pointer-events: none;
}
.crumbs { position: relative; display: flex; flex-wrap: wrap; gap: 10px; color: var(--ink-3); margin: 0 0 28px; }
.crumbs a { color: var(--ink-2); transition: color .2s; }
.crumbs a:hover { color: var(--ink); }
.crumbs [aria-current] { color: var(--red-2); }
.lg-title { position: relative; margin: 0; font-size: clamp(2.8rem, 8vw, 6.6rem); line-height: .95; letter-spacing: -0.055em; font-weight: 500; text-wrap: balance; }
.lg-lead { position: relative; margin: 26px 0 0; max-width: 36em; color: var(--ink-2); font-size: clamp(1.02rem, 1.4vw, 1.2rem); }
/* one light strip with dark ends, as in the launch posts */
.lg-strip { position: relative; display: block; height: 3px; width: min(420px, 70%); margin: clamp(36px, 5vw, 56px) 0 0; border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--red) 12%, var(--red-hot) 50%, var(--red) 88%, transparent); box-shadow: var(--glow); }
.lg-meta { position: relative; display: grid; gap: 18px 48px; margin: 34px 0 0; }
@media (min-width: 760px) { .lg-meta { grid-template-columns: auto auto auto; justify-content: start; } }
.lg-meta div { margin: 0; }
.lg-meta dt { color: var(--ink-3); margin-bottom: 6px; }
.lg-meta dd { margin: 0; color: var(--ink); font-size: 15px; }
.lg-meta a { border-bottom: 1px solid var(--line-2); transition: border-color .2s; }
.lg-meta a:hover { border-color: var(--red-2); }
.lg-actions { position: relative; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.lg-actions .btn-ghost { font-size: 14px; color: var(--ink-2); transition: color .2s, border-color .2s; }
.lg-actions .btn-ghost:hover { color: var(--ink); }

/* ---------- Body: table of contents + document ---------- */
.lg-body { display: grid; gap: 32px; padding-bottom: clamp(90px, 12vw, 160px); border-top: 1px solid var(--line); padding-top: clamp(36px, 5vw, 64px); }
@media (min-width: 1000px) { .lg-body { grid-template-columns: 260px minmax(0, 1fr); gap: 72px; } }

.toc { position: relative; }
@media (min-width: 1000px) { .toc-box { position: sticky; top: calc(var(--nav-h) + 32px); max-height: calc(100vh - var(--nav-h) - 64px); overflow: auto; scrollbar-width: thin; } }
.toc-box > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; min-height: 48px; color: var(--ink-2); }
.toc-box > summary::-webkit-details-marker { display: none; }
.toc-box > summary::after { content: ""; width: 8px; height: 8px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); transition: transform .3s var(--ease); }
.toc-box[open] > summary::after { transform: rotate(-135deg); }
@media (max-width: 999px) { .toc-box { border: 1px solid var(--line-2); border-radius: 16px; padding: 0 18px; background: var(--bg-1); } .toc-box[open] { padding-bottom: 10px; } }
@media (min-width: 1000px) { .toc-box > summary { pointer-events: none; min-height: 0; margin-bottom: 18px; } .toc-box > summary::after { display: none; } }
.toc-list { list-style: none; margin: 0; padding: 0; }
.toc-list a { position: relative; display: grid; grid-template-columns: 30px 1fr; gap: 6px; padding: 9px 0 9px 14px; font-size: 14px; line-height: 1.35; color: var(--ink-3); transition: color .2s; }
.toc-list a::before { content: ""; position: absolute; left: 0; top: 50%; width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%; background: var(--ink-4); transition: background-color .2s, box-shadow .2s; }
.toc-list a .mono { font-size: 11px; padding-top: 2px; color: var(--ink-3); }
.toc-list a:hover { color: var(--ink); }
.toc-list a[aria-current] { color: var(--ink); }
.toc-list a[aria-current]::before { background: var(--red); box-shadow: 0 0 8px var(--red), 0 0 16px rgba(255,59,47,.6); }
.toc-list a[aria-current] .mono { color: var(--red-2); }

/* ---------- Document ---------- */
.policy { min-width: 0; outline: none; }
.doc { max-width: 760px; }
.doc-sec { padding: clamp(36px, 5vw, 56px) 0; border-bottom: 1px solid var(--line); scroll-margin-top: calc(var(--nav-h) + 20px); }
.doc-sec:first-child { padding-top: 0; }
.doc h2 { display: grid; grid-template-columns: 48px 1fr; align-items: baseline; margin: 0 0 22px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.12; letter-spacing: -0.035em; font-weight: 500; text-wrap: balance; }
.doc h2 .n { font-size: 12px; color: var(--red-2); letter-spacing: .14em; }
.doc h3 { margin: 30px 0 12px; font-size: 1.1rem; letter-spacing: -0.02em; font-weight: 500; color: var(--ink); }
.doc p { margin: 0 0 16px; color: var(--ink-2); }
.doc p:last-child { margin-bottom: 0; }
.doc a:not(.btn-red) { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(255,106,92,.5); text-underline-offset: 3px; transition: text-decoration-color .2s; }
.doc a:not(.btn-red):hover { text-decoration-color: var(--red-2); }
.doc > .doc-sec > p, .doc > .doc-sec > ul, .doc > .doc-sec > h3, .doc .cases { padding-left: 0; }
@media (min-width: 760px) { .doc > .doc-sec > :not(h2):not(.glance):not(.tbl) { margin-left: 48px; } .doc .tbl { margin-left: 48px; } }

/* the short version: six cards */
.glance { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 640px) { .glance { grid-template-columns: 1fr 1fr; } }
.glance li { position: relative; padding: 22px 22px 24px; border: 1px solid var(--line); border-radius: 18px; background: linear-gradient(180deg, var(--bg-2), var(--bg-1)); overflow: hidden; }
.glance li::before { content: ""; position: absolute; left: 22px; right: 22px; top: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,59,47,.7), transparent); }
.glance .g-k { display: block; color: var(--red-2); margin-bottom: 10px; font-size: 11px; }
.glance p { margin: 0; color: var(--ink); font-size: 15.5px; line-height: 1.5; }

/* tables: rows become cards on narrow screens */
.tbl { margin: 26px 0; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--bg-1); }
.tbl table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.tbl tbody tr:last-child > * { border-bottom: 0; }
.tbl thead th { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; font-weight: 400; color: var(--ink-3); background: var(--bg-2); }
.tbl tbody th { color: var(--ink); font-weight: 500; width: 28%; }
.tbl td { color: var(--ink-2); }
.tbl-2 tbody th { width: 36%; }
.loc { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.loc-ch::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--red); box-shadow: 0 0 8px var(--red); }
@media (max-width: 699px) {
  .tbl { background: none; border: 0; border-radius: 0; overflow: visible; }
  .tbl thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .tbl table, .tbl tbody, .tbl tr, .tbl th, .tbl td { display: block; width: auto; }
  .tbl tr { border: 1px solid var(--line); border-radius: 14px; background: var(--bg-1); padding: 14px 16px; margin-bottom: 10px; }
  .tbl th, .tbl td { padding: 0; border: 0; }
  .tbl tbody th { width: auto; font-size: 15.5px; margin-bottom: 10px; }
  .tbl td { padding-top: 8px; margin-top: 8px; border-top: 1px solid var(--line); }
  .tbl td::before { content: attr(data-h); display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 3px; }
  .loc { white-space: normal; }
}

/* lists of cases and choices */
.cases { margin: 20px 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.cases > div { display: grid; gap: 4px 28px; padding: 16px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 760px) { .cases > div { grid-template-columns: 200px 1fr; } }
.cases dt { color: var(--ink); font-weight: 500; }
.cases dd { margin: 0; color: var(--ink-2); }
.dash { list-style: none; margin: 0 0 16px; padding: 0; }
.dash li { position: relative; padding-left: 26px; margin-bottom: 12px; color: var(--ink-2); }
.dash li::before { content: ""; position: absolute; left: 2px; top: .78em; width: 12px; height: 2px; border-radius: 2px; background: var(--red); box-shadow: 0 0 6px rgba(255,59,47,.7); }

.callout { margin: 26px 0 0; padding: 24px 24px 26px; border: 1px solid rgba(255,59,47,.28); border-radius: 18px; background: radial-gradient(120% 140% at 0% 0%, rgba(255,59,47,.08), transparent 60%), var(--bg-1); }
.callout h3 { margin: 0 0 10px; }
.callout p { color: var(--ink-2); }

.contact-card { font-style: normal; display: grid; gap: 18px; align-items: start; justify-items: start; padding: 26px; border: 1px solid var(--line-2); border-radius: 20px; background: var(--bg-1); color: var(--ink-2); line-height: 1.6; }
@media (min-width: 760px) { .contact-card { grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; } }
.contact-card .brand { min-height: 0; color: var(--ink); }
.contact-card .btn-red svg { width: 15px; height: 15px; }

.to-top { display: inline-flex; align-items: center; gap: 10px; margin-top: 44px; min-height: 44px; color: var(--ink-3); transition: color .2s; }
.to-top svg { width: 16px; height: 16px; }
.to-top:hover { color: var(--ink); }

.legal-page .foot { padding-top: 32px; }
.legal-page .foot-row { margin-top: 0; }

/* ---------- Print: plain black on white, no navigation ---------- */
@media print {
  @page { margin: 18mm 16mm; }
  :root { --ink: #000; --ink-2: #222; --ink-3: #555; --line: #ccc; --line-2: #bbb; --bg-1: #fff; --bg-2: #f3f3f3; }
  html, body, .legal-page { background: #fff !important; color: #000; font-size: 11pt; }
  .nav, .skip, .toc, .lg-actions, .to-top, .foot, .lg-strip, .crumbs, .lg-hero::before { display: none !important; }
  .lg-hero { padding: 0 0 18px; }
  .lg-title { font-size: 26pt; }
  .lg-body { display: block; border: 0; padding: 0; }
  .doc { max-width: none; }
  .doc-sec { padding: 14px 0; break-inside: auto; }
  .doc h2 { break-after: avoid; font-size: 15pt; }
  .glance li, .callout, .tbl, .contact-card { background: #fff !important; border-color: #ccc; break-inside: avoid; }
  .glance li::before, .dash li::before, .loc-ch::before { box-shadow: none; }
  .doc a { color: #000; text-decoration: none; }
  .doc > .doc-sec > :not(h2):not(.glance):not(.tbl), .doc .tbl { margin-left: 0 !important; }
}
