/* RasterNivo site. Colours are tokens; dark mode redefines them. */
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2190-2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; unicode-range: U+20B9; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f8fb;
  --surface: #ffffff;
  --ink: #0d1626;
  --text: #2b3648;
  --muted: #5d6a7e;
  --line: #e3e8ef;
  --line-strong: #cdd5e0;
  --brand: #1f5fd6;
  --brand-hover: #174fb8;
  --brand-soft: #e9f0fe;
  --btn: #1f5fd6;
  --btn-hover: #174fb8;
  --on-brand: #ffffff;
  --ok: #0f7b4f;
  --ok-soft: #e2f5ec;
  --warn: #9a5b00;
  --warn-soft: #fdf1dc;
  --err: #b42335;
  --err-soft: #fce9eb;
  --shadow: 0 1px 2px rgb(13 22 38 / 6%), 0 8px 24px rgb(13 22 38 / 7%);
  --shadow-lg: 0 2px 4px rgb(13 22 38 / 6%), 0 24px 60px rgb(13 22 38 / 14%);
  /* Code panels stay dark in both themes. */
  --code-bg: #0e1522;
  --code-head: #151e2e;
  --code-line: #263246;
  --code-text: #dbe3ef;
  --code-muted: #8c9ab0;
  --ink-band: #0c1320;
  --header-h: 62px;
  --tabs-h: 44px;
}
:root[data-theme="dark"] { color-scheme: dark; --btn: #2a6ae0; --btn-hover: #3b7bf0; --bg: #0b0f18; --bg-soft: #10161f; --surface: #131a25; --ink: #f1f4f9; --text: #c8d0dc; --muted: #93a0b3; --line: #222c3b; --line-strong: #344156; --brand: #4d8dff; --brand-hover: #6ea3ff; --brand-soft: #16243d; --on-brand: #06101f; --ok: #4cc38a; --ok-soft: #10291e; --warn: #e6a94a; --warn-soft: #2c2110; --err: #f2727f; --err-soft: #2e161a; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%); --shadow-lg: 0 2px 4px rgb(0 0 0 / 30%), 0 24px 60px rgb(0 0 0 / 45%); --code-bg: #0d131e; --code-head: #131b28; --code-line: #232e40; --ink-band: #080c13; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; --btn: #2a6ae0; --btn-hover: #3b7bf0; --bg: #0b0f18; --bg-soft: #10161f; --surface: #131a25; --ink: #f1f4f9; --text: #c8d0dc; --muted: #93a0b3; --line: #222c3b; --line-strong: #344156; --brand: #4d8dff; --brand-hover: #6ea3ff; --brand-soft: #16243d; --on-brand: #06101f; --ok: #4cc38a; --ok-soft: #10291e; --warn: #e6a94a; --warn-soft: #2c2110; --err: #f2727f; --err-soft: #2e161a; --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 8px 24px rgb(0 0 0 / 25%); --shadow-lg: 0 2px 4px rgb(0 0 0 / 30%), 0 24px 60px rgb(0 0 0 / 45%); --code-bg: #0d131e; --code-head: #131b28; --code-line: #232e40; --ink-band: #080c13; }
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + var(--tabs-h) + 16px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.65 "Inter", "Segoe UI", system-ui, sans-serif; font-feature-settings: "cv11", "ss03"; -webkit-font-smoothing: antialiased; overflow-wrap: break-word; }
h1, h2, h3, h4 { color: var(--ink); font-weight: 650; letter-spacing: -.018em; line-height: 1.2; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.4vw, 3.25rem); letter-spacing: -.028em; font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.125rem); letter-spacing: -.022em; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 1em; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
img { display: block; max-width: 100%; }
ul, ol { padding-left: 1.25rem; margin: 0 0 1em; }
li { margin-bottom: .35em; }
strong { color: var(--ink); font-weight: 600; }
code, kbd, pre { font-family: "JetBrains Mono", Consolas, monospace; font-variant-ligatures: none; }
:not(pre) > code { font-size: .86em; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 5px; padding: .08em .36em; color: var(--ink); overflow-wrap: anywhere; }
kbd { font-size: .78em; background: var(--bg-soft); border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 5px; padding: .1em .4em; color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }

