/*
 * Searchbase Cloud stylesheet
 * ---------------------------------------------------------------------------
 * Hand-maintained source (no build step). Ported from the Searchbase
 * "Opus colorway" design system; class names match the design and the
 * templates. Dark theme only.
 *
 *   1. Fonts           self-hosted Adwaita Sans / Mono as "Base" / "Base Mono"
 *   2. Tokens          colours, tints, fonts, radii, shadows, easing, sizes
 *   3. Base            element defaults, focus, forms, a11y helpers, text utils
 *   4. Components      tags, buttons, links, brand
 *   5. Layout: public  site header + nav, footer, page scaffolding
 *   6. Pages: public   home, pricing, FAQ, privacy, quickstart, sign-in
 *   7. Layout: console shell, sidebar, topbar, page titles
 *   8. Pages: console  overview, tables, usage, keys, credits, settings
 *   9. States          empty states, state pages, dialogs, spinners
 *  10. Production      loading, skeletons, status, dialog forms, pagination
 *  11. Motion          keyframes
 *  12. Responsive      one block per breakpoint, widest first
 *  13. Reduced motion
 *
 * Breakpoints: min 1600 · max 1150 · max 960 (public nav collapses) ·
 * max 900 · max 700 (mobile, console drawer) · max 360.
 * Minimum font size is 10px.
 */

/* 1. Fonts ---------------------------------------------------------------- */

@font-face {
  font-family: Base;
  src: url('../fonts/adwaita-sans-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

@font-face {
  font-family: 'Base Mono';
  src: url('../fonts/adwaita-mono-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

/* 2. Tokens --------------------------------------------------------------- */

:root {
  color-scheme: dark;

  /* Surfaces, darkest to lightest */
  --deep: #07090b;            /* site footer */
  --bg: #09090b;              /* page background */
  --sunken: #0c0e11;          /* inputs, code, console canvas */
  --surface: #101317;         /* cards, panels, buttons */
  --raised: #161a20;          /* hover, tooltips */
  --avatar: #1d2329;

  /* Lines */
  --line: #1c2127;
  --line-strong: #2a3038;
  --line-stronger: #3a424c;
  --line-hover: #56606b;

  /* Text */
  --text: #e9eef3;
  --text-soft: #cdd6e0;
  --muted: #a4aeb9;
  --faint: #7a8591;

  /* Signal colours */
  --blue: #38bdf8;
  --blue-hover: #7dd3fc;
  --on-blue: #04121b;         /* ink on primary buttons */
  --cyan: #22d3ee;
  --teal: #2ee6c5;
  --teal-deep: #267f70;       /* fetch bars */
  --lime: #a3e635;            /* success */
  --code-value: #8fe3c3;
  --warning: #fbbf24;
  --red: #f87171;             /* danger */
  --signal-gradient: linear-gradient(118deg, var(--cyan), var(--teal) 52%, var(--lime));

  /* Tinted surfaces */
  --blue-wash: #10222b;       /* icon tiles, active nav, pressed presets */
  --blue-wash-line: #203f4c;
  --info-surface: #10191e;    /* notes */
  --teal-wash: #11221d;       /* balance cards, cloud choice */
  --teal-wash-line: #315548;
  --teal-node: #0c1713;
  --teal-ring: #2ee6c533;
  --teal-glow: #2ee6c508;
  --success-surface: #17200f;
  --success-line: #35451d;
  --warning-surface: #1b160c;
  --warning-line: #4b3a1a;
  --danger-surface: #241416;
  --danger-surface-hover: #391b1e;
  --danger-line: #613133;
  --danger-wash: #170f12;     /* danger zone block */
  --danger-wash-line: #4a282c;

  /* Overlays and effects */
  --chart-grid: #1c212780;
  --row-hover: #161a2055;
  --backdrop: #050607da;
  --shade: #050607bb;
  --shadow-code: 0 24px 70px #0003;
  --shadow-menu: 0 15px 30px #0006;
  --shadow-dialog: 0 30px 100px #0009;
  --shadow-drawer: 20px 0 70px #0009;

  /* Type */
  --sans: Base, Arial, sans-serif;
  --mono: 'Base Mono', monospace;

  /* Radii */
  --radius-xs: 3px;
  --radius-sm: 4px;
  --radius: 5px;
  --radius-md: 6px;
  --radius-lg: 7px;
  --radius-xl: 8px;

  /* Motion */
  --ease: cubic-bezier(.22, .61, .36, 1);

  /* Layout */
  --gutter: 96px;             /* total horizontal page gutter */
  --header-h: 94px;
  --topbar-h: 71px;
  --sidebar-w: 226px;
}

/* 3. Base ----------------------------------------------------------------- */

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
  border: 0;
  background: none;
}

button,
select {
  color: inherit;
}

/* Busy controls (disabled while a request runs) wait; controls that are
   unavailable rather than busy carry aria-disabled="true". */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: wait;
  opacity: .55;
}

button:disabled[aria-disabled=true],
[aria-disabled=true] {
  cursor: not-allowed;
}

a[aria-disabled=true],
.btn[aria-disabled=true] {
  opacity: .55;
}

img,
svg {
  max-width: 100%;
}

svg.icon {
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3,
h4 {
  line-height: 1.12;
  font-weight: 560;
  letter-spacing: -.045em;
}

p {
  color: var(--muted);
}

strong {
  font-weight: 600;
  color: var(--text);
}

::selection {
  background: var(--blue);
  color: var(--bg);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 5px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-offset: 3px;
}

/* Headings that receive focus programmatically (tabindex="-1") after their
   control is re-rendered: no ring, the section itself is the landmark. */
h2[tabindex="-1"]:focus {
  outline: none;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: var(--sunken);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--faint);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
}

input[type=range] {
  padding: 0;
  accent-color: var(--blue);
}

label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-soft);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 26px 0;
}

[hidden] {
  display: none !important;
}

/* Visually hidden, still announced (also used for role="status" live regions). */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: -70px;
  left: 20px;
  z-index: 1000;
  background: var(--blue);
  color: var(--bg);
  padding: 10px 20px;
}

.skip-link:focus {
  top: 10px;
}

.wrap {
  width: min(1232px, calc(100% - var(--gutter)));
  margin-inline: auto;
}

/* Text helpers */
.mono,
.eyebrow,
.tag,
.small-label {
  font-family: var(--mono);
}

.eyebrow {
  color: var(--blue);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow:before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--lime);
  display: inline-block;
}

.small-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
}

.text-blue {
  color: var(--blue);
}

.text-mint {
  color: var(--lime);
}

.tiny {
  font-size: 12px;
}

.spaced {
  margin-top: 20px;
}

/* 4. Components ----------------------------------------------------------- */

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  color: var(--muted);
  letter-spacing: .025em;
  white-space: nowrap;
}

.tag.success {
  color: var(--lime);
  border-color: var(--success-line);
  background: var(--success-surface);
}

.tag.warning {
  color: var(--warning);
  border-color: var(--warning-line);
  background: var(--warning-surface);
}

.tag.danger {
  color: var(--red);
  border-color: var(--danger-line);
  background: var(--danger-surface);
}

.dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 45px;
  padding: 11px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  line-height: 1.5;
  transition: background .2s, border-color .2s, transform .2s;
  white-space: nowrap;
}

.btn:hover {
  border-color: var(--line-hover);
  background: var(--raised);
}

.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--on-blue);
}

.btn.primary:hover {
  background: var(--blue-hover);
  border-color: var(--blue-hover);
  transform: translateY(-1px);
}

.btn.ghost {
  background: transparent;
}

.btn.small {
  min-height: 35px;
  padding: 7px 12px;
  font-size: 12px;
}

.btn.large {
  padding: 14px 24px;
  min-height: 51px;
}

.btn.danger {
  color: var(--red);
  border-color: var(--danger-line);
  background: var(--danger-surface);
}

