:root {
  --bg: #f3f6fb;
  --ink: #112033;
  --ink-soft: #45576c;
  --brand: #0a3a72;
  --brand-deep: #06254a;
  --brand-warm: #d97a1f;
  --line: #d3dbe5;
  --surface: rgba(255, 255, 255, 0.96);
  --surface-strong: #ffffff;
  --shadow: 0 10px 28px rgba(12, 27, 43, 0.08);
  --radius: 16px;
  --radius-sm: 12px;
  --max: 1100px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
}

body {
  font-family: "Work Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: "Fraunces", Georgia, serif;
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand);
}

code,
pre {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
}

code {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.site-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(circle at 8% 0%, rgba(10, 58, 114, 0.06), transparent 45%),
    linear-gradient(180deg, #f7faff 0%, #eff3f9 100%);
}

.glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(28px);
  opacity: 0.35;
}

.glow-a {
  width: 28rem;
  height: 28rem;
  background: rgba(10, 58, 114, 0.18);
  top: -8rem;
  left: -6rem;
}

.glow-b {
  width: 34rem;
  height: 34rem;
  background: rgba(217, 122, 31, 0.12);
  right: -10rem;
  bottom: -10rem;
}

.grid-overlay {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(10, 58, 114, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(10, 58, 114, 0.03) 1px, transparent 1px);
  background-size: 56px 56px;
  opacity: 0.2;
}

.topbar {
  width: min(var(--max), 100%);
  margin: 1rem auto 0;
  padding-inline: 1rem;
  background: var(--surface);
  border: 1px solid rgba(10, 58, 114, 0.14);
  border-radius: 14px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
  position: sticky;
  top: 0.8rem;
  z-index: 20;
  backdrop-filter: blur(10px);
}

.brand {
  text-decoration: none;
  font-weight: 700;
  color: var(--brand-deep);
  letter-spacing: 0.01em;
}

.site-nav {
  display: flex;
  gap: 0.45rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.35rem 0.8rem;
  font-size: 0.95rem;
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--brand-deep);
  border-color: rgba(10, 58, 114, 0.28);
  background: var(--surface-strong);
}

.menu-toggle {
  display: none;
}

.page {
  width: min(var(--max), 100%);
  padding-inline: 1rem;
  margin: 2.5rem auto 4rem;
  display: grid;
  gap: 1.7rem;
}

.hero {
  background: var(--surface);
  border: 1px solid rgba(10, 58, 114, 0.12);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 2.5vw, 2.8rem);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--brand-warm));
}

.hero h1 {
  font-size: clamp(2rem, 4vw, 3.25rem);
  max-width: 16ch;
  margin-bottom: 1rem;
}

.hero p {
  max-width: 70ch;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--brand);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.4rem;
}

.btn {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.58rem 1rem;
  font-weight: 600;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(10, 58, 114, 0.2);
}

.btn-primary:hover {
  background: var(--brand-deep);
}

.btn-ghost {
  border-color: rgba(10, 58, 114, 0.28);
  color: var(--ink);
  background: #fff;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.card {
  border: 1px solid rgba(10, 58, 114, 0.12);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}

.card-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 0.65rem;
}

.card-list {
  margin: 0 0 1rem;
  padding-left: 1rem;
  color: var(--ink-soft);
}

.text-link {
  text-decoration: none;
  font-weight: 600;
}

.timeline {
  border: 1px solid rgba(10, 58, 114, 0.12);
  border-radius: var(--radius);
  padding: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.timeline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.timeline-grid article {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.85rem;
  background: #fdfefe;
}

.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 1rem;
  min-width: 0;
}

.docs-nav {
  border: 1px solid rgba(10, 58, 114, 0.12);
  background: var(--surface);
  border-radius: 14px;
  padding: 1rem;
  align-self: start;
  position: sticky;
  top: 5.3rem;
  box-shadow: var(--shadow);
}

.docs-nav h2 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}

.docs-nav a {
  display: block;
  text-decoration: none;
  color: var(--ink-soft);
  padding: 0.35rem 0;
  border-bottom: 1px dashed rgba(10, 58, 114, 0.14);
}

.docs-nav a:last-child {
  border-bottom: none;
}

.docs-nav a.active,
.docs-nav a:hover {
  color: var(--brand-deep);
}

.docs-main {
  display: grid;
  gap: 1rem;
  min-width: 0;
}

.panel {
  border: 1px solid rgba(10, 58, 114, 0.12);
  background: var(--surface);
  border-radius: 14px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  min-width: 0;
}

.panel h1 {
  font-size: clamp(1.8rem, 3.4vw, 2.8rem);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.5rem 0 1rem;
  font-size: 0.94rem;
}

th,
td {
  text-align: left;
  border: 1px solid var(--line);
  padding: 0.55rem;
  vertical-align: top;
}

th {
  background: #edf2f9;
}

pre {
  margin: 0;
  padding: 0.9rem;
  border-radius: 12px;
  border: 1px solid #d8e1ee;
  background: #f4f7fc;
  overflow-x: auto;
  max-width: 100%;
}

pre code {
  overflow-wrap: normal;
  word-break: normal;
}

.kv-list {
  display: grid;
  gap: 0.4rem;
}

.kv-list li {
  list-style: none;
  border-left: 3px solid var(--brand);
  padding-left: 0.65rem;
}

.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 420ms ease, transform 420ms ease;
}

.reveal.reveal-show {
  opacity: 1;
  transform: translateY(0);
}

.footer-note {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

@media (max-width: 960px) {
  .docs-shell {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: static;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink);
    padding: 0.35rem 0.65rem;
  }

  .site-nav {
    width: 100%;
    display: none;
    flex-direction: column;
  }

  .site-nav.is-open {
    display: flex;
  }
}
