/* ==========================================================================
   Rivora — inner pages stylesheet
   --------------------------------------------------------------------------
   Loaded after css/style.css on every page except index.html. It only adds
   the components the inner pages need (page hero, docs layout, prose, cards,
   tables, status bars, forms) and reads every colour, radius and shadow from
   the tokens in style.css, so light and dark themes work automatically.

   Contents
     1. Tokens            7. Docs layout, sidebar, table of contents
     2. Page hero         8. Prose (long-form text)
     3. Buttons, links    9. Code panels, API reference
     4. Cards, tiles     10. Changelog, status, careers, blog
     5. Chips, badges    11. Forms, toggles, toast
     6. Lists, tables    12. Utilities, responsive
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  --ok: #15803d;
  --ok-soft: rgb(21 128 61 / 0.1);
  --warn: #b45309;
  --warn-soft: rgb(180 83 9 / 0.1);
  --bad: #dc2626;
  --tide-soft: color-mix(in srgb, var(--color-tide) 10%, transparent);
  --page-pad-top: 148px;
}
:root[data-theme="dark"] {
  --ok: #4ade80;
  --ok-soft: rgb(74 222 128 / 0.12);
  --warn: #fbbf24;
  --warn-soft: rgb(251 191 36 / 0.12);
  --bad: #f87171;
}
@media (min-width: 640px) { :root { --page-pad-top: 184px; } }

body { background: var(--color-ink-900); color: var(--color-fg); }
.page-main { position: relative; z-index: 10; overflow: clip; background: var(--color-ink-900); }

/* ---------- 2. Page hero ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  padding: var(--page-pad-top) 0 72px;
  text-align: center;
}
.page-hero--left { text-align: left; padding-bottom: 48px; }
.page-hero--tight { padding-bottom: 40px; }
.page-hero__glow {
  position: absolute;
  inset: 0 0 auto;
  height: 760px;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.page-hero__glow::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -320px;
  width: 1100px;
  height: 700px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--color-tide) 10%, transparent), transparent);
}
.page-hero h1 { margin-top: 18px; font-size: clamp(2.6rem, 6.6vw, 4.5rem); }
.page-hero--left h1 { font-size: clamp(2.3rem, 5vw, 3.4rem); }
.page-hero .lede {
  margin: 22px auto 0;
  max-width: 56ch;
  font-size: 17.5px;
  line-height: 1.6;
  color: var(--color-fg-muted);
}
.page-hero--left .lede { margin-left: 0; }
.page-hero .actions { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.page-hero--left .actions { justify-content: flex-start; }
.page-hero .meta-line { margin-top: 18px; font-size: 13.5px; color: var(--color-fg-faint); }

.crumbs {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-fg-faint);
}
.crumbs a { transition: color 0.2s var(--ease); }
.crumbs a:hover { color: var(--color-fg); }
.crumbs .sep { opacity: 0.5; }
.crumbs [aria-current] { color: var(--color-tide); }

/* Section heading used inside inner pages (mirrors the landing page sections) */
.sec { padding-block: 80px; }
@media (min-width: 1024px) { .sec { padding-block: 104px; } }
.sec--tight { padding-block: 56px; }
.sec-head { max-width: 760px; margin-inline: auto; text-align: center; }
.sec-head--left { margin-inline: 0; text-align: left; }
.sec-head h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); }
.sec-head p:not(.eyebrow) { margin: 18px auto 0; max-width: 54ch; font-size: 16.5px; line-height: 1.65; color: var(--color-fg-muted); }
.sec-head--left p:not(.eyebrow) { margin-left: 0; }
.sec-body { margin-top: 56px; }
@media (min-width: 1024px) { .sec-body { margin-top: 64px; } }

/* Section dividers: same faded hairline the landing page draws between sections */
.page-main > section.container-page,
.page-main > .divided { position: relative; }
.page-main > section.container-page + section.container-page::before,
.page-main > .divided::before {
  content: "";
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  max-width: 1136px;
  margin-inline: auto;
  border-top: 1px solid var(--color-line-strong);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20%, #000 80%, transparent);
  pointer-events: none;
}
.page-main > section.no-divider::before { display: none; }

