/* Public legal + support pages.
 *
 * Served as static files by nginx, outside the React app entirely — no bundle, no
 * auth, no JS. Anything added here has to survive that: a store reviewer on a slow
 * phone and a crawler must both get the full document from the first response.
 *
 * External stylesheet rather than inline <style> because the vhost CSP is
 * `style-src 'self' 'unsafe-inline'` and 'unsafe-inline' is there for the React
 * app's legacy inline styles, not as an invitation. */

:root {
  --page: #fbfbfa;
  --surface: #ffffff;
  --ink-1: #16181d;
  --ink-2: #414651;
  --ink-3: #767c88;
  --rule: #e4e4e2;
  --rule-soft: #eeeeec;
  --link: #1c4f8b;
  --accent: #0e7490;
  --measure: 41rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0d1017;
    --surface: #131720;
    --ink-1: #e8eaee;
    --ink-2: #b0b6c2;
    --ink-3: #7c8494;
    --rule: #242a36;
    --rule-soft: #1c212b;
    --link: #7cb2ea;
    --accent: #4dc3d8;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink-2);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

/* --- frame ------------------------------------------------------------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}

.masthead-inner,
.sheet,
.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.masthead-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  color: var(--ink-1);
  text-decoration: none;
}

/* The mark is a teal tile with a white glyph, so one file carries both themes —
   there is no light variant to swap in and nothing here should tint it. */
.wordmark img {
  width: 22px;
  height: 22px;
  display: block;
}

.masthead-inner span {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sheet { padding-top: 3.25rem; padding-bottom: 4rem; }

/* --- type -------------------------------------------------------------- */

h1 {
  margin: 0 0 0.4rem;
  font-size: 2.05rem;
  line-height: 1.18;
  letter-spacing: -0.021em;
  font-weight: 680;
  color: var(--ink-1);
}

.dateline {
  margin: 0 0 2.5rem;
  font-size: 0.85rem;
  color: var(--ink-3);
}

.lede {
  font-size: 1.06rem;
  color: var(--ink-2);
  margin: 0 0 2.5rem;
}

.address {
  font-size: 0.9rem;
  color: var(--ink-3);
  line-height: 1.7;
}

h2 {
  margin: 3rem 0 0.85rem;
  font-size: 1.16rem;
  font-weight: 640;
  letter-spacing: -0.008em;
  color: var(--ink-1);
  scroll-margin-top: 1.5rem;
}

h2 .num {
  display: inline-block;
  min-width: 1.7rem;
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--ink-3);
}

h3 {
  margin: 1.9rem 0 0.5rem;
  font-size: 0.97rem;
  font-weight: 620;
  color: var(--ink-1);
}

p { margin: 0 0 1.05rem; }

ul, ol { margin: 0 0 1.05rem; padding-left: 1.25rem; }
li { margin-bottom: 0.45rem; }
li::marker { color: var(--ink-3); }

a { color: var(--link); text-decoration: underline; text-underline-offset: 0.16em; }
a:hover { text-decoration-thickness: 2px; }

strong { color: var(--ink-1); font-weight: 620; }

/* Table of contents — a plain list, because a legal document's contents page is a
   list and dressing it as cards helps nobody find clause 7. */
.contents {
  margin: 0 0 1rem;
  padding: 1.1rem 0 0.3rem;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  columns: 2;
  column-gap: 2rem;
  list-style: none;
  padding-left: 0;
  font-size: 0.9rem;
}
.contents li { break-inside: avoid; margin-bottom: 0.5rem; }
.contents a { color: var(--ink-2); text-decoration: none; }
.contents a:hover { color: var(--link); text-decoration: underline; }

@media (max-width: 34rem) { .contents { columns: 1; } }

/* --- tables ------------------------------------------------------------ */

.table-scroll { overflow-x: auto; margin: 0 0 1.4rem; }

table {
  width: 100%;
  min-width: 26rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.6rem 0.9rem 0.6rem 0;
  border-bottom: 1px solid var(--rule-soft);
}

th {
  color: var(--ink-1);
  font-weight: 620;
  border-bottom-color: var(--rule);
  white-space: nowrap;
}

/* --- callout ----------------------------------------------------------- */

/* Full tinted panel, not a coloured edge stripe. */
.note {
  margin: 1.6rem 0;
  padding: 1rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 6px;
  font-size: 0.93rem;
}
.note p:last-child { margin-bottom: 0; }
.note strong { color: var(--ink-1); }

/* --- forms ------------------------------------------------------------- */

form { margin: 2rem 0 0; }

.field { margin-bottom: 1.35rem; }

label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.88rem;
  font-weight: 560;
  color: var(--ink-1);
}

.hint {
  margin: 0.3rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-3);
}

input[type="text"],
input[type="email"],
textarea {
  width: 100%;
  padding: 0.62rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 5px;
  color: var(--ink-1);
  font: inherit;
  font-size: 0.95rem;
}

input:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

textarea { min-height: 7.5rem; resize: vertical; }

button[type="submit"] {
  padding: 0.62rem 1.35rem;
  background: var(--ink-1);
  color: var(--page);
  border: 1px solid var(--ink-1);
  border-radius: 5px;
  font: inherit;
  font-size: 0.93rem;
  font-weight: 560;
  cursor: pointer;
}
button[type="submit"]:hover { opacity: 0.88; }

.required { color: var(--ink-3); font-weight: 400; }

/* --- confirmation ------------------------------------------------------ */

.confirm { padding-top: 4.5rem; }
.confirm h1 { margin-bottom: 1rem; }

/* --- footer ------------------------------------------------------------ */

.footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  padding: 1.6rem 0;
  font-size: 0.86rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: baseline;
}

.footer a { color: var(--ink-2); text-decoration: none; }
.footer a:hover { color: var(--link); text-decoration: underline; }
.footer .spacer { flex: 1; }
.footer .muted { color: var(--ink-3); }