.btn.danger:hover {
  background: var(--danger-surface-hover);
}

.btn.block {
  width: 100%;
}

.btn .icon {
  width: 16px;
  height: 16px;
}

/* Disabled buttons do not react to hover. */
.btn:is(:disabled, [aria-disabled=true]):hover {
  border-color: var(--line);
  background: var(--surface);
  transform: none;
}

.btn.ghost:is(:disabled, [aria-disabled=true]):hover {
  background: transparent;
}

.btn.primary:is(:disabled, [aria-disabled=true]):hover {
  background: var(--blue);
  border-color: var(--blue);
}

.btn.danger:is(:disabled, [aria-disabled=true]):hover {
  border-color: var(--danger-line);
  background: var(--danger-surface);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--blue);
  font-size: 13px;
}

.text-link:hover {
  color: var(--blue-hover);
}

.text-link .icon {
  width: 15px;
  height: 15px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* Brand */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
}

.wordmark {
  font-size: 21px;
  font-weight: 790;
  letter-spacing: -.9px;
  line-height: 1;
}

.wordmark span {
  color: var(--blue);
}

/* 5. Layout: public ------------------------------------------------------- */

.site-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 20;
  background: var(--bg);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.public-nav {
  display: flex;
  gap: 29px;
  align-items: center;
  margin-left: auto;
  margin-right: 22px;
}

.public-nav > a {
  font-size: 12px;
  color: var(--muted);
  position: relative;
}

.public-nav > a:hover,
.public-nav > a[aria-current=page] {
  color: var(--text);
}

/* Active underline sits on the header's bottom border (tuned to 94px). */
.public-nav > a[aria-current=page]:after {
  content: '';
  position: absolute;
  bottom: -34px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--blue);
}

/* Menu copy of the header sign-in link, shown only on narrow screens. */
.public-nav > .nav-login {
  display: none;
}

.site-header .public-nav .icon {
  width: 13px;
  height: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}

.menu-toggle {
  display: none;
  padding: 9px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 22px;
  background: var(--deep);
}

.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 30px;
}

.footer-top .brand img {
  width: 27px;
  height: 27px;
}

.footer-top .wordmark {
  font-size: 17px;
}

.footer-top p {
  font-size: 12px;
  margin-top: 11px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 25px;
  font-size: 12px;
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--blue);
}

.footer-bottom {
  margin-top: 35px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 25px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

/* Page scaffolding */
.section {
  padding: 100px 0;
}

/* A section that follows another without its own top padding. */
.section.flush-top {
  padding-top: 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 40px;
}

.section-header h2 {
  font-size: 42px;
  margin-top: 17px;
  max-width: 540px;
}

.section-header > p {
  max-width: 350px;
  font-size: 14px;
}

.section-number {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--faint);
}

.page-intro {
  padding: 74px 0 46px;
}

.page-intro h1 {
  font-size: 58px;
  margin: 21px 0;
}

.page-intro p {
  font-size: 17px;
  max-width: 610px;
}

.page-intro.center {
  text-align: center;
}

.page-intro.center .eyebrow {
  justify-content: center;
}

.page-intro.center p {
  margin: auto;
}

.page-content {
  padding-bottom: 95px;
}

/* 6. Pages: public -------------------------------------------------------- */

/* Home: hero */
.hero {
  display: grid;
  grid-template-columns: 1.03fr 1fr;
  min-height: 626px;
  align-items: center;
  position: relative;
  padding-top: 34px;
  padding-bottom: 40px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero h1 {
  font-size: clamp(62px, 6.5vw, 88px);
  letter-spacing: -.062em;
  line-height: 1.02;
  margin: 26px 0 25px;
  font-weight: 580;
}

.hero h1 span {
  color: var(--blue);
}

.hero-description {
  font-size: 17px;
  line-height: 1.75;
  max-width: 435px;
  color: var(--muted);
}

.hero .actions {
  margin-top: 31px;
}

.hero-note {
  margin-top: 20px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
}

.orbit-art {
  width: calc(100% + 36px);
  max-width: none;
  margin-left: -14px;
  aspect-ratio: 1.1;
  position: relative;
}

.orbit-art svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.orbit-art .orbit-sweep {
  transform-origin: 300px 280px;
  animation: orbit 95s linear infinite;
}

.orbit-art .beacon {
  animation: beacon 4s ease-in-out infinite;
}

.art-caption {
  position: absolute;
  bottom: 4%;
  right: 2%;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--faint);
}

.principles-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-block: 1px solid var(--line);
  padding: 23px 0;
  margin-bottom: 0;
}

.principles-strip > div {
  display: flex;
  gap: 11px;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
}

.principles-strip > div:first-child {
  justify-content: flex-start;
}

.principles-strip > div:last-child {
  border-right: 0;
}

.principles-strip .icon {
  color: var(--blue);
  width: 17px;
}

/* Home: independence diagram */
.independence-section {
  display: grid;
  grid-template-columns: .8fr 1fr;
  gap: 100px;
  align-items: center;
}

.independence-copy h2 {
  font-size: 42px;
  margin: 20px 0;
}

.independence-copy p {
  font-size: 15px;
  max-width: 440px;
}

.independence-copy .text-link {
  margin-top: 24px;
}

.route-diagram {
  border: 1px solid var(--line);
  background: linear-gradient(125deg, var(--surface), transparent 65%);
  border-radius: var(--radius-lg);
  padding: 31px 29px;
}

.diagram-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .1em;
  color: var(--faint);
  margin-bottom: 21px;
}

.model-nodes {
  display: flex;
  gap: 10px;
}

.model-node {
  flex: 1;
  border: 1px solid var(--line);
  padding: 10px 5px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  border-radius: var(--radius-xs);
  background: var(--sunken);
}

.diagram-traces {
  height: 34px;
  margin: 0 16%;
  border-left: 1px solid var(--line-strong);
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  position: relative;
}

.diagram-traces:before,
.diagram-traces:after {
  content: '';
  position: absolute;
  left: 50%;
  width: 1px;
  background: var(--line-strong);
}

.diagram-traces:before {
  top: 0;
  height: 34px;
}

.diagram-traces:after {
  top: 34px;
  height: 24px;
  background: var(--teal);
}

/* Gradient border: padding-box fill over a border-box gradient. */
.searchbase-node {
  margin: 24px auto 0;
  padding: 14px;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--teal-node), var(--teal-node)) padding-box,
    var(--signal-gradient) border-box;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.searchbase-node .brand img {
  width: 26px;
  height: 26px;
}

.searchbase-node .wordmark {
  font-size: 17px;
}

.searchbase-node > span {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--teal);
}

.diagram-trace {
  height: 24px;
  width: 1px;
  background: var(--teal);
  margin: auto;
}

.web-node {
  border-top: 1px solid var(--line);
  padding-top: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--muted);
}

.web-node > span {
  display: flex;
  gap: 7px;
  align-items: center;
}

.web-node .icon {
  width: 16px;
}

/* Home: two tools */
.feature-band {
  background: var(--sunken);
  border-block: 1px solid var(--line);
}

.two-tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.tool-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg);
  overflow: hidden;
}

.tool-panel-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 25px 28px;
  border-bottom: 1px solid var(--line);
}

.tool-icon {
  width: 42px;
  height: 42px;
  background: var(--blue-wash);
  border: 1px solid var(--blue-wash-line);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  color: var(--blue);
}

.tool-panel h3 {
  font-size: 22px;
  letter-spacing: -.025em;
}

.tool-panel-head .small-label {
  margin-left: auto;
}

.tool-panel-copy {
  padding: 24px 28px 14px;
  font-size: 14px;
}

.tool-example {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.8;
  margin: 6px 28px 28px;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 17px 20px;
  min-height: 110px;
}

.code-key {
  color: var(--teal);
}

.code-value {
  color: var(--code-value);
}

.tool-example .dim {
  color: var(--faint);
}