/* ---------- 3. Buttons, links ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.012em;
  white-space: nowrap;
  user-select: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 15.5px; }
.btn-primary {
  background: var(--color-fg);
  color: var(--color-ink-950);
  box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.16), 0 1px 2px rgb(9 9 11 / 0.3), 0 4px 12px -4px rgb(9 9 11 / 0.3);
}
.btn-primary:hover { background: color-mix(in srgb, var(--color-fg) 86%, var(--color-tide)); transform: translateY(-1px); }
.btn-secondary { background: var(--surface); color: var(--color-fg); box-shadow: inset 0 0 0 1px var(--color-line-strong), var(--shadow-xs); }
.btn-secondary:hover { background: var(--color-ink-850); transform: translateY(-1px); }
.btn-ghost { color: var(--color-fg-muted); }
.btn-ghost:hover { color: var(--color-fg); background: color-mix(in srgb, var(--color-fg) 5%, transparent); }
:root[data-theme="dark"] .btn-primary { box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.5), 0 1px 2px rgb(0 0 0 / 0.5), 0 6px 20px -6px rgb(139 149 255 / 0.45); }
:root[data-theme="dark"] .btn-secondary { background: color-mix(in srgb, var(--color-fg) 4%, var(--surface)); }
:root[data-theme="dark"] .btn-secondary:hover { background: color-mix(in srgb, var(--color-fg) 8%, var(--surface)); }
.btn:active { transform: scale(0.985); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--color-fg);
  transition: color 0.2s var(--ease);
}
.link-arrow svg { width: 15px; height: 15px; transition: transform 0.3s var(--ease); }
.link-arrow:hover { color: var(--color-tide); }
.link-arrow:hover svg, a:hover > .link-arrow svg, .card-link:hover .link-arrow svg { transform: translateX(3px); }

.pill-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 14px 4px 4px;
  border: 1px solid var(--color-line-strong);
  border-radius: 999px;
  background: var(--surface);
  box-shadow: var(--shadow-xs);
  font-size: 13.5px;
  color: var(--color-fg-muted);
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.pill-link:hover { color: var(--color-fg); border-color: color-mix(in srgb, var(--color-tide) 40%, transparent); }
.pill-link b { padding: 2px 8px; border-radius: 999px; background: var(--tide-soft); color: var(--color-tide); font-size: 12px; font-weight: 600; }

/* ---------- 4. Cards, tiles ---------- */
.grid-2, .grid-3, .grid-4 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.card { padding: 26px; border-radius: var(--r-lg); }
.card-lg { padding: 32px; }
@media (min-width: 1024px) { .card-lg { padding: 40px; } }
.card h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.card p { margin-top: 8px; font-size: 15px; line-height: 1.6; color: var(--color-fg-muted); }
.card .link-arrow { margin-top: 18px; }
.card-link { display: flex; flex-direction: column; height: 100%; }
.card-link:hover { border-color: var(--color-line-strong); }
.card-link .grow-space { flex: 1 1 auto; }

.tile {
  display: grid;
  place-items: center;
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: var(--surface);
  border: 1px solid var(--color-line);
  box-shadow: var(--shadow-sm);
  color: var(--color-tide);
}
.tile svg { width: 19px; height: 19px; }
.tile-lg { width: 48px; height: 48px; border-radius: 13px; }
.tile-lg svg { width: 22px; height: 22px; }
.tile-mono { font: 600 13px/1 var(--font-mono); letter-spacing: -0.02em; color: var(--color-fg); }
.tile + h3 { margin-top: 20px; }

.feature-row { display: flex; gap: 16px; align-items: flex-start; }
.feature-row h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.015em; }
.feature-row p { margin-top: 6px; font-size: 14.5px; line-height: 1.6; color: var(--color-fg-muted); }

.split { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1024px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 72px; }
  .split--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split--center { align-items: center; }
  .sticky-col { position: sticky; top: 32px; }
}

/* Landing-page style stats strip works here too (.stats / .stat from style.css) */
.stats { margin-top: 0; }

/* ---------- 5. Chips, badges ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips--center { justify-content: center; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--color-line-strong);
  background: var(--surface);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-fg-muted);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { color: var(--color-fg); }
.chip[aria-pressed="true"] { background: var(--color-fg); border-color: var(--color-fg); color: var(--color-ink-950); }
.chip .count { font: 500 11.5px/1 var(--font-mono); opacity: 0.7; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 9px;
  border-radius: 6px;
  font: 500 11.5px/1 var(--font-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  background: color-mix(in srgb, var(--color-fg) 6%, transparent);
  color: var(--color-fg-muted);
}
.badge-tide { background: var(--tide-soft); color: var(--color-tide); }
.badge-violet { background: color-mix(in srgb, var(--color-violet) 12%, transparent); color: var(--color-violet); }
.badge-sodium { background: color-mix(in srgb, var(--color-sodium) 13%, transparent); color: var(--color-sodium); }
.badge-coral { background: color-mix(in srgb, var(--color-coral) 12%, transparent); color: var(--color-coral); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.dot { width: 8px; height: 8px; border-radius: 999px; background: currentColor; flex: none; }
.dot-ok { color: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft); }
.dot-warn { color: var(--warn); box-shadow: 0 0 0 4px var(--warn-soft); }

/* ---------- 6. Lists, tables ---------- */
.check-list { display: grid; gap: 12px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; line-height: 1.55; color: var(--color-fg-muted); }
.check-list svg { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--color-tide); }

.table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14.5px; text-align: left; }
.table th { padding: 14px 18px; font: 500 12px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-fg-faint); background: var(--color-ink-850); border-bottom: 1px solid var(--color-line); }
.table td { padding: 14px 18px; border-top: 1px solid var(--color-line); color: var(--color-fg-muted); vertical-align: top; }
.table tr:first-child td { border-top: 0; }
.table td:first-child { color: var(--color-fg); }
.table code { font: 500 13px/1.5 var(--font-mono); color: var(--color-fg); }

