/* Dev Scenario site: shared design for every page (body). White page, ink text, one blue
 * accent, a ruled centre column, pale blue trays, dark code windows and a dark footer. Page-specific
 * styles live in their own file (home.css, pricing.css, docs.css, ...). */
:root {
    --h-bg: #FFFFFF;
    --h-ink: #0B0C10;
    --h-text-2: #3C4558;
    --h-text-3: #5B6478;
    --h-nav: #2A3040;
    --h-blue: #2F5BEA;
    --h-blue-hover: #2449C4;
    --h-blue-soft: #A9BDF2;
    --h-blue-mute: #8DA0D6;
    --h-rule: #E6EBF5;
    --h-rule-dot: #B7C4E6;
    --h-tray: #EEF3FF;
    --h-tray-line: #DCE5FA;
    --h-card-line: #E1E8F7;
    --h-btn-line: #D5DDF0;
    --h-art: #F8FAFF;
    --h-code-bg: #0B0C10;
    --h-code-line: #22262F;
    --h-code-text: #A8AFBD;
    --h-code-dim: #8D95A5;
    --h-code-faint: #5E6678;
    --h-code-key: #A9BEFF;
    --h-code-head: #7C9CFF;
    --h-code-val: #6FD8E8;
    --h-pass: #4FD07A;
    --h-fail: #FF4B4B;
    --h-run: #FFCB5C;
    --h-ok-ink: #1A7F45;
    --h-bad-ink: #C62B2B;
    --h-warn-ink: #9A6200;
    --h-foot-bg: #1B1B1D;
    --h-foot-text: #B9BDC7;
    --h-foot-dim: #8D93A0;
    --h-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --h-ease: cubic-bezier(.22, 1, .36, 1);
    --h-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--h-bg); color: var(--h-ink); font: 17px/1.55 var(--h-sans); overflow-x: hidden; }
body a { text-decoration: none; color: inherit; }
body button { font: inherit; cursor: pointer; }
body :focus-visible { outline: 2px solid var(--h-blue); outline-offset: 3px; }
body .num { font-weight: 600; letter-spacing: -.02em; }
body .mono { font-family: var(--h-mono); }
body .accent { color: var(--h-blue); }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; z-index: 10; background: var(--h-ink); color: #fff; padding: 10px 16px; border-radius: 999px; }
.staging-banner { background: var(--h-tray); color: var(--h-blue-hover); text-align: center; font-size: 13px; padding: 6px 16px; }

/* Ruled column, with a dot where each rule meets the section line */
.col { position: relative; max-width: 1140px; margin: 0 auto; padding: 80px 32px; border-left: 1px solid var(--h-rule); border-right: 1px solid var(--h-rule); }
.col::before, .col::after { content: ""; position: absolute; top: -3px; width: 5px; height: 5px; border-radius: 50%; background: var(--h-rule-dot); }
.col::before { left: -3px; }
.col::after { right: -3px; }
.sec { border-top: 1px solid var(--h-rule); scroll-margin-top: 88px; }
.sec:first-child { border-top: 0; }