/* Home: split section */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 90px;
  align-items: center;
}

.split-section h2 {
  font-size: 43px;
  margin: 18px 0 22px;
}

.split-section p {
  font-size: 15px;
}

.values-list {
  margin: 30px 0 0;
  list-style: none;
  padding: 0;
}

.values-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

.values-list .icon {
  color: var(--blue);
  width: 16px;
  height: 16px;
  margin-top: 3px;
}

/* Code windows (tabbed REST / MCP snippets) */
.code-window {
  background: var(--sunken);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-code);
}

.code-bar {
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  min-height: 48px;
  background: var(--surface);
}

.code-tabs {
  display: flex;
  align-items: stretch;
  gap: 20px;
  align-self: stretch;
}

.code-tabs button {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  padding: 14px 0;
  border-bottom: 2px solid transparent;
}

.code-tabs button[aria-selected=true] {
  color: var(--blue);
  border-color: var(--blue);
}

/* Inset ring: .code-window clips anything drawn outside the tab bar. */
.code-tabs button:focus-visible {
  outline-offset: -2px;
}

.copy-btn {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  padding: 5px 8px;
  white-space: nowrap;
}

.copy-btn:hover {
  color: var(--text);
  border-color: var(--line-stronger);
}

.copy-btn .icon {
  width: 13px;
  height: 13px;
}

.code-window pre {
  padding: 25px;
  margin: 0;
  overflow: auto;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.95;
  tab-size: 2;
  min-height: 214px;
}

.code-window code {
  font-family: inherit;
}

.code-footer {
  border-top: 1px solid var(--line);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  display: flex;
  justify-content: space-between;
}

/* Home + pricing: deployment choices */
.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.choice {
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sunken);
  display: flex;
  flex-direction: column;
}

.choice.cloud {
  border-color: var(--teal-wash-line);
  background: linear-gradient(120deg, var(--teal-wash), var(--sunken) 80%);
}

.choice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 27px;
}

.choice-heading .icon {
  width: 25px;
  height: 25px;
  color: var(--blue);
}

.choice h3 {
  font-size: 28px;
  margin-bottom: 13px;
}

.choice p {
  font-size: 14px;
  max-width: 400px;
}

.choice-price {
  margin: 26px 0;
  font-size: 35px;
  letter-spacing: -.05em;
}

.choice-price span {
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0;
}

.choice .values-list {
  margin: 0 0 30px;
}

.choice .actions {
  margin-top: auto;
}

.closing {
  padding: 65px 0 72px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.closing h2 {
  font-size: 39px;
}

.closing p {
  margin-top: 12px;
}

/* Pricing */
.pricing-faq {
  max-width: 980px;
  margin: 65px auto 0;
}

.pricing-cards {
  max-width: 980px;
  margin: 0 auto;
}

.pricing-cards .choice {
  padding: 38px;
}

.price-pair {
  display: flex;
  gap: 34px;
  margin: 27px 0;
}

.price-pair > div {
  flex: 1;
}

.price-pair > div + div {
  border-left: 1px solid var(--line-strong);
  padding-left: 30px;
}

.price-pair b {
  font-size: 42px;
  font-weight: 550;
  letter-spacing: -.05em;
  display: block;
  line-height: 1.3;
}

.price-pair span {
  font-size: 12px;
  color: var(--muted);
}

.price-note {
  font-size: 12px;
  text-align: center;
  margin: 23px auto 0;
  max-width: 850px;
}

.estimator {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  margin: 70px auto 0;
  max-width: 980px;
  overflow: hidden;
}

.estimator-inputs {
  padding: 32px 36px;
}

.estimator h2,
.estimator h3 {
  font-size: 22px;
  margin-bottom: 8px;
}

.estimator p {
  font-size: 12px;
}

.range-group {
  margin-top: 24px;
}

.range-group label {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.range-group output {
  font-family: var(--mono);
  color: var(--blue);
}

.estimate-result {
  background: var(--surface);
  border-left: 1px solid var(--line);
  padding: 35px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.estimate-result output {
  font-size: 52px;
  letter-spacing: -.05em;
  margin: 10px 0;
}

.estimate-result .tiny {
  max-width: 255px;
}

/* FAQ */
.faq-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 80px;
}

.faq-side {
  position: sticky;
  top: 35px;
  align-self: start;
}

.faq-side h2 {
  font-size: 23px;
  margin-bottom: 15px;
}

.faq-side p {
  font-size: 13px;
}

.faq-side .text-link {
  margin-top: 15px;
}

.faq-group {
  margin-bottom: 45px;
}

.faq-group > h2 {
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--blue);
  margin-bottom: 18px;
}

.faq-item {
  border-top: 1px solid var(--line);
}

.faq-item:last-child {
  border-bottom: 1px solid var(--line);
}

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 23px 30px 23px 0;
  position: relative;
  font-size: 16px;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:after {
  content: '+';
  position: absolute;
  right: 4px;
  top: 20px;
  font-size: 22px;
  font-weight: 300;
  color: var(--blue);
}

.faq-item[open] summary:after {
  content: '\2212';
}

.faq-item p {
  font-size: 14px;
  line-height: 1.85;
  margin: 0 35px 24px 0;
}

.faq-item p a {
  color: var(--blue);
  text-decoration: underline;
}

/* Privacy */
.privacy-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 0 0 55px;
}

.privacy-summary > div {
  padding: 25px;
  border-right: 1px solid var(--line);
}

.privacy-summary > div:last-child {
  border: 0;
}

.privacy-summary .icon {
  color: var(--blue);
  margin-bottom: 15px;
}

.privacy-summary h3 {
  font-size: 17px;
  margin-bottom: 10px;
}

.privacy-summary p {
  font-size: 12px;
}

.prose-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 75px;
}

.prose-nav {
  position: sticky;
  top: 30px;
  align-self: start;
  display: grid;
  gap: 14px;
  font-size: 12px;
  color: var(--muted);
}

.prose-nav a:hover {
  color: var(--blue);
}

.prose {
  max-width: 750px;
}

.prose section {
  margin-bottom: 38px;
  scroll-margin-top: 35px;
}

.prose h2 {
  font-size: 25px;
  margin-bottom: 17px;
}

.prose h3 {
  font-size: 17px;
  margin: 22px 0 12px;
}

.prose p,
.prose li {
  font-size: 14px;
  line-height: 1.9;
  color: var(--muted);
}

.prose p + p {
  margin-top: 13px;
}

.prose a {
  color: var(--blue);
}

.prose table {
  font-size: 12px;
}

/* Quickstart */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 55px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}

.step {
  padding: 27px;
  border-right: 1px solid var(--line);
}

.step:last-child {
  border: 0;
}

.step-number {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--blue);
}

.step h3 {
  font-size: 20px;
  margin: 17px 0 12px;
}

.step p {
  font-size: 13px;
  margin-bottom: 19px;
}

.connect-layout {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: 60px;
  align-items: start;
  margin: 50px 0;
}

.connect-layout h2 {
  font-size: 29px;
  margin: 15px 0;
}

.connect-layout p {
  font-size: 14px;
}

.connect-layout .code-window pre {
  font-size: 12px;
  min-height: 210px;
}

/* Info callout */
.note {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--info-surface);
  border: 1px solid var(--line-strong);
  padding: 17px 20px;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
}

.note > .icon {
  color: var(--blue);
  margin-top: 1px;
  width: 17px;
  height: 17px;
}

.note a {
  color: var(--blue);
}

/* Sign-in */
.login-main {
  min-height: 740px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
  padding-block: 70px;
}

.login-story h1 {
  font-size: 60px;
  margin: 23px 0;
}

.login-story p {
  max-width: 380px;
  font-size: 16px;
}

/* The sign-in illustration reuses the animated homepage lens at a smaller scale. */
.login-story .login-orbit {
  display: block;
  width: 240px;
  max-width: 100%;
  aspect-ratio: 600 / 550;
  margin: 18px 0 0;
}

