/* self-hosted fonts (Manrope is a variable font: one file covers 400–800) */
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-weight: 200 800; font-display: swap; src: url(fonts/manrope-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/jetbrains-mono-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  /* --ink: headings and what stands out; --text: running text, a little softer */
  --bg: #FFFFFF; --surface: #F6F6FD; --ink: #14143A; --text: #3C3C5E; --muted: #6B6B8F; --line: #E6E6F4;
  --dark: #2C2CE3; --dark-2: #2424C4; --on-dark: #FFFFFF; --on-dark-muted: #C9C9FA;
  --blue: #2C2CE3; --sky: #FFFFFF; --sky-soft: #EBEBFC;
  --radius: 6px; --radius-sm: 4px; /* one corner radius for cards, panels, inputs and images; the small one for inline bits inside them */
}
@media (prefers-color-scheme: dark) {
  /* a deep background, and no pure white: the text is a soft light grey */
  :root { --bg: #08081A; --surface: #111130; --ink: #F3F3F3; --text: #D4D4E0; --muted: #9A9AC0; --line: #212148; --blue: #8C8CFF; --sky-soft: #1A1A48; }
}
html { color-scheme: light dark; scroll-behavior: smooth; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: "Manrope", "Segoe UI", system-ui, sans-serif; font-size: 17px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4, h5, h6, strong, b { color: var(--ink); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1320px; margin: 0 auto; padding-inline: 24px; }

/* nav */
.nav { background: var(--bg); color: var(--ink); position: sticky; top: 0; z-index: 10; }
.nav > .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0; color: var(--ink); font-weight: 800; font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
.logo:hover { text-decoration: none; }
.logo svg { width: 30px; height: 32px; color: var(--blue); }
.nav-links { display: flex; gap: 28px; font-size: 15px; font-weight: 600; }
.nav-links a { color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current] { color: var(--blue); text-decoration: none; }

/* menus: a trigger and a card that opens on hover (pointer devices) or on click, closed by a click outside or Esc */
.menu { position: relative; }
.menu-trigger { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font: inherit; font-weight: 600; color: var(--muted); }
.menu-trigger .caret { width: 10px; height: 10px; flex: none; transition: transform 0.15s; }
.menu[data-open] .menu-trigger .caret { transform: rotate(180deg); }
.menu-panel { position: absolute; top: 100%; z-index: 20; padding-top: 10px; opacity: 0; transform: translateY(-4px); pointer-events: none; transition: opacity 0.15s, transform 0.15s; }
.menu[data-open] .menu-panel { opacity: 1; transform: none; pointer-events: auto; }
@media (hover: hover) {
  .menu:hover .menu-panel { opacity: 1; transform: none; pointer-events: auto; }
  .menu:hover .menu-trigger { color: var(--blue); }
}
.menu[data-open] .menu-trigger, .menu-trigger[aria-current] { color: var(--blue); }
.menu-card { padding: 6px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 16px 48px rgba(20, 20, 58, 0.16); }
@media (prefers-color-scheme: dark) { .menu-card { box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5); } }

/* products, in the top navigation: a panel across the whole bar, its content aligned with the page */
.nav-menu { position: static; }
.nav-menu-trigger { position: relative; }
.nav-menu-trigger::after { content: ""; position: absolute; left: -12px; right: -12px; top: 100%; height: 28px; } /* keeps the panel open while the pointer moves down to it */
.nav-menu-panel { left: 0; right: 0; top: 100%; padding-top: 0; transform: translateY(-6px); background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 32px 48px -24px rgba(20, 20, 58, 0.22); }
@media (prefers-color-scheme: dark) { .nav-menu-panel { box-shadow: 0 32px 48px -24px rgba(0, 0, 0, 0.6); } }
.menu[data-open] .nav-menu-panel, .menu:hover .nav-menu-panel { transform: none; }
.mega { padding-block: 28px 36px; font-weight: 400; }
.mega-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 1100px) { .mega-grid { grid-template-columns: 1fr 1fr; } }
.mega-heading { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.nav-product { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: var(--radius); background: var(--surface); color: var(--ink); font-weight: 400; transition: background 0.12s; }
.nav-product:hover { background: var(--sky-soft); text-decoration: none; }
.nav-product-icon { flex: none; width: 38px; height: 38px; border-radius: var(--radius); background: var(--sky-soft); color: var(--blue); display: grid; place-items: center; }
.nav-product-icon svg { width: 20px; height: 20px; }
.nav-product strong { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 2px 0 3px; }
.nav-product em { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 1px 7px; line-height: 1.5; }
.nav-product.is-soon { background: none; color: var(--muted); }
.nav-product[hidden] { display: none; } /* modules not announced yet: drop `hidden` in the markup to show one */
.nav-product.is-soon .nav-product-icon { background: var(--surface); color: var(--muted); }
.nav-product small { display: block; font-size: 13.5px; line-height: 1.45; color: var(--muted); }

/* the docs' version picker */
.version-menu { margin: 0 0 18px; }
.version-trigger { width: 100%; justify-content: space-between; padding: 8px 10px 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); font-size: 13px; transition: border-color 0.12s; }
.version-trigger:hover, .menu[data-open] .version-trigger { border-color: var(--blue); color: var(--ink); }
.version-trigger .version-note { flex: 1; text-align: left; }
.version-tag { font-family: "JetBrains Mono", Menlo, monospace; font-weight: 400; font-size: 12.5px; color: var(--blue); }
.version-note { font-size: 12.5px; font-weight: 500; color: var(--muted); }
.version-panel { left: 0; right: 0; }
.version-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--radius-sm); color: var(--ink); font-size: 13px; transition: background 0.12s; }
.version-panel a:hover { background: var(--surface); text-decoration: none; }
.version-panel a .version-note { flex: 1; }
.version-panel a .check { width: 14px; height: 14px; color: var(--blue); }
.version-panel a[aria-selected="true"] { background: var(--sky-soft); }

