@font-face {
  font-family: "Chivo";
  src: url("/fonts/Chivo-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --blue: #1761ad;
  --blue-deep: #0d477f;
  --navy: #071f2d;
  --teal: #008e91;
  --teal-dark: #006d70;
  --ink: #0c2936;
  --muted: #4b6672;
  --mist: #edf5f7;
  --white: #ffffff;
  --line: #c9dce3;
  --focus: #f8d34e;
  --on-blue: #eef7fd;
  --on-blue-soft: #cfe6f6;
  --on-blue-accent: #a9eef0;
  --content: 1180px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--blue);
  font-family: "Chivo", Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: var(--teal-dark); text-underline-offset: 4px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
.skip-link { background: var(--focus); color: var(--navy); border-radius: 0 0 5px 0; }

/* Homepage-matched shared chrome */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  color: var(--ink);
  background: var(--white);
  border-bottom: 1px solid var(--line);
  backdrop-filter: none;
}
.site-header .wrap,
.site-header .docs-header-inner {
  width: min(var(--content), calc(100% - 48px));
  min-height: 78px;
  margin-inline: auto;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-header .brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}
.site-header .brand img { width: 66px; height: auto; }
.site-header .brand .word { color: var(--navy); font-size: 1.2rem; font-weight: 860; letter-spacing: -0.03em; }
.site-header .brand .word b { color: var(--teal); }
.site-header .site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
}
.site-header .site-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #294955;
  font-size: 0.86rem;
  font-weight: 740;
  text-decoration: none;
}
.site-header .tagline { display: none; }
.site-header .site-nav a:hover,
.site-header .site-nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-underline-offset: 6px; }
.site-header .site-nav .primary-cta {
  padding: 0 18px;
  color: var(--white);
  background: var(--teal);
  border-radius: 5px;
  font-weight: 820;
  text-decoration: none;
}
.site-header .site-nav .primary-cta:hover { color: var(--white); background: var(--teal-dark); text-decoration: none; }

