/*
 * curatedapi's one stylesheet, for every host (site, docs, status, dashboard, admin).
 *
 * The design system is shadcn/ui's (https://ui.shadcn.com, MIT licence,
 * copyright 2023 shadcn): its zinc theme colours, radius and type scale, and
 * the classes of its new-york-v4 components (button, card, input, badge,
 * alert, table, breadcrumb), written out as plain CSS so that pages stay
 * server-rendered with no JavaScript framework. Light and dark follow the
 * visitor's system setting.
 *
 * Fonts: Geist Sans and Geist Mono (SIL Open Font License, fonts/OFL.txt),
 * cut down to Latin text, self-hosted.
 */

@font-face {
  font-family: "Geist";
  src: url("fonts/geist-sans-1.8.2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0218-021B, U+02C6, U+02DA, U+02DC, U+2009,
    U+2010-2027, U+2030, U+2032-2033, U+2039-203A, U+20AC, U+20B9, U+2122, U+2190-2193,
    U+2212, U+2248, U+221E, U+2264-2265;
}

@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-1.8.2.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-017F, U+0218-021B, U+02C6, U+02DA, U+02DC, U+2009,
    U+2010-2027, U+2030, U+2032-2033, U+2039-203A, U+20AC, U+20B9, U+2122, U+2190-2193,
    U+2212, U+2248, U+221E, U+2264-2265;
}

/* ------------------------------------------------------------------ tokens */

:root {
  color-scheme: light dark;
  --radius: 0.625rem;
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) * 1.4);

  /* shadcn/ui zinc, light */
  --background: oklch(1 0 0);
  --foreground: oklch(0.141 0.005 285.823);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.141 0.005 285.823);
  --primary: oklch(0.21 0.006 285.885);
  --primary-foreground: oklch(0.985 0 0);
  --secondary: oklch(0.967 0.001 286.375);
  --secondary-foreground: oklch(0.21 0.006 285.885);
  --muted: oklch(0.967 0.001 286.375);
  --muted-foreground: oklch(0.552 0.016 285.938);
  --accent: oklch(0.967 0.001 286.375);
  --accent-foreground: oklch(0.21 0.006 285.885);
  --destructive: oklch(0.577 0.245 27.325);
  --border: oklch(0.92 0.004 286.32);
  --input: oklch(0.92 0.004 286.32);
  --ring: oklch(0.705 0.015 286.067);
  --surface: oklch(0.985 0 0);

  /* Not in shadcn's theme: Tailwind's green, amber and blue, for states and charts. */
  --success: oklch(0.527 0.154 150.069);
  --success-soft: oklch(0.982 0.018 155.826);
  --warning: oklch(0.555 0.163 48.998);
  --warning-soft: oklch(0.987 0.022 95.277);
  --danger-soft: oklch(0.971 0.013 17.38);
  --info: oklch(0.488 0.243 264.376);
  --info-soft: oklch(0.97 0.014 254.604);
  --chart-1: oklch(0.546 0.245 262.881);
  --chart-2: oklch(0.627 0.194 149.214);
  --chart-3: oklch(0.666 0.179 58.318);
  --chart-4: oklch(0.577 0.245 27.325);

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --focus-ring: 0 0 0 3px color-mix(in oklab, var(--ring) 50%, transparent);

  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --header-height: 3.5rem;
  --container: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* shadcn/ui zinc, dark */
    --background: oklch(0.141 0.005 285.823);
    --foreground: oklch(0.985 0 0);
    --card: oklch(0.21 0.006 285.885);
    --card-foreground: oklch(0.985 0 0);
    --primary: oklch(0.92 0.004 286.32);
    --primary-foreground: oklch(0.21 0.006 285.885);
    --secondary: oklch(0.274 0.006 286.033);
    --secondary-foreground: oklch(0.985 0 0);
    --muted: oklch(0.274 0.006 286.033);
    --muted-foreground: oklch(0.705 0.015 286.067);
    --accent: oklch(0.274 0.006 286.033);
    --accent-foreground: oklch(0.985 0 0);
    --destructive: oklch(0.704 0.191 22.216);
    --border: oklch(1 0 0 / 10%);
    --input: oklch(1 0 0 / 15%);
    --ring: oklch(0.552 0.016 285.938);
    --surface: oklch(0.181 0.005 285.823);

    --success: oklch(0.792 0.209 151.711);
    --success-soft: oklch(0.792 0.209 151.711 / 12%);
    --warning: oklch(0.828 0.189 84.429);
    --warning-soft: oklch(0.828 0.189 84.429 / 12%);
    --danger-soft: oklch(0.704 0.191 22.216 / 12%);
    --info: oklch(0.707 0.165 254.624);
    --info-soft: oklch(0.707 0.165 254.624 / 12%);
    --chart-1: oklch(0.707 0.165 254.624);
    --chart-2: oklch(0.792 0.209 151.711);
    --chart-3: oklch(0.828 0.189 84.429);
    --chart-4: oklch(0.704 0.191 22.216);
  }
}

/* -------------------------------------------------------------------- base */

*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + 1rem);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-feature-settings: "rlig" 1, "calt" 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--primary); color: var(--primary-foreground); }

main { flex: 1 0 auto; padding: 2.5rem 0 4rem; }

a { color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }
a:hover { text-decoration-color: currentColor; }
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; text-wrap: balance; }
h1 { font-size: 2.25rem; margin: 0 0 1rem; }
h2 { font-size: 1.5rem; margin: 3rem 0 1rem; }
h3 { font-size: 1.125rem; margin: 1.75rem 0 0.5rem; letter-spacing: -0.015em; }
h4 { font-size: 1rem; margin: 1.25rem 0 0.5rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin: 0.25rem 0; }
li::marker { color: var(--muted-foreground); }
hr { border: 0; border-top: 1px solid var(--border); margin: 2.5rem 0; }
strong { font-weight: 600; }
img, svg { max-width: 100%; }

code, pre, kbd, .mono { font-family: var(--font-mono); font-size: 0.875em; font-variant-ligatures: none; }
/* Inline code keeps the full text colour, even in grey text: grey on the
   code background is below 4.5:1. Inside a link it stays the link's colour. */
:not(pre) > code {
  background: var(--muted);
  color: var(--foreground);
  border-radius: var(--radius-sm);
  padding: 0.125rem 0.375rem;
  font-size: 0.8125em;
  overflow-wrap: anywhere;
}
a > code { color: inherit; }
pre {
  margin: 0 0 1rem;
  padding: 1rem;
  overflow-x: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 0.8125rem;
  line-height: 1.7;
  tab-size: 2;
}
pre code { background: none; padding: 0; font-size: inherit; }

/* Syntax colours for the server-side highlighter (site/highlight.py). */
.tok-key { color: var(--info); }
.tok-str { color: var(--success); }
.tok-num { color: var(--warning); }
.tok-kw { color: var(--chart-4); }
.tok-flag { color: var(--muted-foreground); }
.tok-cmd { font-weight: 600; }
.tok-com { color: var(--muted-foreground); font-style: italic; }

.wrap { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 640px) { .wrap { padding: 0 1.5rem; } }
.narrow { max-width: 46rem; }