/* doc page */
.doc { max-width: 800px; padding-block: 56px 96px; }
.prose { max-width: none; }
.prose h2 { font-size: 24px; letter-spacing: -0.02em; margin: 48px 0 12px; scroll-margin-top: 88px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose ul { margin: 0 0 16px; }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 6px; }
.prose code { font-family: "JetBrains Mono", Menlo, monospace; font-size: 0.86em; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 2px 6px; }
.scroll { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }

footer { padding-block: 28px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }

@media (max-width: 860px) {
  .grid { grid-template-columns: 1fr; }
  .trust .wrap { grid-template-columns: 1fr; }
  .nav-links { gap: 18px; }
}

/* minimal landing: header, one statement, footer pinned to the bottom */
body.minimal { min-height: 100vh; display: flex; flex-direction: column; }
body.minimal footer { margin-top: auto; }
.statement { padding-block: 96px 120px; }
.statement .eyebrow { color: var(--blue); }
.statement h1 { font-size: clamp(40px, 7vw, 76px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800; margin: 0 0 24px; max-width: 12ch; text-wrap: balance; color: var(--ink); }
.statement p { font-size: 20px; color: var(--muted); max-width: 48ch; margin: 0; }

/* docs: Markdown pages built from docs/ by build.mjs */
.docs { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding-block: 48px 96px; align-items: start; }
.docs-side { position: sticky; top: 88px; font-size: 14px; }
.docs-section { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.docs-side ul, .docs-side ol { list-style: none; margin: 0; padding: 0; }
.docs-side > ul > li { margin-bottom: 8px; font-weight: 600; }
.docs-side > ul > li > a { color: var(--ink); }
.docs-side > ul > li.active > a { color: var(--blue); }
.docs-side > ul > li.docs-group { margin: 20px 0 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.docs-parts { display: flex; gap: 4px; padding: 4px; margin-bottom: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.docs-parts a { flex: 1; text-align: center; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--muted); font-size: 13px; font-weight: 600; }
.docs-parts a:hover { color: var(--ink); text-decoration: none; }
.docs-parts a[aria-current="page"] { background: var(--bg); color: var(--ink); box-shadow: 0 1px 2px rgba(20, 20, 58, 0.08); }
/* a product's front page: no sidebar, and two cards that lead to its parts */
.docs-landing { max-width: 880px; padding-block: 64px 96px; }
.docs-landing .choices { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 32px 0 40px; }
.docs-landing .choice { display: block; padding: 22px 22px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink); transition: border-color 0.12s, background 0.12s; }
.docs-landing .choice:hover { border-color: var(--blue); background: var(--sky-soft); text-decoration: none; }
.docs-landing .choice strong { display: block; font-size: 18px; margin-bottom: 6px; }
.docs-landing .choice span { display: block; color: var(--muted); font-size: 15px; line-height: 1.5; }
.docs-landing .choice em { display: block; margin-top: 14px; font-style: normal; font-size: 13px; font-weight: 600; color: var(--blue); }
@media (max-width: 640px) { .docs-landing .choices { grid-template-columns: 1fr; } .docs-landing { padding-block: 40px 64px; } }
.docs-side ol { margin: 6px 0 4px; padding-left: 12px; border-left: 2px solid var(--line); font-weight: 500; }
.docs-side ol li { margin: 0; position: relative; }
.docs-side ol a { display: block; padding: 3px 0; color: var(--muted); transition: color 0.12s; }
.docs-side ol a:hover { color: var(--blue); text-decoration: none; }
.docs-side ol a.active { color: var(--ink); font-weight: 600; }
.docs-side ol a.active::before { content: ""; position: absolute; left: -14px; top: 5px; bottom: 5px; width: 2px; border-radius: 2px; background: var(--blue); }
.docs .prose { max-width: 1000px; }
.prose p, .prose ul, .prose ol, .prose h1, .prose h2, .prose h3, .prose .docs-banner, .prose .docs-version { max-width: 800px; }
.prose a.shot { display: block; margin: 4px 0 20px; }
.prose a.shot img { display: block; margin: 0; }
.prose a.shot:hover { text-decoration: none; }
.prose h1 { font-size: 40px; line-height: 1.1; letter-spacing: -0.03em; margin: 0 0 16px; }
.prose h3 { font-size: 18px; letter-spacing: -0.01em; margin: 32px 0 8px; scroll-margin-top: 88px; }
.prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose pre { margin: 0 0 16px; padding: 14px 16px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 14px; line-height: 1.55; }
.prose pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.prose img { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); margin: 4px 0 16px; cursor: zoom-in; }
.prose table { margin: 0 0 20px; }
.prose table code { white-space: nowrap; }
@media (max-width: 860px) {
  .docs { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .docs-side { position: static; }
  .prose h1 { font-size: 32px; }
}
.docs-version { margin: 0 0 8px; font-size: 13px; color: var(--muted); }
.docs-version code { font-size: 12px; }
.docs-version + h1 { margin-top: 0; }
.docs-banner { margin: 0 0 20px; padding: 10px 14px; border: 1px solid var(--line); border-left: 3px solid var(--blue); border-radius: var(--radius); background: var(--surface); font-size: 14px; }
.docs-banner + .docs-version { margin-top: 0; }

/* lightbox for the docs' screenshots */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100vw; height: 100vh; color: #fff; }
.lightbox::backdrop { background: rgba(10, 10, 30, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.lightbox[open] { display: grid; place-items: center; animation: lightbox-in 0.18s ease-out; }
.lightbox figure { margin: 0; display: grid; justify-items: center; gap: 12px; max-width: min(1600px, calc(100vw - 96px)); max-height: calc(100vh - 48px); }
.lightbox img { max-width: 100%; max-height: calc(100vh - 100px); width: auto; height: auto; border-radius: var(--radius); box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5); background: #fff; }
.lightbox figcaption { font-size: 14px; color: rgba(255, 255, 255, 0.78); text-align: center; max-width: 70ch; }
.lightbox button { position: fixed; border: 0; padding: 0; cursor: pointer; color: #fff; background: rgba(255, 255, 255, 0.12); border-radius: 999px; width: 44px; height: 44px; display: grid; place-items: center; transition: background 0.15s; }
.lightbox button svg { width: 20px; height: 20px; display: block; }
.lightbox button:focus:not(:focus-visible) { outline: 0; }
.lightbox button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.lightbox button:hover { background: rgba(255, 255, 255, 0.24); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox button[hidden] { display: none; }
body.lightbox-open { overflow: hidden; }
@keyframes lightbox-in { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: none; } }
@media (max-width: 860px) {
  .lightbox figure { max-width: calc(100vw - 24px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; transform: none; }
  .lightbox-prev { left: 16px; } .lightbox-next { right: 16px; }
}
@media (max-width: 860px) {
  .nav-menu-panel { max-height: calc(100vh - 64px); overflow-y: auto; }
  .mega { padding-block: 16px 24px; }
  .mega-grid { grid-template-columns: 1fr; gap: 4px; }
}
