/* Kuma legal pages — Cozy Cream + Night Den.
 *
 * Same tokens as get-kuma.com and as mobile/src/theme.ts. This file is a separate copy
 * rather than a link to the landing site because these pages are served from a
 * different host and their CSP allows stylesheets from 'self' only.
 *
 * Nothing here may add or remove a word of the policy text. The two published surfaces
 * are compared paragraph by paragraph in tests/test_privacy_policy.py and
 * tests/test_legal.py, and those tests parse bare <section>, <h2> and <p> tags — so
 * style these elements from here, never with a class or a style attribute on them.
 */

/* --- tokens ---------------------------------------------------------------- */

:root {
  color-scheme: light;
  --bg: #FBF6EC;
  --surface: #FFFDF7;
  --border: #EFE6D5;
  --hairline: #F2EADD;
  --ink: #3A2320;
  --inkSoft: #8A7A70;
  --inkFaint: #C1B299;
  --jade: #25C7A5;
  --deepJade: #1F4A41;
  --jadeTint: #EAFAF4;
}

/* Night Den, declared twice: once for an explicit choice, once for the system
 * preference when theme.js has not set an attribute. Keep the blocks identical. */
:root[data-theme="den"] {
  color-scheme: dark;
  --bg: #1C1412;
  --surface: #271D1A;
  --border: #443330;
  --hairline: #2F2320;
  --ink: #F5EDE4;
  --inkSoft: #B7A49B;
  --inkFaint: #7E6C64;
  --jade: #2FD9B4;
  --deepJade: #7BE7CD;
  --jadeTint: #16332D;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="cream"]) {
    color-scheme: dark;
    --bg: #1C1412;
    --surface: #271D1A;
    --border: #443330;
    --hairline: #2F2320;
    --ink: #F5EDE4;
    --inkSoft: #B7A49B;
    --inkFaint: #7E6C64;
    --jade: #2FD9B4;
    --deepJade: #7BE7CD;
    --jadeTint: #16332D;
  }
}

/* --- fonts ----------------------------------------------------------------- */

@font-face {
  font-family: "Baloo 2";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("/assets/fonts/baloo2-latin-var.woff2") format("woff2");
  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;
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 200 1000;
  font-display: swap;
  src: url("/assets/fonts/nunito-latin-var.woff2") format("woff2");
  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;
}

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

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--deepJade); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--jade); }

:focus-visible { outline: 2px solid var(--jade); outline-offset: 2px; border-radius: 4px; }

.shell { max-width: 820px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 24px); }

/* --- header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  border-bottom: 1px solid var(--hairline);
}

.site-header .shell {
  padding-block: 12px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.wordmark { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; }
.wordmark:hover { color: inherit; }
.wordmark img { width: 34px; height: 34px; object-fit: contain; }
.wordmark-text { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.wordmark-name { font-family: "Baloo 2", cursive; font-weight: 800; font-size: 20px; }
.wordmark-tag { font-size: 13px; font-weight: 700; color: var(--inkFaint); white-space: nowrap; }

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 14px;
  font-weight: 700;
}
.site-nav a { color: var(--inkSoft); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

.den-toggle {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--inkSoft);
  border-radius: 18px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  flex: none;
}
.den-toggle:hover { color: var(--ink); }

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

main { padding-block: clamp(36px, 6vw, 56px) 96px; }

.doc-head { border-bottom: 1px solid var(--hairline); padding-bottom: 28px; margin-bottom: 12px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--jadeTint);
  color: var(--deepJade);
  border-radius: 22px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1 {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: clamp(38px, 7vw, 56px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 16px 0 10px;
}

.meta { margin: 0; font-size: 15px; color: var(--inkSoft); font-weight: 600; }

section { margin: 32px 0; }

h2 {
  font-family: "Baloo 2", cursive;
  font-weight: 800;
  font-size: 23px;
  line-height: 1.25;
  margin: 0 0 10px;
}

section p { margin: 0; font-size: 17px; line-height: 1.65; color: var(--inkSoft); }
section p + p { margin-top: 14px; }
section strong { color: var(--ink); }

/* The opening summary reads as a card. Selected structurally because the test
 * parsers require <section> to carry no attributes. */
main > section:first-of-type {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: clamp(18px, 3vw, 24px) clamp(18px, 3vw, 26px);
  margin: 28px 0;
}

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

.doc-footer {
  border-top: 1px solid var(--hairline);
  margin-top: 48px;
  padding-top: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.doc-footer img { width: 30px; height: 30px; object-fit: contain; }
.doc-footer span { font-size: 14px; color: var(--inkSoft); font-weight: 600; }
.doc-footer-links { margin-left: auto; display: flex; gap: 20px; font-size: 14px; font-weight: 700; flex-wrap: wrap; }