.lead { font-size: 1.125rem; line-height: 1.65; color: var(--muted-foreground); max-width: 46rem; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.875rem; line-height: 1.5; }
.xsmall { font-size: 0.75rem; line-height: 1.4; }
.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; }
.nowrap { white-space: nowrap; }
.num, .tabular { font-variant-numeric: tabular-nums; }

.skip-link { position: absolute; left: 1rem; top: -3rem; z-index: 100; padding: 0.5rem 1rem; border-radius: var(--radius-md); background: var(--primary); color: var(--primary-foreground); }
.skip-link:focus { top: 0.5rem; }

/* ------------------------------------------------------------------ header */

header.site {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--background) 95%, transparent);
}
@supports (backdrop-filter: blur(1px)) {
  header.site { background: color-mix(in oklab, var(--background) 80%, transparent); backdrop-filter: saturate(1.8) blur(12px); }
}
header.site .wrap { display: flex; align-items: center; gap: 1.5rem; height: var(--header-height); }
.brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; letter-spacing: -0.02em; text-decoration: none; white-space: nowrap; }
.brand svg { width: 1.5rem; height: 1.5rem; flex: none; }
.brand .tag { font-weight: 500; color: var(--muted-foreground); }
header.site nav { display: flex; align-items: center; gap: 1.25rem; font-size: 0.875rem; }
header.site nav a { color: var(--muted-foreground); text-decoration: none; transition: color 0.15s; }
header.site nav a:hover, header.site nav a.here, header.site nav a[aria-current] { color: var(--foreground); }
header.site nav a.here, header.site nav a[aria-current] { font-weight: 500; }
header.site .actions { margin-left: auto; display: flex; align-items: center; gap: 0.5rem; }
header.site .who { font-size: 0.875rem; color: var(--muted-foreground); max-width: 16rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* The small-screen menu: a <details>, so it opens without JavaScript. */
.menu { display: none; position: relative; }
.menu > summary { list-style: none; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.5rem);
  width: min(18rem, calc(100vw - 2rem));
  padding: 0.5rem;
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
.menu-panel a { display: block; padding: 0.5rem 0.75rem; border-radius: var(--radius-md); font-size: 0.875rem; text-decoration: none; }
.menu-panel a:hover { background: var(--accent); }
.menu-panel hr { margin: 0.5rem 0; }

@media (max-width: 860px) {
  header.site nav.primary, header.site .actions .wide { display: none; }
  .menu { display: block; }
}

/* ----------------------------------------------------------------- buttons */

button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 2.25rem;
  padding: 0 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--primary-foreground);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: background-color 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
}
button:hover, .button:hover { background: color-mix(in oklab, var(--primary) 90%, transparent); }
button:focus-visible, .button:focus-visible { box-shadow: var(--focus-ring); border-radius: var(--radius-md); }
button:disabled { opacity: 0.5; pointer-events: none; }
button svg, .button svg { width: 1rem; height: 1rem; flex: none; }

/* outline (shadcn's "outline"; "secondary" here for older templates) */
button.secondary, .button.secondary, button.outline, .button.outline {
  background: var(--background);
  color: var(--foreground);
  border-color: var(--border);
}
button.secondary:hover, .button.secondary:hover, button.outline:hover, .button.outline:hover { background: var(--accent); color: var(--accent-foreground); }
@media (prefers-color-scheme: dark) {
  button.secondary, .button.secondary, button.outline, .button.outline { background: color-mix(in oklab, var(--input) 30%, transparent); border-color: var(--input); }
  button.secondary:hover, .button.secondary:hover, button.outline:hover, .button.outline:hover { background: color-mix(in oklab, var(--input) 50%, transparent); }
}
button.ghost, .button.ghost { background: transparent; color: var(--foreground); box-shadow: none; }
button.ghost:hover, .button.ghost:hover { background: var(--accent); }
button.danger, .button.danger { background: var(--destructive); color: #fff; }
button.danger:hover, .button.danger:hover { background: color-mix(in oklab, var(--destructive) 90%, transparent); }
@media (prefers-color-scheme: dark) { button.danger, .button.danger { background: color-mix(in oklab, var(--destructive) 60%, transparent); } }
button.sm, .button.sm { height: 2rem; padding: 0 0.75rem; gap: 0.375rem; }
button.lg, .button.lg { height: 2.5rem; padding: 0 1.5rem; }
.button.link { background: none; border: 0; box-shadow: none; padding: 0; height: auto; color: var(--foreground); text-decoration: underline; text-underline-offset: 4px; }
.buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; margin: 1.5rem 0; }
.inline-form { display: inline-flex; align-items: center; gap: 0.5rem; margin: 0; }

/* ------------------------------------------------------------------- cards */

.card {
  background: var(--card);
  color: var(--card-foreground);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}
.card > :first-child { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }
.card h2, .card h3 { margin: 0 0 0.5rem; font-size: 1rem; letter-spacing: -0.01em; }
.card p { font-size: 0.875rem; color: var(--muted-foreground); }
.card a.title { font-weight: 600; text-decoration: none; }
.card a.title::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card.link { position: relative; transition: border-color 0.15s, background-color 0.15s; }
.card.link:hover { border-color: color-mix(in oklab, var(--foreground) 25%, transparent); }
.card.flat { box-shadow: none; }
.card .icon { display: inline-flex; width: 2.25rem; height: 2.25rem; align-items: center; justify-content: center; margin-bottom: 1rem; border-radius: var(--radius-md); background: var(--muted); color: var(--foreground); }
.card .icon svg { width: 1.125rem; height: 1.125rem; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 1fr)); }
.grid.dense { gap: 0.75rem; }

.layout { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) {
  .layout.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .layout.calc { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .layout.calc > .sticky { position: sticky; top: calc(var(--header-height) + 1.5rem); }
}

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: fit-content;
  padding: 0.125rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--secondary-foreground);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  vertical-align: middle;
}
p.badge { margin: 0; }
.badge.outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.badge.good { background: var(--success-soft); color: var(--success); }
.badge.bad { background: var(--danger-soft); color: var(--destructive); }
.badge.warn { background: var(--warning-soft); color: var(--warning); }
.badge.info { background: var(--info-soft); color: var(--info); }
a.badge { text-decoration: none; }
a.badge:hover { border-color: var(--border); }
.dot { display: inline-block; width: 0.5rem; height: 0.5rem; border-radius: 999px; background: currentColor; }

/* ------------------------------------------------------------------ alerts */

.notice {
  position: relative;
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--card);
  color: var(--card-foreground);
  font-size: 0.875rem;
  line-height: 1.55;
}
.notice strong:first-child { font-weight: 600; }
.notice.good { background: var(--success-soft); border-color: color-mix(in oklab, var(--success) 30%, transparent); color: var(--success); }
.notice.warn { background: var(--warning-soft); border-color: color-mix(in oklab, var(--warning) 30%, transparent); color: var(--warning); }
.notice.bad { background: var(--danger-soft); border-color: color-mix(in oklab, var(--destructive) 30%, transparent); color: var(--destructive); }
.notice.info { background: var(--info-soft); border-color: color-mix(in oklab, var(--info) 30%, transparent); color: var(--info); }
.notice a { color: inherit; }
.notice ul { margin: 0.5rem 0 0; }