.login-box {
  max-width: 430px;
  width: 100%;
  justify-self: end;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  padding: 36px;
  border-radius: var(--radius-lg);
}

.login-box h2 {
  font-size: 29px;
  margin: 15px 0;
}

.login-box > p {
  font-size: 13px;
  margin-bottom: 26px;
}

.login-fineprint {
  font-size: 11px;
  text-align: center;
  margin-top: 23px !important;
}

/* Inline result text (success by default). */
.inline-status {
  font-size: 12px;
  line-height: 1.7;
  color: var(--lime);
  margin-top: 15px;
  min-height: 0;
}

.inline-status.error {
  color: var(--red);
}

/* 7. Layout: console ------------------------------------------------------ */

.console {
  background: var(--sunken);
}

.console-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
}

/* Sticky full-height sidebar; scrolls on short viewports. */
.sidebar {
  border-right: 1px solid var(--line);
  background: var(--bg);
  padding: 30px 20px 18px;
  position: sticky;
  height: 100vh;
  top: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.sidebar > .brand {
  padding-left: 8px;
}

.sidebar .brand img {
  width: 31px;
  height: 31px;
}

.sidebar .wordmark {
  font-size: 19px;
}

.workspace {
  margin: 33px 0 31px;
  border: 1px solid var(--line);
  padding: 11px 12px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 10px;
}

.workspace-icon {
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--blue-wash);
  color: var(--teal);
  font-family: var(--mono);
  font-size: 12px;
}

.workspace b {
  font-size: 11px;
  font-weight: 500;
  display: block;
}

.workspace small {
  color: var(--faint);
  font-size: 10px;
}

.nav-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .12em;
  color: var(--faint);
  margin: 0 13px 12px;
}

.side-nav {
  display: grid;
  gap: 5px;
}

.side-nav a {
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.side-nav a .icon {
  width: 17px;
  height: 17px;
}

.side-nav a:hover {
  color: var(--text);
  background: var(--surface);
}

.side-nav a[aria-current=page] {
  background: var(--blue-wash);
  border-color: var(--blue-wash-line);
  color: var(--blue);
}

.sidebar-bottom {
  margin-top: auto;
  padding-top: 28px;
}

.sidebar-bottom .text-link {
  font-size: 11px;
  color: var(--muted);
  padding: 7px 12px;
}

.sidebar-balance {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 15px;
  margin-top: 20px;
  background: var(--surface);
}

.sidebar-balance-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
  color: var(--muted);
}

.sidebar-balance strong {
  display: block;
  font-size: 24px;
  margin: 8px 0 12px;
  font-weight: 500;
  letter-spacing: -.04em;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 21px;
  padding: 0 3px;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--avatar);
  border: 1px solid var(--line-stronger);
  display: grid;
  place-items: center;
  font-size: 10px;
  color: var(--text-soft);
  flex-shrink: 0;
}

.sidebar-user span:last-child {
  font-size: 10px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Drawer scrim (only shown on mobile while the drawer is open). */
.console-menu-shade {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--shade);
  z-index: 35;
}

.console-main {
  min-width: 0;
}

.console-topbar {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding: 0 42px;
  gap: 20px;
}

.breadcrumbs {
  display: flex;
  gap: 13px;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}

.breadcrumbs span:first-child {
  color: var(--faint);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 21px;
}

.topbar-right > a {
  font-size: 11px;
  color: var(--muted);
}

.console-mobile-brand {
  display: none;
}

.console-content {
  max-width: 1330px;
  padding: 40px 42px 45px;
  margin: 0 auto;
}

.console-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 31px;
}

.console-title h1 {
  font-size: 32px;
  font-weight: 560;
}

.console-title p {
  font-size: 12px;
  margin-top: 10px;
}

.console-heading {
  font-size: 17px;
  letter-spacing: -.025em;
}

.console-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 30px 0 17px;
}

.console-section-title .text-link {
  font-size: 11px;
}

/* 8. Pages: console ------------------------------------------------------- */

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
}

.panel-pad {
  padding: 25px;
}

/* Overview */
.overview-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr 1fr;
  gap: 18px;
}

.stat-card {
  padding: 25px;
  position: relative;
  overflow: hidden;
}

.stat-card.balance {
  background: linear-gradient(115deg, var(--teal-wash), var(--surface));
  border-color: var(--teal-wash-line);
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-label .icon {
  width: 17px;
  color: var(--blue);
}

.stat-number {
  font-size: 40px;
  letter-spacing: -.06em;
  line-height: 1.2;
  margin: 16px 0 13px;
  font-weight: 500;
}

.stat-number span {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0;
  margin-left: 5px;
}

.stat-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 26px;
}

.stat-bottom p {
  font-size: 10px;
}

.stat-bottom .text-link {
  font-size: 10px;
  gap: 5px;
}

.stat-bottom .icon {
  width: 12px;
}

.mini-bars {
  display: flex;
  align-items: end;
  gap: 4px;
  height: 24px;
  width: 80px;
}

.mini-bars i {
  flex: 1;
  background: var(--teal);
  border-radius: 1px;
  opacity: .7;
}

.getting-started {
  margin-top: 23px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 22px 25px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius-md);
}

.getting-started > .tool-icon {
  width: 41px;
  height: 41px;
}

.getting-started h2 {
  font-size: 15px;
  letter-spacing: -.025em;
}

.getting-started p {
  font-size: 11px;
  margin-top: 6px;
}

.getting-started > .btn {
  margin-left: auto;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 23px;
  margin-top: 23px;
}

.dashboard-columns .panel-pad {
  padding: 23px;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 19px;
}

.panel-title h2 {
  font-size: 16px;
  letter-spacing: -.02em;
}

.panel-title p {
  font-size: 10px;
  margin-top: 6px;
}

.panel-title .tag {
  font-size: 10px;
}

/* Pure-CSS grouped bar chart; bar heights are inline percentages. */
.chart {
  height: 148px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 10px;
  margin: 28px 0 10px;
  padding: 0 6px;
  position: relative;
  background: repeating-linear-gradient(to top, transparent, transparent 48px, var(--chart-grid) 49px, var(--chart-grid) 50px);
}

.chart-group {
  height: 100%;
  flex: 1;
  max-width: 43px;
  display: flex;
  align-items: flex-end;
  gap: 3px;
  position: relative;
}

.chart-bar {
  background: var(--blue);
  width: 50%;
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  transition: filter .2s;
}

.chart-bar.fetch {
  background: var(--teal-deep);
}

.chart-group:hover .chart-bar {
  filter: brightness(1.35);
}

.chart-days {
  display: flex;
  justify-content: space-around;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  margin: 0 0 18px;
}

.chart-legend {
  display: flex;
  gap: 20px;
  font-size: 10px;
  color: var(--muted);
}

.chart-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.chart-legend i {
  width: 6px;
  height: 6px;
  background: var(--blue);
}

.chart-legend span + span i {
  background: var(--teal-deep);
}

.chart-tooltip {
  display: none;
  position: absolute;
  bottom: 105%;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  padding: 4px 8px;
  background: var(--raised);
  border: 1px solid var(--line-stronger);
  font-size: 10px;
  z-index: 2;
  border-radius: var(--radius-xs);
}

.chart-group:hover .chart-tooltip,
.chart-group:focus .chart-tooltip {
  display: block;
}

/* Compact code window on the overview */
.quick-connect .code-window {
  border-color: var(--line-strong);
  box-shadow: none;
}

.quick-connect .code-window pre {
  padding: 16px;
  font-size: 10px;
  line-height: 1.9;
  min-height: 145px;
}

.quick-connect .code-bar {
  min-height: 38px;
  padding-inline: 13px;
}

.quick-connect .code-tabs button {
  font-size: 10px;
  padding: 9px 0;
}

