/*
  Shared styling for the three legal pages.

  One stylesheet rather than three inlined copies: these documents will be
  edited by whoever reviews them, and a change of wording should never depend
  on remembering that the same rule exists in two other files.

  System fonts on purpose. A legal page that waits on a font CDN is a legal
  page that renders unstyled for the reader on hotel wifi, and nothing here is
  improved by a display face.
*/

:root {
  --ground: #fdfbf7;
  --surface: #ffffff;
  --surface-alt: #f5f1ea;
  --border: #e7e1d8;
  --border-soft: #efeae1;
  --ink: #1c1917;
  --body: #44403c;
  --muted: #78716c;
  --accent: #cf5826;
  --accent-soft: #fbede7;
  --measure: 68ch;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground: #141210;
    --surface: #1c1917;
    --surface-alt: #292521;
    --border: #332e29;
    --border-soft: #292521;
    --ink: #faf7f2;
    --body: #d6cec2;
    --muted: #a8a29e;
    --accent: #f07a4a;
    --accent-soft: #2a1a12;
  }
}

:root[data-theme='dark'] {
  --ground: #141210;
  --surface: #1c1917;
  --surface-alt: #292521;
  --border: #332e29;
  --border-soft: #292521;
  --ink: #faf7f2;
  --body: #d6cec2;
  --muted: #a8a29e;
  --accent: #f07a4a;
  --accent-soft: #2a1a12;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--body);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: var(--measure); margin: 0 auto; padding: 0 20px 96px; }

/* ── Masthead ─────────────────────────────────────────────────────────── */

header.masthead {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  margin-bottom: 40px;
}

.masthead .wrap { padding-top: 22px; padding-bottom: 22px; display: flex; align-items: center; gap: 12px; }

.masthead img { width: 40px; height: 40px; border-radius: 10px; display: block; }

.masthead .name {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--accent);
  text-decoration: none;
}

.masthead nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }

.masthead nav a { font-size: 14px; color: var(--muted); text-decoration: none; }
.masthead nav a:hover, .masthead nav a:focus-visible { color: var(--accent); text-decoration: underline; }
.masthead nav a[aria-current='page'] { color: var(--ink); font-weight: 600; }

/*
  On a phone the four links wrap into a ragged second row, so below 640px they
  fold behind a ☰ button. A checkbox and its label do the toggling, which keeps
  these pages free of JavaScript.
*/
.menu-toggle { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.menu-button { display: none; }

@media (max-width: 640px) {
  .masthead .wrap { flex-wrap: wrap; }
  .menu-button {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--ink);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    user-select: none;
  }
  .menu-toggle:focus-visible + .menu-button { outline: 2px solid var(--accent); outline-offset: 2px; }
  .menu-toggle:checked + .menu-button { background: var(--surface-alt); }
  .masthead nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; margin: 10px 0 0; }
  .menu-toggle:checked ~ nav { display: flex; }
  .masthead nav a { font-size: 16px; padding: 12px 2px; border-top: 1px solid var(--border-soft); }
}

/* ── Type ─────────────────────────────────────────────────────────────── */

h1 {
  font-size: clamp(30px, 5vw, 40px);
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 6px;
  text-wrap: balance;
}

.updated { color: var(--muted); font-size: 15px; margin: 0 0 34px; }

h2 {
  font-size: 22px;
  line-height: 1.3;
  color: var(--ink);
  margin: 42px 0 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
  scroll-margin-top: 20px;
  text-wrap: balance;
}

h3 { font-size: 17px; color: var(--ink); margin: 26px 0 8px; }

p, li { margin: 0 0 14px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 8px; }

a { color: var(--accent); }

strong { color: var(--ink); }

/* ── Components ───────────────────────────────────────────────────────── */

.lede { font-size: 19px; line-height: 1.6; color: var(--body); }

.toc {
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 12px;
}
.toc p { font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin-bottom: 5px; }

.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 16px 20px;
  margin: 22px 0;
}
.callout p:last-child { margin-bottom: 0; }

.table-scroll { overflow-x: auto; margin: 20px 0; }

table {
  border-collapse: collapse;
  width: 100%;
  min-width: 520px;
  font-size: 15px;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-soft);
}

th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}

tbody tr:last-child td { border-bottom: none; }

td.yes { color: var(--ink); font-weight: 600; }
td.no { color: var(--muted); }

footer.page {
  border-top: 1px solid var(--border);
  margin-top: 56px;
  padding-top: 22px;
  font-size: 15px;
  color: var(--muted);
}
footer.page a { color: var(--muted); }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
