:root {
  color-scheme: light;
  --ink: #17233f;
  --muted: #5c6880;
  --line: #dce3ed;
  --paper: #ffffff;
  --wash: #f4f7fb;
  --navy: #0c1830;
  --navy-2: #142746;
  --blue: #1767d2;
  --cyan: #35c9c2;
  --amber: #f2a51a;
  --code: #0b1428;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }
body { margin: 0; overflow-x: hidden; color: var(--ink); background: var(--paper); font-size: 16px; line-height: 1.7; }
a { color: var(--blue); text-underline-offset: 0.18em; }
a:hover { color: #0b4fa8; }
img { display: block; max-width: 100%; height: auto; }

.skip-link { position: fixed; z-index: 100; top: 0.75rem; left: 0.75rem; transform: translateY(-200%); padding: 0.65rem 0.9rem; border-radius: 0.4rem; background: var(--amber); color: var(--navy); font-weight: 800; }
.skip-link:focus { transform: translateY(0); }
.layout { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 19rem; overflow-y: auto; padding: 2rem 1.25rem; color: #eaf2ff; background: linear-gradient(165deg, var(--navy), #081225 70%); }
.brand { display: flex; align-items: center; gap: 0.8rem; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand-logo { display: block; flex: 0 0 3.35rem; width: 3.35rem; height: 3.35rem; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.15rem; letter-spacing: -0.02em; }
.brand small { margin-top: -0.15rem; color: #9fb1ca; font-size: 0.74rem; }
.site-nav { display: grid; gap: 0.14rem; margin-top: 2.2rem; }
.site-nav > a { padding: 0.48rem 0.7rem; border-left: 3px solid transparent; border-radius: 0.25rem; color: #b9c7dc; font-size: 0.9rem; font-weight: 650; text-decoration: none; }
.site-nav > a:hover { color: #fff; background: rgba(255,255,255,.06); }
.site-nav > a.active { border-left-color: var(--cyan); color: #fff; background: rgba(53,201,194,.1); }
.subnav { display: grid; margin: 0.1rem 0 0.4rem 1.2rem; }
.subnav a { padding: 0.28rem 0.5rem; color: #8fa2bd; font-size: 0.78rem; line-height: 1.4; text-decoration: none; }
.subnav a:hover, .subnav a.active { color: var(--cyan); }
.sidebar-links { display: flex; gap: 1rem; margin: 2rem 0.7rem 0; padding-top: 1.1rem; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-links a { color: #9fb1ca; font-size: 0.78rem; font-weight: 700; text-decoration: none; }

.main { width: min(100% - 19rem, 96rem); min-height: 100vh; margin-left: 19rem; padding: 3rem clamp(2rem, 6vw, 7rem) 2rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 3rem; color: var(--muted); font-size: 0.8rem; font-weight: 650; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.page-header { max-width: 56rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.page-header.home-header { position: relative; max-width: 70rem; padding: clamp(2rem, 6vw, 5rem); padding-right: clamp(10rem, 22vw, 16rem); overflow: hidden; border: 0; border-radius: 1.1rem; color: #fff; background: linear-gradient(128deg, #122b50 0%, var(--navy) 72%); box-shadow: 0 20px 60px rgba(12,24,48,.16); }
.home-header::after { position: absolute; right: -8rem; bottom: -14rem; width: 27rem; height: 27rem; border: 5rem solid rgba(53,201,194,.13); border-radius: 50%; content: ""; }
.hero-logo { position: absolute; z-index: 1; top: 1.5rem; right: 1.5rem; width: clamp(7rem, 16vw, 12rem); height: auto; filter: drop-shadow(0 .8rem 1.4rem rgba(0,0,0,.28)); }
.eyebrow { margin: 0 0 0.55rem; color: var(--blue); font-size: 0.78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.home-header .eyebrow { color: var(--cyan); }
h1, h2, h3, h4 { color: var(--ink); font-weight: 780; line-height: 1.18; letter-spacing: -0.035em; }
h1 { max-width: 55rem; margin: 0; font-size: clamp(2.35rem, 6vw, 4.8rem); }
.home-header h1 { position: relative; z-index: 1; color: #fff; }
.page-header:not(.home-header) h1 { font-size: clamp(2.2rem, 5vw, 4rem); }
.lede { position: relative; z-index: 1; max-width: 46rem; margin: 1.2rem 0 0; color: #c9d7eb; font-size: clamp(1.05rem, 2vw, 1.28rem); }
.hero-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 2.8rem; padding: 0.6rem 1rem; border: 1px solid transparent; border-radius: .42rem; font-weight: 800; text-decoration: none; }
.button.primary { color: var(--navy); background: var(--cyan); }
.button.secondary { border-color: rgba(255,255,255,.3); color: #fff; background: rgba(255,255,255,.07); }

.prose { max-width: 58rem; margin-top: 3rem; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose li { color: #2f3b52; }
.prose h2 { margin: 2.8rem 0 0.8rem; font-size: clamp(1.65rem, 3vw, 2.2rem); }
.prose h3 { margin: 2.2rem 0 .65rem; font-size: 1.35rem; }
.prose h4 { margin: 1.7rem 0 .45rem; font-size: 1.1rem; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li + li { margin-top: 0.3rem; }
.prose strong { color: var(--ink); }
.prose code { padding: 0.12em 0.32em; border-radius: 0.25rem; color: #c8f8ef; background: var(--code); font-size: .88em; }
.prose pre { max-width: 100%; overflow: auto; padding: 1.2rem; border-radius: .6rem; background: var(--code); }
.prose pre code { padding: 0; background: transparent; }
.prose img { margin: 1.6rem auto; border: 1px solid var(--line); border-radius: .45rem; box-shadow: 0 10px 28px rgba(22,35,63,.08); }
.prose .alignright { float: right; margin: .2rem 0 1rem 1.5rem; }
.prose hr, .prose .wp-block-separator { margin: 2.5rem 0; border: 0; border-top: 1px solid var(--line); }
.example-grid { max-width: 58rem; margin-top: 3rem; padding: 1.5rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--wash); }
.example-grid h2 { margin-top: 0; }
.example-grid > div { display: grid; grid-template-columns: repeat(2, 1fr); gap: .65rem; }
.example-grid a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: .45rem; color: var(--ink); background: #fff; font-weight: 720; text-decoration: none; }
.example-grid a:hover { border-color: var(--cyan); box-shadow: 0 6px 18px rgba(22,35,63,.08); }
.page-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; max-width: 58rem; margin-top: 4rem; padding-top: 1.2rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.menu-button { display: none; }
.not-found { display: grid; min-height: 100vh; place-content: center; justify-items: start; padding: 2rem; }
.not-found h1 { margin: .4rem 0; }

@media (max-width: 860px) {
  .menu-button { position: fixed; z-index: 50; top: .8rem; right: .8rem; display: inline-flex; align-items: center; gap: .4rem; padding: .55rem .75rem; border: 1px solid var(--line); border-radius: .45rem; color: var(--ink); background: rgba(255,255,255,.96); font: inherit; font-size: .88rem; font-weight: 800; box-shadow: 0 5px 18px rgba(12,24,48,.14); }
  .sidebar { z-index: 40; width: min(21rem, 86vw); transform: translateX(-105%); transition: transform .2s ease; box-shadow: 18px 0 50px rgba(0,0,0,.25); }
  .sidebar.open { transform: translateX(0); }
  .layout, .main, .page-header, .prose { max-width: 100vw; }
  .main { width: 100%; min-width: 0; margin: 0; overflow: hidden; padding: 5rem 1.2rem 2rem; }
  .breadcrumbs { margin-bottom: 1.5rem; }
  .page-header.home-header { padding: 2.2rem 1.4rem; padding-right: clamp(8.5rem, 22vw, 11rem); }
  .hero-logo { top: 1.2rem; right: 1.2rem; width: clamp(6.5rem, 18vw, 9rem); }
  .example-grid > div { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  body { font-size: 16px; }
  .page-header.home-header { margin-inline: -0.2rem; padding: 7.2rem 1.4rem 2.2rem; }
  .hero-logo { top: 1rem; right: 1rem; width: 6rem; }
  h1 { overflow-wrap: anywhere; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .prose .alignright { float: none; margin: 1.4rem auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar { transition: none; }
}