.row-list { border: 1px solid var(--color-line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.row-list > * + * { border-top: 1px solid var(--color-line); }
.row-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  transition: background-color 0.2s var(--ease);
}
a.row-item:hover { background: var(--color-ink-850); }
.row-item .row-title { font-size: 15.5px; font-weight: 500; letter-spacing: -0.01em; color: var(--color-fg); }
.row-item .row-sub { margin-top: 3px; font-size: 13.5px; color: var(--color-fg-faint); }
.row-item .row-end { margin-left: auto; display: flex; align-items: center; gap: 12px; color: var(--color-fg-faint); font-size: 13.5px; }
.row-item .row-end svg { width: 16px; height: 16px; transition: transform 0.3s var(--ease); }
a.row-item:hover .row-end svg { transform: translateX(3px); color: var(--color-fg); }

/* Accordion built on <details> */
.accordion { display: grid; gap: 10px; }
.accordion details { border: 1px solid var(--color-line); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--shadow-xs); }
.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  list-style: none;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary .plus { display: grid; place-items: center; width: 28px; height: 28px; flex: none; border-radius: 999px; background: color-mix(in srgb, var(--color-fg) 5%, transparent); color: var(--color-fg-muted); }
.accordion summary .plus svg { width: 14px; height: 14px; transition: transform 0.3s var(--ease); }
.accordion details[open] summary .plus svg { transform: rotate(45deg); }
.accordion .answer { padding: 0 20px 20px; max-width: 64ch; font-size: 15px; line-height: 1.65; color: var(--color-fg-muted); }

/* ---------- 7. Docs layout, sidebar, table of contents ---------- */
.doc-layout { display: grid; gap: 40px; grid-template-columns: minmax(0, 1fr); padding-bottom: 96px; }
@media (min-width: 1024px) { .doc-layout { grid-template-columns: 220px minmax(0, 1fr); gap: 56px; } }
.doc-side { display: none; }
@media (min-width: 1024px) { .doc-side { display: block; position: sticky; top: 32px; align-self: start; max-height: calc(100vh - 64px); overflow-y: auto; scrollbar-width: none; } }
.doc-side { padding-left: 1px; }
.doc-side h4 { margin: 26px 0 10px; font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-fg-faint); }
.doc-side h4:first-child { margin-top: 0; }
/* Sidebar links sit on a thin vertical rail (like "On this page").
   Hover lifts the text colour and draws a short neutral marker on the rail;
   the current section gets a taller accent marker. No background pill. */
.doc-side a {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 0 6px 16px;
  font-size: 14px;
  color: var(--color-fg-muted);
  box-shadow: inset 1px 0 0 var(--color-line);
  transition: color 0.2s var(--ease);
}
.doc-side a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  border-radius: 2px;
  background: var(--color-fg-faint);
  transform: translateY(-50%);
  opacity: 0;
  transition: height 0.3s var(--ease), opacity 0.2s var(--ease), background-color 0.2s var(--ease);
}
.doc-side a:hover { color: var(--color-fg); }
.doc-side a:hover::before { height: 12px; opacity: 0.6; }
.doc-side a[aria-current="page"], .doc-side a.is-active { color: var(--color-fg); }
.doc-side a[aria-current="page"]::before, .doc-side a.is-active::before { height: 18px; opacity: 1; background: var(--color-tide); }
@media (prefers-reduced-motion: reduce) { .doc-side a::before { transition: none; } }
/* The current page's sections are nested under its link */
.doc-side a.has-sub::before { display: none; }
.doc-sub { margin: 2px 0 6px; }
.doc-side .doc-sub a { padding: 5px 0 5px 28px; font-size: 13.5px; color: var(--color-fg-faint); }
.doc-side .doc-sub a:hover, .doc-side .doc-sub a.is-active { color: var(--color-fg); }
.doc-layout .prose { max-width: 760px; }
.doc-side .method { min-width: 42px; }

.doc-mobile-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 8px; scrollbar-width: none; }
@media (min-width: 1024px) { .doc-mobile-nav { display: none; } }


