/* ==========================================================================
   Design tokens
   ========================================================================== */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --surface-3: #f2f4f7;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #101828;
  --text-2: #344054;
  --muted: #667085;
  --subtle: #98a2b3;

  --primary: #1d4ed8;
  --primary-hover: #1e40af;
  --primary-soft: #eff4ff;
  --primary-ring: rgb(29 78 216 / 18%);
  --on-primary: #ffffff;

  --danger: #d92d20;
  --danger-hover: #b42318;
  --danger-solid: #d92d20;
  --danger-soft: #fef3f2;
  --danger-border: #fecdca;
  --warn: #b54708;
  --warn-soft: #fffaeb;
  --warn-border: #fedf89;
  --ok: #067647;
  --ok-soft: #ecfdf3;
  --ok-border: #abefc6;

  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --shadow-xs: 0 1px 2px rgb(16 24 40 / 5%);
  --shadow-lg: 0 12px 16px -4px rgb(16 24 40 / 8%), 0 4px 6px -2px rgb(16 24 40 / 3%);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

/* Dark theme: follows the system unless the visitor picked a theme with the header toggle (data-theme on <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c111d;
    --surface: #161b26;
    --surface-2: #1b2130;
    --surface-3: #202738;
    --border: #2a3242;
    --border-strong: #364055;
    --text: #f5f5f6;
    --text-2: #cecfd2;
    --muted: #94969c;
    --subtle: #61646c;
    --primary: #528bff;
    --primary-hover: #7aa5ff;
    --primary-soft: #172447;
    --primary-ring: rgb(82 139 255 / 25%);
    --on-primary: #0c111d;
    --danger: #f97066;
    --danger-hover: #fda29b;
    --danger-solid: #b42318;
    --danger-soft: #2d1414;
    --danger-border: #55160c;
    --warn: #fdb022;
    --warn-soft: #2b1d07;
    --warn-border: #4e3a0b;
    --ok: #47cd89;
    --ok-soft: #0b2a1c;
    --ok-border: #074d31;
    --shadow-xs: none;
    --shadow-lg: 0 12px 24px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0c111d;
  --surface: #161b26;
  --surface-2: #1b2130;
  --surface-3: #202738;
  --border: #2a3242;
  --border-strong: #364055;
  --text: #f5f5f6;
  --text-2: #cecfd2;
  --muted: #94969c;
  --subtle: #61646c;
  --primary: #528bff;
  --primary-hover: #7aa5ff;
  --primary-soft: #172447;
  --primary-ring: rgb(82 139 255 / 25%);
  --on-primary: #0c111d;
  --danger: #f97066;
  --danger-hover: #fda29b;
  --danger-solid: #b42318;
  --danger-soft: #2d1414;
  --danger-border: #55160c;
  --warn: #fdb022;
  --warn-soft: #2b1d07;
  --warn-border: #4e3a0b;
  --ok: #47cd89;
  --ok-soft: #0b2a1c;
  --ok-border: #074d31;
  --shadow-xs: none;
  --shadow-lg: 0 12px 24px rgb(0 0 0 / 40%);
  color-scheme: dark;
}

/* ==========================================================================
   Base
   ========================================================================== */
* { box-sizing: border-box; }

body {
  margin: 0;
  font: 14px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--text);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 15px; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
[hidden] { display: none !important; }
.icon { flex: none; display: block; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 14px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  box-shadow: var(--shadow-xs); text-decoration: none;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:focus-visible, .icon-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--primary-ring); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { background: var(--danger-solid); border-color: var(--danger-solid); color: #fff; }
.btn-danger:hover { filter: brightness(0.92); }
.btn-ghost { border-color: transparent; background: transparent; box-shadow: none; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--radius);
  border: 1px solid transparent; background: transparent; color: var(--muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.icon-btn.bordered { border-color: var(--border-strong); background: var(--surface); box-shadow: var(--shadow-xs); }

/* ==========================================================================
   Badges
   ========================================================================== */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  height: 22px; padding: 0 8px; border-radius: 999px;
  font-size: 12px; font-weight: 500; white-space: nowrap;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border);
}
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.8; }
.badge.plain::before { display: none; }
.badge-ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-border); }
.badge-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-border); }
.badge-danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-border); }
.badge-primary { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.badge-neutral { color: var(--muted); }
.count-pill {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; background: var(--danger); color: #fff;
}

.code-chip {
  display: inline-block; font-family: var(--mono); font-size: 13px; font-weight: 500;
  padding: 3px 8px; border-radius: var(--radius-sm);
  background: var(--surface-3); border: 1px solid var(--border); color: var(--text);
  white-space: nowrap;
}

/* ==========================================================================
   Cards, lists, alerts
   ========================================================================== */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); }