/* ------------------------------------------------------------------ tables */

.scroll { position: relative; width: 100%; overflow-x: auto; margin: 0 0 1rem; }
table.data { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.scroll > table.data { margin: 0; }
table.data th, table.data td {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}
table.data thead th { height: 2.5rem; vertical-align: middle; font-weight: 500; color: var(--foreground); white-space: nowrap; }
table.data tbody th { font-weight: 500; }
table.data tbody tr { transition: background-color 0.15s; }
table.data tbody tr:hover { background: color-mix(in oklab, var(--muted) 50%, transparent); }
table.data tbody tr:last-child > * { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.data tr.muted td { color: var(--muted-foreground); }
.table-card { border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; margin: 0 0 1rem; }
.table-card .scroll { margin: 0; }
.table-card table.data th:first-child, .table-card table.data td:first-child { padding-left: 1rem; }
.table-card table.data th:last-child, .table-card table.data td:last-child { padding-right: 1rem; }
.table-card table.data thead { background: var(--surface); }

/* ------------------------------------------------------------------- forms */

form.calc { display: grid; gap: 1.25rem; max-width: 40rem; margin: 0 0 1.25rem; }
form.calc .field, .field { display: grid; gap: 0.5rem; }
form.calc label, .field > label { font-size: 0.875rem; font-weight: 500; line-height: 1.2; }
form.calc .help, .help { color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.45; }
/* Cloudflare Turnstile's box keeps its height while it loads, so the form does not jump. */
.bot-check .cf-turnstile { min-height: 65px; max-width: 100%; }
input[type=text], input[type=date], input[type=email], input[type=password], input[type=number],
input[type=search], input[type=url], select, textarea {
  width: 100%;
  min-width: 0;
  height: 2.25rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--input);
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--foreground);
  font: inherit;
  font-size: 1rem;
  box-shadow: var(--shadow-xs);
  transition: color 0.15s, box-shadow 0.15s, border-color 0.15s;
  outline: none;
}
@media (min-width: 768px) {
  input[type=text], input[type=date], input[type=email], input[type=password], input[type=number],
  input[type=search], input[type=url], select, textarea { font-size: 0.875rem; }
}
@media (prefers-color-scheme: dark) {
  input[type=text], input[type=date], input[type=email], input[type=password], input[type=number],
  input[type=search], input[type=url], select, textarea { background: color-mix(in oklab, var(--input) 30%, transparent); }
}
input::placeholder, textarea::placeholder { color: var(--muted-foreground); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ring); box-shadow: var(--focus-ring); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--destructive); }
select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}
select option { background: Canvas; color: CanvasText; }
.inline-form select { width: auto; }
textarea { height: auto; min-height: 5.5rem; padding: 0.5rem 0.75rem; font-family: var(--font-mono); line-height: 1.5; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 1rem; height: 1rem; margin: 0.15rem 0 0; accent-color: var(--primary); flex: none; }
.check { display: flex; gap: 0.625rem; align-items: flex-start; font-weight: 400; font-size: 0.875rem; line-height: 1.45; }
form.calc label.check { font-weight: 400; }
fieldset { margin: 0; padding: 1rem 1.25rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius-lg); display: grid; gap: 1rem; }
legend { padding: 0 0.375rem; margin-left: -0.375rem; font-size: 0.875rem; font-weight: 500; }
form.search { margin: 0 0 1rem; max-width: 24rem; }
/* The rounding options on a calculator form, folded away until asked for */
.more-options { border: 1px solid var(--border); border-radius: var(--radius-lg); }
.more-options > summary { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem 1rem; cursor: pointer; list-style: none; font-size: 0.875rem; font-weight: 500; border-radius: inherit; }
.more-options > summary::-webkit-details-marker { display: none; }
.more-options > summary:hover { background: var(--accent); }
.more-options > summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.more-options fieldset { border: 0; border-top: 1px solid var(--border); border-radius: 0; }
/* the open/close chevron shared by folding boxes */
.more-options > summary::after, .api-group summary::after {
  content: ""; flex: none; width: 0.5rem; height: 0.5rem; margin: 0 0.125rem 0.25rem 0;
  border-right: 1.5px solid var(--muted-foreground); border-bottom: 1.5px solid var(--muted-foreground);
  transform: rotate(45deg); transition: transform 0.15s;
}
.more-options[open] > summary::after, .api-group[open] summary::after { transform: rotate(-135deg); margin-bottom: -0.25rem; }

/* -------------------------------------------------------------- breadcrumb */

.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem 0.625rem; margin: 0 0 1.25rem; padding: 0; list-style: none; font-size: 0.875rem; color: var(--muted-foreground); }
.breadcrumb li { margin: 0; display: inline-flex; align-items: center; gap: 0.625rem; }
.breadcrumb li + li::before { content: ""; width: 0.875rem; height: 0.875rem; background: currentColor; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m9 18 6-6-6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.breadcrumb a { text-decoration: none; transition: color 0.15s; }
.breadcrumb a:hover { color: var(--foreground); }
.breadcrumb [aria-current] { color: var(--foreground); }

/* ------------------------------------------------------------ page blocks */

.page-head { margin-bottom: 2rem; }
.page-head h1 { margin-bottom: 0.75rem; }
.page-head .lead { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 0.5rem; margin-bottom: 1.25rem; padding: 0.25rem 0.75rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8125rem; color: var(--muted-foreground); text-decoration: none; background: var(--background); }
a.eyebrow:hover { color: var(--foreground); border-color: color-mix(in oklab, var(--foreground) 25%, transparent); }
.eyebrow .dot { color: var(--success); }

.hero { display: grid; gap: 2.5rem; align-items: center; padding: 1.5rem 0 1rem; }
.hero h1 { font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.5rem); line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 1.25rem; }
.hero .lead { font-size: 1.125rem; }
@media (min-width: 1024px) { .hero { grid-template-columns: minmax(0, 11fr) minmax(0, 10fr); gap: 3.5rem; } }
.fineprint { margin: -0.5rem 0 0; font-size: 0.8125rem; color: var(--muted-foreground); }

.code-window { border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.code-window .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.625rem 1rem; border-bottom: 1px solid var(--border); font-size: 0.75rem; color: var(--muted-foreground); }
.code-window .bar strong { font-weight: 500; color: var(--foreground); }
.code-window pre { margin: 0; border: 0; border-radius: 0; background: transparent; font-size: 0.78rem; }
.code-window pre + .bar { border-top: 1px solid var(--border); }

/* "How it works" flow on the home page: three steps joined by arrows,
   side by side on wide screens and stacked on phones. No JavaScript. */
