/* Fanout Studio legal pages: terms, privacy, cookies, accessibility.
   Self-contained on purpose: does not depend on styles.css.
   Fonts: uses the brand families if the browser already has them (self-hosted /fonts/),
   otherwise system fonts. No third-party font requests. */

/* Self-hosted brand fonts (site/fonts/, added by the site redesign). If a file is missing,
   the system-font fallbacks below take over. */
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-var.woff2") format("woff2");
  font-weight: 100 900; font-stretch: 62% 125%; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-var.woff2") format("woff2");
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --paper: #F3F5F8;
  --surface: #FFFFFF;
  --ink: #14161C;
  --ink-2: #2A2F3A;
  --muted: #4F5666;
  --rule: #D5DAE3;
  --cobalt: #1D3FD8;
  --cobalt-deep: #142FA8;
  --wash: #E6EBFB;
  --draft-bg: #FFF3D6;
  --draft-edge: #B54708;
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --gutter: clamp(16px, 4vw, 48px);
  --max: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cobalt); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cobalt-deep); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--cobalt); outline-offset: 3px; border-radius: 2px; }
.site-foot :focus-visible { outline-color: #fff; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Skip link ---------- */
.skip {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 6px;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

/* ---------- Draft banner ---------- */
.draft-banner {
  background: var(--draft-bg);
  border-bottom: 1px solid #F0C978;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.draft-banner .wrap { display: flex; gap: 12px; align-items: flex-start; padding-top: 12px; padding-bottom: 12px; }
.draft-banner .tag {
  flex: none; display: inline-block; margin-top: 1px;
  background: var(--draft-edge); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 4px; line-height: 1.4;
}
.draft-banner p { margin: 0; }

/* ---------- Header ---------- */
.site-head { background: var(--paper); border-bottom: 1px solid var(--rule); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }

.wordmark { display: inline-flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; font-weight: 850; font-size: 22px; letter-spacing: -0.01em; line-height: 1; }
.wordmark:hover { color: var(--ink); }
.wordmark .wm span { display: inline-block; }
.wordmark .wm span:nth-child(1) { font-variation-settings: "wdth" 62; }
.wordmark .wm span:nth-child(2) { font-variation-settings: "wdth" 75; }
.wordmark .wm span:nth-child(3) { font-variation-settings: "wdth" 88; }
.wordmark .wm span:nth-child(4) { font-variation-settings: "wdth" 101; }
.wordmark .wm span:nth-child(5) { font-variation-settings: "wdth" 113; }
.wordmark .wm span:nth-child(6) { font-variation-settings: "wdth" 125; }
.wordmark .studio { font-weight: 450; font-size: 0.72em; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 18px; border-radius: 6px;
  background: var(--cobalt); color: #fff; font-weight: 700; font-size: 15px;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--cobalt-deep); color: #fff; }

/* ---------- Page head ---------- */
.page-head { padding-top: clamp(36px, 6vw, 72px); padding-bottom: clamp(24px, 4vw, 40px); }
.eyebrow { margin: 0 0 10px; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--cobalt); }
.page-head h1 {
  margin: 0; font-size: clamp(36px, 6.4vw, 60px); line-height: 1.02; letter-spacing: -0.025em; font-weight: 850;
  font-variation-settings: "wdth" 88;
}
.page-head .lede { margin: 16px 0 0; max-width: 46rem; font-family: var(--serif); font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--ink-2); }
.meta { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; color: var(--muted); }
.meta strong { color: var(--ink); font-weight: 700; }

/* ---------- Layout ---------- */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; padding-bottom: clamp(56px, 8vw, 96px); }
.content { max-width: 44rem; min-width: 0; }

/* ---------- Table of contents ---------- */
.toc { position: sticky; top: 24px; max-height: calc(100vh - 48px); overflow-y: auto; padding: 4px 4px 4px 0; font-size: 14.5px; line-height: 1.4; }
.toc h2 { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; border-left: 2px solid var(--rule); }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 8px; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); text-decoration: none; }
.toc a::before { content: counter(toc) "."; flex: none; min-width: 1.9em; color: var(--muted); font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--cobalt); border-left-color: var(--cobalt); }
.toc li.plain { counter-increment: none; }
.toc li.plain a::before { content: none; }

/* ---------- Summary card ---------- */
.content .summary {
  background: var(--surface); border: 1px solid var(--rule); border-top: 4px solid var(--cobalt);
  border-radius: 10px; padding: clamp(20px, 3vw, 30px); margin: 0 0 clamp(36px, 5vw, 52px);
}
.content .summary h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -0.01em; font-weight: 800; }
.content .summary > p { margin: 0 0 14px; color: var(--muted); font-size: 15.5px; }
.content .summary ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.content .summary li { position: relative; margin: 0; padding-left: 32px; }
.content .summary li::before {
  content: ""; position: absolute; left: 0; top: .32em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--wash) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.5 9.5l3 3 6-7' fill='none' stroke='%231D3FD8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 14px no-repeat;
}