.quick-connect > .text-link {
  font-size: 10px;
  margin-top: 16px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.data-table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
  font-size: 12px;
}

.data-table th {
  font-weight: 400;
  color: var(--faint);
  font-size: 10px;
  letter-spacing: .015em;
  padding: 13px 21px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.data-table td {
  padding: 16px 21px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}

.data-table tr:last-child td {
  border-bottom: 0;
}

.data-table td:last-child,
.data-table th:last-child {
  text-align: right;
}

.data-table tbody tr:hover {
  background: var(--row-hover);
}

.data-table .mono {
  font-size: 10px;
}

.operation {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  color: var(--text);
}

.operation > .icon {
  width: 14px;
  height: 14px;
  color: var(--blue);
}

.data-table .tag {
  padding: 3px 7px;
  font-size: 10px;
}

/* Why an unsuccessful request failed, under its "No charge" tag. */
.usage-reason {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--muted);
}

.table-copy {
  border: 0;
  padding: 3px;
  background: none;
}

.table-copy .icon {
  width: 13px;
  height: 13px;
}

.console-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin-top: 30px;
  font-size: 10px;
  color: var(--faint);
}

.console-footer > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.console-footer .icon {
  width: 12px;
  height: 12px;
}

/* Usage */
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
}

.filters .filter {
  width: 175px;
}

.filters select {
  font-size: 11px;
  padding: 9px 12px;
  background: var(--surface);
}

.filters label {
  font-size: 10px;
}

.filters .filter:last-child {
  margin-left: auto;
  width: 155px;
}

.usage-summary {
  display: flex;
  gap: 25px;
  margin-bottom: 29px;
}

.usage-summary > span {
  font-size: 12px;
  color: var(--muted);
}

.usage-summary strong {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 400;
  margin-right: 7px;
}

/* API keys */
.keys-note {
  margin: 24px 0;
}

.key-name {
  font-weight: 550;
  color: var(--text);
  font-size: 12px;
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.row-actions button {
  font-size: 11px;
  color: var(--muted);
  padding: 5px;
}

.row-actions button:hover {
  color: var(--blue);
}

.row-actions button.red {
  color: var(--red);
}

/* Credits */
.credits-grid {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 25px;
  align-items: start;
}

.credit-wallet {
  padding: 32px;
  background: linear-gradient(135deg, var(--teal-wash), var(--surface));
  border: 1px solid var(--teal-wash-line);
  border-radius: var(--radius-md);
  min-height: 275px;
  position: relative;
  overflow: hidden;
}

.credit-wallet:after {
  content: '';
  position: absolute;
  width: 210px;
  height: 210px;
  right: -125px;
  top: 90px;
  border: 1px solid var(--teal-ring);
  border-radius: 50%;
  box-shadow: 0 0 0 22px var(--teal-glow), 0 0 0 44px var(--teal-glow);
  pointer-events: none;
}

.credit-wallet .stat-number {
  font-size: 57px;
  margin: 26px 0 13px;
  /* Keep the card height while the balance loads. */
  min-height: 1.2em;
}

.credit-wallet [data-credit-balance] > .skeleton.value {
  height: 48px;
  width: 190px;
  margin-top: 10px;
  background: var(--teal-ring);
}

.credit-wallet > p {
  font-size: 12px;
  max-width: 260px;
}

.wallet-rates {
  border-top: 1px solid var(--line-strong);
  margin-top: 27px;
  padding-top: 20px;
  display: flex;
  gap: 30px;
  font-size: 11px;
  color: var(--muted);
}

.wallet-rates b {
  color: var(--text);
  font-weight: 500;
}

.topup-panel {
  padding: 28px;
}

.topup-panel h2 {
  font-size: 20px;
  letter-spacing: -.03em;
}

.topup-panel > p {
  font-size: 12px;
  margin: 9px 0 24px;
}

.amount-presets {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.amount-presets button {
  flex: 1;
  padding: 9px 5px;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  font-family: var(--mono);
  font-size: 12px;
}

.amount-presets button[aria-pressed=true] {
  border-color: var(--blue);
  color: var(--blue);
  background: var(--blue-wash);
}

.currency-input {
  position: relative;
}

.currency-input > span {
  position: absolute;
  top: 11px;
  left: 15px;
  color: var(--muted);
}

.currency-input input {
  padding-left: 35px;
  font-family: var(--mono);
  font-size: 15px;
}

.receipt {
  margin: 21px 0;
}

.receipt > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin: 10px 0;
  font-size: 12px;
  color: var(--muted);
}

.receipt > div.total {
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: var(--text);
}

.receipt > div span:last-child {
  font-family: var(--mono);
  font-size: 12px;
}

.topup-panel .tiny {
  margin-top: 12px;
  font-size: 10px;
}

/* Settings */
.settings-stack {
  max-width: 900px;
  display: grid;
  gap: 22px;
}

.settings-block {
  padding: 27px;
}

.settings-block-head {
  display: flex;
  justify-content: space-between;
  gap: 25px;
  margin-bottom: 22px;
}

.settings-block h2 {
  font-size: 19px;
  letter-spacing: -.025em;
}

.settings-block p {
  font-size: 12px;
  margin-top: 9px;
}

.settings-block .icon {
  color: var(--blue);
}

.device-row {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.device-row .device-icon {
  color: var(--muted);
  background: var(--raised);
  padding: 9px;
  border-radius: var(--radius-sm);
  display: flex;
}

.device-row > div {
  flex: 1 1 0;
  min-width: 0;
}

.device-row h3 {
  font-size: 12px;
  letter-spacing: 0;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.device-row p {
  font-size: 10px;
  margin-top: 5px;
}

.device-row > .btn,
.device-row > .tag {
  margin-left: auto;
}

.danger-block {
  border-color: var(--danger-wash-line);
  background: var(--danger-wash);
}

.danger-block .settings-block-head {
  margin: 0;
  align-items: center;
}

.danger-block .settings-block-head > div {
  max-width: 560px;
}

/* 9. States, dialogs, spinners -------------------------------------------- */

.empty-state {
  text-align: center;
  padding: 55px 25px;
  border: 1px dashed var(--line-stronger);
  border-radius: var(--radius);
}

.empty-state > .icon {
  color: var(--blue);
  width: 30px;
  height: 30px;
}

.empty-state h2 {
  font-size: 21px;
  margin: 19px 0 10px;
}

.empty-state p {
  font-size: 12px;
  max-width: 350px;
  margin: 0 auto 22px;
}

.state-page {
  text-align: center;
  min-height: 650px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 24px;
}

.state-page h1 {
  font-size: 49px;
  margin: 18px 0;
}

.state-page p {
  max-width: 450px;
  margin-bottom: 26px;
}

.state-number {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--blue);
}

.state-page .state-support {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--muted);
}

.state-support a {
  color: var(--blue);
}

.state-page > .icon {
  width: 40px;
  height: 40px;
  color: var(--blue);
  margin-bottom: 8px;
}

/* Native <dialog> */
.modal {
  border: 1px solid var(--line-stronger);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-xl);
  padding: 0;
  max-width: 470px;
  width: calc(100% - 40px);
  box-shadow: var(--shadow-dialog);
}

.modal::backdrop {
  background: var(--backdrop);
  backdrop-filter: blur(6px);
}

.modal-inner {
  padding: 29px;
}

.modal-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.modal h2 {
  font-size: 24px;
  letter-spacing: -.04em;
}

.modal-close {
  display: grid;
  place-items: center;
  padding: 7px;
  color: var(--muted);
}

.modal-close:hover {
  color: var(--text);
}

.modal p {
  font-size: 13px;
  margin: 17px 0 22px;
  line-height: 1.8;
}

.modal form {
  margin-top: 23px;
}

.modal .actions {
  justify-content: flex-end;
  margin-top: 26px;
}

.modal .note {
  font-size: 11px;
  margin-top: 20px;
}