.section-head.center { margin-inline: auto; text-align: center; }
.how { padding-top: 4rem; }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 3rem; counter-reset: none; }
.flow-step {
  position: relative; display: flex; flex-direction: column; margin: 0; padding: 1.5rem;
  background: var(--card); color: var(--card-foreground);
  border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm);
}
.flow-step h3 { margin: 0 0 0.375rem; font-size: 1.0625rem; letter-spacing: -0.01em; }
.flow-step > p { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); }
/* the last block of each step sits at the bottom, so the three steps line up */
.flow-step > .flow-end { margin-top: auto; padding-top: 1.25rem; }
.flow-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.25rem; }
.flow-icon { display: inline-flex; width: 2.5rem; height: 2.5rem; align-items: center; justify-content: center; border-radius: var(--radius-md); background: var(--muted); color: var(--foreground); }
.flow-icon svg, .flow-badge svg { width: 1.25rem; height: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.flow-num { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.02em; color: var(--muted-foreground); }
/* the arrow between two steps: a small circle sitting in the gap */
.flow-step + .flow-step::before {
  content: "\2193"; position: absolute; left: 50%; top: -2.375rem; transform: translateX(-50%);
  display: flex; width: 1.75rem; height: 1.75rem; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: 999px; background: var(--background);
  font-size: 0.875rem; line-height: 1; color: var(--muted-foreground);
}
.flow-inputs { border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); overflow: hidden; }
.flow-inputs div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.75rem; }
.flow-inputs div + div { border-top: 1px solid var(--border); }
.flow-inputs dt { font-size: 0.8125rem; color: var(--muted-foreground); }
.flow-inputs dd { margin: 0; font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.flow-main {
  border-color: color-mix(in oklab, var(--success) 40%, var(--border));
  background: linear-gradient(180deg, var(--success-soft), var(--card) 70%);
}
.flow-main .flow-icon { background: color-mix(in oklab, var(--success) 14%, transparent); color: var(--success); }
.flow-badge { display: inline-flex; margin: 0; align-items: center; gap: 0.375rem; padding: 0.375rem 0.75rem; border-radius: 999px; background: color-mix(in oklab, var(--success) 12%, transparent); color: var(--success); font-size: 0.8125rem; font-weight: 500; }
.flow-badge svg { width: 1rem; height: 1rem; stroke-width: 2.25; }
.flow-step > .flow-result { margin: 0.75rem 0 0; }
.flow-big { display: block; font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; color: var(--foreground); font-variant-numeric: tabular-nums; }
.flow-tags { display: flex; flex-wrap: wrap; gap: 0.375rem; list-style: none; margin: 0; padding: 0; }
.flow-tags li { margin: 0; padding: 0.25rem 0.625rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.75rem; color: var(--muted-foreground); }
@media (min-width: 900px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.75rem; align-items: stretch; }
  .flow-step + .flow-step::before { content: "\2192"; left: -2.25rem; top: 50%; transform: translateY(-50%); }
}

/* "All APIs" groups on the home page: each group is a <details> box that
   opens in place to list its APIs. No JavaScript; the links are in the HTML. */
.api-groups { display: grid; gap: 0.625rem; align-items: start; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.api-group { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); transition: border-color 0.15s; }
.api-group[open] { border-color: color-mix(in oklab, var(--foreground) 25%, transparent); box-shadow: var(--shadow-sm); }
.api-group summary { display: flex; align-items: center; gap: 0.75rem; padding: 0.875rem 1rem; cursor: pointer; list-style: none; font-size: 0.9375rem; font-weight: 500; border-radius: inherit; }
.api-group summary::-webkit-details-marker { display: none; }
.api-group summary:hover { background: var(--accent); }
.api-group summary > span:first-child { flex: 1; }
.api-group summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.api-count { min-width: 1.75rem; padding: 0.125rem 0.5rem; border-radius: 999px; background: var(--muted); font-size: 0.75rem; font-weight: 500; text-align: center; color: var(--foreground); font-variant-numeric: tabular-nums; }
.api-group ul { list-style: none; margin: 0; padding: 0.25rem 1rem 0; border-top: 1px solid var(--border); }
.api-group li { margin: 0; }
.api-group li a { display: block; padding: 0.375rem 0; font-size: 0.875rem; color: var(--foreground); text-decoration: none; }
.api-group li a:hover { text-decoration: underline; }
.calc-groups { display: grid; gap: 0.625rem; margin-bottom: 1rem; }
.calc-group-body { padding: 1rem; border-top: 1px solid var(--border); }
.calc-group-body > p { margin: 0 0 1rem; font-size: 0.875rem; color: var(--muted-foreground); max-width: 48rem; }
.calc-group-body > p a { color: var(--foreground); }
.api-group .api-more { margin: 0; padding: 0.5rem 1rem 0.875rem; font-size: 0.8125rem; }
.api-group .api-more a { color: var(--muted-foreground); }
@media (min-width: 1024px) { .grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stats { display: grid; gap: 1px; margin: 3rem 0 0; background: var(--border); border: 1px solid var(--border); border-radius: var(--radius-xl); overflow: hidden; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.stats > div { background: var(--background); padding: 1.25rem 1.5rem; }
.stats .value { display: block; font-size: 1.875rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.stats .name { display: block; margin-top: 0.25rem; font-size: 0.875rem; color: var(--muted-foreground); }

.section { padding: 4.5rem 0 0; }
.section > h2:first-child, .section-head h2 { margin-top: 0; }
.section-head { max-width: 44rem; margin-bottom: 2rem; }
.section-head h2 { font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); letter-spacing: -0.03em; margin-bottom: 0.75rem; }
.section-head p { color: var(--muted-foreground); font-size: 1.0625rem; margin: 0; }
.kicker { display: block; margin-bottom: 0.5rem; font-size: 0.8125rem; font-weight: 500; color: var(--muted-foreground); }

.feature h3 { display: flex; align-items: center; gap: 0.5rem; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.5rem; font-size: 0.875rem; }
.checks li { position: relative; margin: 0; padding-left: 1.5rem; }
.checks li::before { content: ""; position: absolute; left: 0; top: 0.3rem; width: 1rem; height: 1rem; background: var(--success); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat; }

.links { list-style: none; padding: 0; margin: 0.75rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.links li { margin: 0; max-width: 100%; }
/* A long MCP tool name wraps inside its badge instead of widening the page. */
.links .badge { white-space: normal; overflow-wrap: anywhere; height: auto; }
.links a { display: inline-flex; padding: 0.25rem 0.625rem; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 0.8125rem; text-decoration: none; background: var(--background); color: var(--foreground); }
.links a:hover { background: var(--accent); }

.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); }
.steps > li { counter-increment: step; margin: 0; }
.steps > li::before { content: counter(step); display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; margin-bottom: 0.75rem; border-radius: 999px; border: 1px solid var(--border); font-size: 0.8125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.steps h3 { margin: 0 0 0.375rem; font-size: 1rem; }
.steps p { margin: 0; font-size: 0.875rem; color: var(--muted-foreground); }

.cta { margin-top: 4.5rem; padding: 2.5rem 2rem; border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--surface); text-align: center; }
.cta h2 { margin: 0 0 0.75rem; font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem); letter-spacing: -0.03em; }
.cta p { margin: 0 auto; max-width: 36rem; color: var(--muted-foreground); }
.cta .buttons { justify-content: center; margin-bottom: 0; }
.cta.compact { margin-top: 2.5rem; padding: 1.5rem; text-align: left; }
.cta.compact p { margin: 0; }
.cta.compact .buttons { justify-content: flex-start; margin-top: 1rem; }

/* Questions and answers, as <details> so they open without JavaScript. */
.faq { border-top: 1px solid var(--border); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; font-weight: 500; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 1rem; height: 1rem; background: var(--muted-foreground); transition: transform 0.2s; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / contain no-repeat; }
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details > div { padding: 0 0 1rem; color: var(--muted-foreground); font-size: 0.9375rem; }
.faq details > div p:last-child { margin: 0; }

