/* Inbound — legal pages (privacy, terms). Loaded after styles.css, which supplies tokens, nav, footer and buttons. */

/* ---------- Header band ---------- */
.doc-head {
  position: relative; isolation: isolate;
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-alt), #FFFFFF 85%);
}
.doc-head::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle, rgba(51, 84, 242, .14) 1.2px, transparent 1.6px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(60% 90% at 85% 0%, #000, transparent 75%);
  mask-image: radial-gradient(60% 90% at 85% 0%, #000, transparent 75%);
}
.doc-head .wrap { max-width: 784px; }
.doc-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 11px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent-hover);
  font-size: 13px; font-weight: 600; letter-spacing: 0;
}
.doc-head h1 { margin-top: 18px; font-size: clamp(40px, 7vw, 60px); letter-spacing: -0.035em; line-height: 1.02; }
.doc-meta { display: grid; gap: 2px; margin-top: 16px; color: var(--faint); font-size: 14px; }
@media (min-width: 520px) {
  .doc-meta { display: flex; flex-wrap: wrap; }
  .doc-meta li + li::before { content: "·"; margin: 0 10px; color: #B4B8C4; }
}
.doc-intro { margin-top: 20px; max-width: 62ch; color: var(--ink-2); font-size: 18px; line-height: 1.55; letter-spacing: -0.012em; }

@media (min-width: 760px) {
  .doc-head { padding: 88px 0 56px; }
  .doc-head .wrap { max-width: 784px; }
  .doc-intro { font-size: 20px; }
}

/* ---------- Layout: 720px reading column, TOC beside it on wide screens ---------- */
.doc-layout { max-width: 784px; padding-top: 32px; padding-bottom: 96px; }
@media (min-width: 760px) { .doc-layout { padding-top: 48px; padding-bottom: 128px; } }

@media (min-width: 1180px) {
  .doc-head .wrap { max-width: 1200px; padding-left: calc(32px + 216px + 64px); } /* on the site grid: TOC under the logo */
  .doc-layout {
    display: grid; grid-template-columns: 216px minmax(0, 720px); column-gap: 64px;
    max-width: 1200px; padding-top: 64px;
  }
}

/* ---------- Table of contents ---------- */
.doc-toc {
  padding: 16px 18px 14px;
  border: 1px solid var(--line); border-radius: 16px;
  background: #FFFFFF;
}
.doc-toc-title { color: var(--faint); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.doc-toc ol { margin-top: 8px; counter-reset: toc; }
.doc-toc li { counter-increment: toc; break-inside: avoid; }
.doc-toc a {
  display: flex; gap: 10px; align-items: baseline;
  padding: 4px 0; color: var(--ink-2); font-size: 14px; line-height: 1.35;
}
.doc-toc a::before {
  content: counter(toc); flex: none; min-width: 16px;
  color: var(--faint); font: 500 12px/1 var(--mono); font-variant-numeric: tabular-nums;
}
.doc-toc a:hover { color: var(--accent); text-decoration: none; }
@media (min-width: 600px) { .doc-toc ol { columns: 2; column-gap: 28px; } }

@media (min-width: 1180px) {
  .doc-toc {
    position: sticky; top: 80px; align-self: start;
    max-height: calc(100vh - 104px); overflow-y: auto;
    padding: 0; border: 0; border-radius: 0; background: none;
  }
  .doc-toc ol { columns: 1; margin-top: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
  .doc-toc a { padding: 5px 0; font-size: 13.5px; color: var(--muted); }
  .doc-toc a:hover { color: var(--ink); }
}

/* ---------- Document body ---------- */
.doc { min-width: 0; margin-top: 40px; font-size: 17px; line-height: 1.7; letter-spacing: -0.008em; }
@media (min-width: 1180px) { .doc { margin-top: 0; } }
.doc > section { scroll-margin-top: 80px; }
.doc > section + section { margin-top: 56px; }

.doc h2 {
  display: flex; align-items: center; gap: 14px;
  font-size: clamp(23px, 3vw, 28px); line-height: 1.2; letter-spacing: -0.025em;
}
.doc-num {
  flex: none; display: inline-grid; place-items: center;
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--accent-soft); color: var(--accent-hover);
  font: 600 13px/1 var(--mono); letter-spacing: 0;
}
.doc h3 { margin-top: 32px; font-size: 18px; line-height: 1.3; letter-spacing: -0.018em; }
.doc h2 + p, .doc h2 + ul { margin-top: 16px; }
.doc p, .doc ul, .doc ol, .doc .doc-table, .doc dl { margin-top: 14px; }
.doc p, .doc li, .doc dd { color: #3F3F46; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { display: grid; gap: 10px; }
.doc ul > li { position: relative; padding-left: 22px; }
.doc ul > li::before {
  content: ""; position: absolute; left: 5px; top: .72em;
  width: 6px; height: 6px; border-radius: 50%; background: #B4BCD6;
}
.doc a { text-decoration: underline; text-decoration-color: rgba(51, 84, 242, .35); text-underline-offset: 3px; overflow-wrap: anywhere; }
.doc a:hover { text-decoration-color: currentColor; }

/* The short version */
.doc-summary {
  margin-bottom: 56px; padding: 24px 22px;
  border-radius: 20px;
  background: linear-gradient(180deg, #F3F5FE, var(--bg-alt));
  box-shadow: inset 0 0 0 1px rgba(51, 84, 242, .10);
}
@media (min-width: 760px) { .doc-summary { padding: 30px 32px; } }
.doc-summary h2 { font-size: 20px; }
.doc .doc-summary ul { gap: 12px; margin-top: 16px; }
.doc .doc-summary li { padding-left: 30px; color: var(--ink); }
.doc .doc-summary li::before {
  left: 0; top: .28em; width: 18px; height: 18px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='m5 9.2 2.6 2.6L13 6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 18px no-repeat;
}

/* Callouts */
.doc .doc-note {
  margin-top: 20px; padding: 16px 18px 16px 20px;
  border-radius: 14px;
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
  color: var(--ink); font-size: 16px; line-height: 1.6;
}
.doc-contact {
  margin-top: 18px; padding: 18px 20px;
  border: 1px solid var(--line); border-radius: 14px;
  background: #FFFFFF; color: #3F3F46; font-style: normal; font-size: 16px; line-height: 1.6;
}
.doc-contact strong { display: block; margin-bottom: 2px; color: var(--ink); }

/* Tables */
.doc-table { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: #FFFFFF; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.doc th, .doc td { padding: 13px 18px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line-soft); }
.doc thead th {
  background: var(--bg-alt); border-bottom-color: var(--line);
  color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
}
.doc tbody tr:last-child td { border-bottom: 0; }
.doc td { color: #3F3F46; }
.doc td:first-child { width: 40%; color: var(--ink); font-weight: 600; }
.doc .doc-providers td:first-child { width: 28%; }

@media (max-width: 639px) {
  .doc table, .doc tbody, .doc tr, .doc td { display: block; width: 100%; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .doc tr { padding: 14px 16px; border-bottom: 1px solid var(--line-soft); }
  .doc tbody tr:last-child { border-bottom: 0; }
  .doc td { padding: 0; border: 0; }
  .doc td:first-child, .doc .doc-providers td:first-child { width: 100%; }
  .doc td + td { margin-top: 4px; }
  .doc td + td[data-label]::before {
    content: attr(data-label); display: block; margin-bottom: 1px;
    color: var(--faint); font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  }
}

/* Footer sits on a hairline on document pages */
.foot-line a[aria-current="page"] { color: var(--ink); }
main:has(.doc) + .foot-line { border-top: 1px solid var(--line); }
