/* =================================================================
   ABc — Hospitality Operations Platform
   Documentation Design System
   ================================================================= */

/* ---------- Design Tokens ---------- */
:root {
  /* Brand */
  --brand-50:  #eef2ff;
  --brand-100: #e0e7ff;
  --brand-200: #c7d2fe;
  --brand-300: #a5b4fc;
  --brand-400: #818cf8;
  --brand-500: #6366f1;
  --brand-600: #4f46e5;
  --brand-700: #4338ca;
  --brand-800: #3730a3;
  --brand-900: #312e81;

  --accent-400: #fb7185;
  --accent-500: #f43f5e;
  --accent-600: #e11d48;

  --teal-500: #14b8a6;
  --emerald-500: #10b981;
  --amber-500: #f59e0b;
  --rose-500: #f43f5e;
  --sky-500: #0ea5e9;
  --violet-500: #8b5cf6;
  --fuchsia-500: #d946ef;

  /* Neutrals (Light) */
  --bg: #fafafa;
  --bg-elev: #ffffff;
  --bg-subtle: #f4f4f5;
  --bg-muted: #e4e4e7;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --code-bg: #0f172a;
  --code-text: #e2e8f0;

  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 12px 40px rgba(15, 23, 42, 0.10);
  --shadow-brand: 0 8px 30px rgba(99, 102, 241, 0.20);

  /* Layout */
  --sidebar-w: 280px;
  --toc-w: 240px;
  --header-h: 64px;
  --max-content: 880px;

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  /* Type */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', ui-monospace, monospace;
}

[data-theme="dark"] {
  --bg: #09090b;
  --bg-elev: #18181b;
  --bg-subtle: #1c1c1f;
  --bg-muted: #27272a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --code-bg: #0a0a0e;
  --code-text: #e4e4e7;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow: 0 4px 14px rgba(0,0,0,0.45);
  --shadow-lg: 0 16px 50px rgba(0,0,0,0.6);
  --shadow-brand: 0 8px 30px rgba(99, 102, 241, 0.35);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 24px); }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--brand-600); text-decoration: none; transition: color .15s; }
a:hover { color: var(--brand-700); }
[data-theme="dark"] a { color: var(--brand-400); }
[data-theme="dark"] a:hover { color: var(--brand-300); }

img, svg { max-width: 100%; display: block; }
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* ---------- Layout ---------- */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  backdrop-filter: saturate(180%) blur(10px);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
}
.header__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.header__brand .dot {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500));
  display: grid;
  place-items: center;
  color: white;
  font-size: 14px;
  box-shadow: var(--shadow-brand);
}
.header__chip {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--brand-50);
  color: var(--brand-700);
}
[data-theme="dark"] .header__chip { background: rgba(99,102,241,0.15); color: var(--brand-300); }

.header__spacer { flex: 1; }

.header__search {
  position: relative;
  width: 320px;
  max-width: 40vw;
}
.header__search input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.header__search input:focus {
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.header__search::before {
  content: '';
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 14px; height: 14px;
  background: no-repeat center / contain 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%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
}
.header__kbd {
  position: absolute;
  right: 8px; top: 50%;
  transform: translateY(-50%);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-muted);
  color: var(--text-faint);
}

.theme-toggle {
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  display: grid; place-items: center;
  color: var(--text-muted);
  transition: all .15s;
}
.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }

/* ---------- Sidebar ---------- */
.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  width: var(--sidebar-w);
  border-right: 1px solid var(--border);
  background: var(--bg-elev);
  overflow-y: auto;
  padding: 18px 14px 60px;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: var(--bg-muted); border-radius: 4px; }

.sidebar__section {
  margin-top: 22px;
}
.sidebar__section:first-child { margin-top: 8px; }
.sidebar__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  padding: 0 10px;
  margin-bottom: 6px;
}
.sidebar__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border-radius: 6px;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: all .12s;
}
.sidebar__link:hover {
  background: var(--bg-subtle);
  color: var(--text);
}
.sidebar__link.is-active {
  background: var(--brand-50);
  color: var(--brand-700);
  font-weight: 600;
}
[data-theme="dark"] .sidebar__link.is-active {
  background: rgba(99,102,241,0.12);
  color: var(--brand-300);
}
.sidebar__link.is-active::before {
  content: '';
  position: absolute;
  left: -14px;
  top: 6px; bottom: 6px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand-500);
}
.sidebar__icon {
  width: 16px; height: 16px;
  display: grid; place-items: center;
  flex-shrink: 0;
  opacity: 0.85;
}