/* Pricing */
.plans { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.plan { display: flex; flex-direction: column; gap: 1rem; }
.plan h3 { margin: 0; font-size: 1rem; }
.plan .price { font-size: 2rem; font-weight: 600; letter-spacing: -0.03em; line-height: 1; color: var(--foreground); }
.plan .price small { font-size: 0.875rem; font-weight: 400; letter-spacing: 0; color: var(--muted-foreground); }
.plan .checks { flex: 1; }
/* Dollars or euros: two hidden radio buttons before .plans, and their labels as
   the switch. The checked one decides which of each price's two spans shows. */
.pricing { display: flex; flex-direction: column; gap: 1rem; }
.pricing + p { margin-top: 1rem; }
.currency-switch { align-self: center; display: inline-flex; gap: 0.125rem; padding: 0.1875rem; background: var(--muted); border-radius: var(--radius-lg); font-size: 0.875rem; }
.currency-switch label { padding: 0.3125rem 0.875rem; border-radius: var(--radius-md); color: color-mix(in oklab, var(--muted-foreground) 70%, var(--foreground)); white-space: nowrap; line-height: 1.5; cursor: pointer; user-select: none; transition: color 0.15s; }
.currency-switch label:hover { color: var(--foreground); }
#currency-usd:checked ~ .currency-switch label[for="currency-usd"],
#currency-eur:checked ~ .currency-switch label[for="currency-eur"] { background: var(--background); color: var(--foreground); font-weight: 500; box-shadow: var(--shadow-xs); }
#currency-usd:focus-visible ~ .currency-switch label[for="currency-usd"],
#currency-eur:focus-visible ~ .currency-switch label[for="currency-eur"] { box-shadow: var(--focus-ring); }
.plans .eur { display: none; }
#currency-eur:checked ~ .plans .usd { display: none; }
#currency-eur:checked ~ .plans .eur { display: inline; }
.plan.featured { border-color: color-mix(in oklab, var(--foreground) 35%, transparent); }

/* Calculator pages */
.result { margin-bottom: 2rem; }
.result-value { font-size: 1rem; font-weight: 500; font-variant-numeric: tabular-nums; word-break: break-all; }
.result table.data tbody th { width: 45%; }
.examples { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.examples li { margin: 0; }
.examples a { display: inline-flex; padding: 0.25rem 0.625rem; border: 1px solid var(--border); border-radius: 999px; font-size: 0.8125rem; text-decoration: none; color: var(--muted-foreground); }
.examples a:hover { color: var(--foreground); background: var(--accent); }
.examples a[aria-current] { color: var(--foreground); border-color: color-mix(in oklab, var(--foreground) 35%, transparent); }
.prose { max-width: 48rem; }
.prose h2 { font-size: 1.25rem; margin: 2.5rem 0 0.75rem; }
.prose h3 { font-size: 1rem; }
.prose > :first-child { margin-top: 0; }
.grid + .prose { margin-top: 2.5rem; }

/* Docs */
.docs { display: grid; gap: 2.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1024px) { .docs { grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; } }
.docs-nav { font-size: 0.875rem; }
.docs-nav h2 { margin: 1.5rem 0 0.5rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--foreground); }
.docs-nav h2:first-child { margin-top: 0; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li { margin: 0; }
.docs-nav a { display: block; padding: 0.3rem 0.5rem; margin-left: -0.5rem; border-radius: var(--radius-md); color: var(--muted-foreground); text-decoration: none; }
.docs-nav a:hover { color: var(--foreground); background: var(--accent); }
.docs-nav a[aria-current] { color: var(--foreground); font-weight: 500; background: var(--accent); }
@media (min-width: 1024px) {
  .docs-nav > div { position: sticky; top: calc(var(--header-height) + 1.5rem); max-height: calc(100vh - var(--header-height) - 3rem); overflow-y: auto; padding-right: 0.5rem; }
}
/* Small screens get the same links in a <details> above the page instead of a sidebar. */
.docs-menu { margin: 0 0 1.5rem; border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: 0.875rem; }
.docs-menu > summary { cursor: pointer; padding: 0.625rem 0.875rem; font-weight: 500; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.docs-menu > summary::-webkit-details-marker { display: none; }
.docs-menu > summary::after { content: "+"; color: var(--muted-foreground); }
.docs-menu[open] > summary::after { content: "\2212"; }
.docs-menu > div { padding: 0 0.875rem 0.75rem; }
.docs-menu h2 { margin: 1rem 0 0.25rem; font-size: 0.75rem; font-weight: 600; letter-spacing: 0; }
.docs-menu ul { list-style: none; margin: 0; padding: 0; columns: 2 12rem; column-gap: 1rem; }
.docs-menu li { margin: 0; break-inside: avoid; }
.docs-menu a { display: block; padding: 0.25rem 0; color: var(--muted-foreground); text-decoration: none; }
.docs-menu a[aria-current] { color: var(--foreground); font-weight: 500; }
@media (min-width: 1024px) { .docs-menu { display: none; } }
@media (max-width: 1023px) { .docs-nav { display: none; } }
.docs-body { min-width: 0; max-width: 52rem; }
.docs-body h2 { padding-top: 0.5rem; }
.docs-body h2 + p, .docs-body h3 + p { margin-top: 0; }
.endpoint + .links { margin-bottom: 1.5rem; }
.endpoint { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 1.25rem; font-size: 0.875rem; }
.method { display: inline-flex; padding: 0.125rem 0.5rem; border-radius: var(--radius-sm); background: var(--info-soft); color: var(--info); font-family: var(--font-mono); font-size: 0.75rem; font-weight: 600; }

/* Dashboard and admin numbers */
.kpis { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); margin: 0 0 1rem; }
.kpi { padding: 1rem 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); }
.kpi .value { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kpi .name { color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.4; }

svg.chart { width: 100%; height: auto; display: block; min-width: 24rem; }
svg.chart.wide { min-width: 40rem; }
svg.chart .axis { stroke: var(--border); }
svg.chart .grid { stroke: var(--border); stroke-dasharray: 2 3; }
svg.chart text { fill: var(--muted-foreground); font-size: 11px; font-family: var(--font-sans); }
svg.chart .s0 { fill: var(--chart-1); }
svg.chart .s1 { fill: var(--chart-2); }
svg.chart .s2 { fill: var(--chart-3); }
svg.chart .s3 { fill: var(--chart-4); }
svg.chart .line { fill: none; stroke: var(--chart-1); stroke-width: 2; }
.legend { display: flex; gap: 0.875rem; flex-wrap: wrap; font-size: 0.8125rem; color: var(--muted-foreground); }
.legend i { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 2px; margin-right: 0.375rem; }
.legend .s0 { background: var(--chart-1); }
.legend .s1 { background: var(--chart-2); }
.legend .s2 { background: var(--chart-3); }
.legend .s3 { background: var(--chart-4); }

.over { color: var(--destructive); font-weight: 600; }
.near { color: var(--warning); font-weight: 600; }
.secret { display: block; margin: 0.5rem 0; padding: 0.5rem 0.75rem; border-radius: var(--radius-md); background: var(--background); color: var(--foreground); border: 1px solid var(--border); font-size: 0.875rem; overflow-wrap: anywhere; }

/* Status page */
.status-now { display: flex; align-items: flex-start; gap: 0.75rem; font-size: 1rem; padding: 1rem 1.25rem; }
.status-now .dot { margin-top: 0.5rem; flex: none; }
.status-body { white-space: pre-line; }
.status-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.status-head p { margin: 0; }
.status-grid { list-style: none; padding: 0; margin: 0.75rem 0; display: grid; grid-template-columns: repeat(90, minmax(0, 1fr)); gap: 2px; }
.status-grid li { height: 2rem; margin: 0; border-radius: 2px; }
.lvl-operational { background: var(--chart-2); }
.lvl-degraded { background: var(--chart-3); }
.lvl-outage { background: var(--chart-4); }
.lvl-none { background: var(--muted); }
.status-legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.status-legend span { display: inline-flex; align-items: center; gap: 0.375rem; }
.status-legend i { display: inline-block; width: 0.625rem; height: 0.625rem; border-radius: 2px; }
@media (max-width: 600px) { .status-grid { gap: 1px; } .status-grid li { height: 1.5rem; } }

/* ------------------------------------------------------------------ footer */

footer.site { border-top: 1px solid var(--border); padding: 3rem 0 2.5rem; font-size: 0.875rem; color: var(--muted-foreground); }
footer.site .cols { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
footer.site .about { grid-column: 1 / -1; max-width: 22rem; }
@media (min-width: 860px) { footer.site .cols { grid-template-columns: 2fr repeat(4, 1fr); } footer.site .about { grid-column: auto; } }
footer.site h2 { margin: 0 0 0.75rem; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; color: var(--foreground); }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin: 0 0 0.5rem; }
footer.site a { color: var(--muted-foreground); text-decoration: none; }
footer.site a:hover { color: var(--foreground); }
footer.site .legal { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); font-size: 0.8125rem; }
footer.site.slim { padding: 1.5rem 0; }
footer.site.slim .legal { margin: 0; padding: 0; border: 0; }


/* ------------------------------------------------------------- additions */

.mark-bg { fill: currentColor; }
.mark-fg { fill: none; stroke: var(--background); stroke-width: 2.25; stroke-linecap: round; }
.menu > summary svg, .card .icon svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.menu > summary { padding: 0 0.5rem; }

/* The dashboard and admin: brand and account on top, sections as tabs below. */
header.site.app .wrap + .wrap { height: auto; }
/* "header.site nav" sets a 1.25rem gap for the marketing menu; the tabs carry
   their own padding, so the gap is reset here. With both, the 11 admin tabs
   ran past the right edge even on a wide screen and "Audit log" was cut off.
   Wide screens: the tabs wrap onto a second row rather than hide. Phones: one
   row that scrolls sideways, faded at the edges so it is clear there is more,
   with the current tab scrolled into view (site.js / admin.js). */
header.site nav.tabs { display: flex; flex-wrap: wrap; gap: 0; margin: 0 -0.625rem; font-size: 0.875rem; }
nav.tabs a { flex: none; padding: 0.5rem 0.625rem 0.625rem; color: var(--muted-foreground); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; transition: color 0.15s; }
nav.tabs a:hover { color: var(--foreground); }
nav.tabs a.here { color: var(--foreground); font-weight: 500; border-bottom-color: var(--foreground); }
@media (max-width: 640px) {
  header.site nav.tabs {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    margin: 0 -1rem; padding: 0 0.375rem;
  }
  header.site nav.tabs::-webkit-scrollbar { display: none; }
  header.site nav.tabs.more-right { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 2.5rem), transparent); }
  header.site nav.tabs.more-left { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 2.5rem), transparent); }
  header.site nav.tabs.more-left.more-right { -webkit-mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); mask-image: linear-gradient(to right, transparent, #000 2.5rem, #000 calc(100% - 2.5rem), transparent); }
}
header.site .actions .who { display: inline-block; vertical-align: middle; }
@media (max-width: 640px) { header.site .who { max-width: 9rem; } }

