/* Legal pages (/privacy, /terms, /cookies), rendered by scripts/legal.mjs.
   Standalone on purpose: those pages are plain HTML with no bundle and no script,
   so they cannot use the hashed CSS Vite emits for the app. The tokens and the two
   self-hosted faces are the same values as web/src/styles.css, Heegstra theme, with
   the Night palette under prefers-color-scheme: dark. Keep the two in step. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/Outfit-Variable.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/IBMPlexSans-Variable.woff2') format('woff2');
}

:root {
  --t-bg: #fbfaf8;
  --t-card: #eaf4f2;
  --t-ink: #1c3a40;
  --t-sec: #4e6f70;
  --t-faint: rgba(28, 58, 64, 0.42);
  --t-rule: #d7eae7;
  --t-act: #23afa5;
  --t-deep: #157f78;
  --t-display: 'Outfit', system-ui, sans-serif;
  --t-body: 'IBM Plex Sans', system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --t-bg: #141c1e;
    --t-card: #1c2629;
    --t-ink: #ede9e0;
    --t-sec: rgba(237, 233, 224, 0.62);
    --t-faint: rgba(237, 233, 224, 0.38);
    --t-rule: rgba(237, 233, 224, 0.16);
    --t-act: #1fa096;
    --t-deep: #79ccc4;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
}
body {
  background: var(--t-bg);
  color: var(--t-ink);
  font-family: var(--t-body);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}
a {
  color: var(--t-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:hover {
  color: var(--t-ink);
}
:focus-visible {
  outline: 2px solid var(--t-act);
  outline-offset: 3px;
  border-radius: 4px;
}

.legal {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 7vh, 72px) 24px 64px;
}

.legal__lockup {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 17px;
  color: var(--t-ink);
  text-decoration: none;
}
.legal__lockup svg {
  flex: none;
}

.legal__title {
  font-family: var(--t-display);
  font-weight: 600;
  font-size: clamp(28px, 6vw, 34px);
  line-height: 1.2;
  margin: 40px 0 6px;
}
.legal__meta {
  margin: 0 0 34px;
  font-size: 12.5px;
  letter-spacing: 0.04em;
  color: var(--t-faint);
}

.legal__body h2 {
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin: 40px 0 10px;
}
.legal__body h3 {
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 17px;
  margin: 28px 0 8px;
}
.legal__body p {
  margin: 0 0 16px;
}
.legal__body ul,
.legal__body ol {
  margin: 0 0 16px;
  padding-left: 22px;
}
.legal__body li {
  margin-bottom: 8px;
}
.legal__body blockquote {
  margin: 0 0 16px;
  padding-left: 16px;
  border-left: 2px solid var(--t-rule);
  color: var(--t-sec);
}
.legal__body blockquote p:last-child {
  margin-bottom: 0;
}
.legal__body strong {
  font-weight: 600;
}
.legal__body code {
  font-family: ui-monospace, 'SFMono-Regular', 'Consolas', monospace;
  font-size: 0.88em;
  background: var(--t-card);
  border-radius: 4px;
  padding: 1px 5px;
  /* A long identifier must break rather than push the page sideways on a phone. */
  overflow-wrap: anywhere;
}
.legal__body hr {
  border: none;
  border-top: 1px solid var(--t-rule);
  margin: 36px 0;
}

/* Tables scroll inside their own box: the cookie table is far wider than a phone. */
.legal__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 0 20px;
}
.legal__body table {
  border-collapse: collapse;
  width: 100%;
  min-width: 460px;
  font-size: 14.5px;
}
.legal__body th,
.legal__body td {
  text-align: left;
  vertical-align: top;
  padding: 9px 12px 9px 0;
  border-bottom: 1px solid var(--t-rule);
}
.legal__body th {
  font-family: var(--t-display);
  font-weight: 600;
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--t-sec);
  white-space: nowrap;
}

.legal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 56px;
  padding-top: 20px;
  border-top: 1px solid var(--t-rule);
  font-size: 14px;
}