/* ---------- Main Content ---------- */
.main {
  min-width: 0;
  position: relative;
}
.content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--toc-w);
  gap: 56px;
  padding: 48px 56px 96px;
  max-width: 1280px;
  margin: 0 auto;
}
.content.no-toc {
  grid-template-columns: minmax(0, 1fr);
}
.article { min-width: 0; max-width: var(--max-content); }

/* ---------- TOC ---------- */
.toc {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  font-size: 13px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.toc__title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  margin-bottom: 12px;
}
.toc a {
  display: block;
  padding: 5px 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
  border-left: 2px solid transparent;
  padding-left: 12px;
  margin-left: -14px;
  transition: all .12s;
}
.toc a:hover { color: var(--text); }
.toc a.is-active {
  color: var(--brand-600);
  border-left-color: var(--brand-500);
  font-weight: 500;
}
[data-theme="dark"] .toc a.is-active { color: var(--brand-400); }
.toc a.toc--h3 { padding-left: 24px; font-size: 12.5px; }

/* ---------- Typography ---------- */
.article h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 40px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 12px;
}
.article h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 56px 0 16px;
  scroll-margin-top: calc(var(--header-h) + 32px);
}
.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  margin: 36px 0 12px;
  scroll-margin-top: calc(var(--header-h) + 32px);
}
.article h4 {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 28px 0 12px;
}
.article p {
  margin: 12px 0 16px;
  color: var(--text);
}
.article p.lead {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 28px;
}
.article ul, .article ol {
  padding-left: 22px;
  margin: 12px 0 20px;
}
.article li { margin: 6px 0; }
.article li::marker { color: var(--brand-500); }

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

/* Inline code */
.article p code,
.article li code,
.article td code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1px 6px;
  border-radius: 4px;
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs {
  display: flex;
  gap: 8px;
  font-size: 13px;
  color: var(--text-faint);
  margin-bottom: 18px;
}
.breadcrumbs a { color: var(--text-faint); }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs .sep { opacity: 0.5; }

/* ---------- Hero (Home) ---------- */
.hero {
  position: relative;
  padding: 56px 56px 64px;
  background:
    radial-gradient(800px 320px at 10% 0%, rgba(99,102,241,0.15), transparent 60%),
    radial-gradient(700px 280px at 90% 20%, rgba(139,92,246,0.13), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}
.hero__inner {
  max-width: 1180px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 16px;
}
[data-theme="dark"] .hero__eyebrow { background: rgba(99,102,241,0.15); color: var(--brand-300); }
.hero__eyebrow .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 0 rgba(16,185,129,0.5);
  animation: pulse 1.8s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5); }
  70% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}
.hero h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 56px;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 18px;
  max-width: 780px;
}
.hero h1 .grad {
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500) 55%, var(--accent-500));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__sub {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 0 28px;
}
.hero__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}
.btn--primary {
  background: linear-gradient(135deg, var(--brand-600), var(--violet-500));
  color: white;
  box-shadow: var(--shadow-brand);
}
.btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 36px rgba(99,102,241,0.32);
  color: white;
}
.btn--ghost {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border);
}
.btn--ghost:hover { border-color: var(--border-strong); color: var(--text); }

/* Hero stats */
.hero__stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px dashed var(--border);
}
.hero__stat .v {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero__stat .l {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all .18s;
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.card a.card__link { position: absolute; inset: 0; }
.card__icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: grid; place-items: center;
  margin-bottom: 16px;
  color: white;
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500));
}
.card__icon.alt-1 { background: linear-gradient(135deg, var(--emerald-500), var(--teal-500)); }
.card__icon.alt-2 { background: linear-gradient(135deg, var(--amber-500), var(--accent-500)); }
.card__icon.alt-3 { background: linear-gradient(135deg, var(--sky-500), var(--brand-500)); }
.card__icon.alt-4 { background: linear-gradient(135deg, var(--accent-500), var(--fuchsia-500)); }
.card__icon.alt-5 { background: linear-gradient(135deg, var(--violet-500), var(--brand-700)); }
.card h3 {
  font-family: var(--font-display);
  font-size: 17px;
  margin: 0 0 8px;
  font-weight: 600;
}
.card p { color: var(--text-muted); font-size: 14px; margin: 0; line-height: 1.55; }
.card__tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--brand-700);
  background: var(--brand-50);
  padding: 3px 8px;
  border-radius: 4px;
  margin-top: 12px;
}
[data-theme="dark"] .card__tag { background: rgba(99,102,241,0.12); color: var(--brand-300); }