/* Surfaces */
.tray { background: var(--h-tray); border: 1px solid var(--h-tray-line); border-radius: 18px; padding: 8px; margin-top: 40px; }
.card { background: #fff; border: 1px solid var(--h-card-line); border-radius: 12px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 8px; }
.dots { background-image: radial-gradient(circle, var(--h-blue) 1.5px, transparent 1.7px); background-size: 8px 8px; }
.dbox { border: 2px dotted var(--h-blue); border-radius: 3px; background-color: #fff; }
/* Twinkling star dust behind [data-stardust] (js/stardust.js), as on the app's Welcome screen */
[data-stardust] { position: relative; isolation: isolate; --stardust: #2F5BEA; }
.stardust { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

/* Buttons */
.btn { display: inline-block; border-radius: 999px; padding: 14px 26px; font-size: 16px; text-align: center; border: 1px solid transparent; transition: background-color .15s, border-color .15s, color .15s; }
.btn-sm { padding: 10px 18px; font-size: 14px; }
body .btn-p { background: var(--h-blue); color: #fff; font-weight: 600; }
body .btn-p:hover { background: var(--h-blue-hover); }
body .btn-o { background: #fff; color: var(--h-ink); border-color: var(--h-btn-line); font-weight: 500; }
body .btn-o:hover { border-color: var(--h-blue); color: var(--h-blue); }
body .btn-o.blue { border-color: var(--h-blue); color: var(--h-blue); }
body .btn[aria-disabled="true"] { background: var(--h-art); color: var(--h-text-3); border-color: var(--h-card-line); cursor: default; }

/* Headings */
.h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.05; font-weight: 500; letter-spacing: -.035em; }
.lede { margin: 20px 0 0; color: var(--h-text-2); max-width: 60ch; }
.eyebrow { font: 500 13px var(--h-mono); color: var(--h-blue); letter-spacing: .04em; text-transform: uppercase; }

/* Page head: the first section of a content page */
.page-head .col { padding: 96px 32px 56px; }
.page-head h1 { margin: 12px 0 0; font-size: clamp(36px, 5vw, 64px); line-height: 1.02; font-weight: 500; letter-spacing: -.04em; max-width: 20ch; }
.page-head .lede { font-size: 19px; }
.page-head.center .col { text-align: center; }
.page-head.center h1, .page-head.center .lede { margin-left: auto; margin-right: auto; }

/* Prose: long-form text (docs, legal, blog) */
.prose { max-width: 74ch; color: var(--h-text-2); }
.prose > :first-child { margin-top: 0; }
.prose h2 { margin: 48px 0 0; color: var(--h-ink); font-size: 28px; line-height: 1.15; font-weight: 500; letter-spacing: -.025em; scroll-margin-top: 96px; }
.prose h3 { margin: 32px 0 0; color: var(--h-ink); font-size: 20px; font-weight: 600; letter-spacing: -.01em; scroll-margin-top: 96px; }
.prose h4 { margin: 24px 0 0; color: var(--h-ink); font-size: 16px; font-weight: 600; }
.prose p, .prose ul, .prose ol { margin: 14px 0 0; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--h-ink); font-weight: 600; }
.prose a { color: var(--h-blue); text-decoration: underline; text-decoration-color: var(--h-blue-soft); text-underline-offset: 3px; }
.prose a:hover { text-decoration-color: var(--h-blue); }
.prose hr { margin: 40px 0; border: 0; border-top: 1px solid var(--h-rule); }
.prose blockquote { margin: 20px 0 0; padding: 14px 18px; border-radius: 12px; background: var(--h-tray); border: 1px solid var(--h-tray-line); color: var(--h-nav); }
body :not(pre) > code { font: .88em var(--h-mono); background: var(--h-tray); border: 1px solid var(--h-tray-line); border-radius: 6px; padding: 1px 6px; color: var(--h-ink); }
.note { margin-top: 20px; padding: 14px 18px; border-radius: 12px; background: var(--h-tray); border: 1px solid var(--h-tray-line); color: var(--h-nav); font-size: 15px; }

/* Code window: dark, as on the home page */
.code { position: relative; margin: 16px 0 0; background: var(--h-code-bg); color: var(--h-code-text); border-radius: 12px; padding: 16px 20px; font: 13.5px/1.75 var(--h-mono); overflow-x: auto; box-shadow: 0 12px 30px rgba(10, 20, 60, .12); }
.code pre, pre.code { white-space: pre; }
.code pre { margin: 0; font: inherit; }
/* Copy icon on code blocks (js/code-copy.js) */
.code-copy-host { position: relative; }
div.code-copy-host > pre { padding-right: 52px; }
.code-copy { position: absolute; top: 8px; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; padding: 0; color: var(--h-code-dim); background: rgba(255, 255, 255, .06); border: 1px solid var(--h-code-line); border-radius: 8px; cursor: pointer; opacity: .7; transition: opacity .15s, color .15s; }
.code-copy-host:hover .code-copy, .code-copy:focus-visible { opacity: 1; }
.code-copy:hover { color: var(--h-code-text); }
.code-copy.is-copied { color: var(--h-pass); opacity: 1; }
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
@media (hover: none) { .code-copy { opacity: 1; } }
/* .key: words of the syntax (fun, scope, val), styled like commands but not checked against the catalog. */
.code .k, .code .key { color: var(--h-code-key); }
.code .s, .code .v { color: var(--h-code-val); }
.code .c { color: var(--h-code-faint); }
.code .h { color: var(--h-code-head); }
.code .ok { color: var(--h-pass); }
.code .bad { color: var(--h-fail); }

/* Tables */
.table-wrap { margin-top: 20px; overflow-x: auto; border: 1px solid var(--h-card-line); border-radius: 12px; background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { padding: 12px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--h-rule); }
.table thead th { border-top: 0; background: var(--h-art); color: var(--h-text-3); font-size: 13px; font-weight: 600; }
.table td { color: var(--h-text-2); }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--h-card-line); background: #fff; font-size: 13px; color: var(--h-nav); }
.chip.blue { background: var(--h-tray); border-color: var(--h-tray-line); color: var(--h-blue-hover); }

/* Docs: sidebar + content */
.docs { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; font-size: 15px; }
.docs-nav .group { margin: 18px 0 6px; font: 500 12px var(--h-mono); color: var(--h-text-3); text-transform: uppercase; letter-spacing: .05em; }
.docs-nav .group:first-child { margin-top: 0; }
.docs-nav a { padding: 6px 12px; border-radius: 8px; color: var(--h-nav); }
.docs-nav a:hover { background: var(--h-art); color: var(--h-ink); }
.docs-nav a[aria-current="page"] { background: var(--h-tray); color: var(--h-blue-hover); font-weight: 600; }

/* Header: floating pill */
.site-header { position: sticky; top: 12px; z-index: 5; padding: 12px 16px 0; pointer-events: none; }
.site-header nav { pointer-events: auto; max-width: 1120px; margin: 0 auto; background: #fff; border: 1px solid var(--h-btn-line); border-radius: 999px; box-shadow: 0 0 0 6px rgba(47, 91, 234, .08), 0 8px 24px rgba(20, 40, 100, .06); padding: 8px 10px 8px 20px; display: flex; align-items: center; gap: 24px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; white-space: nowrap; }
.site-nav { position: relative; isolation: isolate; display: flex; gap: 4px; flex: 1; justify-content: center; font-size: 15px; font-weight: 500; color: var(--h-nav); }
.site-nav a { padding: 8px 14px; border-radius: 999px; transition: color .2s; }
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] { color: var(--h-ink); }
.site-nav .glass { border-radius: 999px; opacity: 0; }
.site-nav.hovering .glass { opacity: 1; }
.site-header .account { font-size: 14px; color: var(--h-nav); white-space: nowrap; }
.site-header .account:hover { color: var(--h-blue); }

/* Mobile menu: a button in the pill opens a glass sheet with the links (wired in site.js) */
.menu-btn { display: none; margin-left: auto; width: 40px; height: 40px; padding: 0; border-radius: 999px; border: 1px solid var(--h-btn-line); background: #fff; color: var(--h-ink); align-items: center; justify-content: center; }
.menu-btn svg path { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transform-origin: 9px 9px; transition: transform .28s var(--h-ease); }
.menu-btn[aria-expanded="true"] .l1 { transform: translateY(3px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .l2 { transform: translateY(-3px) rotate(-45deg); }
.mobile-menu { pointer-events: auto; max-width: 1120px; margin: 8px auto 0; padding: 8px; display: flex; flex-direction: column; border-radius: 22px; border: 1px solid var(--h-btn-line);
    background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
    box-shadow: inset 0 1px 0 #fff, 0 0 0 6px rgba(47, 91, 234, .08), 0 18px 40px rgba(20, 40, 100, .14);
    transform-origin: 100% 0; animation: menuIn .26s var(--h-ease) both; }
.mobile-menu[hidden] { display: none; }
.mobile-menu a { padding: 13px 16px; border-radius: 14px; font-size: 17px; font-weight: 500; color: var(--h-nav); }
.mobile-menu a:hover, .mobile-menu a:active { background: var(--h-tray); color: var(--h-ink); }
.mobile-menu .sub { margin-top: 4px; border-top: 1px solid var(--h-rule); border-radius: 0 0 14px 14px; font-size: 15px; color: var(--h-text-3); }
@keyframes menuIn { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }

/* Footer */
.site-footer { background: var(--h-foot-bg); color: var(--h-foot-text); scroll-margin-top: 88px; }
.foot-in { max-width: 1140px; margin: 0 auto; padding: 56px 32px 0; }
.foot-top { display: flex; flex-wrap: wrap; gap: 32px 24px; justify-content: space-between; align-items: flex-start; }
.foot-brand { max-width: 34ch; }
.foot-brand b { color: #fff; font-size: 20px; }
.foot-brand p { margin: 12px 0 0; font-size: 15px; }
.foot-brand .btn { margin-top: 20px; padding: 12px 22px; font-size: 15px; }
.foot-brand .soon { margin-top: 12px; font-size: 13px; color: var(--h-foot-dim); }
.foot-links { display: flex; flex-wrap: wrap; gap: 32px 64px; font-size: 15px; }
.foot-links div { display: flex; flex-direction: column; gap: 10px; }
.foot-links b { color: #fff; font-weight: 600; }
.foot-links a:hover { color: #fff; }
.foot-copy { margin-top: 48px; border-top: 1px solid #333; padding: 18px 0 32px; font-size: 13px; color: var(--h-foot-dim); }

/* The full nav needs about 1090px; narrower windows get the menu button. */
@media (min-width: 1101px) {
    .mobile-menu { display: none !important; }
}
@media (max-width: 1100px) {
    .site-nav, .site-header .account, .hide-m { display: none; }
    .site-header nav { gap: 8px; }
    .menu-btn { display: inline-flex; }
}
@media (max-width: 900px) {
    .docs { grid-template-columns: minmax(0, 1fr); gap: 24px; }
    .docs-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: 4px; }
    .docs-nav .group { width: 100%; margin: 8px 0 0; }
}
@media (max-width: 640px) {
    .col { padding: 64px 16px; }
    .page-head .col { padding: 80px 16px 40px; }
    .foot-in { padding: 48px 16px 0; }
    .code { padding: 14px 16px; font-size: 12.5px; }
}
@media (prefers-reduced-transparency: reduce) {
    .mobile-menu { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
    .btn, .site-nav a, .menu-btn svg path { transition: none; }
    .mobile-menu { animation: none; }
}
