:root {
  color-scheme: dark;
  --bg: #06080f;
  --surface: #101624;
  --card: #141c2e;
  --border: #2a3858;
  --text: #eef2fb;
  --muted: #9aa8c9;
  --accent: #6b9dff;
  --accent2: #45e0a8;
  --radius: 16px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, Cantarell, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: max(12px, env(safe-area-inset-top, 0px));
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: radial-gradient(ellipse 800px 420px at 12% -8%, rgba(107, 157, 255, 0.1), transparent 50%), var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(40px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
}

header.hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

header.hero h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

header.hero .lead {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

nav.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
}

nav.toc h2 {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

nav.toc ul {
  margin: 0;
  padding-left: 1.2rem;
}

nav.toc a {
  color: var(--accent);
  text-decoration: none;
}

nav.toc a:hover {
  text-decoration: underline;
}

section {
  margin-bottom: 2.25rem;
}

section h2 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: #dbe4ff;
}

section h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.02rem;
  font-weight: 600;
  color: #c8d4f0;
}

section p {
  margin: 0 0 0.85rem;
  color: #d2daf0;
}

section a {
  color: var(--accent);
}

section a:hover {
  text-decoration: underline;
}

section code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.88em;
  padding: 0.12em 0.35em;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  color: #cfe8ff;
}

section ul {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
  color: #d2daf0;
}

section ol {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
  color: #d2daf0;
}

section ol li {
  margin-bottom: 0.5rem;
}

section li {
  margin-bottom: 0.35rem;
}

.timeline {
  border-left: 2px solid rgba(107, 157, 255, 0.35);
  padding-left: 1rem;
  margin: 0.5rem 0 0;
}

.timeline dt {
  font-weight: 600;
  color: var(--accent2);
  margin-top: 0.75rem;
}

.timeline dt:first-child {
  margin-top: 0;
}

.timeline dd {
  margin: 0.25rem 0 0;
  color: #d2daf0;
}

figure.photo {
  margin: 1.25rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card);
}

figure.photo--local {
  border-color: rgba(69, 224, 168, 0.35);
  box-shadow: 0 0 0 1px rgba(69, 224, 168, 0.12);
}

figure.photo img {
  width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

figure.photo figcaption {
  padding: 0.65rem 0.85rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.35);
}

.sources {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
}

.sources h2 {
  margin-top: 0;
}

.sources ol {
  margin: 0;
  padding-left: 1.25rem;
}

.sources a {
  color: var(--accent);
  word-break: break-word;
}

.public-narrative {
  padding: 1.15rem 1.2rem 1.05rem;
  border-radius: var(--radius);
  border: 1px solid rgba(107, 157, 255, 0.35);
  border-left: 4px solid rgba(107, 157, 255, 0.65);
  background: linear-gradient(165deg, rgba(107, 157, 255, 0.08) 0%, transparent 55%), var(--surface);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.public-narrative h2 {
  margin-top: 0;
  font-size: 1.15rem;
  color: #e4ecff;
}

.public-narrative__tag {
  margin: 0 0 1rem;
  font-size: 0.82rem;
  color: var(--accent2);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.public-narrative p:last-child {
  margin-bottom: 0;
}

.disclaimer {
  margin-top: 2rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(240, 193, 75, 0.35);
  background: rgba(240, 193, 75, 0.06);
  font-size: 0.88rem;
  color: #e8dcc8;
}

@media (min-width: 900px) {
  .wrap {
    max-width: 820px;
  }
}
