:root {
  --text: #f4f6fa;
  --text-dim: rgba(244, 246, 250, 0.66);
  --text-faint: rgba(244, 246, 250, 0.4);

  --glass-bg: rgba(255, 255, 255, 0.07);
  --glass-bg-strong: rgba(255, 255, 255, 0.11);
  --glass-line: rgba(255, 255, 255, 0.16);
  --glass-blur: blur(22px) saturate(150%);
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.32);

  --serif: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --sans: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: #0b1018;
  color: var(--text-dim);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
}

/* Same portrait backdrop as the chat, held still behind the content. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: url("/emilia.jpg");
  background-image: -webkit-image-set(url("/emilia.webp") type("image/webp"), url("/emilia.jpg") type("image/jpeg"));
  background-image: image-set(url("/emilia.webp") type("image/webp"), url("/emilia.jpg") type("image/jpeg"));
  background-size: cover;
  background-position: 50% 12%;
  background-repeat: no-repeat;
  filter: brightness(0.4) saturate(0.8);
}

/* Legal pages carry long text, so the scrim sits heavier than on the chat. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: linear-gradient(to bottom,
    rgba(8, 11, 17, 0.82) 0%,
    rgba(8, 11, 17, 0.88) 45%,
    rgba(8, 11, 17, 0.95) 100%);
}

.nav, main, footer { position: relative; z-index: 1; }

.nav {
  padding: 18px 20px;
}

.nav-inner {
  max-width: 680px;
  margin: 0 auto;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 13px;
  padding: 8px 15px 8px 12px;
  border-radius: 999px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  transition: color 0.2s ease, background 0.2s ease;
}

.back:hover { color: var(--text); background: var(--glass-bg-strong); }
.back svg { width: 15px; height: 15px; }

main {
  max-width: 680px;
  margin: 0 auto;
  padding: 30px 20px 70px;
}

h1 {
  color: var(--text);
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 0 0 6px;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.4);
}

.lead {
  color: var(--text-faint);
  font-size: 13px;
  margin: 0 0 30px;
}

section {
  background: var(--glass-bg);
  border: 1px solid var(--glass-line);
  -webkit-backdrop-filter: var(--glass-blur);
  backdrop-filter: var(--glass-blur);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 20px 22px;
  margin-bottom: 14px;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  section, .back, .note { background: rgba(18, 24, 34, 0.9); }
}

h2 {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: 0.005em;
}

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

ul { margin: 0 0 10px; padding-left: 20px; }
li { margin-bottom: 5px; }

a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--glass-line); }
a:hover { border-bottom-color: rgba(255, 255, 255, 0.45); }

.note {
  background: var(--glass-bg-strong);
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  padding: 15px 17px;
  font-size: 13.5px;
  color: var(--text);
  margin: 0;
}

strong { color: var(--text); font-weight: 600; }

footer {
  padding: 0 20px 44px;
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
}

footer a { color: var(--text-faint); border-bottom: 0; }
footer a:hover { color: var(--text-dim); }

@media (max-width: 520px) {
  h1 { font-size: 25px; }
  section { padding: 17px 18px; }
}

/* A section that only carries the summary note needs no panel of its own. */
section.bare {
  background: transparent;
  border: 0;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  padding: 0;
}
