/* ------------------------------------------------------------------
   Mirmoi legal pages
   Tokens mirror the marketing site (mirmoi.com styles.css), which in
   turn takes them from MirmoiPalette in the app:
   amethyst #6E3CBC, lavender #D3BCFD, rose #B44A72 / #F0A8C0,
   dusk #352A5E to #7B5FC0. Radii: card 20, control 14.
   ------------------------------------------------------------------ */

:root {
  color-scheme: light dark;

  --bg: #fbf7fc;
  --bg-deep: #f3ebf6;
  --surface: rgba(255, 255, 255, 0.78);
  --hairline: rgba(110, 60, 188, 0.16);
  --hairline-soft: rgba(110, 60, 188, 0.09);

  --text: #241a3c;
  --text-strong: #190f30;
  --muted: #584d74;

  --accent: #6e3cbc;
  --accent-deep: #572f99;
  --accent-ink: #ffffff;
  --accent-wash: rgba(110, 60, 188, 0.08);
  --rose: #b44a72;

  --blob-a: rgba(124, 77, 255, 0.16);
  --blob-b: rgba(240, 168, 192, 0.26);
  --blob-c: rgba(255, 200, 87, 0.12);

  --shadow-soft: 0 18px 50px -34px rgba(53, 42, 94, 0.6);

  --radius-card: 20px;
  --radius-control: 14px;
  --radius-pill: 999px;

  --gutter: clamp(16px, 5vw, 40px);
  --max: 50rem;

  --font-display: "Poppins", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Nunito", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17122c;
    --bg-deep: #100c22;
    --surface: rgba(255, 255, 255, 0.06);
    --hairline: rgba(211, 188, 253, 0.18);
    --hairline-soft: rgba(211, 188, 253, 0.1);

    --text: #f0eafb;
    --text-strong: #ffffff;
    --muted: #c0b5dc;

    --accent: #d3bcfd;
    --accent-deep: #e3d4ff;
    --accent-ink: #2a1a4d;
    --accent-wash: rgba(211, 188, 253, 0.12);
    --rose: #f0a8c0;

    --blob-a: rgba(124, 77, 255, 0.26);
    --blob-b: rgba(240, 168, 192, 0.13);
    --blob-c: rgba(255, 200, 87, 0.07);

    --shadow-soft: 0 18px 50px -34px rgba(0, 0, 0, 0.9);
  }
}

/* ---------- base ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  letter-spacing: 0.002em;
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}

/* Static version of the landing page's ambient glow. No animation:
   nothing should move behind long-form legal text. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vmax 60vmax at 0% 0%, var(--blob-a), transparent 65%),
    radial-gradient(52vmax 52vmax at 100% 38%, var(--blob-b), transparent 65%),
    radial-gradient(44vmax 44vmax at 35% 100%, var(--blob-c), transparent 68%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 55%, var(--bg) 100%);
}

img { max-width: 100%; }

a {
  color: var(--accent-deep);
  text-decoration-line: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--rose); }

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

::selection { background: var(--accent); color: var(--accent-ink); }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: 0;
  transform: translateY(-140%);
  z-index: 60;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.7em 1.1em;
  border-radius: 0 0 var(--radius-control) var(--radius-control);
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus,
.skip:focus-visible { transform: translateY(0); color: var(--accent-ink); }

/* ---------- top bar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--hairline-soft);
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  text-decoration: none;
}
.brand:hover { color: var(--text-strong); }
.logo {
  display: block;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

.nav { display: flex; gap: 4px; }
.nav a {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.45em 0.95em;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
}
.nav a:hover { color: var(--accent-deep); background: var(--accent-wash); }
.nav a.active {
  color: var(--accent-deep);
  background: var(--accent-wash);
  border-color: var(--hairline);
  font-weight: 600;
}

/* ---------- document ---------- */

.content {
  flex: 1 0 auto;
  padding-block: clamp(24px, 5vw, 56px) clamp(40px, 7vw, 80px);
}

/* minima's `page` layout wraps the text in article.post */
.post,
.panel {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  backdrop-filter: blur(18px) saturate(1.2);
  padding: clamp(22px, 5vw, 56px);
}

.post-header {
  margin-bottom: clamp(20px, 3vw, 30px);
  padding-bottom: clamp(18px, 3vw, 26px);
  border-bottom: 1px solid var(--hairline);
}
.post-header::before {
  content: "LEGAL";
  display: block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--rose);
  margin-bottom: 0.9em;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text-strong);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  text-wrap: balance;
}