.doc-pager { margin-top: 56px; display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .doc-pager { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.doc-pager a { padding: 18px 20px; border-radius: var(--r-md); }
.doc-pager small { display: block; font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-fg-faint); }
.doc-pager span { display: block; margin-top: 8px; font-size: 15.5px; font-weight: 500; color: var(--color-fg); }
.doc-pager .next { text-align: right; }

/* ---------- 8. Prose (long-form text) ---------- */
.prose { max-width: 720px; font-size: 16px; line-height: 1.75; color: var(--color-fg-muted); }
.prose > * + * { margin-top: 18px; }
.prose h2 { margin-top: 56px; font-family: var(--font-display); font-size: 26px; font-weight: 600; line-height: 1.2; letter-spacing: -0.03em; color: var(--color-fg); scroll-margin-top: 24px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin-top: 36px; font-size: 18.5px; font-weight: 600; line-height: 1.35; letter-spacing: -0.02em; color: var(--color-fg); scroll-margin-top: 24px; }
.prose h2 + *, .prose h3 + * { margin-top: 12px; }
.prose strong { color: var(--color-fg); font-weight: 600; }
.prose a { color: var(--color-fg); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--color-tide) 50%, transparent); text-underline-offset: 3px; transition: text-decoration-color 0.2s var(--ease); }
.prose a:hover { text-decoration-color: var(--color-tide); }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose ul { list-style: none; padding-left: 20px; }
.prose ul > li { position: relative; }
.prose ul > li::before { content: ""; position: absolute; left: -16px; top: 0.72em; width: 5px; height: 5px; border-radius: 2px; transform: rotate(45deg); background: var(--color-tide); opacity: 0.75; }
.prose ol { list-style: decimal; }
.prose ol > li::marker { font: 500 13px var(--font-mono); color: var(--color-fg-faint); }
.prose :not(pre) > code { padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--color-fg) 6%, transparent); font: 500 0.86em/1 var(--font-mono); color: var(--color-fg); }
.prose blockquote { padding: 4px 0 4px 20px; border-left: 2px solid var(--color-tide); font-size: 18px; line-height: 1.6; color: var(--color-fg); }
.prose hr { margin-block: 40px; border: 0; border-top: 1px solid var(--color-line); }
.prose .table-wrap, .prose .code { margin-top: 24px; }
.prose-lg { font-size: 17px; }
.prose a:is(.panel, .btn, .chip, .link-arrow, .card-link) { text-decoration: none; }
.prose a.panel { color: inherit; }
.prose ol.steps { padding-left: 0; }
.prose .grid-2 > *, .prose .doc-pager > * { margin-top: 0; }

.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border: 1px solid color-mix(in srgb, var(--color-tide) 25%, transparent);
  border-radius: var(--r-md);
  background: var(--tide-soft);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-fg-muted);
}
.callout svg { flex: none; width: 18px; height: 18px; margin-top: 3px; color: var(--color-tide); }
.callout strong { color: var(--color-fg); }
.callout-warn { border-color: color-mix(in srgb, var(--warn) 30%, transparent); background: var(--warn-soft); }
.callout-warn svg { color: var(--warn); }

.steps { counter-reset: step; display: grid; gap: 0; }
.steps > li { position: relative; padding: 0 0 32px 52px; list-style: none; }
.steps > li::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  border: 1px solid var(--color-line-strong);
  background: var(--surface);
  font: 500 12px/1 var(--font-mono);
  color: var(--color-sodium);
}
.steps > li::after { content: ""; position: absolute; left: 16px; top: 40px; bottom: 6px; border-left: 1px dashed var(--color-line-strong); }
.steps > li:last-child { padding-bottom: 0; }
.steps > li:last-child::after { display: none; }
.steps h3 { margin-top: 4px !important; }

/* ---------- 9. Code panels, API reference ---------- */
.code { border-radius: var(--r-lg); overflow: hidden; background: var(--surface); border: 1px solid var(--color-line); box-shadow: var(--shadow-md); }
.code-head { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--color-line); }
.code-dots { display: flex; gap: 6px; }
.code-dots i { width: 10px; height: 10px; border-radius: 999px; background: var(--color-ink-600); }
.code-file { font: 500 12.5px/1 var(--font-mono); color: var(--color-fg-faint); }
.code-tabs { display: flex; gap: 2px; }
.code-tabs button { height: 30px; padding: 0 10px; border-radius: 7px; font: 500 12.5px/1 var(--font-mono); color: var(--color-fg-faint); transition: color 0.2s var(--ease), background-color 0.2s var(--ease); }
.code-tabs button:hover { color: var(--color-fg); }
.code-tabs button[aria-selected="true"] { color: var(--color-fg); background: color-mix(in srgb, var(--color-fg) 6%, transparent); }
.copy-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-fg-faint);
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.copy-btn:hover { color: var(--color-fg); background: color-mix(in srgb, var(--color-fg) 5%, transparent); }
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn.is-copied { color: var(--ok); }
.code pre { margin: 0; padding: 20px 22px; overflow-x: auto; font: 400 13.5px/1.8 var(--font-mono); color: color-mix(in srgb, var(--color-fg) 86%, transparent); tab-size: 2; }
.code pre code { font: inherit; background: none; padding: 0; white-space: pre; }
.code [role="tabpanel"][hidden] { display: none; }
.code-inline-cmd { display: flex; align-items: center; gap: 10px; padding: 0 6px 0 16px; height: 46px; border-radius: 12px; border: 1px solid var(--color-line); background: var(--color-ink-850); font: 500 13.5px/1 var(--font-mono); color: var(--color-fg); }
.code-inline-cmd .prompt { color: var(--color-fg-faint); }
.code-inline-cmd span.cmd { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Syntax colours (match the landing page code example) */
.t-k { color: var(--color-violet); }
.t-s { color: var(--color-sodium); }
.t-f { color: var(--color-tide); }
.t-p { color: var(--color-prop); }
.t-c { color: var(--color-fg-faint); font-style: italic; }
.t-n { color: var(--color-coral); }

.method {
  display: inline-grid;
  place-items: center;
  height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.04em;
}
.m-get { background: var(--ok-soft); color: var(--ok); }
.m-post { background: var(--tide-soft); color: var(--color-tide); }
.m-del { background: color-mix(in srgb, var(--color-coral) 12%, transparent); color: var(--color-coral); }
.m-patch { background: color-mix(in srgb, var(--color-sodium) 13%, transparent); color: var(--color-sodium); }

.endpoint { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); padding-block: 56px; border-top: 1px solid var(--color-line); scroll-margin-top: 16px; }
.endpoint:first-of-type { border-top: 0; padding-top: 8px; }
@media (min-width: 1180px) { .endpoint { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; } .endpoint .code { position: sticky; top: 32px; } }
.endpoint-path { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; font: 500 14px/1.4 var(--font-mono); color: var(--color-fg); }
.endpoint h2 { font-size: 24px; }
.params { margin-top: 24px; border-top: 1px solid var(--color-line); }
.params > div { display: grid; gap: 6px; padding: 14px 0; border-bottom: 1px solid var(--color-line); }
.params .p-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; font: 500 13.5px/1.4 var(--font-mono); color: var(--color-fg); }
.params .p-type { font-size: 12.5px; color: var(--color-fg-faint); }
.params .p-req { font: 500 11px/1 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-coral); }
.params p { font-size: 14.5px; line-height: 1.6; color: var(--color-fg-muted); }