.grid {
  display: grid;
  gap: 20px;
}
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 980px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* Section header */
.section {
  margin: 64px 0;
}
.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 16px;
}
.section__head .eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--brand-600);
  margin-bottom: 4px;
}
.section__head h2 {
  font-family: var(--font-display);
  font-size: 28px; letter-spacing: -0.02em; margin: 0;
  font-weight: 700;
}
.section__head p {
  color: var(--text-muted);
  margin: 8px 0 0;
  max-width: 600px;
}

/* ---------- Callouts ---------- */
.callout {
  display: flex;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  margin: 20px 0;
}
.callout__icon {
  flex-shrink: 0;
  width: 22px; height: 22px;
  display: grid; place-items: center;
}
.callout__body { flex: 1; }
.callout__body strong { display: block; margin-bottom: 4px; font-size: 14px; }
.callout__body p { margin: 0; font-size: 14px; color: var(--text-muted); }
.callout--info { background: rgba(14,165,233,0.07); border-color: rgba(14,165,233,0.25); }
.callout--info .callout__icon { color: var(--sky-500); }
.callout--warn { background: rgba(245,158,11,0.07); border-color: rgba(245,158,11,0.3); }
.callout--warn .callout__icon { color: var(--amber-500); }
.callout--success { background: rgba(16,185,129,0.07); border-color: rgba(16,185,129,0.3); }
.callout--success .callout__icon { color: var(--emerald-500); }
.callout--danger { background: rgba(244,63,94,0.07); border-color: rgba(244,63,94,0.3); }
.callout--danger .callout__icon { color: var(--rose-500); }

