/* Terms and Privacy - one sheet of trip-ticket paper on the site's night asphalt.
   Shared by terms.html and privacy.html (they used to carry identical inline copies).
   Self-contained on purpose: styles.css switches the whole page to the fixed card deck from
   901px with `html, body { overflow: hidden }`, under which a long document cannot scroll.
   Tokens are the site's own (styles.css :root) - change them together. */
:root {
  --bg: #0c0e0f;
  --panel: #131617;
  --line: #252a2b;
  --line-2: #373d3e;
  --paper: #ece6d6;
  --paper-2: #f6f2e7;
  --paper-line: #c9bfa6;
  --ink: #121414;
  --ink-2: #3b403e;
  --ink-3: #585f5c;
  --teal: #19d3b0;
  --teal-ink: #08806b;
  --yellow: #ffd23f;
  --sign: #0b6b4d;
  --text: #efece2;
  --mute: #8e9895;
  --display: "Oswald", "Arial Narrow", Impact, sans-serif;
  --sans: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
}
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { background: var(--bg); scroll-padding-top: 88px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
/* faint asphalt grain + the road's centre line running down the left margin */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 520px at 85% -10%, rgba(255, 210, 63, 0.06), transparent 60%),
    radial-gradient(1000px 600px at 0% 0%, rgba(25, 211, 176, 0.06), transparent 60%);
}
[hidden] { display: none !important; }

/* ---------- header ---------- */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(12, 14, 15, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.doc-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--yellow) 0 22px, transparent 22px 36px);
  opacity: 0.85;
}
.doc-header-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px clamp(16px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font: 600 1.15rem/1 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.brand img { display: block; width: 28px; height: 28px; }
.brand:hover span { color: var(--teal); }
.doc-nav { display: flex; align-items: center; gap: 14px; }
.lang-switch {
  display: flex;
  border: 1px solid var(--line-2);
  border-radius: 4px;
  overflow: hidden;
}
.lang-btn {
  padding: 6px 10px;
  border: 0;
  background: none;
  color: var(--mute);
  font: 600 0.72rem/1 var(--mono);
  letter-spacing: 0.06em;
  cursor: pointer;
}
.lang-btn + .lang-btn { border-left: 1px solid var(--line-2); }
.lang-btn:hover { color: var(--text); }
.lang-btn.active { background: var(--yellow); color: var(--ink); }
.back-link {
  font: 500 0.72rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
  white-space: nowrap;
}
.back-link:hover { color: var(--yellow); }
.lang-btn:focus-visible, .back-link:focus-visible, .brand:focus-visible, .doc-toc a:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 2px;
}

/* ---------- page ---------- */
main {
  position: relative;
  z-index: 1;
  max-width: 1120px;
  margin: 0 auto;
  padding: 56px clamp(16px, 4vw, 40px) 96px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 48px;
}
main.has-toc { grid-template-columns: 220px minmax(0, 1fr); }
main > [id^="doc-"] { grid-column: -2 / -1; min-width: 0; counter-reset: sec; }