/* Blog index and article canvas */
body > main { padding: clamp(48px, 6vw, 84px) 0; }
body > main > .wrap {
  width: min(980px, calc(100% - 48px));
  margin-inline: auto;
}
body > main > .wrap > .eyebrow,
.article-head .eyebrow {
  color: var(--on-blue-accent);
  font-size: 0.74rem;
  font-weight: 820;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
body > main > .wrap > h1,
.article-head h1 {
  color: var(--white);
  font-size: clamp(2.5rem, 5vw, 4.6rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
body > main > .wrap > .intro,
.article-head .dek,
.article-head .meta { color: var(--on-blue-soft); }
.posts { gap: 16px; }
.post {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: none;
}
.post .thumb { background: var(--navy); }
.post .body { padding: 22px; }
.post .meta { color: var(--muted); }
.post h2 a { color: var(--navy); }
.post h2 a:hover, .post .readmore { color: var(--teal-dark); }
.post p { color: #33525f; }
article#article {
  overflow: hidden;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
}
article#article .article-head { padding: clamp(28px, 5vw, 52px); background: var(--blue-deep); }
article#article .article-copy { padding: clamp(24px, 5vw, 52px); color: #294955; }
article#article .article-copy h2,
article#article .article-copy h3 { color: var(--navy); }
article#article .article-copy a { color: var(--teal-dark); }
article#article blockquote,
article#article .callout,
article#article .note {
  color: var(--ink);
  background: var(--mist);
  border: 1px solid var(--line);
  border-left: 5px solid var(--teal);
  border-radius: 5px;
  box-shadow: none;
}
figure.hero-image, .article-hero, article#article figure { border-radius: 0; }

/* Docs index and detail pages */
body > header:not(.site-header) { display: none; }
.docs-header + .layout { margin-top: 0; }
.layout {
  width: min(1440px, 100%);
  color: var(--ink);
  background: var(--blue);
}
.layout main,
.help-page,
.api-shell {
  color: var(--ink);
  background: transparent;
  font-family: "Chivo", Arial, sans-serif;
}
.layout > main {
  padding: 34px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.layout aside { color: var(--on-blue-soft); }
.layout .sidebar-title,
.layout .toc-title { color: var(--on-blue-accent); }
.layout .side-section a,
.layout .toc a { color: var(--on-blue); border-radius: 4px; }
.layout .side-section a:hover,
.layout .toc a:hover { color: var(--white); background: rgba(255,255,255,0.10); }
.layout .crumbs, .layout .lead { color: var(--muted); }
.layout h1, .layout h2, .layout h3 { color: var(--navy); }
.layout h2 { border-top-color: var(--line); }
.layout .callout,
.help-page .card,
.help-page .help-card,
.api-shell .api-note {
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  box-shadow: none;
}
.layout .card {
  color: var(--ink);
  background: var(--mist);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.layout footer { border-top-color: var(--line); color: var(--muted); }
.help-page {
  width: min(920px, calc(100% - 48px));
  max-width: 920px;
  margin: 0 auto;
  padding: clamp(38px, 5vw, 64px) 0;
}
.help-page .help-back { color: var(--on-blue-accent); font-weight: 760; }
.help-page .help-title { color: var(--white); font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.03; letter-spacing: -0.035em; }
.help-page .help-lede { color: var(--on-blue-soft); }
.help-page .card,
.help-page .help-card { padding: clamp(18px, 3vw, 28px); margin: 16px 0; }
.help-page .card h2,
.help-page .card h3,
.help-page .help-card h2,
.help-page .help-card h3 { color: var(--navy); }
.help-page .card p,
.help-page .card li,
.help-page .help-card p,
.help-page .help-card li { color: #294955; }
.help-page code,
.api-shell code { color: var(--navy); background: var(--mist); border: 1px solid var(--line); border-radius: 4px; }
.help-page :not(pre) > code,
.api-shell :not(pre) > code { overflow-wrap: anywhere; word-break: break-word; }
.help-page pre,
.api-shell pre { color: #eaf4f9; background: var(--navy); border: 1px solid #21414f; border-radius: 5px; }
.help-page .help-table {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.help-page .pill { color: var(--teal-dark); background: var(--mist); border: 1px solid var(--line); border-radius: 4px; }
.help-page .ok { color: #185a54; border-left-color: var(--teal); }
.help-page .warn { color: #7a4c00; }
.help-page .danger { color: #8c2f2f; }
.api-shell { max-width: 1180px; margin: 0 auto; padding: 32px 24px 56px; }

.site-footer {
  margin-top: 0;
  padding: 36px 0 44px;
  color: #d7e8ef;
  background: var(--blue-deep);
  border-top: 1px solid rgba(255,255,255,0.18);
}
.site-footer .wrap { width: min(var(--content), calc(100% - 48px)); margin-inline: auto; }
.site-footer a { color: #eaf4f9; }

@media (max-width: 760px) {
  .site-header .wrap,
  .site-header .docs-header-inner { width: min(100% - 30px, var(--content)); min-height: 68px; gap: 12px; }
  .site-header .brand img { width: 54px; }
  .site-header .brand .word { display: none; }
  .site-header .site-nav { gap: 12px; overflow-x: auto; }
  .site-header .site-nav a { font-size: 0.8rem; white-space: nowrap; }
  .site-header .site-nav .home-link { display: none; }
  .site-header .site-nav .primary-cta { padding: 0 13px; }
  body > main > .wrap { width: min(100% - 30px, 980px); }
  .post { grid-template-columns: 1fr; }
  article#article .article-head,
  article#article .article-copy { padding: 24px 18px; }
  .layout { display: block; padding: 20px 15px; }
  .layout > main { padding: 24px 18px; }
  .layout aside { position: static; max-height: none; margin-bottom: 20px; }
  .layout .toc { display: none; }
  .help-page { width: min(100% - 30px, 920px); }
  .help-page .card,
  .help-page .help-card { padding: 18px 16px; }
}

@media (max-width: 620px) {
  .site-header .site-nav .dashboard-link { display: none; }
  .site-header .site-nav a { min-height: 44px; }
  .help-page .help-title { font-size: clamp(2.1rem, 11vw, 3.1rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