/* ---------- Code Blocks ---------- */
.code {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
  margin: 20px 0;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.05);
}
.code__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  color: rgba(255,255,255,0.65);
}
.code__head .dots { display: flex; gap: 6px; }
.code__head .dots span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,0.15); }
.code__lang {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--brand-300);
}
.code pre {
  margin: 0;
  padding: 18px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.65;
  color: var(--code-text);
  overflow-x: auto;
}
.code pre .k { color: #c084fc; }
.code pre .s { color: #86efac; }
.code pre .n { color: #fcd34d; }
.code pre .c { color: #64748b; font-style: italic; }
.code pre .f { color: #60a5fa; }
.code pre .o { color: #f472b6; }
.code pre .t { color: #5eead4; }

/* ---------- Tables ---------- */
.tbl {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 20px 0;
  font-size: 14px;
}
.tbl th {
  background: var(--bg-subtle);
  text-align: left;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
  color: var(--text-muted);
}
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr:hover td { background: var(--bg-subtle); }
.tbl td strong { color: var(--text); }

/* ---------- Pills / badges ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.pill--brand { background: var(--brand-50); color: var(--brand-700); border-color: rgba(99,102,241,0.2); }
.pill--success { background: rgba(16,185,129,0.1); color: #047857; border-color: rgba(16,185,129,0.25); }
.pill--warn { background: rgba(245,158,11,0.1); color: #b45309; border-color: rgba(245,158,11,0.25); }
.pill--rose { background: rgba(244,63,94,0.1); color: #be123c; border-color: rgba(244,63,94,0.25); }
.pill--sky { background: rgba(14,165,233,0.1); color: #0369a1; border-color: rgba(14,165,233,0.25); }
[data-theme="dark"] .pill--brand { background: rgba(99,102,241,0.15); color: var(--brand-300); }
[data-theme="dark"] .pill--success { background: rgba(16,185,129,0.15); color: #6ee7b7; }
[data-theme="dark"] .pill--warn { background: rgba(245,158,11,0.15); color: #fcd34d; }
[data-theme="dark"] .pill--rose { background: rgba(244,63,94,0.15); color: #fda4af; }
[data-theme="dark"] .pill--sky { background: rgba(14,165,233,0.15); color: #7dd3fc; }

/* ---------- Steps / Numbered Lists ---------- */
.steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  display: grid;
  gap: 16px;
  margin: 24px 0;
}
.steps li {
  counter-increment: step;
  padding: 18px 18px 18px 60px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 16px; top: 16px;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500));
  color: white;
  display: grid; place-items: center;
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 14px;
}
.steps li h4 { margin: 0 0 6px; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 15px; font-weight: 600; }
.steps li p { margin: 0; font-size: 14px; color: var(--text-muted); }

/* ---------- Flow Diagrams ---------- */
.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  overflow-x: auto;
}
.flow__node {
  background: var(--bg-elev);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}
.flow__node .ic { width: 16px; height: 16px; color: var(--brand-500); }
.flow__node.brand { background: var(--brand-50); border-color: var(--brand-300); color: var(--brand-700); }
.flow__node.success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.4); color: #047857; }
.flow__node.warn { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.4); color: #b45309; }
.flow__arrow {
  display: inline-flex;
  align-items: center;
  margin: 0 6px;
  color: var(--text-faint);
  font-weight: 700;
}
[data-theme="dark"] .flow__node.brand { background: rgba(99,102,241,0.12); color: var(--brand-300); border-color: rgba(99,102,241,0.4); }
[data-theme="dark"] .flow__node.success { color: #6ee7b7; }
[data-theme="dark"] .flow__node.warn { color: #fcd34d; }

/* ---------- Mock UI ---------- */
.mock {
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-elev);
  box-shadow: var(--shadow-lg);
  margin: 24px 0;
}
.mock__bar {
  background: var(--bg-subtle);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}
.mock__bar .d {
  width: 10px; height: 10px; border-radius: 50%;
}
.mock__bar .d.r { background: #ef4444; }
.mock__bar .d.y { background: #f59e0b; }
.mock__bar .d.g { background: #10b981; }
.mock__bar .url {
  margin-left: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-faint);
}
.mock__body { padding: 22px; }

/* ---------- Comparison ---------- */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 20px 0;
}
.compare__col {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  background: var(--bg-elev);
}
.compare__col h4 {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.compare__col ul { margin: 0; padding-left: 18px; }
.compare__col li { font-size: 14px; color: var(--text-muted); margin: 6px 0; }
.compare__col.bad li::marker { color: var(--rose-500); }
.compare__col.good li::marker { color: var(--emerald-500); }
@media (max-width: 720px) { .compare { grid-template-columns: 1fr; } }

/* ---------- Page nav (prev/next) ---------- */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 64px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.page-nav a {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  transition: all .15s;
}
.page-nav a:hover {
  border-color: var(--brand-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}
.page-nav__dir { font-size: 12px; color: var(--text-faint); margin-bottom: 4px; }
.page-nav__title { font-weight: 600; color: var(--text); }
.page-nav a.next { text-align: right; }
.page-nav a.prev::before { content: '← '; color: var(--brand-500); }
.page-nav a.next::after { content: ' →'; color: var(--brand-500); }
.page-nav .empty { visibility: hidden; }

/* ---------- Misc ---------- */
.kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--bg-muted);
  border: 1px solid var(--border);
  color: var(--text);
}

/* Star rating in mocks */
.stars { color: #fbbf24; letter-spacing: 1px; }

/* Mobile sidebar toggle */
.sidebar-toggle {
  display: none;
  width: 36px; height: 36px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 8px;
  cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--text-muted);
}

@media (max-width: 1080px) {
  .content { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 880px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    left: 0; top: var(--header-h);
    height: calc(100vh - var(--header-h));
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-toggle { display: inline-flex; }
  .header__search { display: none; }
  .content { padding: 32px 22px 64px; }
  .hero { padding: 36px 22px 44px; }
  .hero h1 { font-size: 36px; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
}

/* Subtle fade-in */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp .4s ease both; }
.fade-up:nth-child(2) { animation-delay: .05s; }
.fade-up:nth-child(3) { animation-delay: .1s; }
.fade-up:nth-child(4) { animation-delay: .15s; }
.fade-up:nth-child(5) { animation-delay: .2s; }
.fade-up:nth-child(6) { animation-delay: .25s; }

/* ---------- Spec / KV blocks ---------- */
.spec {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 12px 24px;
  margin: 20px 0;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  font-size: 14px;
}
.spec dt { color: var(--text-faint); font-weight: 600; font-size: 13px; }
.spec dd { margin: 0; color: var(--text); }

/* ---------- Stat row ---------- */
.statrow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 24px 0;
}
.statrow > div {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--bg-elev);
}
.statrow .v {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.statrow .l { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
@media (max-width: 720px) { .statrow { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Persona row ---------- */
.persona {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  margin: 14px 0;
}
.persona__avatar {
  flex-shrink: 0;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: white;
  font-weight: 700;
  font-size: 17px;
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500));
}
.persona__body h4 { margin: 0 0 4px; text-transform: none; letter-spacing: 0; font-size: 15px; color: var(--text); font-weight: 600; }
.persona__body p { margin: 0; font-size: 13.5px; color: var(--text-muted); }

/* =================================================================
   COST TOGGLE — show/hide optional cost sections + recompute totals
   ================================================================= */
.cost-toggle-wrap {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin: 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.cost-toggle {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.cost-toggle__label {
  font-weight: 600;
  font-size: 14px;
}
.cost-toggle__help {
  font-size: 12.5px;
  color: var(--text-muted);
  flex: 1;
  min-width: 240px;
  line-height: 1.5;
}
.cost-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.cost-toggle-track {
  width: 40px;
  height: 22px;
  background: var(--bg-muted);
  border-radius: 999px;
  position: relative;
  transition: background .2s;
}
.cost-toggle-knob {
  position: absolute;
  left: 2px;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: white;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.cost-toggle-btn[data-on="true"] .cost-toggle-track {
  background: var(--brand-500);
}
.cost-toggle-btn[data-on="true"] .cost-toggle-knob {
  left: 20px;
}
.cost-toggle-state {
  min-width: 60px;
  text-align: left;
}

/* Optional badge in section headings */
.optional-tag {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  background: rgba(245,158,11,0.15);
  color: #b45309;
  padding: 3px 9px;
  border-radius: 999px;
  margin-left: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  vertical-align: middle;
  border: 1px solid rgba(245,158,11,0.3);
}
[data-theme="dark"] .optional-tag { color: #fcd34d; }

/* Hidden state */
.cost-section.is-hidden { display: none; }
tr.cost-row.is-hidden  { display: none; }

/* Optional row tag in totals table */
tr.cost-row.is-optional td:first-child .row-opt-tag {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  background: rgba(245,158,11,0.15);
  color: #b45309;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  vertical-align: middle;
  margin-left: 6px;
  border: 1px solid rgba(245,158,11,0.3);
}
[data-theme="dark"] tr.cost-row.is-optional td:first-child .row-opt-tag { color: #fcd34d; }

/* Total row styling */
tr.cost-row.total-row td {
  font-weight: 700;
  background: var(--bg-subtle);
  border-top: 2px solid var(--border-strong);
}
tr.cost-row.total-row td span[data-total] {
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: -0.01em;
}

/* =================================================================
   FLOWCHART — visual replacement for ASCII diagrams
   ================================================================= */
.flowchart {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 24px;
  margin: 28px 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  justify-items: center;
  gap: 0;
  overflow-x: auto;
}
.flowchart > .fc-empty { width: 100%; height: 100%; }

.fc-node {
  background: var(--bg-elev);
  border: 2px solid var(--brand-400);
  border-radius: 10px;
  padding: 12px 22px;
  font-weight: 600;
  font-size: 13px;
  min-width: 190px;
  text-align: center;
  box-shadow: 0 4px 14px rgba(15,23,42,0.06);
  font-family: var(--font-mono);
  color: var(--text);
  letter-spacing: 0.02em;
  position: relative;
  transition: transform .15s;
}
.fc-node small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  font-family: var(--font-sans);
  color: var(--text-faint);
  margin-top: 3px;
  letter-spacing: 0;
}
.fc-node.is-start {
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500));
  color: white;
  border-color: transparent;
  box-shadow: 0 8px 20px rgba(99,102,241,0.3);
}
.fc-node.is-start small { color: rgba(255,255,255,0.85); }
.fc-node.is-success {
  background: rgba(16,185,129,0.10);
  border-color: var(--emerald-500);
  color: #047857;
}
[data-theme="dark"] .fc-node.is-success { color: #6ee7b7; background: rgba(16,185,129,0.15); }
.fc-node.is-danger {
  background: rgba(244,63,94,0.10);
  border-color: var(--rose-500);
  color: #be123c;
}
[data-theme="dark"] .fc-node.is-danger { color: #fda4af; background: rgba(244,63,94,0.15); }
.fc-node.is-warn {
  background: rgba(245,158,11,0.10);
  border-color: var(--amber-500);
  color: #b45309;
}
[data-theme="dark"] .fc-node.is-warn { color: #fcd34d; background: rgba(245,158,11,0.15); }
.fc-node.is-info {
  background: rgba(14,165,233,0.10);
  border-color: var(--sky-500);
  color: #0369a1;
}
[data-theme="dark"] .fc-node.is-info { color: #7dd3fc; background: rgba(14,165,233,0.15); }
.fc-node.is-terminal {
  background: var(--bg-muted);
  border-color: var(--border-strong);
  border-style: dashed;
  color: var(--text-muted);
}

/* Vertical connector */
.fc-arrow-v {
  width: 2px;
  height: 38px;
  background: var(--border-strong);
  position: relative;
  margin: 0;
}
.fc-arrow-v::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--border-strong);
}
.fc-arrow-v[data-label] { height: 52px; }
.fc-arrow-v[data-label]::before {
  content: attr(data-label);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  background: var(--bg-elev);
  padding: 3px 9px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Horizontal branch (sits in column 3 of the grid) */
.fc-branch {
  display: flex;
  align-items: center;
  justify-self: start;
}
.fc-arrow-h {
  position: relative;
  width: 64px;
  height: 2px;
  background: var(--border-strong);
  margin-right: 9px;
  flex-shrink: 0;
}
.fc-arrow-h::after {
  content: '';
  position: absolute;
  right: -9px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid var(--border-strong);
}
.fc-arrow-h[data-label]::before {
  content: attr(data-label);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 6px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  background: var(--bg-elev);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.fc-arrow-h.is-danger { background: var(--rose-500); }
.fc-arrow-h.is-danger::after { border-left-color: var(--rose-500); }
.fc-arrow-h.is-success { background: var(--emerald-500); }
.fc-arrow-h.is-success::after { border-left-color: var(--emerald-500); }

/* Self-loop indicator (curved back-arrow) */
.fc-loop {
  position: absolute;
  right: -36px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 56px;
  border: 2px solid var(--border-strong);
  border-left: 0;
  border-radius: 0 28px 28px 0;
}
.fc-loop::after {
  content: '';
  position: absolute;
  left: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 9px solid var(--border-strong);
}
.fc-loop[data-label]::before {
  content: attr(data-label);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
  background: var(--bg-elev);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Architecture/Layered diagram — like flowchart but allows multiple nodes per row */
.archchart {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 32px 24px;
  margin: 28px 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
}
.arch-layer {
  background: var(--bg-elev);
  border: 1.5px solid var(--border-strong);
  border-radius: 12px;
  padding: 18px 20px;
  position: relative;
}
.arch-layer__label {
  position: absolute;
  top: -10px;
  left: 18px;
  background: var(--bg-subtle);
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-radius: 4px;
}
.arch-row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.arch-node {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  color: var(--text);
  transition: all .15s;
  position: relative;
}
.arch-node small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-faint);
  margin-top: 2px;
}
.arch-node.is-brand {
  background: linear-gradient(135deg, var(--brand-500), var(--violet-500));
  color: white;
  border-color: transparent;
}
.arch-node.is-brand small { color: rgba(255,255,255,0.85); }
.arch-node.is-data { background: rgba(14,165,233,0.08); border-color: var(--sky-500); color: #0369a1; }
[data-theme="dark"] .arch-node.is-data { color: #7dd3fc; background: rgba(14,165,233,0.12); }
.arch-node.is-worker { background: rgba(245,158,11,0.08); border-color: var(--amber-500); color: #b45309; }
[data-theme="dark"] .arch-node.is-worker { color: #fcd34d; background: rgba(245,158,11,0.12); }
.arch-node.is-external { background: rgba(244,63,94,0.08); border-color: var(--rose-500); color: #be123c; }
[data-theme="dark"] .arch-node.is-external { color: #fda4af; background: rgba(244,63,94,0.12); }
.arch-node.is-service { background: rgba(99,102,241,0.08); border-color: var(--brand-400); }

.arch-down {
  align-self: center;
  width: 2px;
  height: 28px;
  background: var(--border-strong);
  position: relative;
}
.arch-down::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 9px solid var(--border-strong);
}
.arch-down[data-label]::before {
  content: attr(data-label);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  margin-left: 10px;
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  white-space: nowrap;
}

/* Sequence diagram — actor-based */
.seqchart {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 0 24px;
  margin: 28px 0;
  overflow-x: auto;
}
.seq-actors {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  padding: 0 24px 18px;
  border-bottom: 1px dashed var(--border-strong);
}
.seq-actor {
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
  padding: 10px 8px;
  background: var(--bg-elev);
  border: 1.5px solid var(--border-strong);
  border-radius: 8px;
  margin: 0 4px;
  position: relative;
}
.seq-actor small {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-faint);
  margin-top: 2px;
}
.seq-actor.is-brand { background: linear-gradient(135deg, var(--brand-500), var(--violet-500)); color: white; border-color: transparent; }
.seq-actor.is-brand small { color: rgba(255,255,255,0.85); }
.seq-actor.is-external { background: rgba(244,63,94,0.08); border-color: var(--rose-500); color: #be123c; }
[data-theme="dark"] .seq-actor.is-external { color: #fda4af; }

.seq-msgs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(140px, 1fr);
  padding: 0 24px;
  position: relative;
}
.seq-msgs::before {
  /* dashed lifelines */
  content: '';
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    to right,
    transparent 0,
    transparent calc(((100% - 48px) / var(--actors, 4)) / 2 + 12px - 1px),
    var(--border) calc(((100% - 48px) / var(--actors, 4)) / 2 + 12px - 1px),
    var(--border) calc(((100% - 48px) / var(--actors, 4)) / 2 + 12px + 1px),
    transparent calc(((100% - 48px) / var(--actors, 4)) / 2 + 12px + 1px)
  );
  pointer-events: none;
}
.seq-msg {
  grid-row: var(--row, 1);
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
  padding: 8px 0;
}
.seq-msg__line {
  flex: 1;
  height: 2px;
  background: var(--brand-500);
  position: relative;
}
.seq-msg__line.is-return { background: var(--text-faint); background-image: repeating-linear-gradient(to right, var(--text-faint) 0, var(--text-faint) 4px, transparent 4px, transparent 8px); height: 1px; }
.seq-msg__line.is-async { background: var(--amber-500); }
.seq-msg__line.is-event { background: var(--emerald-500); }
.seq-msg__line::after {
  content: '';
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid currentColor;
  color: var(--brand-500);
}
.seq-msg__line.is-return::after { color: var(--text-faint); }
.seq-msg__line.is-async::after  { color: var(--amber-500); }
.seq-msg__line.is-event::after  { color: var(--emerald-500); }
.seq-msg__label {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-bottom: 4px;
  font-size: 11.5px;
  color: var(--text);
  font-family: var(--font-mono);
  background: var(--bg-elev);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border);
  white-space: nowrap;
  font-weight: 500;
}
.seq-step-label {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 14px 0 4px;
  position: relative;
  z-index: 2;
}

/* ---------- Schema diagram (simple ER) ---------- */
.er {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  margin: 20px 0;
}
.er__table {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-elev);
  overflow: hidden;
  font-size: 13px;
}
.er__table h5 {
  margin: 0;
  padding: 10px 12px;
  background: linear-gradient(135deg, var(--brand-600), var(--violet-500));
  color: white;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
}
.er__table ul { margin: 0; padding: 8px 0; list-style: none; }
.er__table li {
  padding: 4px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  display: flex; justify-content: space-between;
  border-bottom: 1px dashed var(--border);
}
.er__table li:last-child { border-bottom: 0; }
.er__table li .typ { color: var(--text-faint); }
.er__table li.pk { background: rgba(99,102,241,0.07); }
.er__table li.fk .typ { color: var(--accent-500); }