.card-header {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--border);
}
.card-header p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.card-body { padding: 20px; }

.list-group { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-xs); overflow: hidden; }
.list-group > * + * { border-top: 1px solid var(--border); }

.alert {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--radius-lg); border: 1px solid;
  font-size: 14px;
}
.alert .icon { margin-top: 2px; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-weight: 600; }
.alert-danger { background: var(--danger-soft); border-color: var(--danger-border); color: var(--danger); }
.alert-danger .alert-body { color: var(--text-2); }
.alert-danger .alert-title { color: var(--danger); }
.alert-warn { background: var(--warn-soft); border-color: var(--warn-border); color: var(--warn); }
.alert-warn .alert-body { color: var(--text-2); }

.empty-state { padding: 48px 24px; text-align: center; color: var(--muted); }
.empty-state .icon { margin: 0 auto 10px; color: var(--subtle); }
.empty-state strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 2px; }

/* ==========================================================================
   Forms
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span:first-child, .field-label { font-size: 13px; font-weight: 500; color: var(--text-2); }
.field .help { font-size: 12px; color: var(--muted); }
.input, input[type=text], input[type=number], input[type=password], input[type=url], input[type=date], input[type=search], select, textarea {
  width: 100%; height: 36px; padding: 0 12px; border-radius: var(--radius);
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-xs); font-size: 14px;
}
textarea { height: auto; min-height: 72px; padding: 8px 12px; resize: vertical; line-height: 1.5; }
select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' 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 10px center; }
input::placeholder, textarea::placeholder { color: var(--subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-ring); }
input[type=checkbox] { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); }
input[type=file] { font-size: 13px; }
.check { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--text-2); cursor: pointer; }

.input-icon { position: relative; }
.input-icon .icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--subtle); pointer-events: none; }
.input-icon input { padding-left: 36px; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
.form-section { display: flex; flex-direction: column; gap: 16px; }
.form-section + .form-section { border-top: 1px solid var(--border); padding-top: 20px; }
.form-section-title { font-size: 13px; font-weight: 600; color: var(--text); }
.form-section-title span { display: block; font-weight: 400; color: var(--muted); margin-top: 2px; }

.errors { color: var(--danger); background: var(--danger-soft); border: 1px solid var(--danger-border); border-radius: var(--radius); padding: 10px 14px; font-size: 13px; }
.errors:empty { display: none; }
.errors ul { margin: 0; padding-left: 18px; }

/* ==========================================================================
   Modal
   ========================================================================== */
