/* The published legal pages. One stylesheet, no font file, no image, no script.
   The colours are apps/mobile/src/tokens.ts: bg #fffdf2, card #ffffff, ink #1e222a,
   sunshine #ffd60a, muted #6c727f, hairline rgba(30,34,42,0.09), amberBg #fff8dc. */

:root {
  --bg: #fffdf2;
  --card: #ffffff;
  --ink: #1e222a;
  --muted: #6c727f;
  --hairline: rgba(30, 34, 42, 0.09);
  --sunshine: #ffd60a;
  --amber-bg: #fff8dc;
  --measure: 36rem;
  --gutter: 1rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

@media (min-width: 46rem) {
  body { font-size: 18px; }
  :root { --gutter: 1.5rem; }
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
}

.skip:focus {
  left: 0;
  z-index: 2;
  padding: 0.6rem 1rem;
  background: var(--sunshine);
  color: var(--ink);
  text-decoration: none;
}

a { color: #1b7fa8; }

a:hover { color: var(--ink); }

a:focus-visible, span[aria-current]:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---- the band at the top ---- */

.masthead {
  border-bottom: 1px solid var(--hairline);
  background: var(--card);
}

.masthead nav {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0.85rem var(--gutter);
  display: flex;
  gap: 1.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.masthead a { text-decoration: none; color: var(--muted); }

.masthead a:hover { color: var(--ink); }

.masthead [aria-current] {
  color: var(--ink);
  box-shadow: inset 0 -0.35rem 0 var(--sunshine);
}

/* ---- the sheet the document sits on ---- */

.sheet {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.25rem var(--gutter) 3rem;
}

h1 {
  font-size: 1.85rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0 0 0.9rem;
}

h1::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 0.35rem;
  margin-top: 0.9rem;
  border-radius: 0.2rem;
  background: var(--sunshine);
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 2.6rem 0 0.75rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--hairline);
}

h3 {
  font-size: 1.05rem;
  line-height: 1.35;
  margin: 1.9rem 0 0.6rem;
}

p, ul, ol { margin: 0 0 1.05rem; }

li { margin-bottom: 0.5rem; }

ul, ol { padding-left: 1.3rem; }

li ul, li ol { margin-top: 0.5rem; }

strong { font-weight: 650; }

hr {
  margin: 2.5rem 0 0;
  border: 0;
  border-top: 1px solid var(--hairline);
}

.doc-meta {
  margin: 0 0 0.3rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.doc-meta strong { font-weight: 600; color: var(--muted); }

.lede { font-size: 1.08rem; }

/* ---- the table of contents ---- */

.toc {
  margin: 2.2rem 0 1rem;
  padding: 1.1rem 1.25rem 0.6rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 0.65rem;
}

.toc-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin: 0 0 0.6rem;
  padding: 0;
  border: 0;
}

.toc ol {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
}

.toc li { margin-bottom: 0.4rem; }

.toc a { text-decoration: none; }

.toc a:hover { text-decoration: underline; }

/* ---- the index's list of documents ---- */

.doc-list {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0;
}

.doc-list li {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 0.65rem;
  padding: 1rem 1.15rem;
  margin-bottom: 0.75rem;
}

.doc-list a {
  font-weight: 650;
  font-size: 1.05rem;
  text-decoration: none;
}

.doc-list a:hover { text-decoration: underline; }

.doc-note {
  display: block;
  color: var(--muted);
  font-size: 0.88rem;
}

/* ---- tables ---- */

.table-wrap { margin: 0 0 1.4rem; }

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  font-size: 0.95rem;
}

caption { text-align: left; }

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid var(--hairline);
}

thead th {
  background: var(--amber-bg);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
}

/* On a narrow screen a row of sentences is unreadable as columns, so each row becomes a card and
   each cell carries its column's name. The name comes from the cell's own data-label, which the
   builder writes, so nothing here needs a script. */
@media (max-width: 42rem) {
  table, thead, tbody, tr, th, td { display: block; }

  thead { display: none; }

  tbody tr {
    border: 1px solid var(--hairline);
    border-radius: 0.65rem;
    margin-bottom: 0.75rem;
    padding: 0.35rem 0.25rem;
  }

  tbody td { border-bottom: 0; padding: 0.35rem 0.8rem; }

  tbody td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
  }
}

/* ---- the band at the bottom ---- */

.footer {
  border-top: 1px solid var(--hairline);
  background: var(--card);
}

.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.75rem var(--gutter) 2.25rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.footer-inner p { margin: 0 0 0.5rem; }

/* ---- paper ---- */

@media print {
  body { background: #ffffff; font-size: 11pt; }
  .masthead, .skip, .toc { display: none; }
  .sheet { max-width: none; padding: 0; }
  h2 { page-break-after: avoid; }
  table { font-size: 9pt; }
  tbody tr { page-break-inside: avoid; }
  a { color: inherit; text-decoration: underline; }
}
