/* Amida — legal pages. Tokens copied from the landing (index.html :root). */
@font-face {
  font-family: "Manrope";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/manrope-800.woff2") format("woff2");
}
:root {
  --bg: #ffffff;
  --ink: #100f18;
  --muted: #55545f;
  --line: #e4e4eb;
  --soft: #f8f7fe;
  --accent: #6244f2;
  --accent-text: #4e31db;
  --accent-hover: #5335e3;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Manrope", var(--font);
  --measure: 68ch;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1.5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--font);
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }
a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Header */
.site-header {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
  text-decoration: none;
}

/* Layout */
.layout {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
  display: grid;
  grid-template-columns: 13rem minmax(0, 1fr);
  gap: 4rem;
  align-items: start;
}

/* Document switcher */
.layout > * { min-width: 0; }
.doc-nav { position: sticky; top: 2rem; }
.doc-nav p {
  margin: 0 0 0.75rem;
  font-size: 0.875rem;
  color: var(--muted);
}
.doc-nav ul { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.doc-nav a {
  display: block;
  margin-left: -1px;
  padding: 0.4rem 0 0.4rem 1rem;
  border-left: 2px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.35;
}
.doc-nav a:hover { color: var(--ink); }
.doc-nav a[aria-current="page"] { color: var(--ink); font-weight: 600; border-left-color: var(--accent); }

/* Document */
article { max-width: var(--measure); }

h1 {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  font-weight: 700;
}
.doc-meta { margin: 0.75rem 0 2rem; color: var(--muted); font-size: 0.9375rem; }

h2 {
  margin: 2.75rem 0 0.75rem;
  font-size: 1.3125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  font-weight: 650;
}
h3 { margin: 1.75rem 0 0.5rem; font-size: 1.0625rem; font-weight: 650; }

p { margin: 0 0 1rem; }
ul { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
li::marker { color: var(--muted); }
strong { font-weight: 650; }

/* In-page contents */
.toc {
  margin: 0 0 2.5rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.toc summary {
  cursor: pointer;
  padding: 0.85rem 0;
  font-weight: 600;
  font-size: 0.9375rem;
}
.toc ol { list-style: none; margin: 0 0 1rem; padding: 0; columns: 2; column-gap: 2rem; }
.toc li { margin: 0 0 0.35rem; break-inside: avoid; font-size: 0.9375rem; }
.toc a { color: var(--ink); text-decoration: none; }
.toc a:hover { color: var(--accent); text-decoration: underline; }

/* Tables */
.table-wrap { overflow-x: auto; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: 6px; }
table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.5; }
th, td { text-align: left; vertical-align: top; padding: 0.75rem 0.9rem; border-bottom: 1px solid var(--line); }
th { background: var(--soft); font-weight: 600; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
/* Provider-style tables (3+ columns): the first column names the entity. */
table:has(th:nth-child(3)) td:first-child { font-weight: 600; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
.site-footer .inner {
  max-width: 72rem;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--ink); }

/* Mobile */
@media (max-width: 760px) {
  .layout { grid-template-columns: minmax(0, 1fr); gap: 2rem; padding-top: 1.5rem; }
  .doc-nav { position: static; }
  .doc-nav p { display: none; }
  .doc-nav ul {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    border-left: 0;
    padding-bottom: 0.25rem;
    scrollbar-width: none;
  }
  .doc-nav a {
    margin: 0;
    padding: 0.4rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    white-space: nowrap;
  }
  .doc-nav a[aria-current="page"] { border-color: var(--accent); }
  .toc ol { columns: 1; }
  th { white-space: normal; }
}

@media print {
  .site-header, .doc-nav, .toc, .site-footer { display: none; }
  .layout { display: block; padding: 0; }
  body { font-size: 11pt; }
  a { color: inherit; text-decoration: none; }
}