.card h3 a, .card h2 a { text-decoration: none; }
.card h3 a:hover, .card h2 a:hover { text-decoration: underline; }
.section-head h2 a { text-decoration: none; }
.section-head h2 a:hover { text-decoration: underline; }
.card form.calc { max-width: none; margin: 0; }
.card h2.small { margin: 1.75rem 0 0; font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); }
.card h2.small + .examples { margin-top: 0.625rem; }
.page-head .links { margin-top: 1.25rem; }
.result h2, .layout.calc > section > h2:first-child { margin-top: 0; }
.layout.calc > section:last-child > h2 { font-size: 1.25rem; }
.cta.compact h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.status-notice { margin: 1rem 0; }
.status-notice h2, .status-notice h3 { margin: 0 0 0.25rem; font-size: 1rem; display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }
.status-notice > :last-child { margin-bottom: 0; }
.code-window .bar span code { font-size: 0.7rem; }
.code-window { margin: 0 0 1rem; }
.hero .code-window, .layout .code-window:last-child { margin-bottom: 0; }
pre.formula { white-space: pre-wrap; overflow-wrap: anywhere; }
.pre-line { white-space: pre-line; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ admin */
/* Denser than the public site: many numbers per screen, in cards. */

body.admin main { padding: 1.75rem 0 3rem; }
body.admin h1 { font-size: 1.75rem; margin: 0; letter-spacing: -0.03em; }
body.admin h1.email { font-size: 1.5rem; overflow-wrap: anywhere; }
body.admin h2.group { margin: 1.75rem 0 0.75rem; font-size: 0.8125rem; font-weight: 500; letter-spacing: 0; color: var(--muted-foreground); text-transform: uppercase; }
body.admin .kpis { margin-bottom: 1.25rem; }
body.admin .kpi { padding: 0.875rem 1rem; }
body.admin .kpi .value { font-size: 1.375rem; }
.kpi .sub { margin-top: 0.125rem; font-size: 0.75rem; line-height: 1.4; color: var(--muted-foreground); }
.kpi.bad .value { color: var(--destructive); }
.kpi.warn .value { color: var(--warning); }
.kpi.good .value { color: var(--success); }
.kpis.inset { padding: 1rem 1.25rem 0; }

.ahead { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 0.75rem 1.5rem; margin: 0 0 1.5rem; }
.ahead > div:first-child { min-width: 0; }
.ahead p { margin: 0.375rem 0 0; max-width: 46rem; color: var(--muted-foreground); font-size: 0.875rem; }
.ahead .tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.ahead .tools input[type=search] { width: 15rem; height: 2rem; font-size: 0.8125rem; }
.facts { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 1rem; }
.crumbs { margin: 0 0 0.5rem; }
.crumbs a { color: var(--muted-foreground); text-decoration: none; }
.crumbs a::before { content: "\2190\00a0"; }
.crumbs a:hover { color: var(--foreground); }

.segmented { display: inline-flex; gap: 0.125rem; padding: 0.1875rem; background: var(--muted); border-radius: var(--radius-lg); font-size: 0.8125rem; }
.segmented a { padding: 0.1875rem 0.625rem; border-radius: var(--radius-md); color: var(--muted-foreground); text-decoration: none; white-space: nowrap; line-height: 1.5; }
.segmented a:hover { color: var(--foreground); }
.segmented a[aria-current] { background: var(--background); color: var(--foreground); font-weight: 500; box-shadow: var(--shadow-xs); }

.panel { margin: 0 0 1.25rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); overflow: hidden; scroll-margin-top: 7rem; }
.panel > .head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.25rem 1rem; padding: 0.75rem 1.25rem; border-bottom: 1px solid var(--border); }
.panel > .head h2 { margin: 0; font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.01em; }
.panel > .head .note, .panel > .head a { font-size: 0.8125rem; color: var(--muted-foreground); }
.panel > .head a { text-decoration: none; }
.panel > .head a:hover { color: var(--foreground); text-decoration: underline; }
.panel > .body { padding: 1rem 1.25rem 1.25rem; }
.panel > .body > :last-child, .panel .body form.calc:last-child { margin-bottom: 0; }
.panel .scroll { margin: 0; }
.panel .scroll + .body { border-top: 1px solid var(--border); }
.panel table.data th:first-child, .panel table.data td:first-child { padding-left: 1.25rem; }
.panel table.data th:last-child, .panel table.data td:last-child { padding-right: 1.25rem; }
.panel table.data thead { background: var(--surface); }
.panel table.data tfoot th, .panel table.data tfoot td { border-top: 1px solid var(--border); background: var(--surface); }
.panel table.data tr.current td { background: color-mix(in oklab, var(--info-soft) 60%, transparent); }
.panel .empty { margin: 0; padding: 1.25rem; color: var(--muted-foreground); font-size: 0.875rem; }
.panel .footnote { margin: 0; padding: 0.75rem 1.25rem; border-top: 1px solid var(--border); color: var(--muted-foreground); font-size: 0.8125rem; line-height: 1.5; }
.panel .body .footnote { padding: 0.75rem 0 0; border: 0; }
.panel details.more > summary { padding: 0.75rem 1.25rem; cursor: pointer; font-size: 0.875rem; color: var(--muted-foreground); }
.panel details.more > summary:hover { color: var(--foreground); }
.panel details.more[open] > summary { border-bottom: 1px solid var(--border); }
.panel h3.sub { margin: 0; padding: 0.875rem 1.25rem 0.5rem; font-size: 0.875rem; font-weight: 600; border-top: 1px solid var(--border); }
.panel .body h3.sub { padding: 1rem 0 0.5rem; border: 0; }
.panel .chart-wrap { padding: 0.75rem 1.25rem 1rem; overflow-x: auto; }
.panel .chart-wrap .legend { margin-bottom: 0.25rem; }
.panel .chart-wrap + .scroll { border-top: 1px solid var(--border); }
.panels { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.25rem; }
@media (min-width: 960px) { .panels.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.panels.inset { padding: 0 0 0.25rem; }
.panels > .panel { align-self: start; }

.attention { list-style: none; margin: 0; padding: 0; }
.attention li { display: flex; align-items: baseline; gap: 0.625rem; margin: 0; padding: 0.625rem 1.25rem; border-bottom: 1px solid var(--border); font-size: 0.875rem; }
.attention li:last-child { border-bottom: 0; }
.attention a { text-decoration: none; }
.attention a:hover { text-decoration: underline; }
.attention .dot, .all-clear .dot { flex: none; transform: translateY(-0.05rem); }
.attention .bad .dot { color: var(--destructive); }
.attention .warn .dot { color: var(--warning); }
.attention .info .dot { color: var(--info); }
.attention .bad a { color: var(--destructive); font-weight: 500; }
.all-clear { display: flex; align-items: center; gap: 0.625rem; margin: 0; padding: 0.75rem 1.25rem; font-size: 0.875rem; }
.all-clear .dot { color: var(--success); }
.checklist { list-style: none; margin: 0; padding: 0.375rem 0; }
.checklist li { margin: 0; padding: 0.375rem 1.25rem; font-size: 0.875rem; }

.pill { display: inline-block; min-width: 2.25rem; padding: 0 0.375rem; border-radius: var(--radius-sm); background: var(--muted); font-family: var(--font-mono); font-size: 0.75rem; line-height: 1.25rem; text-align: center; }
.pill.ok { background: var(--success-soft); color: var(--success); }
.pill.client { background: var(--warning-soft); color: var(--warning); }
.pill.server { background: var(--danger-soft); color: var(--destructive); }
svg.meter { display: block; width: 100%; min-width: 3.5rem; height: 4px; margin-top: 0.3rem; }
svg.meter .track { fill: var(--muted); }
svg.meter .fill { fill: var(--chart-1); }
svg.meter.warn .fill { fill: var(--chart-3); }
svg.meter.bad .fill { fill: var(--chart-4); }
td.num svg.meter { margin-left: auto; max-width: 8rem; }
table.funnel td.num .muted { font-size: 0.8125rem; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin: 0 0 1rem; }
.search-row { display: flex; gap: 0.5rem; flex: 1 1 22rem; max-width: 36rem; margin: 0 0 1rem; }
.toolbar .search-row { margin: 0; }
.search-row input { flex: 1; min-width: 0; }
.toc { display: flex; flex-wrap: wrap; gap: 0.375rem; margin: 0 0 1.25rem; font-size: 0.8125rem; }
.toc a { padding: 0.25rem 0.625rem; border: 1px solid var(--border); border-radius: 999px; color: var(--muted-foreground); text-decoration: none; }
.toc a:hover { color: var(--foreground); background: var(--accent); }
dl.kv { display: grid; grid-template-columns: minmax(8rem, max-content) minmax(0, 1fr); gap: 0.5rem 1.5rem; margin: 0 0 1rem; font-size: 0.875rem; }
dl.kv dt { color: var(--muted-foreground); }
dl.kv dd { margin: 0; overflow-wrap: anywhere; }
p.lede { font-size: 1rem; }

.note-form { display: grid; gap: 0.5rem; margin: 0 0 1rem; }
.note-form textarea { min-height: 3.5rem; font-family: var(--font-sans); font-size: 0.875rem; }
ol.notes { list-style: none; margin: 0; padding: 0; }
ol.notes li { margin: 0; padding: 0.75rem 0; border-top: 1px solid var(--border); }
ol.notes .note-body { white-space: pre-line; overflow-wrap: anywhere; font-size: 0.875rem; }
ol.notes .note-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.25rem; color: var(--muted-foreground); font-size: 0.75rem; }
ol.notes .note-meta button { height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; color: var(--muted-foreground); }
details.more > summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; }
details.more[open] > summary { margin-bottom: 1rem; }
.search-row select { flex: 0 1 14rem; width: auto; min-width: 0; }
.toolbar .search-row:has(select) { max-width: 48rem; }
.panel table.data tr.detail td { padding-top: 0; border-top: 0; color: var(--muted-foreground); }
.card.signin { max-width: 26rem; margin: 2.5rem auto; padding: 1.75rem; }
.card.signin h1 { margin: 0 0 0.375rem; font-size: 1.5rem; }
.card.signin form.calc { margin-top: 1.25rem; }
button.block { width: 100%; }