/* the title is an interstate guide sign: the tag is the EXIT tab, the date sits under the posts */
.doc-tag {
  display: inline-block;
  margin-left: 16px;
  padding: 5px 12px 4px;
  background: var(--sign);
  border: 2px solid #fff;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  font: 500 0.72rem/1 var(--display);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  position: relative;
  z-index: 1;
  margin-bottom: -2px;
}
h1 {
  display: block;
  width: fit-content;
  max-width: 100%;
  padding: 14px 22px 13px 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent 40%), var(--sign);
  box-shadow: inset 0 0 0 3px var(--sign), inset 0 0 0 5px #fff, 0 10px 30px rgba(0, 0, 0, 0.45);
  color: #fff;
  font: 700 clamp(1.6rem, 4.2vw, 2.6rem)/1.05 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-wrap: balance;
}
.doc-meta {
  position: relative;
  margin: 0 0 30px;
  padding-top: 26px;
  font: 500 0.78rem/1.4 var(--mono);
  letter-spacing: 0.06em;
  color: var(--yellow);
}
/* the sign's two posts */
.doc-meta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 40px;
  width: 140px;
  height: 20px;
  background: linear-gradient(90deg, #3a4142 0 6px, transparent 6px calc(100% - 6px), #3a4142 calc(100% - 6px));
  -webkit-mask-image: linear-gradient(#000, transparent);
  mask-image: linear-gradient(#000, transparent);
}

/* sections form one continuous sheet of paper */
section {
  counter-increment: sec;
  position: relative;
  max-width: none;
  margin: 0;
  padding: 26px clamp(20px, 4vw, 48px) 22px clamp(56px, 7vw, 84px);
  background: var(--paper-2);
  color: var(--ink-2);
  border-left: 1px solid var(--paper-line);
  border-right: 1px solid var(--paper-line);
}
section + section { border-top: 1px dashed var(--paper-line); }
.doc-meta + section {
  border-top: 1px solid var(--paper-line);
  border-radius: 4px 4px 0 0;
  padding-top: 34px;
  box-shadow: 0 -2px 0 var(--yellow);
}
section:last-of-type { padding-bottom: 30px; }
/* an untitled lead-in (Privacy opens with one) is not a numbered section */
section:not(:has(> h2)) { counter-increment: none; }
section:not(:has(> h2))::before { content: none; }
section::before {
  content: counter(sec, decimal-leading-zero);
  position: absolute;
  left: clamp(20px, 3vw, 34px);
  top: 30px;
  font: 600 0.72rem/1 var(--mono);
  color: var(--teal-ink);
  letter-spacing: 0.04em;
}
.doc-meta + section::before { top: 38px; }
h2 {
  margin-bottom: 10px;
  font: 600 1.25rem/1.15 var(--display);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  text-wrap: balance;
}
p, ul { max-width: 68ch; }
p { margin-bottom: 12px; color: var(--ink-2); }
p:last-child, ul:last-child { margin-bottom: 0; }
ul { margin: 0 0 12px; padding-left: 20px; color: var(--ink-2); }
ul ul { margin-top: 8px; }
li { margin-bottom: 8px; }
li::marker { color: var(--teal-ink); }
strong { color: var(--ink); font-weight: 600; }
section a { color: var(--teal-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
section a:hover { background: var(--yellow); color: var(--ink); text-decoration: none; }
section a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* the stub at the bottom of the ticket: perforation, barcode, contact */
.doc-foot {
  position: relative;
  margin: 0;
  padding: 18px clamp(20px, 4vw, 48px) 18px clamp(56px, 7vw, 84px);
  border: 1px solid var(--paper-line);
  border-top: 2px dashed var(--paper-line);
  border-radius: 0 0 4px 4px;
  background: var(--paper);
  font: 500 0.82rem/1.5 var(--mono);
  color: var(--ink-2);
}
.doc-foot::before {
  content: "";
  position: absolute;
  left: clamp(20px, 3vw, 34px);
  top: 50%;
  width: 22px;
  height: 28px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(90deg, var(--ink) 0 2px, transparent 2px 4px, var(--ink) 4px 5px, transparent 5px 8px);
  opacity: 0.75;
}
.doc-foot a { color: var(--teal-ink); }
.doc-foot a:hover { background: var(--yellow); color: var(--ink); text-decoration: none; }

/* ---------- table of contents (built by legal.js on wide screens) ---------- */
.doc-toc {
  grid-column: 1;
  grid-row: 1 / span 999;
  align-self: start;
  position: sticky;
  top: 96px;
  margin-top: 150px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 0.8rem;
}
.doc-toc-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font: 600 0.68rem/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.doc-toc-title::before { content: ""; width: 16px; height: 3px; background: var(--yellow); }
.doc-toc ol { list-style: none; counter-reset: toc; }
.doc-toc li { counter-increment: toc; margin: 0; }
.doc-toc a {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 6px;
  padding: 5px 6px 5px 0;
  color: var(--mute);
  text-decoration: none;
  line-height: 1.35;
  border-left: 2px solid transparent;
  padding-left: 8px;
}
.doc-toc a::before { content: counter(toc, decimal-leading-zero); font: 500 0.7rem/1.6 var(--mono); color: #5a6361; }
.doc-toc a:hover { color: var(--text); }
.doc-toc a.active { color: var(--text); border-left-color: var(--yellow); }
.doc-toc a.active::before { color: var(--yellow); }

@media (max-width: 960px) {
  main.has-toc { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { display: none; }
}
@media (max-width: 600px) {
  main { padding-top: 36px; }
  .doc-header-inner { flex-wrap: wrap; }
  .back-link { display: none; }
  section, .doc-foot { padding-left: 20px; padding-right: 18px; }
  section { padding-top: 40px; }
  section::before { left: 20px; top: 18px; }
  .doc-meta + section::before { top: 22px; }
  .doc-foot::before { display: none; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