.modal input {
  font-size: 13px;
}

.modal code {
  font-family: var(--mono);
  font-size: 11px;
  overflow-wrap: anywhere;
}

/* One-time API key reveal */
.key-reveal {
  background: var(--bg);
  border: 1px solid var(--teal-wash-line);
  padding: 18px;
  border-radius: var(--radius-sm);
  margin: 20px 0;
}

.key-reveal code {
  display: block;
  color: var(--blue);
  margin-bottom: 16px;
  user-select: all;
}

.spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  border-right-color: transparent;
  animation: orbit .7s linear infinite;
}

/* 10. Production states ---------------------------------------------------- */

/* Request spinners (RequestSpinner): hidden until the owning HTMX request
   runs. htmx 4 adds .htmx-request to the requesting element (or to its
   hx-indicator target); main.js mirrors it with aria-busy="true". */
.request-spinner {
  display: none;
}

.htmx-request .request-spinner,
.request-spinner.htmx-request,
[aria-busy=true] .request-spinner {
  display: inline-block;
}

/* Busy spinners (BusySpinner) for native forms and JS actions: hidden until
   their button carries aria-busy="true". */
[data-busy-spinner] {
  display: none;
}

button[aria-busy=true] [data-busy-spinner],
.btn[aria-busy=true] [data-busy-spinner] {
  display: inline-block;
}

/* Initial-load placeholders. */
.skeleton {
  display: block;
  height: 12px;
  width: 100%;
  max-width: 100%;
  border-radius: var(--radius-xs);
  background: var(--raised);
  animation: skeleton-pulse 1.6s ease-in-out infinite;
}

.skeleton + .skeleton {
  margin-top: 10px;
}

.skeleton.short {
  width: 40%;
}

.skeleton.medium {
  width: 65%;
}

.skeleton.value {
  height: 28px;
  width: 110px;
}

.skeleton.large-value {
  height: 44px;
  width: 150px;
}

.skeleton.row {
  height: 40px;
}

.skeleton.inline {
  display: inline-block;
  vertical-align: middle;
  width: 4em;
  height: 1em;
}

/* Inline status variants (base .inline-status above is success-coloured).
   Use role="status" for progress/success and role="alert" for errors. */
.inline-status.success {
  color: var(--lime);
}

.inline-status.warning {
  color: var(--warning);
}

.inline-status.info {
  color: var(--muted);
}

.inline-status a {
  color: var(--blue);
  text-decoration: underline;
}

.inline-status .spinner {
  margin-right: 8px;
  vertical-align: -2px;
}

.inline-status .btn {
  margin-top: 10px;
}

/* Boxed variant for standalone messages (payment status, unavailable data). */
.inline-status.boxed {
  padding: 14px 17px;
  border: 1px solid var(--success-line);
  border-radius: var(--radius);
  background: var(--success-surface);
}

.inline-status.boxed.error {
  border-color: var(--danger-line);
  background: var(--danger-surface);
}

.inline-status.boxed.warning {
  border-color: var(--warning-line);
  background: var(--warning-surface);
}

.inline-status.boxed.info {
  border-color: var(--line-strong);
  background: var(--info-surface);
}

/* Dialog forms */
.field {
  margin-bottom: 18px;
}

.field:last-child {
  margin-bottom: 0;
}

.field input,
.field select,
.field textarea {
  font-size: 13px;
}

.field .field-hint,
.modal .field .field-hint {
  font-size: 11px;
  line-height: 1.6;
  color: var(--faint);
  margin: 7px 0 0;
}

.field .inline-status,
.modal .field .inline-status {
  margin: 7px 0 0;
}

.modal-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 26px;
}

/* In-dialog error slot: p.inline-status.error.modal-error[role=alert]. */
.modal-error,
.modal .modal-error {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.7;
}

.modal-error:empty {
  display: none;
}

/* Empty-state variants */
.empty-state.compact {
  padding: 30px 20px;
}

.empty-state.compact > .icon {
  width: 24px;
  height: 24px;
}

.empty-state.compact h2 {
  font-size: 17px;
  margin: 12px 0 6px;
}

.empty-state.compact p {
  margin-bottom: 16px;
}

.empty-state > :last-child {
  margin-bottom: 0;
}

/* State page variants (404, deleted, error, email changed, ...) */
.state-page.error .state-number,
.state-page.error > .icon {
  color: var(--red);
}

.state-page.warning .state-number,
.state-page.warning > .icon {
  color: var(--warning);
}

.state-page.success > .icon {
  color: var(--lime);
}

/* Chart with no data in the window */
.chart-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 20px;
  text-align: center;
  font-size: 12px;
  color: var(--faint);
}

/* Secondary line under an API key name ("Last used ..."). */
.key-meta {
  display: block;
  margin-top: 4px;
  font-size: 10px;
  font-weight: 400;
  color: var(--faint);
  white-space: nowrap;
}

/* Pagination: "Showing 11–20" · "Page 2" · Previous / Next */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 17px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.pagination .actions {
  gap: 7px;
}

.pagination .btn {
  min-height: 32px;
  font-size: 10px;
  padding: 6px 11px;
}

.pagination [aria-disabled=true] {
  cursor: not-allowed;
}

.pagination-range {
  font-variant-numeric: tabular-nums;
}

.pagination-page {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--faint);
  padding: 0 6px;
}

/* Destructive dialogs (Dialog with Danger). */
.modal.danger {
  border-color: var(--danger-line);
}

/* Balance that could not be loaded, inside a [data-credit-balance] value
   (sidebar card or overview stat). Overrides the value typography. */
[data-credit-balance] .balance-unavailable {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.5;
  color: var(--muted);
}

[data-credit-balance] > .skeleton {
  margin: 0;
}

[data-credit-balance] .balance-unavailable span {
  margin: 0;
  font-size: inherit;
  letter-spacing: inherit;
  color: inherit;
}

[data-credit-balance] .balance-unavailable .text-link {
  font-size: 11px;
}

/* 11. Motion -------------------------------------------------------------- */

@keyframes orbit {
  to {
    transform: rotate(360deg);
  }
}

@keyframes beacon {
  0%,
  100% {
    opacity: .45;
  }

  50% {
    opacity: 1;
  }
}

@keyframes skeleton-pulse {
  0%,
  100% {
    opacity: .55;
  }

  50% {
    opacity: 1;
  }
}

/* 12. Responsive ---------------------------------------------------------- */

@media (min-width: 1600px) {
  .hero {
    min-height: 680px;
  }

  .hero h1 {
    font-size: 94px;
  }

  .orbit-art {
    margin-left: 5px;
  }
}

@media (max-width: 1150px) {
  :root {
    --gutter: 64px;
    --sidebar-w: 200px;
  }

  .public-nav {
    gap: 20px;
    margin-right: 5px;
  }

  .header-actions {
    gap: 16px;
  }

  .hero {
    min-height: 585px;
  }

  .hero h1 {
    font-size: 71px;
  }

  .orbit-art {
    width: 110%;
    margin-left: -30px;
  }

  .independence-section,
  .split-section {
    gap: 50px;
  }

  .section {
    padding: 75px 0;
  }

  .sidebar {
    padding-inline: 14px;
  }

  .console-content {
    padding: 32px 26px;
  }

  .console-topbar {
    padding-inline: 26px;
  }

  .overview-grid {
    gap: 12px;
  }

  .stat-card {
    padding: 20px;
  }

  .dashboard-columns {
    gap: 17px;
    grid-template-columns: 1.2fr 1fr;
  }

  .dashboard-columns .panel-pad {
    padding: 20px;
  }

  .data-table td,
  .data-table th {
    padding-inline: 16px;
  }

  .stat-bottom {
    flex-wrap: wrap;
  }

  .login-main {
    gap: 60px;
  }

  .credits-grid {
    gap: 18px;
  }

  .credit-wallet {
    padding: 27px;
  }

  .console-title h1 {
    font-size: 30px;
  }
}