/* ---------- Body copy ---------- */
.content section { scroll-margin-top: 24px; padding-top: 8px; }
.content .summary + section { margin-top: 0; padding-top: 0; border-top: 0; }
.content section + section { margin-top: clamp(28px, 4vw, 40px); padding-top: clamp(28px, 4vw, 40px); border-top: 1px solid var(--rule); }
.content h2 { margin: 0 0 14px; font-size: clamp(22px, 2.6vw, 27px); line-height: 1.2; letter-spacing: -0.015em; font-weight: 800; display: flex; gap: 12px; align-items: baseline; }
.content h2 .n { flex: none; color: var(--cobalt); font-variant-numeric: tabular-nums; }
.content h3 { margin: 26px 0 8px; font-size: 18px; line-height: 1.3; font-weight: 750; }
.content p, .content ul, .content ol, .content dl { margin: 0 0 14px; }
.content ul, .content ol { padding-left: 1.3em; }
.content li { margin: 0 0 8px; padding-left: 2px; }
.content li::marker { color: var(--muted); }
.content strong { font-weight: 700; }
.content address { font-style: normal; }

.callout {
  margin: 18px 0; padding: 14px 18px; border-radius: 8px;
  background: var(--wash); border-left: 4px solid var(--cobalt);
  font-size: 16px;
}
.callout p:last-child { margin-bottom: 0; }

.caps { text-transform: uppercase; font-size: 15px; letter-spacing: .01em; }

/* ---------- Data tables (stack on small screens) ---------- */
.table-wrap { margin: 16px 0 20px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.data-table caption { text-align: left; font-weight: 700; padding: 0 0 8px; font-size: 15px; color: var(--ink-2); }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--rule); }
.data-table thead th { background: #E9EDF3; font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); }
.data-table tbody th { font-weight: 700; }
.data-table tr:last-child > * { border-bottom: 0; }

@media (max-width: 680px) {
  .data-table, .data-table tbody, .data-table tr, .data-table th, .data-table td { display: block; width: 100%; }
  .data-table { border: 0; background: transparent; border-radius: 0; }
  .data-table caption { display: block; width: 100%; }
  .data-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .data-table tr { background: var(--surface); border: 1px solid var(--rule); border-radius: 8px; margin: 0 0 12px; padding: 4px 0; }
  .data-table th, .data-table td { border: 0; padding: 6px 14px; }
  .data-table tbody th { font-size: 16px; padding-top: 10px; }
  .data-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
}

/* ---------- Footer ---------- */
.site-foot { background: var(--ink); color: #D9DEE8; font-size: 15px; line-height: 1.55; }
.site-foot .wrap { padding-top: 48px; padding-bottom: 40px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 32px; }
.site-foot .wordmark { color: #fff; }
.site-foot .wordmark .studio { color: #B7BFCE; }
.site-foot p { margin: 12px 0 0; max-width: 22rem; }
.site-foot h2 { margin: 0 0 10px; font-size: 12.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #B7BFCE; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-foot a { color: #fff; text-decoration: none; }
.site-foot a:hover { color: #fff; text-decoration: underline; }
.site-foot a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.site-foot address { font-style: normal; }
.site-foot .legal-line { grid-column: 1 / -1; margin: 8px 0 0; padding-top: 20px; border-top: 1px solid #343A47; max-width: none; color: #B7BFCE; font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .toc { position: static; max-height: none; overflow: visible; background: var(--surface); border: 1px solid var(--rule); border-radius: 10px; padding: 18px 20px; }
  .toc ol { border-left: 0; columns: 2; column-gap: 24px; }
  .toc li { break-inside: avoid; }
  .toc a { padding: 4px 0; margin: 0; border-left: 0; }
  .content { max-width: none; }
}
@media (max-width: 720px) {
  .site-foot .wrap { grid-template-columns: 1fr 1fr; }
  .site-foot .brand { grid-column: 1 / -1; }
}
@media (max-width: 560px) {
  body { font-size: 16.5px; }
  .toc ol { columns: 1; }
  .site-head .btn { padding: 0 14px; font-size: 14px; }
  .wordmark { font-size: 20px; }
}
@media (max-width: 380px) {
  .site-head .wrap { gap: 10px; }
  .site-head .btn { padding: 0 12px; }
  .draft-banner .wrap { flex-direction: column; gap: 6px; }
}

@media print {
  .skip, .site-head .btn, .toc { display: none; }
  .layout { display: block; }
  body { background: #fff; font-size: 11pt; }
  .site-foot { background: #fff; color: #000; }
  .site-foot a, .site-foot .wordmark { color: #000; }
  a { color: #000; }
}

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