/* ---------- 10. Changelog, status, careers, blog ---------- */
.timeline { position: relative; display: grid; gap: 0; }
.release { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); padding: 48px 0; border-top: 1px solid var(--color-line); scroll-margin-top: 24px; }
.release:first-child { border-top: 0; padding-top: 0; }
@media (min-width: 900px) { .release { grid-template-columns: 220px minmax(0, 1fr); gap: 48px; } .release-meta { position: sticky; top: 32px; align-self: start; } }
.release-meta time { display: block; font: 500 13px/1 var(--font-mono); color: var(--color-fg-faint); }
.release-meta .ver { margin-top: 12px; display: inline-flex; }
.release h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.release .visual { margin-top: 22px; height: 220px; border-radius: var(--r-lg); overflow: hidden; }
.release .changes { margin-top: 24px; display: grid; gap: 12px; }
.release .changes li { display: flex; gap: 12px; align-items: baseline; font-size: 15px; line-height: 1.6; color: var(--color-fg-muted); }
.release .changes .badge { flex: none; min-width: 84px; justify-content: center; }

.status-hero { display: flex; align-items: center; gap: 16px; padding: 22px 24px; border-radius: var(--r-lg); border: 1px solid color-mix(in srgb, var(--ok) 30%, transparent); background: linear-gradient(180deg, var(--ok-soft), transparent), var(--surface); box-shadow: var(--shadow-sm); }
.status-hero .tile { color: var(--ok); }
.status-hero h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.status-hero p { margin-top: 2px; font-size: 14px; color: var(--color-fg-muted); }
.uptime-row { padding: 20px 22px; }
.uptime-head { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; }
.uptime-head .pct { margin-left: auto; font: 500 13px/1 var(--font-mono); color: var(--color-fg-faint); }
.bars { display: flex; gap: 2px; height: 34px; margin-top: 14px; }
.bars i { flex: 1 1 0; min-width: 0; border-radius: 2px; background: color-mix(in srgb, var(--ok) 70%, transparent); transition: opacity 0.2s var(--ease), transform 0.2s var(--ease); }
.bars i.minor { background: var(--warn); }
.bars i.major { background: var(--bad); }
.bars i:hover { opacity: 0.7; transform: scaleY(1.08); }
.bars-scale { display: flex; justify-content: space-between; margin-top: 8px; font: 500 11.5px/1 var(--font-mono); color: var(--color-fg-faint); }
@media (max-width: 639px) { .bars i:nth-child(-n+45) { display: none; } }
.incident { padding: 22px 0; border-top: 1px solid var(--color-line); }
.incident:first-child { border-top: 0; padding-top: 0; }
.incident h3 { font-size: 16px; font-weight: 600; letter-spacing: -0.01em; }
.incident .upd { margin-top: 12px; display: grid; gap: 10px; }
.incident .upd p { font-size: 14.5px; line-height: 1.6; color: var(--color-fg-muted); }
.incident .upd b { color: var(--color-fg); font-weight: 600; }
.incident time { font: 500 12px/1 var(--font-mono); color: var(--color-fg-faint); }

