:root {
  --bg: #f4efe7;
  --bg-elevated: #fbf8f2;
  --panel: rgba(255, 251, 245, 0.8);
  --panel-strong: #fffdf9;
  --line: rgba(33, 45, 68, 0.12);
  --line-strong: rgba(33, 45, 68, 0.22);
  --text: #1c2433;
  --muted: #5b6678;
  --brand: #0d3b66;
  --brand-soft: #d9e8f5;
  --accent: #b85c38;
  --accent-soft: #f6ded3;
  --success: #315f4f;
  --shadow: 0 24px 60px rgba(18, 31, 49, 0.12);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --content-width: 920px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(13, 59, 102, 0.12), transparent 28%),
    radial-gradient(circle at bottom right, rgba(184, 92, 56, 0.12), transparent 24%),
    linear-gradient(180deg, #f8f3eb 0%, #f1ebe0 100%);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  line-height: 1.65;
}

a {
  color: var(--brand);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

code,
pre,
kbd {
  font-family: "IBM Plex Mono", "SFMono-Regular", monospace;
}

.site-frame {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: 100vh;
}

.site-sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 32px 24px;
  border-right: 1px solid var(--line);
  background: rgba(252, 248, 241, 0.88);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(145deg, var(--brand), #174d83);
  color: white;
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  font-size: 1rem;
}

.brand-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.sidebar-intro,
.sidebar-meta {
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav {
  margin-top: 28px;
}

.nav-group + .nav-group {
  margin-top: 24px;
}

.nav-group h2 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-group li + li {
  margin-top: 6px;
}

.nav-group a {
  display: block;
  padding: 9px 12px;
  border-radius: 12px;
  color: var(--text);
  text-decoration: none;
  transition: background-color 140ms ease, transform 140ms ease;
}

.nav-group a:hover {
  background: rgba(13, 59, 102, 0.07);
  transform: translateX(2px);
}

.nav-group a.active {
  background: var(--brand);
  color: white;
  box-shadow: 0 10px 20px rgba(13, 59, 102, 0.16);
}

.sidebar-meta {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.meta-label {
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-main {
  padding: 36px 40px 48px;
}

.masthead {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  max-width: var(--content-width);
  margin: 0 auto 28px;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.masthead h1 {
  margin: 0;
  font-family: "Fraunces", Georgia, serif;
  font-size: clamp(2rem, 3vw, 3.4rem);
  line-height: 1.08;
}

.page-summary {
  max-width: 68ch;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.masthead-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.ghost-button:hover {
  background: var(--panel-strong);
  text-decoration: none;
}

.page-shell {
  max-width: var(--content-width);
  margin: 0 auto;
}

.page-card {
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(252, 248, 241, 0.96));
  box-shadow: var(--shadow);
}

.hero-grid,
.card-grid {
  display: grid;
  gap: 18px;
}

.hero-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr);
  margin-bottom: 24px;
}

.hero-panel,
.spotlight-panel,
.doc-tile,
.metric-tile {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(251, 246, 239, 0.94));
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 34px;
}

.hero-panel h2,
.spotlight-panel h2 {
  margin: 0 0 12px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.8rem;
  line-height: 1.15;
}

.hero-panel p,
.spotlight-panel p {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--brand);
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.primary-button:hover {
  text-decoration: none;
  background: #174d83;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.secondary-button:hover {
  text-decoration: none;
  background: white;
}

.spotlight-panel {
  padding: 28px;
}

.metric-stack {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.metric-tile {
  padding: 16px 18px;
}

.metric-label {
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.metric-value {
  margin-top: 4px;
  font-size: 1.6rem;
  font-weight: 700;
}

.section-heading {
  margin: 36px 0 16px;
}

.section-heading h2 {
  margin: 0 0 6px;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.55rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
}

.card-grid {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.doc-tile {
  padding: 22px;
}

.doc-tile .kicker {
  margin-bottom: 8px;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.doc-tile h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
}

.doc-tile p {
  margin: 0 0 14px;
  color: var(--muted);
}

.doc-tile a {
  font-weight: 700;
}

.callout {
  margin: 28px 0 0;
  padding: 18px 20px;
  border: 1px solid rgba(184, 92, 56, 0.25);
  border-radius: var(--radius-md);
  background: var(--accent-soft);
}

.page-card h1,
.page-card h2,
.page-card h3,
.page-card h4 {
  color: var(--text);
  line-height: 1.2;
}

.page-card h1,
.page-card h2 {
  font-family: "Fraunces", Georgia, serif;
}

.page-card table {
  width: 100%;
  border-collapse: collapse;
  display: block;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: 14px;
  background: var(--panel-strong);
}

.page-card th,
.page-card td {
  padding: 12px 14px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.page-card th {
  background: var(--brand-soft);
}

.page-card pre {
  padding: 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f3ec;
}

.page-card blockquote {
  margin: 18px 0;
  padding: 4px 0 4px 18px;
  border-left: 4px solid var(--accent);
  color: var(--muted);
}

.page-card hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 30px 0;
}

.page-card img {
  max-width: 100%;
  border-radius: 14px;
}

.site-footer {
  max-width: var(--content-width);
  margin: 26px auto 0;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}

@media (max-width: 1080px) {
  .site-frame {
    grid-template-columns: 1fr;
  }

  .site-sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .site-main {
    padding: 24px 16px 32px;
  }

  .site-sidebar {
    padding: 24px 16px;
  }

  .page-card,
  .hero-panel,
  .spotlight-panel,
  .doc-tile {
    padding: 22px;
  }

  .masthead {
    flex-direction: column;
  }
}