dialog.modal {
  width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
  padding: 0; border: 1px solid var(--border); border-radius: 12px;
  background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg);
}
dialog.modal[open] { display: flex; flex-direction: column; }
dialog.modal.modal-lg { width: min(760px, calc(100vw - 32px)); }
dialog.modal.modal-sm { width: min(420px, calc(100vw - 32px)); }
dialog::backdrop { background: rgb(16 24 40 / 55%); }
.modal > form { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.modal-header { display: flex; align-items: flex-start; gap: 12px; padding: 20px 24px 16px; border-bottom: 1px solid var(--border); }
.modal-header > div { flex: 1; min-width: 0; }
.modal-header h3 { font-size: 17px; }
.modal-header p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.modal-body { padding: 20px 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 12px 12px; }

/* ==========================================================================
   Toast
   ========================================================================== */
.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  background: #101828; color: #fff; padding: 10px 16px; border-radius: var(--radius-lg);
  font-size: 13px; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(8px); transition: opacity 0.18s, transform 0.18s; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* ==========================================================================
   Public directory
   ========================================================================== */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.header-actions { display: flex; align-items: center; gap: 4px; margin-right: -6px; }
.header-actions .icon-btn { width: 38px; height: 38px; }
.menu-toggle { display: none; }
.menu-open-only, .site-header.menu-open .menu-closed-only { display: none; }
.site-header.menu-open .menu-open-only { display: revert; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--text); white-space: nowrap; }
.brand:hover { text-decoration: none; }
.logo-mark { width: 30px; height: 30px; flex: none; display: block; }
.site-search { flex: 1; max-width: 440px; margin-left: auto; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { color: var(--text-2); font-weight: 500; padding: 6px 10px; border-radius: var(--radius); }
.site-nav a:hover { background: var(--surface-3); text-decoration: none; }

.page { padding: 32px 0 64px; }
.page-title { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.page-title p { color: var(--muted); margin-top: 6px; font-size: 15px; max-width: 640px; }
.section { margin-top: 32px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-head span { color: var(--muted); font-size: 13px; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 16px; flex-wrap: wrap; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .icon { color: var(--subtle); }
.breadcrumb [aria-current] { color: var(--text-2); font-weight: 500; }

.category-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.category-card {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); color: var(--text); transition: border-color 0.12s, box-shadow 0.12s;
}
.category-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: 0 2px 6px rgb(16 24 40 / 6%); }
.category-card .info { flex: 1; min-width: 0; }
.category-card strong { display: block; font-weight: 600; font-size: 14px; }
.category-card small { color: var(--muted); font-size: 13px; }
.category-card > .icon:last-child { color: var(--subtle); }
.icon-tile { width: 36px; height: 36px; border-radius: var(--radius); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.icon-tile.danger { background: var(--danger-soft); color: var(--danger); }
.avatar { width: 40px; height: 40px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--surface-3); color: var(--text-2); border: 1px solid var(--border); font-weight: 600; font-size: 14px; flex: none; }
.avatar-lg { width: 56px; height: 56px; font-size: 18px; }
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-xs { width: 18px; height: 18px; font-size: 8px; border-radius: 4px; display: inline-grid; vertical-align: -4px; margin-right: 6px; }
/* Logos are drawn on white, so the tile stays white in dark mode too. */
.avatar.has-logo { background: #fff; overflow: hidden; }
.avatar.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

.provider-row { display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--text); }
.provider-row:hover { background: var(--surface-2); text-decoration: none; }
.provider-row .info { flex: 1; min-width: 0; }
.provider-row strong { display: block; font-weight: 600; }
.provider-row small { color: var(--muted); font-size: 13px; }
.provider-row > .icon:last-child { color: var(--subtle); }

.code-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px 20px; align-items: center; padding: 16px 20px; }
.code-row .title { font-weight: 600; font-size: 14px; color: var(--text); }
.code-row .sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.code-row .sub a { color: var(--text-2); font-weight: 500; }
.code-row .badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.code-row .actions { display: flex; gap: 4px; align-items: center; }
.code-row .code-chip { font-size: 14px; }

.provider-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.provider-header .info { flex: 1; min-width: 200px; }
.provider-header p { color: var(--muted); margin-top: 4px; }
.details { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 24px 0 0; }
.details > div { padding: 16px 20px; }
.details > div + div { border-left: 1px solid var(--border); }
.details dt { font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px; }
.details dd { margin: 0; display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.details dd a { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }

.preview { padding: 16px; border-radius: var(--radius-lg); background: var(--surface-3); border: 1px dashed var(--border-strong); text-align: center; }
.preview .label { font-size: 12px; color: var(--muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.preview .value { font-family: var(--mono); font-size: 20px; font-weight: 600; margin-top: 4px; word-break: break-all; }

/* Short pages keep the footer at the bottom of the screen instead of halfway up. */
body.site { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
body.site > main { flex: 1 0 auto; width: 100%; }
.site-footer { border-top: 1px solid var(--border); background: var(--surface); }
.site-footer .container { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 20px; font-size: 13px; color: var(--muted); }

/* ==========================================================================
   Guides
   ========================================================================== */
.site-nav a[aria-current=page] { color: var(--primary); background: var(--primary-soft); }

.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.guide-card {
  display: flex; flex-direction: column; gap: 6px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); color: var(--text); transition: border-color 0.12s, box-shadow 0.12s;
}
.guide-card:hover { text-decoration: none; border-color: var(--border-strong); box-shadow: 0 2px 6px rgb(16 24 40 / 6%); }
.guide-card strong { font-size: 15px; font-weight: 600; line-height: 1.4; }
.guide-card p { color: var(--muted); font-size: 13px; flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.guide-card .more { display: inline-flex; align-items: center; gap: 4px; color: var(--primary); font-size: 13px; font-weight: 500; margin-top: 6px; }
.eyebrow { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--primary); }

.article { max-width: 720px; }
.article header { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.article h1 { font-size: 32px; letter-spacing: -0.02em; margin-top: 8px; }
.article .lede { font-size: 17px; color: var(--text-2); margin-top: 12px; }
.article .meta { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; margin-top: 14px; }

.prose { font-size: 16px; line-height: 1.75; color: var(--text-2); }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: 21px; color: var(--text); margin-top: 2em; }
.prose h3 { font-size: 17px; color: var(--text); margin-top: 1.6em; }
.prose h2 + *, .prose h3 + * { margin-top: 0.6em; }
.prose strong { color: var(--text); font-weight: 600; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: 0.4em; }
.prose a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.prose .embed a:not(.btn) { text-decoration: none; }
.prose blockquote { margin-left: 0; padding: 4px 0 4px 16px; border-left: 3px solid var(--border-strong); color: var(--muted); }
.prose code { font-size: 0.9em; padding: 2px 6px; border-radius: var(--radius-sm); background: var(--surface-3); }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius-lg); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; }
.prose th, .prose td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.prose th { color: var(--text); font-weight: 600; }
.prose .embed { margin: 1.4em 0; font-size: 14px; line-height: 1.5; }

/* ==========================================================================
   Theme toggle: show the icon/label for the theme you'd switch to
   ========================================================================== */
:root[data-theme="dark"] .theme-light-only, :root:not([data-theme="dark"]) .theme-dark-only { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-dark-only { display: revert; }
  :root:not([data-theme="light"]) .theme-light-only { display: none; }
}

/* ==========================================================================
   Directory page content: provider links, intro text, FAQ
   ========================================================================== */
.provider-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 8px; }
.provider-links a {
  display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0;
  padding: 10px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs); color: var(--text); font-weight: 500;
}
.provider-links a > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.provider-links a:hover { text-decoration: none; border-color: var(--border-strong); }
.provider-links .code-chip { flex: none; font-size: 12px; padding: 2px 8px; }
.intro { margin-top: 16px; max-width: 720px; color: var(--text-2); font-size: 15px; }
.faq .prose { max-width: 760px; margin-top: 4px; font-size: 15px; }
.faq .prose h3 { font-size: 16px; }

