/* Legal pages (privacy, terms). Same tokens as index.html. */
:root {
  --bg: #F6F5F2;
  --surface: #FFFFFF;
  --surface-2: #EFEDE9;
  --text: #111110;
  --text-soft: #55534E;
  --text-faint: #8A8781;
  --line: #E2DFD9;
  --line-strong: #D3CFC8;
  --accent: #3346A8;
  --accent-soft: #E9ECF8;
  --shadow: 0 1px 2px rgba(28,25,23,.04), 0 12px 32px rgba(28,25,23,.08);
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0B;
    --surface: #161618;
    --surface-2: #1E1E21;
    --text: #F5F4F2;
    --text-soft: #B3B1AB;
    --text-faint: #7F7D78;
    --line: #26262A;
    --line-strong: #333338;
    --accent: #8C9BEB;
    --accent-soft: #171B33;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 12px 32px rgba(0,0,0,.35);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--text); overflow-x: clip;
  font-family: var(--sans); font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: inherit; }
img { display: block; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.progress { position: fixed; inset: 0 0 auto 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 60; }

/* nav — same as the landing page */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(18px); backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; text-decoration: none; }
.mark { width: 32px; height: 32px; flex: none; } /* app icon: rounded, transparent corners */
.nav-links { display: flex; gap: 26px; font-size: 15px; color: var(--text-soft); }
.nav-links a { text-decoration: none; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang {
  font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .04em; height: 36px; padding: 0 12px; border-radius: 18px; cursor: pointer;
  background: transparent; color: var(--text-soft); border: 1px solid var(--line-strong); transition: color .2s, border-color .2s;
}
.lang:hover { color: var(--text); border-color: var(--text-faint); }
.btn-sm {
  display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 19px; font-size: 14px; font-weight: 600;
  background: var(--text); color: var(--bg); text-decoration: none; transition: transform .3s var(--ease);
}
.btn-sm:hover { transform: translateY(-1px); }

/* header */
.head { padding: 72px 0 40px; position: relative; overflow: hidden; }
.head::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%; pointer-events: none;
  background: radial-gradient(55% 55% at 50% 0%, color-mix(in srgb, var(--accent) 10%, transparent), transparent 70%);
}
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--text-faint); }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
.head h1 { position: relative; margin: 18px 0 14px; font-size: clamp(40px, 6vw, 68px); line-height: 1.04; font-weight: 600; letter-spacing: -0.035em; }
.head h1 em { font-size: 1.05em; }
.updated { position: relative; display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 15px; }
.updated::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

/* layout */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding-bottom: 96px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 14.5px; }
.toc-title { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--text-faint); margin: 0 0 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc a {
  display: block; padding: 6px 0 6px 16px; margin-left: -1px; border-left: 1px solid transparent;
  color: var(--text-soft); text-decoration: none; line-height: 1.4; transition: color .2s, border-color .2s;
}
.toc a:hover { color: var(--text); }
.toc a.active { color: var(--text); border-left-color: var(--text); }
.toc-mobile { display: none; }

/* article */
.doc { max-width: 720px; min-width: 0; overflow-wrap: break-word; }
.doc > section > p:first-child, .doc .intro {
  font-size: 19px; line-height: 1.65; color: var(--text); margin-top: 0;
}
.doc h2 {
  font-size: 24px; line-height: 1.25; letter-spacing: -0.02em; font-weight: 600;
  margin: 56px 0 14px; padding-top: 28px; border-top: 1px solid var(--line);
  display: flex; gap: 14px; align-items: baseline;
}
.doc h2 .n { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--text-faint); font-size: 22px; min-width: 1.6em; }
.doc h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 28px 0 6px; }
.doc p, .doc li { color: var(--text-soft); }
.doc p { margin: 0 0 14px; }
.doc ul { margin: 8px 0 18px; padding: 0; list-style: none; display: grid; gap: 8px; }
.doc li { position: relative; padding-left: 26px; }
.doc li::before { content: ""; position: absolute; left: 4px; top: .8em; width: 12px; height: 1px; background: var(--text-faint); }
.doc a { color: var(--accent); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.doc strong { color: var(--text); font-weight: 600; }

.table-wrap { overflow-x: auto; margin: 18px 0 20px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.doc th, .doc td { text-align: left; padding: 14px 16px; vertical-align: top; border-bottom: 1px solid var(--line); }
.doc tr:last-child td { border-bottom: 0; }
.doc th { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-faint); background: var(--surface-2); }
.doc td:first-child { color: var(--text); font-weight: 600; white-space: nowrap; }
.doc td { color: var(--text-soft); }

.contact-card {
  margin-top: 56px; padding: 28px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 20px; box-shadow: var(--shadow);
}
.contact-card img { width: 60px; height: 60px; flex: none; filter: drop-shadow(0 8px 16px rgba(28, 25, 23, .14)); }
.contact-card h3 { margin: 0 0 4px; font-size: 18px; }
.contact-card p { margin: 0; font-size: 15px; }

footer { border-top: 1px solid var(--line); padding: 40px 0 calc(36px + env(safe-area-inset-bottom)); font-size: 14.5px; color: var(--text-soft); }
.foot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.foot-links { display: flex; gap: 26px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot small { color: var(--text-faint); font-size: 13px; }

/* reveal */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0s); }
.rv.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  /* minmax(0, …): a plain 1fr column would grow to the provider table's
     min-width and make the whole page scroll sideways. */
  .layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .toc { display: none; }
  .toc-mobile {
    display: block; margin: 0 0 32px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface);
  }
  .toc-mobile summary { cursor: pointer; list-style: none; padding: 16px 18px; font-weight: 600; font-size: 15px; display: flex; justify-content: space-between; align-items: center; }
  .toc-mobile summary::-webkit-details-marker { display: none; }
  .toc-mobile summary::after { content: ""; width: 9px; height: 9px; border: solid var(--text-soft); border-width: 0 1.5px 1.5px 0; transform: rotate(45deg); margin-top: -4px; transition: transform .3s var(--ease); }
  .toc-mobile[open] summary::after { transform: rotate(-135deg); margin-top: 4px; }
  .toc-mobile ol { list-style: none; margin: 0; padding: 0 18px 14px; }
  .toc-mobile a { display: block; padding: 8px 0; color: var(--text-soft); text-decoration: none; border-top: 1px solid var(--line); font-size: 15px; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links { display: none; }
  .head { padding: 48px 0 28px; }
  .doc > section > p:first-child, .doc .intro { font-size: 17.5px; }
  .doc h2 { font-size: 21px; margin-top: 44px; }
  .contact-card { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .rv { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