.avatar {
  display: grid;
  place-items: center;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--a1, #6d4ee6), var(--a2, #4f46e5));
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-lg { width: 64px; height: 64px; font-size: 20px; }
.avatar-stack { display: flex; }
.avatar-stack .avatar { border: 2px solid var(--surface); }
.avatar-stack .avatar + .avatar { margin-left: -10px; }

/* Abstract covers for blog posts and guides: no images needed */
.cover {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: calc(var(--r-lg) - 4px);
  border: 1px solid var(--color-line);
  background: var(--color-ink-850);
  isolation: isolate;
}
.cover::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(var(--dot) 1px, transparent 1.2px);
  background-size: 14px 14px;
}
.cover::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  background: radial-gradient(40% 50% at var(--cx, 30%) var(--cy, 40%), color-mix(in srgb, var(--cc, var(--color-tide)) 26%, transparent), transparent 70%),
    radial-gradient(35% 45% at calc(100% - var(--cx, 30%)) calc(100% - var(--cy, 40%)), color-mix(in srgb, var(--cc2, var(--color-violet)) 18%, transparent), transparent 70%);
}
.cover svg.art { position: absolute; inset: 0; width: 100%; height: 100%; color: var(--color-fg-faint); }
.cover .cover-label { position: absolute; left: 16px; bottom: 14px; font: 500 12px/1 var(--font-mono); color: var(--color-fg-faint); }
.post-card { display: flex; flex-direction: column; padding: 10px 10px 22px; height: 100%; }
.post-card .post-body { padding: 18px 12px 0; display: flex; flex-direction: column; flex: 1 1 auto; }
.post-card h3 { font-size: 18px; line-height: 1.35; font-weight: 600; letter-spacing: -0.02em; transition: color 0.2s var(--ease); }
.post-card:hover h3 { color: var(--color-tide); }
.post-card p { margin-top: 10px; font-size: 14.5px; line-height: 1.6; color: var(--color-fg-muted); }
.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--color-fg-faint); }
.post-meta .sep { width: 3px; height: 3px; border-radius: 999px; background: currentColor; opacity: 0.6; }
.post-card .post-meta { margin-top: auto; padding-top: 18px; }
.post-featured { display: grid; gap: 0; grid-template-columns: minmax(0, 1fr); padding: 10px; }
@media (min-width: 900px) { .post-featured { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.post-featured .cover { aspect-ratio: auto; min-height: 280px; }
.post-featured .post-body { padding: 24px 18px 18px; display: flex; flex-direction: column; justify-content: center; }
@media (min-width: 900px) { .post-featured .post-body { padding: 32px 36px; } }
.post-featured h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }

.article-head { max-width: 760px; margin-inline: auto; text-align: center; }
.article-head h1 { margin-top: 18px; font-size: clamp(2.2rem, 5vw, 3.4rem); }
.article-author { margin-top: 28px; display: inline-flex; align-items: center; gap: 12px; text-align: left; font-size: 14px; }
.article-author b { display: block; font-weight: 600; color: var(--color-fg); }
.article-author span { color: var(--color-fg-faint); }
.article-cover { max-width: 1040px; margin: 48px auto 0; }
.article-cover .cover { aspect-ratio: 21 / 9; border-radius: var(--r-xl); }
.article-body { max-width: 720px; margin: 64px auto 0; }

/* ---------- 11. Forms, toggles, toast ---------- */
.field { display: grid; gap: 7px; }
.field label { font-size: 13.5px; font-weight: 500; color: var(--color-fg-muted); }
.input, .textarea, .select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--color-line-strong);
  background: var(--surface);
  font-size: 15px;
  color: var(--color-fg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.textarea { height: auto; min-height: 132px; padding: 12px 14px; line-height: 1.55; resize: vertical; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%2385858f' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input:hover, .textarea:hover, .select:hover { border-color: color-mix(in srgb, var(--color-fg) 24%, transparent); }
.input:focus, .textarea:focus, .select:focus { border-color: var(--color-tide); box-shadow: 0 0 0 4px var(--tide-soft) !important; }
.field.has-error .input, .field.has-error .textarea { border-color: var(--color-coral); }
.field .error { font-size: 13px; color: var(--color-coral); }
.form-grid { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } }

.search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin-inline: auto;
}
.search svg { position: absolute; left: 18px; width: 18px; height: 18px; color: var(--color-fg-faint); pointer-events: none; }
.search input {
  width: 100%;
  height: 54px;
  padding: 0 70px 0 50px;
  border-radius: 999px;
  border: 1px solid var(--color-line-strong);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  font-size: 16px;
  color: var(--color-fg);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.search input:focus { border-color: color-mix(in srgb, var(--color-tide) 60%, transparent); box-shadow: 0 0 0 5px var(--tide-soft), var(--shadow-md) !important; }
.search kbd { position: absolute; right: 16px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--color-line-strong); font: 500 11.5px/1 var(--font-mono); color: var(--color-fg-faint); background: var(--color-ink-850); }
.search-sm { max-width: 320px; margin: 0; }
.search-sm input { height: 42px; padding-right: 16px; padding-left: 42px; font-size: 14.5px; box-shadow: var(--shadow-xs); }
.search-sm svg { left: 15px; width: 16px; height: 16px; }

.empty { display: none; padding: 48px 20px; text-align: center; font-size: 15px; color: var(--color-fg-faint); border: 1px dashed var(--color-line-strong); border-radius: var(--r-lg); }
.empty.is-shown { display: block; }
[data-filter-item][hidden] { display: none !important; }

.switch { position: relative; display: inline-flex; flex: none; width: 42px; height: 24px; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; border-radius: 999px; background: var(--color-ink-600); transition: background-color 0.25s var(--ease); }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 999px; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 0.25s var(--ease); }
.switch input:checked + span { background: var(--color-tide); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:disabled + span { opacity: 0.55; }
.switch input:disabled { cursor: not-allowed; }

.form-done { display: none; text-align: center; padding: 24px 8px; }
.form-done.is-shown { display: block; }
.form-done .tile { margin-inline: auto; color: var(--ok); }
.form-done h3 { margin-top: 18px; font-size: 22px; }
.form-done p { margin-top: 8px; color: var(--color-fg-muted); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--color-fg);
  color: var(--color-ink-950);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 16px; height: 16px; }