.wrap { max-width: 1160px; margin-inline: auto; padding-inline: 24px; }
.wrap-narrow { max-width: 800px; }
.wrap-wide { max-width: 1560px; margin-inline: auto; padding-inline: 24px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 12px; top: 12px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--muted); }
.eyebrow { display: block; color: var(--brand); font-size: .8125rem; font-weight: 600; letter-spacing: .02em; margin-bottom: .75rem; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 8px; border: 1px solid transparent; font-weight: 550; font-size: .9375rem; line-height: 1.3; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--btn); color: #fff; }
.btn-primary:hover { background: var(--btn-hover); }
.btn-ghost { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-on-ink { border-color: #3a475c; color: #eef2f8; }
.btn-on-ink:hover { border-color: #7d8ba1; }
.btn-small { padding: 7px 13px; font-size: .875rem; }
.btn-large { padding: 13px 24px; font-size: 1rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.5rem; }
.actions-center { justify-content: center; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 700; font-size: 1.0625rem; letter-spacing: -.015em; }
.logo:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { color: var(--muted); padding: 6px 11px; border-radius: 7px; font-size: .9375rem; font-weight: 500; }
.nav a:hover { color: var(--ink); text-decoration: none; background: var(--bg-soft); }
.nav a[aria-current] { color: var(--ink); }
.header-tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.search-open { display: inline-flex; align-items: center; gap: 22px; height: 36px; padding: 0 8px 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--muted); font: inherit; font-size: .875rem; cursor: pointer; }
.search-open:hover { border-color: var(--muted); }
.search-open kbd { color: var(--muted); }
.theme-toggle { width: 36px; height: 36px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 1rem; line-height: 1; cursor: pointer; }
.theme-toggle:hover { color: var(--ink); border-color: var(--muted); }
.theme-sun { display: none; }
:root[data-theme="dark"] .theme-sun { display: inline; }
:root[data-theme="dark"] .theme-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-sun { display: inline; }
  :root:not([data-theme="light"]) .theme-moon { display: none; }
}
.header-login { color: var(--ink); font-size: .9375rem; font-weight: 550; padding: 6px 8px; white-space: nowrap; }
.nav-check { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle { display: none; }

/* Search */
.search-dialog { width: min(640px, calc(100vw - 32px)); margin: 12vh auto auto; padding: 0; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.search-dialog::backdrop { background: rgb(5 10 20 / 55%); }
.search-dialog input { width: 100%; padding: 16px 18px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); font: inherit; font-size: 1.0625rem; outline: 0; }
.search-results { list-style: none; margin: 0; padding: 6px; max-height: 56vh; overflow-y: auto; }
.search-results:empty { display: none; }
.search-results li { margin: 0; }
.search-results a { display: block; padding: 10px 12px; border-radius: 8px; color: inherit; }
.search-results a:hover, .search-results a:focus { background: var(--brand-soft); text-decoration: none; }
.search-results strong { display: block; font-size: .9375rem; }
.search-results small { display: block; color: var(--muted); font-size: .8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-none { padding: 14px 12px; color: var(--muted); }

/* Marketing sections */
.home-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); background: linear-gradient(180deg, var(--bg-soft), var(--bg) 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero-copy .lead { max-width: 34rem; }
.badge { display: inline-block; margin-bottom: 1.25rem; padding: 3px 10px; border-radius: 99px; background: var(--brand-soft); color: var(--brand); font-size: .8125rem; font-weight: 600; }
.hero-points { display: flex; flex-wrap: wrap; gap: 6px 20px; padding: 0; margin: 1.25rem 0 0; list-style: none; color: var(--muted); font-size: .875rem; }
.hero-points li { margin: 0; }
.hero-points li + li::before { content: "·"; margin-right: 20px; }
.section { padding: clamp(56px, 7vw, 88px) 0; }
.section-soft { background: var(--bg-soft); border-block: 1px solid var(--line); }
.section-head { max-width: 42rem; margin-bottom: 2.25rem; }
.section-head p { color: var(--muted); font-size: 1.0625rem; }
.section-link { margin-top: 1.5rem; }
.split { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.split-code { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
.section-ink { background: var(--ink-band); color: #b9c4d4; }
.section-ink h2, .section-ink strong { color: #f3f6fb; }
.section-ink .eyebrow { color: #7fb0ff; }
.section-ink .ticks li::before { background-color: #7fb0ff; }
.code-panel { min-width: 0; }
.cta-band { padding: clamp(56px, 7vw, 80px) 0; text-align: center; background: var(--bg-soft); border-top: 1px solid var(--line); }
.cta-band p { color: var(--muted); }
.page-hero { padding: clamp(44px, 6vw, 72px) 0 12px; text-align: center; }
.page-hero .lead { max-width: 38rem; margin-inline: auto; }

.ticks { list-style: none; padding: 0; margin: 1rem 0; }
.ticks li { position: relative; padding-left: 24px; margin-bottom: .5em; font-size: .9375rem; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .42em; width: 11px; height: 6px; border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand); transform: rotate(-45deg); }
.section-ink .ticks li::before { background: none; border-color: #7fb0ff; }

.ways { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.way { display: flex; flex-direction: column; padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.way h3 { font-size: 1.25rem; }
.way > p { color: var(--muted); font-size: .9375rem; }
.way .ticks { flex: 1; }
.way-link { font-weight: 550; font-size: .9375rem; }
.way-link::after { content: " →"; }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.facts > div { border-top: 2px solid var(--line-strong); padding-top: 16px; }
.facts h3 { font-size: 1rem; }
.facts p { color: var(--muted); font-size: .9375rem; margin: 0; }

/* Old cards and grids, used by the pages not yet redesigned */
.hero { padding: clamp(40px, 6vw, 64px) 0 8px; }
.hero-small { padding-bottom: 8px; }
.alt { background: var(--bg-soft); border-block: 1px solid var(--line); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card { display: block; padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: inherit; }
a.card:hover { border-color: var(--brand); text-decoration: none; }
.card p { color: var(--muted); font-size: .9375rem; margin: 0; }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 1.5rem; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 44px; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; background: var(--brand-soft); color: var(--brand); font-size: .8125rem; font-weight: 650; }
.legal { max-width: 800px; }
.note { margin: 1.25rem 0; padding: 14px 16px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: 10px; font-size: .9375rem; }
.note p:last-child { margin: 0; }

/* Illustrations */
figure { margin: 0; }
figcaption { margin-top: 10px; color: var(--muted); font-size: .75rem; text-align: center; }
.mock-app { min-width: 0; }
.mock-bar { display: flex; align-items: center; gap: 6px; padding: 11px 14px; background: var(--surface); border: 1px solid var(--line); border-bottom: 0; border-radius: 14px 14px 0 0; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.mock-bar b { margin-left: 8px; color: var(--muted); font-size: .8125rem; font-weight: 550; }
.mock-body { padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 0 0 14px 14px; box-shadow: var(--shadow-lg); }
.mock-file { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mock-file > div { flex: 1; min-width: 0; }
.mock-file strong, .mock-file small { display: block; }
.mock-file strong { font-size: .9375rem; }
.mock-file small { color: var(--muted); font-size: .8125rem; }
.mock-pdf { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 9px; background: var(--err-soft); color: var(--err); font-size: .6875rem; font-weight: 700; }
.mock-pages { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding: 18px 0; }
.mock-pages i { display: block; aspect-ratio: 1 / 1.3; border: 1px solid var(--line-strong); border-radius: 5px; background: linear-gradient(var(--line-strong), var(--line-strong)) 12% 14% / 58% 6% no-repeat, linear-gradient(var(--line), var(--line)) 12% 30% / 76% 4% no-repeat, linear-gradient(var(--line), var(--line)) 12% 40% / 76% 4% no-repeat, linear-gradient(var(--line), var(--line)) 12% 50% / 60% 4% no-repeat, linear-gradient(var(--brand-soft), var(--brand-soft)) 12% 84% / 76% 24% no-repeat, var(--bg); }
.mock-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.mock-btn { padding: 7px 12px; border-radius: 7px; background: var(--btn); color: #fff; font-size: .8125rem; font-weight: 550; white-space: nowrap; }
.status { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; }
.status-ok { background: var(--ok-soft); color: var(--ok); }
.log-card { min-width: 0; }
.log-card .table-wrap { margin: 0; background: var(--surface); box-shadow: var(--shadow); }
.chip { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .75rem; font-weight: 600; }
.chip-api { background: var(--brand-soft); color: var(--brand); }
.chip-web { background: var(--ok-soft); color: var(--ok); }
.chip-desktop { background: var(--warn-soft); color: var(--warn); }

/* Tables */
.table-wrap { overflow-x: auto; margin: 1.25rem 0; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { padding: 10px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
thead th { background: var(--bg-soft); color: var(--muted); font-size: .75rem; font-weight: 600; letter-spacing: .01em; white-space: nowrap; }
tbody tr:last-child > * { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.compare th[scope="row"] { color: var(--ink); font-weight: 500; }
.compare td, .compare thead th:not(:first-child) { text-align: center; }
.compare thead th { color: var(--ink); font-size: .875rem; }
.endpoint { white-space: nowrap; }

/* Method badges */
.method { display: inline-block; min-width: 42px; padding: 1px 6px; border-radius: 5px; text-align: center; font: 600 .6875rem/1.55 "JetBrains Mono", Consolas, monospace; background: var(--bg-soft); color: var(--muted); }
.method.get { background: var(--ok-soft); color: var(--ok); }
.method.post { background: var(--brand-soft); color: var(--brand); }
.method.put { background: var(--warn-soft); color: var(--warn); }
.method.delete, .method.del { background: var(--err-soft); color: var(--err); }

/* Code */
.code-box { position: relative; }
pre { margin: 0; padding: 16px 18px; overflow: auto; background: var(--code-bg); color: var(--code-text); font-size: .8125rem; line-height: 1.7; tab-size: 2; color-scheme: dark; scrollbar-width: thin; scrollbar-color: #39465c transparent; }
.doc > .code-box, .doc > pre, .section > .code-box, .ep-rail > .code-box { margin: 1.25rem 0; }
.doc .code-box > pre, .ep-rail .code-box > pre { border: 1px solid var(--code-line); border-radius: 10px; }
.copy { position: absolute; top: 9px; right: 9px; padding: 3px 9px; border: 1px solid var(--code-line); border-radius: 6px; background: var(--code-head); color: var(--code-muted); font: 500 .75rem/1.5 "Inter", "Segoe UI", sans-serif; cursor: pointer; opacity: 0; transition: opacity .12s; }
.code-box:hover .copy, .copy:focus-visible { opacity: 1; }
@media (hover: none) { .copy { opacity: 1; } }
.copy:hover { color: #fff; }
.tok-com { color: #7486a0; font-style: italic; }
.tok-str { color: #a5d6a7; }
.tok-kw { color: #8fb8ff; }
.tok-var { color: #f2c98a; }
.tok-num { color: #f0a58f; }
.tok-key { color: #9ccbf5; }

/* Language tabs */
.tabs { display: flex; flex-wrap: wrap; margin: 1.25rem 0; background: var(--code-head); border: 1px solid var(--code-line); border-radius: 10px; overflow: hidden; }
.tab-input { position: absolute; opacity: 0; pointer-events: none; }
.tab-label { padding: 10px 13px; color: var(--code-muted); font-size: .8125rem; font-weight: 550; cursor: pointer; border-bottom: 2px solid transparent; }
.tab-label:first-of-type { margin-left: 5px; }
.tab-label:hover { color: #fff; }
.tab-input:checked + .tab-label { color: #fff; border-bottom-color: #6ea3ff; }
.tab-input:focus-visible + .tab-label { outline: 2px solid #6ea3ff; outline-offset: -3px; border-radius: 6px; }
.tab-panel { display: none; order: 1; width: 100%; border-top: 1px solid var(--code-line); }
.tabs .code-box > pre { border: 0; border-radius: 0; }
.tab-input:nth-of-type(1):checked ~ .tab-panel:nth-of-type(1),
.tab-input:nth-of-type(2):checked ~ .tab-panel:nth-of-type(2),
.tab-input:nth-of-type(3):checked ~ .tab-panel:nth-of-type(3),
.tab-input:nth-of-type(4):checked ~ .tab-panel:nth-of-type(4) { display: block; }

/* Docs layout */
.docs-tabs { position: sticky; top: var(--header-h); z-index: 30; background: var(--bg); border-bottom: 1px solid var(--line); }
.docs-tabs .wrap-wide { display: flex; gap: 22px; height: var(--tabs-h); overflow: auto hidden; scrollbar-width: none; }
.docs-tabs a { display: flex; align-items: center; color: var(--muted); font-size: .9rem; font-weight: 550; border-bottom: 2px solid transparent; white-space: nowrap; }
.docs-tabs a:hover { color: var(--ink); text-decoration: none; }
.docs-tabs a[aria-current] { color: var(--ink); border-bottom-color: var(--brand); }
.docs { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 0 44px; align-items: start; }
.docs-toc { grid-template-columns: 264px minmax(0, 1fr) 208px; }
.side-check { position: absolute; opacity: 0; pointer-events: none; }
.side-toggle { display: none; }
.side { position: sticky; top: calc(var(--header-h) + var(--tabs-h)); max-height: calc(100vh - var(--header-h) - var(--tabs-h)); overflow-y: auto; padding: 24px 12px 40px 0; font-size: .875rem; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.side:hover { scrollbar-color: var(--line-strong) transparent; }
.side-title { margin: 1.5rem 0 .4rem 10px; color: var(--ink); font-size: .8125rem; font-weight: 650; letter-spacing: 0; }
.side-title:first-child { margin-top: 0; }
.side ul { list-style: none; padding: 0; margin: 0; }
.side li { margin: 1px 0; }
.side a { display: flex; align-items: flex-start; gap: 9px; padding: 5px 10px; border-radius: 7px; color: var(--muted); line-height: 1.45; }
.side a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.side a[aria-current] { color: var(--brand); background: var(--brand-soft); font-weight: 550; }
.side .method { flex: none; min-width: 36px; padding: 0 4px; font-size: .625rem; line-height: 1.75; margin-top: 1px; }
.doc { min-width: 0; padding: 32px 0 64px; max-width: 800px; }
.docs-endpoint .doc { max-width: none; }
.doc-group { color: var(--brand); font-size: .8125rem; font-weight: 600; margin-bottom: .5rem; }
.doc h1 { font-size: clamp(1.75rem, 3vw, 2.375rem); margin-bottom: .5em; letter-spacing: -.024em; }
.doc h2 { font-size: 1.4375rem; margin-top: 2.25em; padding-top: 1.25em; border-top: 1px solid var(--line); letter-spacing: -.016em; }
.doc h3 { margin-top: 1.75em; }
.doc li { margin-bottom: .4em; }
details { border-bottom: 1px solid var(--line); padding: 2px 0; }
summary { padding: 13px 0; color: var(--ink); font-weight: 550; cursor: pointer; }
details p { color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 3rem; }
.pager a { padding: 13px 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-weight: 550; font-size: .9375rem; }
.pager a:hover { border-color: var(--brand); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-size: .75rem; font-weight: 400; }
.pager-next { text-align: right; }
.toc { position: sticky; top: calc(var(--header-h) + var(--tabs-h)); max-height: calc(100vh - var(--header-h) - var(--tabs-h)); overflow-y: auto; padding: 32px 0; font-size: .8125rem; }
.toc p { color: var(--ink); font-weight: 650; margin-bottom: .5rem; }
.toc ul { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc li { margin: 0; }
.toc a { display: block; padding: 4px 0 4px 12px; margin-left: -1px; border-left: 1px solid transparent; color: var(--muted); line-height: 1.4; }
.toc a:hover { color: var(--ink); text-decoration: none; }
.toc a[aria-current] { color: var(--brand); border-left-color: var(--brand); }

/* API endpoint pages */
.ep { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: 48px; align-items: start; }
.ep-main { min-width: 0; }
.ep-bar { display: flex; align-items: center; gap: 12px; margin: 1.25rem 0; padding: 10px 14px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; }
.ep-bar .method { font-size: .8125rem; padding: 2px 9px; }
.ep-bar code, .ep-bar :not(pre) > code { background: none; border: 0; padding: 0; font-size: .9375rem; font-weight: 500; }
.ep-rail { position: sticky; top: calc(var(--header-h) + var(--tabs-h) + 20px); max-height: calc(100vh - var(--header-h) - var(--tabs-h) - 36px); overflow-y: auto; min-width: 0; scrollbar-width: thin; scrollbar-color: transparent transparent; }
.ep-rail:hover { scrollbar-color: var(--line-strong) transparent; }
.rail-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; color: var(--ink); font-size: .8125rem; font-weight: 650; }
.ep-rail .tabs { margin: 0 0 18px; }
.ep-rail .code-box { margin: 0; }
.ep-rail pre { font-size: .75rem; line-height: 1.65; }
.param { padding: 13px 0; border-bottom: 1px solid var(--line); }
.param:last-child { border-bottom: 0; }
.param-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 4px; }
:not(pre) > code.param-name { background: none; border: 0; padding: 0; color: var(--brand); font-size: .875rem; font-weight: 600; }
.param-type, .param-req, .param-opt { font: 500 .6875rem/1.6 "JetBrains Mono", Consolas, monospace; padding: 0 6px; border-radius: 5px; }
.param-type { background: var(--bg-soft); color: var(--muted); border: 1px solid var(--line); }
.param-req { background: var(--err-soft); color: var(--err); }
.param-opt { color: var(--muted); }
.param p { margin: 0; color: var(--muted); font-size: .9rem; }
.param-children { margin: 0 0 0 6px; padding-left: 16px; border-left: 2px solid var(--line); }
.param-more { margin-top: 12px; font-size: .9rem; }

/* Pricing */
.billing-input { position: absolute; opacity: 0; pointer-events: none; }
.billing-switch { display: flex; width: max-content; max-width: 100%; margin: 20px auto 32px; padding: 4px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; }
.billing-switch label { padding: 7px 18px; border-radius: 7px; color: var(--muted); font-size: .9rem; font-weight: 550; cursor: pointer; }
.billing-switch span { color: var(--ok); font-size: .8125rem; margin-left: 4px; }
#billing-month:checked ~ .billing-switch label[for="billing-month"],
#billing-year:checked ~ .billing-switch label[for="billing-year"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.is-year { display: none; }
#billing-year:checked ~ .plans .is-year { display: block; }
#billing-year:checked ~ .plans .is-month { display: none; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 24px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.plan h2 { font-size: 1.1875rem; margin: 0 0 2px; letter-spacing: -.012em; }
.plan-for { color: var(--muted); font-size: .875rem; min-height: 2.8em; margin-bottom: .5rem; }
.plan.featured { border: 2px solid var(--brand); padding: 23px 21px; box-shadow: var(--shadow); }
.plan-flag { position: absolute; top: -12px; left: 20px; padding: 1px 10px; border-radius: 99px; background: var(--btn); color: #fff; font-size: .75rem; font-weight: 600; }
.price { margin: 0; color: var(--ink); font-size: 2rem; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
.price small { color: var(--muted); font-size: .875rem; font-weight: 450; letter-spacing: 0; }
.price-note { color: var(--muted); font-size: .8125rem; margin-bottom: 1.1rem; }
.plan .ticks { margin-bottom: 0; }
.pricing-note { margin: 22px 0 0; color: var(--muted); font-size: .875rem; text-align: center; }

/* Footer */
.site-footer { padding: 52px 0 28px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
.footer-about { max-width: 26rem; }
.footer-about p { margin: .8em 0 0; }
.site-footer h2 { margin: 0 0 .75em; color: var(--ink); font-size: .8125rem; font-weight: 650; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li a { color: var(--muted); }
.site-footer li a:hover { color: var(--ink); }
.footer-note { margin: 36px 0 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .8125rem; }

@media (max-width: 1320px) {
  .ep { grid-template-columns: minmax(0, 1fr); }
  .ep-rail { position: static; max-height: none; overflow: visible; }
  .docs-toc { grid-template-columns: 264px minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 1080px) {
  .search-open span { display: none; }
  .search-open { gap: 0; padding: 0 8px; }
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-row { gap: 14px; }
}
@media (max-width: 860px) {
  .header-row { flex-wrap: wrap; padding-block: 10px; row-gap: 8px; }
  .nav-toggle { display: inline-block; order: 2; margin-left: auto; padding: 5px 11px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font-size: .875rem; font-weight: 550; cursor: pointer; }
  .nav { display: none; order: 4; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 4px 0; }
  .nav a { padding: 9px 8px; }
  .nav-check:checked ~ .nav { display: flex; }
  .header-tools { order: 3; margin-left: 0; }
  .search-open kbd { display: none; }
  .search-open::before { content: "⌕"; font-size: 1.1rem; line-height: 1; }
  .header-login { display: none; }
  .site-header { position: sticky; }
  .docs-tabs { position: static; }
  .hero-grid, .split, .split-code, .ways { grid-template-columns: minmax(0, 1fr); }
  .docs, .docs-toc { display: block; }
  .side-toggle { display: block; margin: 14px 0 0; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font-size: .875rem; font-weight: 550; cursor: pointer; }
  .side { display: none; position: static; max-height: none; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .side-check:checked ~ .side { display: block; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-about { grid-column: 1 / -1; }
  html { scroll-padding-top: calc(var(--header-h) + 16px); }
}
@media (max-width: 560px) {
  .wrap, .wrap-wide { padding-inline: 16px; }
  .plans, .facts { grid-template-columns: minmax(0, 1fr); }
  .plan-for { min-height: 0; }
  .hero-points li + li::before { content: none; }
  .logo { font-size: 1rem; }
  .header-tools .btn { display: none; }
  .actions .btn { flex: 1 1 100%; }
  .pager { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Sign-up and sign-in pages */
.auth-main { display: grid; place-items: start center; padding: clamp(32px, 7vw, 72px) 16px 72px; background: var(--bg-soft); min-height: calc(100vh - var(--header-h) - 60px); }
.auth-card { width: min(430px, 100%); padding: 32px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.auth-card h1, .auth-title { font-size: 1.625rem; letter-spacing: -.02em; margin-bottom: .35em; }
.auth-sub { color: var(--muted); font-size: .9375rem; }
.auth-foot { margin: 1.25rem 0 0; font-size: .875rem; text-align: center; color: var(--muted); }

/* Forms */
.form { display: flex; flex-direction: column; gap: 16px; }
.form[hidden] { display: none; }
.form > h2 { margin: 0; font-size: 1.125rem; }
.form > p { margin: 0; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field > span, .field > legend { color: var(--ink); font-size: .875rem; font-weight: 550; padding: 0; margin-bottom: 2px; }
.field small { color: var(--muted); font-size: .8125rem; }
input:not([type=checkbox], [type=radio], [type=file]), select { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink); font: inherit; font-size: .9375rem; }
input:focus, select:focus { outline: 2px solid var(--brand); outline-offset: 0; border-color: transparent; }
.invalid { border-color: var(--err) !important; }
.check { display: flex; align-items: flex-start; gap: 9px; font-size: .875rem; color: var(--text); }
.check input { margin: 3px 0 0; accent-color: var(--brand); flex: none; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-error { padding: 10px 13px; border-radius: 8px; background: var(--err-soft); color: var(--err); font-size: .875rem; }
.form-error[hidden], .form-ok[hidden] { display: none; }
.form-ok { padding: 10px 13px; margin: 12px 0 0; border-radius: 8px; background: var(--ok-soft); color: var(--ok); font-size: .875rem; }
.form-error-pad { margin: 0 20px 12px; }
.btn-block { width: 100%; margin-top: 4px; }
.btn[hidden] { display: none; }
.btn[disabled], button[disabled] { opacity: .6; cursor: default; }
button.btn { cursor: pointer; font-family: inherit; }
.btn-danger { background: var(--err); color: #fff; }
.btn.is-static { cursor: default; color: var(--muted); }
.link, .link-danger { border: 0; padding: 0; background: none; color: var(--brand); font: inherit; font-size: .875rem; cursor: pointer; white-space: nowrap; }
.link-danger { color: var(--err); }
.link:hover, .link-danger:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Dashboard */
.dash-header-row { display: flex; align-items: center; gap: 14px; min-height: var(--header-h); padding-inline: 20px; }
.dash-header .header-tools { font-size: .875rem; }
.credit-pill { color: var(--muted); font-size: .875rem; white-space: nowrap; padding: 4px 11px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 99px; }
.credit-pill:hover { text-decoration: none; border-color: var(--line-strong); }
.plan-pill { color: var(--brand); background: var(--brand-soft); padding: 4px 11px; border-radius: 99px; font-size: .8125rem; font-weight: 600; white-space: nowrap; }
.plan-pill:empty { display: none; }
.top-email { color: var(--muted); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: calc(100vh - var(--header-h)); }
.dash-side { position: sticky; top: var(--header-h); align-self: start; height: calc(100vh - var(--header-h)); padding: 18px 12px; border-right: 1px solid var(--line); overflow-y: auto; font-size: .9rem; }
.dash-side ul { list-style: none; padding: 0; margin: 0; }
.dash-side li { margin: 1px 0; }
.dash-side a { display: block; padding: 7px 11px; border-radius: 7px; color: var(--muted); font-weight: 500; }
.dash-side a:hover { color: var(--ink); background: var(--bg-soft); text-decoration: none; }
.dash-side a[aria-current] { color: var(--brand); background: var(--brand-soft); }
.dash-side-title { margin: 20px 0 4px 11px; color: var(--muted); font-size: .75rem; font-weight: 600; }
.dash-menu-check { position: absolute; opacity: 0; pointer-events: none; }
.dash-menu-toggle { display: none; }
.dash-main { min-width: 0; max-width: 1180px; padding: 28px clamp(16px, 3vw, 36px) 64px; display: flex; flex-direction: column; gap: 18px; }
.dash-main > * { margin: 0; }
.dash-main > [hidden] { display: none; }
.dash-main h1 { font-size: 1.625rem; letter-spacing: -.02em; }
.page-note { color: var(--muted); font-size: .9375rem; margin-top: -10px !important; }
.small { font-size: .8125rem; }
.panel { padding: 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.panel[hidden] { display: none; }
.panel-flush { padding: 0; overflow: hidden; }
.panel h2 { font-size: 1.0625rem; letter-spacing: -.01em; margin: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head a { font-size: .875rem; }
.panel-head-pad { padding: 18px 20px 0; margin-bottom: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stat { padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stat-label { margin: 0 0 4px; color: var(--muted); font-size: .8125rem; font-weight: 500; }
.stat-value { margin: 0; color: var(--ink); font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; }
.stat-note { margin: 3px 0 0; min-height: 1.3em; color: var(--muted); font-size: .8125rem; }
.shortcuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.shortcut { display: block; padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; color: inherit; }
.shortcut:hover { border-color: var(--brand); text-decoration: none; }
.shortcut strong, .shortcut span { display: block; }
.shortcut span { margin-top: 3px; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.table-plain { margin: 0; border: 0; border-radius: 0; }
.panel:not(.panel-flush) .table-plain { margin: 0 -20px -20px; }
.cell-main { color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }
.cell-sub { display: block; color: var(--muted); font-size: .78rem; }
.scopes { color: var(--muted); font-size: .8125rem; }
.row-actions { display: inline-flex; flex-wrap: wrap; gap: 4px 14px; }
.empty { margin: 0; padding: 26px 20px; color: var(--muted); text-align: center; font-size: .9375rem; }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.segments { display: inline-flex; padding: 3px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: 9px; }
.segments button { padding: 5px 13px; border: 0; border-radius: 6px; background: none; color: var(--muted); font: inherit; font-size: .875rem; font-weight: 550; cursor: pointer; }
.segments button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.state { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--bg-soft); color: var(--muted); white-space: nowrap; }
.state:empty { display: none; }
.state-ok { background: var(--ok-soft); color: var(--ok); }
.state-err { background: var(--err-soft); color: var(--err); }
.state-run { background: var(--brand-soft); color: var(--brand); }
.job-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.job-actions:empty { display: none; }
.confirm { width: min(440px, calc(100vw - 32px)); padding: 24px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.confirm::backdrop { background: rgb(5 10 20 / 55%); }
.confirm h2 { font-size: 1.125rem; }
.secret { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: var(--code-bg); border-radius: 8px; }
.secret code, .secret :not(pre) > code { flex: 1; min-width: 0; background: none; border: 0; padding: 0; color: var(--code-text); font-size: .8125rem; overflow-wrap: anywhere; }
.facts-list { display: grid; gap: 12px; margin: 0; }
.facts-list > div { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 12px; }
.facts-list dt { color: var(--muted); font-size: .875rem; }
.facts-list dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.banner { padding: 11px 15px; border-radius: 10px; background: var(--warn-soft); color: var(--warn); font-size: .9rem; }
.banner[hidden] { display: none; }
.banner strong { color: inherit; }

/* Convert */
.convert-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 14px; align-items: start; }
.convert-help h2 { margin-bottom: .5em; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 150px; padding: 20px; border: 2px dashed var(--line-strong); border-radius: 12px; background: var(--bg-soft); text-align: center; cursor: pointer; }
.dropzone:hover, .dropzone.dragging { border-color: var(--brand); background: var(--brand-soft); }
.dropzone.has-file { border-style: solid; border-color: var(--brand); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone span { color: var(--muted); font-size: .875rem; }
.dropzone strong { overflow-wrap: anywhere; }
progress { width: 100%; height: 8px; margin-bottom: 8px; accent-color: var(--brand); }
progress[hidden] { display: none; }
#job-note { margin: 0; }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 16px; }
.thumbs:empty { display: none; }
.thumb { display: flex; flex-direction: column; gap: 3px; padding: 8px; border: 1px solid var(--line); border-radius: 10px; color: inherit; font-size: .8125rem; }
.thumb:hover { border-color: var(--brand); text-decoration: none; }
.thumb img { width: 100%; aspect-ratio: 1 / 1.3; object-fit: contain; background: var(--bg-soft); border-radius: 5px; margin-bottom: 4px; }
.thumb-name { color: var(--ink); overflow-wrap: anywhere; }
.thumb small { color: var(--muted); font-size: .75rem; }

/* Billing */
.plan-now { margin: 0; color: var(--ink); font-size: 1.375rem; font-weight: 650; letter-spacing: -.015em; }
#bill-note { margin: 4px 0 0; }
.dash-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.dash-plan { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); border-radius: 10px; }
.dash-plan.is-current { border-color: var(--brand); }
.dash-plan h3 { margin: 0 0 6px; }
.dash-plan .price { font-size: 1.5rem; }
.dash-plan .ticks { flex: 1; margin-bottom: 14px; }
.dash-plan .ticks li { font-size: .875rem; }

@media (max-width: 1000px) {
  .convert-grid, .dash-plans { grid-template-columns: minmax(0, 1fr); }
  .top-email, .plan-pill { display: none; }
}
@media (max-width: 760px) {
  .dash { display: block; }
  .dash-menu-toggle { display: block; margin: 12px 16px 0; padding: 9px 13px; border: 1px solid var(--line-strong); border-radius: 8px; color: var(--ink); font-size: .875rem; font-weight: 550; cursor: pointer; }
  .dash-side { display: none; position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); }
  .dash-menu-check:checked ~ .dash-side { display: block; }
  .stats, .shortcuts, .field-row, .field-row-3 { grid-template-columns: minmax(0, 1fr); }
  .facts-list > div { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .dash-header-row { padding-inline: 16px; }
}

@media (max-width: 760px) {
  .table-plain table { min-width: 620px; }
}
@media (max-width: 560px) {
  .dash-header .header-tools .btn { display: inline-flex; }
  .dash-header .logo { font-size: 0; gap: 0; }
}

/* Scopes and codes in tables stay whole. */
td > :not(pre) > code, td > code { overflow-wrap: normal; white-space: nowrap; }
.page-hero .muted { margin-top: 14px; }