/* Six navigation links collapse into a dropdown before they compete with
   the brand and actions. */
@media (max-width: 960px) {
  :root {
    --header-h: 76px;
  }

  /* Public header only; the console toggle appears at 700px. */
  .site-header .menu-toggle {
    display: grid;
    place-items: center;
  }

  .header-actions {
    margin-left: auto;
  }

  .public-nav {
    display: none;
    position: absolute;
    top: calc(var(--header-h) - 1px);
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 20px;
    margin: 0;
    box-shadow: var(--shadow-menu);
    gap: 0;
  }

  .public-nav.is-open {
    display: grid;
  }

  .public-nav > a {
    font-size: 14px;
    padding: 12px;
  }

  .public-nav > a[aria-current=page]:after {
    bottom: 5px;
    left: 12px;
    right: auto;
    width: 20px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-w: 180px;
  }

  .header-inner {
    gap: 15px;
  }

  .header-actions .btn {
    padding-inline: 13px;
  }

  .hero h1 {
    font-size: 63px;
  }

  .hero-description {
    font-size: 15px;
  }

  .hero {
    min-height: 535px;
  }

  .hero .btn {
    padding-inline: 16px;
  }

  .principles-strip > div {
    font-size: 10px;
    gap: 7px;
  }

  .principles-strip .icon {
    width: 14px;
  }

  .section-header h2,
  .independence-copy h2,
  .split-section h2 {
    font-size: 35px;
  }

  .section-header > p {
    max-width: 290px;
  }

  .independence-section {
    gap: 35px;
  }

  .route-diagram {
    padding: 23px 20px;
  }

  .model-node,
  .web-node {
    font-size: 10px;
  }

  .two-tools {
    gap: 20px;
  }

  .tool-panel-head {
    padding: 21px;
  }

  .tool-panel-copy {
    padding: 20px;
  }

  .tool-example {
    margin: 0 20px 23px;
    padding: 15px;
    font-size: 10px;
  }

  .split-section {
    gap: 35px;
  }

  .choice {
    padding: 27px;
  }

  .choice-price {
    font-size: 30px;
  }

  .closing h2 {
    font-size: 33px;
  }

  .faq-layout {
    gap: 40px;
    grid-template-columns: 190px 1fr;
  }

  .prose-layout {
    gap: 35px;
    grid-template-columns: 175px 1fr;
  }

  .connect-layout {
    gap: 30px;
  }

  .login-story h1 {
    font-size: 48px;
  }

  .login-main {
    gap: 35px;
  }

  .login-box {
    padding: 28px;
  }

  .sidebar .brand {
    gap: 6px;
    padding-left: 2px;
  }

  .sidebar .wordmark {
    font-size: 17px;
  }

  .sidebar .brand img {
    width: 27px;
  }

  .console-topbar {
    padding-inline: 22px;
  }

  .topbar-right > a {
    display: none;
  }

  .console-content {
    padding: 28px 22px;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-grid > .stat-card:last-child {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .overview-grid > .stat-card:last-child .stat-number {
    grid-column: 2;
    grid-row: 1 / 3;
    margin: 0;
    text-align: right;
  }

  .overview-grid > .stat-card:last-child .stat-label .icon {
    display: none;
  }

  .dashboard-columns {
    grid-template-columns: 1fr;
  }

  .getting-started {
    flex-wrap: wrap;
    padding: 20px;
    gap: 13px;
  }

  .getting-started > .btn {
    margin-left: 54px;
  }

  .credits-grid {
    grid-template-columns: 1fr;
  }

  .credit-wallet {
    min-height: 240px;
  }

  .credit-wallet .stat-number {
    margin-top: 18px;
  }

  .settings-block {
    padding: 22px;
  }

  .danger-block .settings-block-head {
    align-items: start;
    flex-direction: column;
  }

  .console-title {
    align-items: flex-start;
  }

  .console-title .btn {
    font-size: 11px;
  }

  .filters {
    flex-wrap: wrap;
  }

  .filters .filter {
    flex: 1;
    min-width: 135px;
  }

  .filters .filter:last-child {
    margin-left: 0;
    min-width: 135px;
  }

  .usage-summary {
    gap: 16px;
  }

  .usage-summary > span {
    font-size: 10px;
  }

  .footer-links {
    gap: 17px;
  }
}

@media (max-width: 700px) {
  :root {
    --gutter: 40px;
    --topbar-h: 65px;
  }

  html {
    scroll-padding-top: 85px;
  }

  /* Public header */
  .brand img {
    width: 31px;
    height: 31px;
  }

  .wordmark {
    font-size: 20px;
  }

  .header-actions {
    gap: 12px;
  }

  .header-actions > .login-link {
    display: none;
  }

  /* The header sign-in link is hidden; offer it in the menu instead. */
  .public-nav > .nav-login {
    display: block;
  }

  .header-actions .btn {
    font-size: 11px;
    min-height: 36px;
    padding: 8px 12px;
  }

  /* Home */
  .hero {
    display: block;
    padding-top: 55px;
    padding-bottom: 15px;
    min-height: 0;
  }

  .hero h1 {
    font-size: clamp(58px, 11vw, 77px);
    margin-top: 22px;
  }

  .hero-description {
    font-size: 16px;
    max-width: 460px;
  }

  .hero .actions {
    gap: 10px;
    margin-top: 27px;
  }

  .hero .btn {
    font-size: 12px;
    padding: 12px 17px;
    min-height: 47px;
  }

  .orbit-art {
    width: min(100%, 490px);
    margin: 5px auto 0;
    aspect-ratio: 1.1;
  }

  .art-caption {
    bottom: 4%;
  }

  .principles-strip {
    grid-template-columns: 1fr 1fr;
    padding: 5px 0;
  }

  .principles-strip > div,
  .principles-strip > div:first-child {
    padding: 17px 6px;
    justify-content: flex-start;
    font-size: 10px;
    gap: 9px;
    border: 0;
  }

  .principles-strip > div:nth-child(even) {
    padding-left: 14px;
    border-left: 1px solid var(--line);
  }

  .principles-strip > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--line);
  }

  .section {
    padding: 61px 0;
  }

  .independence-section,
  .split-section {
    grid-template-columns: 1fr;
    gap: 31px;
  }

  .independence-copy h2,
  .section-header h2,
  .split-section h2 {
    font-size: 35px;
  }

  .independence-copy p {
    max-width: 100%;
    font-size: 14px;
  }

  .route-diagram {
    padding: 25px;
  }

  .model-node {
    font-size: 11px;
  }

  .section-header {
    display: block;
    margin-bottom: 28px;
  }

  .section-header > p {
    margin-top: 18px;
    max-width: 100%;
    font-size: 13px;
  }

  .two-tools {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .tool-panel-head {
    padding: 23px;
  }

  .tool-panel-copy {
    padding: 20px 23px;
  }

  .tool-example {
    margin: 0 23px 23px;
    min-height: 0;
  }

  .tool-panel h3 {
    font-size: 23px;
  }

  .choice-grid {
    grid-template-columns: 1fr;
    gap: 17px;
  }

  .choice {
    padding: 29px;
    min-width: 0;
  }

  .choice h3 {
    font-size: 27px;
  }

  .choice-price {
    font-size: 35px;
  }

  .choice .values-list {
    margin-bottom: 24px;
  }

  .choice .values-list li {
    margin-top: 15px;
  }

  .closing {
    padding: 46px 0;
    display: block;
  }

  .closing h2 {
    font-size: 32px;
  }

  .closing p {
    font-size: 13px;
  }

  .closing .btn {
    margin-top: 25px;
  }

  /* Footer */
  .site-footer {
    padding-top: 28px;
  }

  .footer-top {
    display: block;
  }

  .footer-links {
    margin-top: 25px;
    gap: 20px;
    font-size: 11px;
  }

  .footer-bottom {
    gap: 15px;
    align-items: start;
  }

  .footer-bottom > span:last-child {
    text-align: right;
  }

  /* Public pages */
  .page-intro {
    padding: 47px 0 34px;
  }

  .page-intro h1 {
    font-size: 43px;
    margin: 20px 0 18px;
  }

  .page-intro p {
    font-size: 15px;
  }

  .page-content {
    padding-bottom: 55px;
  }

  .pricing-cards .choice {
    padding: 28px;
  }

  .price-pair {
    gap: 16px;
  }

  .price-pair > div + div {
    padding-left: 16px;
  }

  .price-pair b {
    font-size: 36px;
  }

  .price-pair span {
    font-size: 11px;
  }

  .price-note {
    font-size: 11px;
  }

  .estimator {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .estimator-inputs {
    padding: 26px;
  }

  .estimate-result {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 25px;
  }

  .estimate-result output {
    font-size: 45px;
  }

  .estimate-result .tiny {
    max-width: 100%;
  }

  .faq-layout {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .faq-side {
    position: static;
  }

  .faq-side h2 {
    font-size: 22px;
  }

  .faq-side .text-link {
    margin-top: 10px;
  }

  .faq-item summary {
    font-size: 15px;
  }

  .faq-item p {
    font-size: 13px;
  }

  .privacy-summary {
    grid-template-columns: 1fr;
    margin-bottom: 35px;
  }

  .privacy-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 22px;
  }

  .privacy-summary .icon {
    margin-bottom: 9px;
  }

  .privacy-summary p {
    font-size: 12px;
  }

  .prose-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .prose-nav {
    display: flex;
    flex-wrap: wrap;
    position: static;
    gap: 10px 20px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 23px;
    font-size: 11px;
  }

  .prose h2 {
    font-size: 23px;
  }

  .prose p,
  .prose li {
    font-size: 13px;
  }

  .steps {
    grid-template-columns: 1fr;
    margin-bottom: 35px;
  }

  .step {
    padding: 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .step h3 {
    margin: 10px 0;
    font-size: 21px;
  }

  .step p {
    margin-bottom: 14px;
  }

  .connect-layout {
    grid-template-columns: 1fr;
    gap: 25px;
    margin: 35px 0;
  }

  .connect-layout h2 {
    font-size: 28px;
  }

  .connect-layout .code-window pre {
    font-size: 10px;
  }

  /* Sign-in */
  .login-main {
    display: flex;
    flex-direction: column;
    gap: 33px;
    padding-block: 43px;
    min-height: 0;
  }

  .login-story {
    width: 100%;
  }

  .login-story h1 {
    font-size: 43px;
    margin: 19px 0;
  }

  .login-story p {
    font-size: 14px;
  }

  .login-story .login-orbit {
    width: 176px;
    margin-top: 10px;
  }

  .login-box {
    max-width: 100%;
    padding: 27px;
  }

  .login-box h2 {
    font-size: 27px;
  }

  /* Console shell: sidebar becomes an off-canvas drawer */
  .console-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 235px;
    z-index: 40;
    transform: translateX(-100%);
    /* Hidden once the slide-out ends: out of the tab order and the
       accessibility tree while closed. */
    visibility: hidden;
    transition: transform .25s var(--ease), visibility 0s linear .25s;
    box-shadow: var(--shadow-drawer);
  }

  .sidebar.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform .25s var(--ease), visibility 0s;
  }

  .sidebar .brand {
    padding-left: 8px;
    gap: 10px;
  }

  .sidebar .wordmark {
    font-size: 20px;
  }

  .console-menu-shade.is-open {
    display: block;
  }

  .console-mobile-brand {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .console-mobile-brand .menu-toggle {
    display: grid;
    place-items: center;
    padding: 7px 3px;
  }

  .console-mobile-brand > a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 650;
  }

  .console-mobile-brand img {
    width: 26px;
    height: 26px;
  }

  .console-topbar {
    padding: 0 17px;
    gap: 10px;
  }

  .breadcrumbs {
    display: none;
  }

  .topbar-right {
    gap: 10px;
  }

  .console-content {
    padding: 29px 20px;
  }

  .console-title {
    gap: 15px;
    margin-bottom: 25px;
  }

  .console-title h1 {
    font-size: 28px;
  }

  .console-title p {
    font-size: 12px;
    max-width: 300px;
  }

  .console-title .btn {
    font-size: 10px;
    min-height: 36px;
    padding: 9px 11px;
    gap: 5px;
  }

  .console-title .btn .icon {
    width: 13px;
  }

  /* Console pages */
  .overview-grid {
    gap: 12px;
  }

  .stat-card {
    padding: 20px 17px;
  }

  .stat-label {
    font-size: 10px;
  }

  .stat-label .icon {
    width: 14px;
  }

  .stat-number {
    font-size: 34px;
    margin: 17px 0;
  }

  .stat-bottom {
    gap: 7px;
    align-items: flex-start;
    flex-direction: column;
  }

  .mini-bars {
    width: 63px;
    height: 20px;
  }

  .overview-grid > .stat-card:last-child .stat-bottom {
    display: block;
  }

  .getting-started {
    padding: 20px 17px;
  }

  .getting-started > div:not(.tool-icon) {
    flex: 1;
    min-width: 200px;
  }

  .getting-started p {
    font-size: 10px;
  }

  .getting-started > .btn {
    margin-left: 54px;
    font-size: 11px;
  }

  .dashboard-columns {
    gap: 18px;
    margin-top: 18px;
  }

  .dashboard-columns .panel-pad {
    padding: 22px;
  }

  .chart {
    height: 145px;
  }

  .data-table th {
    padding: 12px 15px;
  }

  .data-table td {
    padding: 16px 15px;
  }

  .console-section-title {
    margin-top: 26px;
  }

  .console-heading {
    font-size: 16px;
  }

  .console-footer {
    gap: 15px;
  }

  .console-footer > span {
    align-items: start;
    max-width: 220px;
  }

  .filters {
    gap: 10px;
  }

  .filters .filter {
    min-width: calc(50% - 5px);
    flex: 1;
  }

  .filters .filter:last-child {
    max-width: 100%;
    min-width: 100%;
  }

  .usage-summary {
    flex-wrap: wrap;
    gap: 8px 17px;
    margin-bottom: 22px;
  }

  .usage-summary strong {
    font-size: 12px;
  }

  .pagination {
    font-size: 10px;
  }

  .credits-grid {
    gap: 20px;
  }

  .credit-wallet {
    padding: 25px;
    min-height: 240px;
  }

  .topup-panel {
    padding: 23px;
  }

  .settings-block {
    padding: 22px;
  }

  .settings-block-head {
    gap: 20px;
  }

  .device-row {
    gap: 10px;
    flex-wrap: wrap;
  }

  .device-row > .btn {
    font-size: 10px;
    padding-inline: 9px;
  }

  .device-row .device-icon {
    padding: 7px;
  }

  .device-row h3 {
    font-size: 11px;
  }

  /* States and dialogs */
  .state-page {
    min-height: 590px;
  }

  .state-page h1 {
    font-size: 37px;
  }

  .state-page p {
    font-size: 14px;
  }

  .modal-inner {
    padding: 24px;
  }

  .modal h2 {
    font-size: 23px;
  }

  /* Three actions wrap on phones; let each row fill the width. */
  .modal-actions:has(> :nth-child(3)) > .btn {
    flex: 1 1 auto;
  }
}

@media (max-width: 360px) {
  .price-pair b {
    font-size: 30px;
  }

  .price-pair {
    gap: 12px;
  }

  .price-pair > div + div {
    padding-left: 12px;
  }

  .pricing-cards .choice {
    padding: 24px;
  }

  .estimator-inputs,
  .estimate-result {
    padding: 23px;
  }
}

/* 13. Reduced motion ------------------------------------------------------ */

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