/* ---------- 12. Utilities, responsive ---------- */
.mono { font-family: var(--font-mono); }
.muted { color: var(--color-fg-muted); }
.faint { color: var(--color-fg-faint); }
.center { text-align: center; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.mt-l { margin-top: 40px; }
.mt-xl { margin-top: 64px; }
.stack-s > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: initial; } }
.text-tide-i { color: var(--color-tide); }
.text-ok { color: var(--ok); }
:is(p, span, h3, div, dt).kicker { margin-bottom: 0; font: 500 12px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-fg-faint); }
.big-number { font-family: var(--font-display); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 600; letter-spacing: -0.045em; line-height: 1; }

/* Simple 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 140px 20px 80px; }
.notfound .code404 { font-family: var(--font-display); font-weight: 600; letter-spacing: -0.07em; line-height: 0.85; font-size: clamp(7rem, 24vw, 15rem); background: linear-gradient(180deg, var(--color-fg), color-mix(in srgb, var(--color-fg) 10%, transparent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .btn, .link-arrow svg, .bars i, .toast { transition: none; }
}
@media print {
  #site-header, footer, .doc-side, .lead-dialog, .page-hero__glow { display: none !important; }
  .page-hero { padding-top: 24px; }
}

/* Category cards that double as filter buttons (help center) */
button.panel.card-link { width: 100%; font: inherit; color: inherit; }
button.panel[aria-pressed="true"] { border-color: color-mix(in srgb, var(--color-tide) 55%, transparent); box-shadow: 0 0 0 4px var(--tide-soft), var(--shadow-xs); }
.h-sub { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }

/* Fine-tuning */
.article-body, .article-cover { text-align: left; }
.release .visual .cover { aspect-ratio: auto; height: 100%; }
.endpoint { align-items: start; }
.endpoint .code pre { font-size: 12.5px; }
.bars i { background: color-mix(in srgb, var(--ok) 55%, var(--surface)); }
.region-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.doc-layout > *, .split > *, .endpoint > *, .steps > li, .release > * { min-width: 0; }

/* ---------- Code blocks: no horizontal scrolling ----------
   Snippets are written to fit the panel line by line. If a screen is narrower
   still, long lines wrap instead of scrolling, and the scrollbar is never shown. */
.code pre {
  overflow-x: hidden;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: normal;
  scrollbar-width: none;
}
.code pre::-webkit-scrollbar { display: none; }
.code pre code { white-space: pre-wrap; }
.code-inline-cmd { height: auto; min-height: 46px; padding-block: 10px; line-height: 1.5; }
.code-inline-cmd span.cmd { overflow: visible; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; flex: 1 1 auto; }
.code-inline-cmd .copy-btn { align-self: center; }
@media (max-width: 639px) {
  .code pre { padding: 18px 16px; font-size: 12.5px; }
  .endpoint .code pre { font-size: 12px; }
}
@media (max-width: 639px) {
  .steps > li { padding-left: 40px; }
  .steps > li::before { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }
  .steps > li::after { left: 14px; top: 36px; }
}

/* ==========================================================================
   13. Design system pass: one type scale, one spacing rhythm
   --------------------------------------------------------------------------
   Type scale (desktop)          Spacing (8 pt rhythm)
   Display  72 / 1.02  -0.045em  Section padding     112 (80 on mobile)
   Doc H1   52 / 1.05  -0.04em   Hero → content       80 (56 on mobile)
   H2       48 / 1.07  -0.038em  Heading → body       80 (56 on mobile)
   H3 lg    28 / 1.2   -0.03em   Card padding         28
   H3       17 / 1.4   -0.02em   Grid gap             20 / 24
   Lede     18 / 1.6             Text measure    ≤ 56–64ch
   Body     16 / 1.7   Small 14.5 / 1.6   Label 12 mono uppercase
   ========================================================================== */
:root {
  --fs-display: clamp(2.75rem, 6.2vw, 4.5rem);
  --fs-doc-h1: clamp(2.25rem, 4.4vw, 3.25rem);
  --fs-h2: clamp(2rem, 4.2vw, 3rem);
  --fs-h3-lg: clamp(1.5rem, 2.6vw, 1.75rem);
  --space-section: 80px;
  --space-hero: 56px;
  --space-head: 56px;
}
@media (min-width: 1024px) {
  :root { --space-section: 112px; --space-hero: 80px; --space-head: 80px; }
}

/* Headings */
.page-hero h1 { font-size: var(--fs-display); line-height: 1.02; letter-spacing: -0.045em; }
.page-hero--left h1, .article-head h1 { font-size: var(--fs-doc-h1); line-height: 1.05; letter-spacing: -0.04em; }
.sec-head h2 { font-size: var(--fs-h2); line-height: 1.07; }
.h-sub, .post-featured h2, .release h2, .endpoint h2 { font-size: var(--fs-h3-lg); line-height: 1.2; letter-spacing: -0.03em; }
.card h3, .feature-row h3, .post-card h3 { font-size: 17px; line-height: 1.4; letter-spacing: -0.02em; font-weight: 600; }
.card p, .feature-row p { font-size: 15px; line-height: 1.6; }
.page-hero .lede { font-size: 18px; line-height: 1.6; max-width: 56ch; }
@media (max-width: 639px) {
  .page-hero .lede { font-size: 17px; }
  .page-hero h1 br, .sec-head h2 br { display: none; }
}
.sec-head p:not(.eyebrow) { font-size: 17px; line-height: 1.6; }