header.site .header-search input { width: 17rem; height: 2rem; font-size: 0.8125rem; }
@media (max-width: 860px) { header.site .header-search { display: none; } }
/* On a phone the address beside "Sign out" pushed the page wider than the
   screen; it is on the Settings page anyway. */
@media (max-width: 520px) {
  header.site.app .who { display: none; }
  main .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
}

/* The live feed: times and endpoints in mono, the rest in the page font. */
.feed { font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.feed td.mono { font-size: 0.75rem; white-space: nowrap; }
.scroll.tall { max-height: 32rem; overflow-y: auto; }
.scroll.tall thead th { position: sticky; top: 0; z-index: 1; background: var(--card); }

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

@media print {
  header.site, footer.site, .menu, .cta, form.calc button { display: none !important; }
  main { padding: 0; }
  pre, .card { box-shadow: none; }
}

/* Admin overview: the verdict, the health strip, number tiles with trends. */
.verdict > .head h2 { display: flex; align-items: center; gap: 0.625rem; font-size: 1.0625rem; }
.verdict > .head .dot { width: 0.625rem; height: 0.625rem; }
.verdict.good > .head .dot { color: var(--success); box-shadow: 0 0 0 4px var(--success-soft); }
.verdict.warn > .head .dot { color: var(--warning); box-shadow: 0 0 0 4px var(--warning-soft); }
.verdict.bad > .head .dot { color: var(--destructive); box-shadow: 0 0 0 4px var(--danger-soft); }
.verdict.bad { border-color: color-mix(in oklab, var(--destructive) 45%, var(--border)); }
.verdict.warn { border-color: color-mix(in oklab, var(--warning) 35%, var(--border)); }
.verdict .all-clear { color: var(--muted-foreground); }
.health-strip { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); list-style: none; margin: 0 0 1.25rem; padding: 0; }
.health-strip li { margin: 0; }
.health-strip a { display: flex; flex-direction: column; gap: 0.125rem; height: 100%; padding: 0.75rem 1rem; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); color: var(--foreground); text-decoration: none; transition: border-color 0.15s; }
.health-strip a:hover { border-color: color-mix(in oklab, var(--foreground) 25%, var(--border)); }
.health-strip .name { display: flex; align-items: center; gap: 0.5rem; color: var(--muted-foreground); font-size: 0.75rem; font-weight: 500; }
.health-strip .text { font-size: 0.875rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.health-strip .good .dot { color: var(--success); }
.health-strip .warn .dot { color: var(--warning); }
.health-strip .bad .dot { color: var(--destructive); }
.health-strip .off .dot { color: var(--muted-foreground); opacity: 0.5; }
.health-strip .bad a { background: var(--danger-soft); border-color: color-mix(in oklab, var(--destructive) 35%, transparent); }
.health-strip .bad .text { color: var(--destructive); }
.health-strip .warn .text { color: var(--warning); }
.health-strip .off .text { color: var(--muted-foreground); font-weight: 400; }
.kpis.trends { grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); }
body.admin .kpi.trend { display: flex; flex-direction: column; padding: 1rem 1.125rem 0.875rem; }
.kpi.trend .name { color: var(--muted-foreground); font-size: 0.8125rem; font-weight: 500; }
body.admin .kpi.trend .value { margin: 0.125rem 0 0.375rem; font-size: 1.625rem; }
.kpi.trend .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 0.75rem; margin-top: auto; }
.kpi.trend .foot > div { min-width: 0; }
.delta { display: inline-block; font-size: 0.75rem; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--muted-foreground); }
.delta.good { color: var(--success); }
.delta.bad { color: var(--destructive); }
svg.spark { flex: none; width: 7rem; height: 2rem; overflow: visible; }
svg.spark .area { opacity: 0.16; }
svg.spark path.line { fill: none; stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.note.live { display: inline-flex; align-items: center; gap: 0.375rem; font-variant-numeric: tabular-nums; }
.note.live strong { color: var(--foreground); font-weight: 600; }
.pulse { width: 0.5rem; height: 0.5rem; border-radius: 999px; background: var(--success); box-shadow: 0 0 0 0 color-mix(in oklab, var(--success) 50%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
#traffic > .head { align-items: center; }

/* Charts: series colours for lines, points, gradients and the muted series. */
svg.chart .sm, .legend .sm, svg.spark .sm { fill: color-mix(in oklab, var(--muted-foreground) 45%, transparent); background: color-mix(in oklab, var(--muted-foreground) 45%, transparent); }
svg.chart path.line, svg.spark path.line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.chart path.line { stroke-width: 2; }
svg.chart path.line.s0, svg.spark path.line.s0 { stroke: var(--chart-1); }
svg.chart path.line.s1, svg.spark path.line.s1 { stroke: var(--chart-2); }
svg.chart path.line.s2, svg.spark path.line.s2 { stroke: var(--chart-3); }
svg.chart path.line.s3, svg.spark path.line.s3 { stroke: var(--chart-4); }
svg.spark .s0 { fill: var(--chart-1); }
svg.spark .s1 { fill: var(--chart-2); }
svg.spark .s2 { fill: var(--chart-3); }
svg.spark .s3 { fill: var(--chart-4); }
svg.chart stop.s0 { stop-color: var(--chart-1); }
svg.chart stop.s1 { stop-color: var(--chart-2); }
svg.chart stop.s2 { stop-color: var(--chart-3); }
svg.chart stop.s3 { stop-color: var(--chart-4); }
svg.chart .pt { stroke: var(--card); stroke-width: 2; }
svg.chart .grid { stroke: color-mix(in oklab, var(--border) 80%, transparent); stroke-dasharray: none; }
svg.chart .hit { fill: transparent; }
svg.chart .hit:hover, svg.chart .hit.on { fill: color-mix(in oklab, var(--foreground) 5%, transparent); }
.chart-tip { position: fixed; z-index: 50; pointer-events: none; min-width: 8rem; padding: 0.5rem 0.625rem; background: var(--background); color: var(--foreground); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-md, 0 4px 12px rgb(0 0 0 / 0.12)); font-size: 0.75rem; line-height: 1.5; font-variant-numeric: tabular-nums; }
.chart-tip[hidden] { display: none; }
.chart-tip .t { margin-bottom: 0.125rem; font-weight: 600; }
.chart-tip .r { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted-foreground); }
.chart-tip .r b { color: var(--foreground); font-weight: 500; }

/* More languages under a code sample, as <details> so they open without JavaScript. */
.code-more { margin-top: 0.75rem; }
.code-more summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; color: var(--muted-foreground); }
.code-more[open] summary { margin-bottom: 0.5rem; }

/* The free invoice check on a validator page. */
.card.invoice-check { margin: 0 0 1.5rem; }
.card.invoice-check form.calc { margin: 1rem 0 0; }
.card.invoice-check textarea { height: auto; min-height: 6rem; padding: 0.5rem 0.75rem; font-family: var(--font-mono); font-size: 0.8125rem; }
.card.invoice-check input[type=file] { font: inherit; font-size: 0.875rem; color: var(--foreground); }
.result#report { margin-bottom: 2rem; }
#report td code { white-space: nowrap; }
.code-more + p { margin-top: 1rem; }