h1,
.post-title {
  font-size: clamp(1.85rem, 5vw, 2.6rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  margin: 0;
}

.post-content,
.panel { max-width: none; }
.post-content > * { max-width: 68ch; }

.post-content h2 {
  font-size: clamp(1.25rem, 2.6vw, 1.5rem);
  margin: 2.2em 0 0.7em;
  padding-top: 1.5em;
  border-top: 1px solid var(--hairline-soft);
  max-width: none;
}
.post-content h3 {
  font-size: 1.1rem;
  margin: 1.8em 0 0.5em;
}
.post-content h4 {
  font-size: 1rem;
  margin: 1.6em 0 0.4em;
}

p { margin: 0 0 1.15em; }
.post-content > :last-child { margin-bottom: 0; }

/* the "Effective Date / Last Updated" block opens both documents */
.post-content > p:first-child {
  color: var(--muted);
  font-size: 0.98rem;
}

strong, b { color: var(--text-strong); font-weight: 700; }

ul, ol { margin: 0 0 1.25em; padding-left: 1.35em; }
li { margin-bottom: 0.55em; padding-left: 0.2em; }
li:last-child { margin-bottom: 0; }
li > ul, li > ol { margin-top: 0.55em; margin-bottom: 0; }
ul li::marker { color: var(--accent); }
ol li::marker {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92em;
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2.2em 0;
}

blockquote {
  margin: 0 0 1.25em;
  padding: 0.9em 1.1em;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  background: var(--accent-wash);
  color: var(--muted);
}
blockquote > :last-child { margin-bottom: 0; }

code, kbd, pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code {
  background: var(--accent-wash);
  border-radius: 6px;
  padding: 0.12em 0.4em;
}
pre {
  overflow-x: auto;
  padding: 1em 1.1em;
  background: var(--accent-wash);
  border: 1px solid var(--hairline-soft);
  border-radius: var(--radius-control);
}
pre code { background: none; padding: 0; }

/* Tables scroll inside themselves so the page never does. */
table {
  display: block;
  overflow-x: auto;
  max-width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.25em;
  font-size: 0.97rem;
}
th, td {
  text-align: left;
  vertical-align: top;
  padding: 0.65em 0.9em;
  border-bottom: 1px solid var(--hairline);
}
th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text-strong);
  background: var(--accent-wash);
}

/* ---------- index and 404 ---------- */

.panel .kicker {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: var(--rose);
  margin: 0 0 0.9em;
}
.panel h1 { margin-bottom: 0.5em; }
.panel .lede { color: var(--muted); max-width: 60ch; }

.doc-list {
  list-style: none;
  margin: 1.6em 0 0;
  padding: 0;
  display: grid;
  gap: 12px;
}
@media (min-width: 620px) { .doc-list { grid-template-columns: 1fr 1fr; } }
.doc-list li { margin: 0; padding: 0; }
.doc-list a {
  display: block;
  height: 100%;
  padding: 1em 1.2em;
  font-family: var(--font-display);
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-deep);
  background: var(--accent-wash);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-control);
}
.doc-list a:hover { color: var(--accent-deep); border-color: var(--accent); }
.doc-list a span {
  display: block;
  margin-top: 0.2em;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 0.95rem;
  color: var(--muted);
}

/* ---------- footer ---------- */

.footer {
  border-top: 1px solid var(--hairline-soft);
  padding-block: clamp(32px, 5vw, 52px) calc(clamp(32px, 5vw, 52px) + env(safe-area-inset-bottom));
  background: var(--bg-deep);
  background: color-mix(in srgb, var(--bg-deep) 70%, transparent);
}
.footer-tagline {
  font-family: var(--font-display);
  font-size: clamp(1.02rem, 2vw, 1.15rem);
  color: var(--text-strong);
  margin-bottom: 0.9em;
}
.footer-links {
  list-style: none;
  margin: 0 0 1.3em;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5em 1.6em;
  font-size: 0.95rem;
}
.footer-links li { margin: 0; padding: 0; }
.footer-meta { color: var(--muted); font-size: 0.9rem; margin: 0; }

/* ---------- small screens ---------- */

@media (max-width: 420px) {
  .nav a { padding-inline: 0.75em; }
  body { font-size: 1rem; line-height: 1.68; }
}

/* ---------- print ---------- */

@media print {
  :root {
    --text: #000;
    --text-strong: #000;
    --muted: #333;
    --accent: #000;
    --accent-deep: #000;
    --rose: #000;
    --hairline: #bbb;
    --hairline-soft: #ccc;
  }
  body { display: block; background: #fff; font-size: 11pt; line-height: 1.5; }
  body::before, .skip, .nav, .footer-tagline, .footer-links { display: none; }
  .topbar { position: static; background: none; border-bottom: 1px solid #bbb; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .wrap { max-width: none; padding-inline: 0; }
  .content { padding-block: 16pt; }
  .post, .panel {
    background: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .post-content > * { max-width: none; }
  .footer { background: none; padding-block: 12pt 0; }
  h1, h2, h3, h4 { break-after: avoid; }
  li, blockquote, tr { break-inside: avoid; }
  p { orphans: 3; widows: 3; }
}