/* Long-form text */
.prose { font-size: 16px; line-height: 1.7; }
.prose h2 { margin-top: 64px; font-size: 28px; line-height: 1.2; letter-spacing: -0.03em; }
.prose h3 { margin-top: 40px; font-size: 19px; }
.prose-lg { font-size: 17px; line-height: 1.7; }

/* Vertical rhythm */
.page-hero { padding-bottom: var(--space-hero); }
.page-hero--tight { padding-bottom: 48px; }
.sec { padding-block: var(--space-section); }
.sec--tight { padding-block: 64px; }
.page-hero + .sec, .page-hero + .sec--tight { padding-top: 0; }
.sec-body { margin-top: var(--space-head); }

/* Cards: one padding, one radius */
.card { padding: 28px; border-radius: var(--r-lg); }
.grid-2, .grid-3, .grid-4 { gap: 20px; }
@media (min-width: 1024px) { .grid-3, .grid-4 { gap: 24px; } }

/* Numbers line up */
.post-meta, .release-meta, .uptime-head .pct, .bars-scale, .stat dd, .big-number, .region-head + dl dd, .count { font-variant-numeric: tabular-nums; }

/* Filter toolbars: chips on the left, search on the right, one row on desktop */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.toolbar .chips { flex: 1 1 auto; }
.toolbar .search-sm { flex: 0 0 280px; }
@media (max-width: 767px) { .toolbar .search-sm { flex: 1 1 100%; max-width: none; } }

/* Covers: gradient and line art only, no background pattern */
.cover::before { display: none; }

/* No focus effects on any element (inputs keep their resting style) */
.input:focus, .textarea:focus, .select:focus { border-color: var(--color-line-strong); box-shadow: none !important; }
.search input:focus { border-color: var(--color-line-strong); box-shadow: var(--shadow-md) !important; }
.search-sm input:focus { box-shadow: var(--shadow-xs) !important; }
/* On small screens, code inside numbered steps uses the full column width */
@media (max-width: 479px) {
  .steps > li .code, .steps > li .code-inline-cmd { margin-left: -40px; }
}

/* ---------- Status: component table with latency sparklines, 30-day incident line ---------- */
.comp-table { border: 1px solid var(--color-line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); overflow: hidden; }
.comp-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: center; padding: 16px 20px; border-top: 1px solid var(--color-line); }
.comp-row:first-child { border-top: 0; }
@media (min-width: 768px) { .comp-row { grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.8fr); } }
.comp-headrow { padding-block: 12px; background: var(--color-ink-850); font: 500 11.5px/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-fg-faint); }
@media (max-width: 767px) { .comp-headrow { display: none; } .comp-up, .comp-spark { grid-column: span 1; } }
.comp-name { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--color-fg); }
.comp-state { font-size: 13.5px; color: var(--ok); justify-self: end; }
@media (min-width: 768px) { .comp-state { justify-self: start; } }
.comp-up { display: flex; align-items: baseline; gap: 6px; font-variant-numeric: tabular-nums; }
.comp-up b { font: 500 14px var(--font-mono); color: var(--color-fg); }
.comp-up span { font-size: 12.5px; color: var(--color-fg-faint); }
.comp-spark { display: flex; align-items: center; gap: 12px; justify-self: end; }
@media (min-width: 768px) { .comp-spark { justify-self: stretch; } }
.comp-spark span { flex: none; min-width: 64px; text-align: right; font: 500 12px var(--font-mono); color: var(--color-fg-faint); }
.spark { flex: 1 1 auto; width: 120px; height: 28px; }
.spark polyline { fill: none; stroke: var(--color-tide); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tl { padding: 20px 22px 18px; border: 1px solid var(--color-line); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-xs); }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.tl-head h3 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.tl-legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--color-fg-faint); }
.tl-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.tl-key { width: 8px; height: 8px; border-radius: 999px; }
.tl-track { position: relative; height: 34px; margin: 18px 6px 0; }
.tl-track::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: 1px solid var(--color-line-strong); }
.tl-track > i { position: absolute; top: calc(50% - 4px); width: 1px; height: 8px; background: var(--color-line-strong); }
.tl-mark { position: absolute; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 999px; border: 2px solid var(--surface); cursor: default; }
.tl-minor, .tl-key.tl-minor { background: var(--warn); }
.tl-major, .tl-key.tl-major { background: var(--bad); }
.tl-mark:hover { transform: scale(1.2); }
.tl-scale { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11.5px/1 var(--font-mono); color: var(--color-fg-faint); }
@media (max-width: 767px) {
  .comp-up { white-space: nowrap; }
  .comp-spark { grid-column: 1 / -1; justify-self: stretch; }
  .comp-spark .spark { width: auto; }
}
