/* Brand chrome shared by the waitlist and legal pages. Load after every other stylesheet. */
/* Only Safari resolves ui-rounded. Other browsers download this rounded fallback. */
@font-face {
  font-family: Nunito;
  src: url('assets/fonts/nunito-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Nunito has no Greek, so Greek falls back to M PLUS Rounded 1c, cut down to the Greek block.
   It draws a step lighter and wider than SF Pro Rounded, so each weight maps to the next
   heavier file, scaled down to SF Pro Rounded's size. */
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('assets/fonts/mplus-rounded-greek-bold.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  unicode-range: U+0370-03FF;
  size-adjust: 90%;
}
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('assets/fonts/mplus-rounded-greek-extrabold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
  unicode-range: U+0370-03FF;
  size-adjust: 90%;
}
@font-face {
  font-family: 'M PLUS Rounded 1c';
  src: url('assets/fonts/mplus-rounded-greek-black.woff2') format('woff2');
  font-weight: 800 900;
  font-display: swap;
  unicode-range: U+0370-03FF;
  size-adjust: 90%;
}
:root:has(.onboarding-style, .legal-page) { background: #f8f7f4; }
/* iPhone Safari would otherwise enlarge the legal text in landscape. */
:root:has(.legal-page) { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* Header logo: the mazi wordmark in Signal Blue, sized to sit with the 12px navigation. */
.header-home {
  display: inline-flex;
  align-items: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 8px;
  transition: opacity 160ms ease-out;
}
/* Lifted 2px so the letters, not the i's dot, share the navigation's optical centre. */
.brand-logo { position: relative; top: -2px; display: block; width: 88px; height: auto; }
.header-home:active { opacity: .64; }
.header-home:focus-visible { outline: 3px solid #185bcb; outline-offset: 6px; }
@media (hover: hover) {
  .header-home:hover { opacity: .76; }
}
@media (max-width: 600px) {
  .brand-logo { width: 78px; }
}

/* The legal pages share the waitlist's onboarding look: Porcelain, Charcoal and one Signal Blue accent. */
.legal-page {
  --blue: #185bcb;
  --muted: #676a66;
  --rounded: ui-rounded, 'SF Pro Rounded', Nunito, 'M PLUS Rounded 1c', system-ui, -apple-system, sans-serif;
  color: #2f312f;
  background: #f8f7f4;
}
.legal-page ::selection { color: #154999; background: #dce6f7; }
.legal-page :where(a, button):focus-visible { outline-color: #185bcb; }
.legal-page .skip-link { color: #2f312f; background: #fff; border-radius: 12px; }
.legal-page .header { width: min(calc(100% - 2 * max(40px, var(--safe-left), var(--safe-right))), 1000px); min-height: 76px; justify-content: space-between; }
/* Long translated labels wrap onto a second row on the narrowest phones instead of running off the screen. */
.legal-page .document-header .legal-links { flex-wrap: wrap; justify-content: flex-end; gap: 0 28px; font-size: 12px; }
.legal-page .document-header .legal-links a { color: var(--muted); }
.legal-page .document-header .legal-links a:hover { color: var(--blue); }
.legal-page .document-header [aria-current="page"] { color: #2f312f; font-weight: 600; }
/* A long title word, like German compounds, must not widen the page on small phones. */
.legal-page .document-page { grid-template-columns: minmax(0, 1fr); }
.legal-page .legal-document { overflow-wrap: break-word; }
/* Keeps long vowel marks and small kana from starting a Japanese line. */
.legal-page:lang(ja) { line-break: strict; }
.legal-page .legal-document h1 { font-family: var(--rounded); font-weight: 700; letter-spacing: -.02em; }
.legal-page .document-section h2 { font-family: var(--rounded); font-weight: 700; letter-spacing: -.01em; }
.legal-page :is(.document-date, .document-intro) { color: var(--muted); }
.legal-page .document-section p { color: #4a4d49; }
/* Titles stay centered; long policy text reads better from a left edge. */
.legal-page .document-section { text-align: left; }
.legal-page .document-date + .document-section { margin-top: 48px; }
.legal-page .document-section a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.legal-page .document-section ul { margin: 12px 0 0; padding-left: 20px; font-size: 14px; line-height: 1.8; color: #4a4d49; }
.legal-page .document-section li + li { margin-top: 4px; }
.legal-page .document-section ul + p { margin-top: 12px; }
/* The 404 page borrows the cat and the waitlist's Signal Blue button. */
.not-found-art { display: block; width: 200px; height: auto; margin: 0 auto 8px; }
.legal-page .not-found .document-intro { margin-bottom: 28px; }
.not-found-home { display: inline-flex; align-items: center; min-height: 48px; padding: 0 22px; border-radius: 16px; color: #fff; background: var(--blue); font-weight: 600; text-decoration: none; }
.legal-page .not-found-home:hover { color: #fff; background: #2563d4; }
@media (max-width: 1000px) {
  .legal-page .header { width: calc(100% - 2 * max(20px, var(--safe-left), var(--safe-right))); min-height: 66px; }
}
@media (max-width: 600px) {
  .legal-page .document-header .legal-links { column-gap: 20px; }
}
@media (prefers-contrast: more) {
  .legal-page :is(.document-date, .document-intro, .document-section p, .document-header .legal-links a) { color: #2f312f; }
}
/* The onboarding's short rise replaces the blurred 3D fold on the legal pages too. */
@media (prefers-reduced-motion: no-preference) {
  .legal-page :is(.header, .footer-meta, .legal-document > h1, .document-date, .document-intro, .document-section) {
    animation-name: brand-rise;
    animation-duration: 420ms;
    animation-timing-function: cubic-bezier(.2, .7, .2, 1);
  }
}
@keyframes brand-rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* White footer text keeps full contrast on the blue canvas when more contrast is requested. */
@media (prefers-contrast: more) {
  .brand-footer .footer-meta { color: #fff; }
  .brand-footer .footer-art img { opacity: .14; }
}

/* Support and the legal pages: a list of the sections beside the text on wide screens, kept in
   view while reading. The section on screen is marked by doc-index.js. Narrower screens leave it
   out; the page reads top to bottom there. */
.doc-index { display: none; }
@media (min-width: 1101px) {
  .legal-page .document-main:has(.doc-index) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 620px) minmax(0, 1fr);
    column-gap: 56px;
    align-items: start;
  }
  .legal-page .document-main:has(.doc-index) .legal-document { grid-column: 2; grid-row: 1; }
  .doc-index { display: block; grid-column: 1; grid-row: 1; justify-self: end; position: sticky; top: calc(40px + var(--safe-top)); width: 210px; margin-top: 168px; }
  .doc-index ol { margin: 0; padding: 0; list-style: none; border-left: 1px solid #2f312f1a; }
  .doc-index a { display: block; margin-left: -1px; padding: 6px 0 6px 16px; border-left: 2px solid transparent; color: var(--muted); font-size: 13px; line-height: 1.4; text-decoration: none; transition: color 160ms, border-color 160ms; }
  .doc-index a:hover { color: #2f312f; }
  .doc-index a[aria-current] { border-left-color: var(--blue); color: #2f312f; font-weight: 600; }
}
/* A linked section lands with room above it. */
.legal-page :is(.document-section, .document-section h2) { scroll-margin-top: 40px; }