/* ==========================================================================
   Footer links & consent banner
   ========================================================================== */
.footer-meta { display: block; margin-top: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

.consent {
  position: fixed; left: 24px; bottom: 24px; z-index: 40; max-width: 420px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); padding: 16px 18px; font-size: 13px; color: var(--text-2);
}
.consent strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }
.consent-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .site-header .container { gap: 12px; }
  .brand > span { display: none; }
  .site-nav { display: none; }
  .menu-toggle { display: inline-flex; }
  /* Alert actions drop below the text so it gets the full width (lined up with the text, past the icon). */
  .alert { flex-wrap: wrap; }
  .alert-body { flex-basis: calc(100% - 30px); }
  .alert > .btn { margin-left: 30px; }
  .site-header.menu-open .site-nav {
    display: flex; flex-direction: column; gap: 2px; position: absolute; top: 100%; left: 0; right: 0;
    padding: 8px 16px 16px; background: var(--surface); border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg);
  }
  .site-header.menu-open .site-nav a { padding: 10px 12px; font-size: 15px; }
  .page { padding-top: 20px; }
  h1 { font-size: 20px; }
  .code-row { grid-template-columns: minmax(0, 1fr) auto; }
  .code-row .actions { grid-column: 1 / -1; }
  .article h1 { font-size: 24px; }
  .prose { font-size: 15px; }
  .details > div + div { border-left: 0; border-top: 1px solid var(--border); }
  .form-grid { grid-template-columns: 1fr; }
  .modal-header, .modal-body, .modal-footer { padding-left: 16px; padding-right: 16px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
  .consent { left: 16px; right: 16px; bottom: 16px; max-width: none; }
}
