/* Legal / support document pages (privacy.html, support.html).
   Design system v4 "Ember Cinema": dark charcoal shell, highly readable,
   prints light. Keeps the legacy class names
   (header.site, main.page, ...) — page HTML is hand-written and never touched. */

:root {
  --paper: #0c0a09;
  --paper-2: #050403;
  --surface: #151210;
  --text: #f2ece4;
  --text-secondary: #b3a89c;
  --border: rgba(255, 214, 170, 0.14);
  --link: #ffb469;
  --shell-text: #f2ece4;
  --shell-text-2: #b3a89c;
  --shell-border: rgba(255, 214, 170, 0.10);
  --ember: #e0664a;
  --gold: #d9a441;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", "PingFang SC", "Hiragino Sans", "Noto Sans", sans-serif;
  background: var(--paper);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: 780px; margin: 0 auto; padding: 0 24px; }

header.site {
  border-bottom: 1px solid var(--shell-border);
  background: var(--paper);
}

header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 58px;
  flex-wrap: wrap;
}

.brand {
  font-weight: 800;
  font-size: 1.02rem;
  text-decoration: none;
  color: var(--shell-text);
  white-space: nowrap;
}

nav.site a,
.site-nav > a {
  color: var(--shell-text-2);
  text-decoration: none;
  font-size: 0.92rem;
  margin-inline-start: 20px;
}

nav.site a:hover,
.site-nav > a:hover { color: var(--shell-text); }

.site-nav { display: flex; align-items: center; }

.brand-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-inline-end: 8px;
  background: linear-gradient(120deg, var(--gold), var(--ember));
  vertical-align: 1px;
}

/* Language dropdown (details/summary) — lives in the dark shell */
details.lang { position: relative; margin-inline-start: 20px; }

details.lang summary {
  list-style: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--shell-text-2);
  font-size: 0.88rem;
  padding: 5px 10px;
  border: 1px solid var(--shell-border);
  border-radius: 9px;
}

details.lang summary::-webkit-details-marker { display: none; }

details.lang[open] summary { color: var(--shell-text); }

.lang-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px;
  z-index: 60;
  box-shadow: 0 14px 40px rgba(70, 50, 25, 0.15);
}

.lang-menu a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  color: var(--shell-text-2);
  text-decoration: none;
  font-size: 0.9rem;
}

.lang-menu a:hover { background: var(--paper-2); color: var(--shell-text); }

.lang-menu a[aria-current="true"] { color: var(--ember); }

.crumb { margin: 0 0 22px; font-size: 0.9rem; }

.crumb a { color: var(--text-secondary); text-decoration: none; }

.crumb a:hover { color: var(--text); }

main.page { padding: 48px 0 76px; }

main.page h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
  font-weight: 800;
}

main.page .subtitle {
  color: var(--text-secondary);
  font-size: 1.02rem;
  margin: 0 0 26px;
}

main.page h2 { font-size: 1.18rem; margin-top: 2.2em; letter-spacing: -0.01em; }

main.page h3 { font-size: 1.02rem; margin-top: 1.8em; }

main.page a { color: var(--link); }

main.page p { color: var(--text-secondary); }

main.page li { color: var(--text-secondary); }

main.page strong { color: var(--text); }

.updated { color: var(--text-secondary); font-size: 0.9rem; }

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

footer.site {
  border-top: 1px solid var(--shell-border);
  padding: 26px 0 40px;
  color: var(--shell-text-2);
  font-size: 0.88rem;
  background: var(--paper-2);
}

footer.site a { color: var(--shell-text-2); }

@media print {
  :root {
    --paper: #fff; --paper-2: #fff; --surface: #fff; --text: #111;
    --text-secondary: #333; --link: #0645ad;
  }
  header.site, footer.site { background: #fff; }
  .brand { color: #111; }
}
