/* ─────────────────────────────────────────────────────────────────────────────
   Dynamic ERP API Documentation — Enhanced Styles
   ───────────────────────────────────────────────────────────────────────────── */

:root {
  --xero-blue:      #13b5ea;
  --xero-dark-blue: #0b1c31;
  --xero-mid-blue:  #0076bb;
  --accent-indigo:  #4f46e5;

  --text-primary:   #1e293b;
  --text-secondary: #64748b;
  --text-tertiary:  #94a3b8;
  --muted:          #b0c0d0;

  --bg-main:    #f1f5f9;
  --bg-sidebar: #ffffff;
  --bg-code:    #ffffff;           /* White Background */
  --bg-code-header: #ffffff;    /* White Background-header */
  --border-dark: #e2e8f0;       /* Light Border */

  --token-property: #1e293b;    /* Dark Slate for keys */
  --token-string: #16a34a;      /* Green 600 for strings */
  --token-number: #d97706;      /* Orange 600 for numbers */
  --token-punct: #1e293b;       /* Dark Slate for punctuation */
  --token-keyword: #7c3aed;     /* Violet for keywords */

  --badge-get:    #10b981;
  --badge-post:   #3b82f6;
  --badge-put:    #f59e0b;
  --badge-delete: #ef4444;

  --font: 'Inter', -apple-system, system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;

  --sidebar-w: 270px;
  --right-nav-w: 240px;
  --radius: 8px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Header ──────────────────────────────────────────────────────────────────── */
.app-header {
  height: 56px;
  background: var(--xero-dark-blue);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  flex-shrink: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 600;
  color: white;
}

.brand-icon { color: var(--xero-blue); }
.brand-text { color: var(--xero-blue); font-weight: 700; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.version-badge {
  background: rgba(255,255,255,0.1);
  color: white;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  font-family: var(--mono);
  letter-spacing: 0.5px;
}

.upload-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.85);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}
.upload-btn:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); }

/* ── Toast ───────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 72px;
  right: 20px;
  background: #10b981;
  color: white;
  padding: 10px 20px;
  border-radius: 6px;
  font-weight: 500;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(130%);
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  z-index: 999;
}
.toast.show { transform: translateX(0); }

/* ── Layout ──────────────────────────────────────────────────────────────────── */
.app-container { display: flex; flex: 1; overflow: hidden; }

/* ── Right Navigation ────────────────────────────────────────────────────────── */
.right-nav {
  width: var(--right-nav-w);
  background: white;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.right-nav-header {
  padding: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.right-nav-content {
  flex: 1;
  overflow-y: auto;
  padding: 12px 0;
}

.toc-link {
  display: block;
  padding: 6px 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s;
  border-left: 2px solid transparent;
}

.toc-link:hover, .toc-link.active {
  color: var(--xero-blue);
  background: var(--bg-hover, #f8fafc);
  border-left-color: var(--xero-blue);
  font-weight: 500;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-header {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  background: white;
}

.sidebar-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px 0 38px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f8fafc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='none' stroke='%2394a3b8' stroke-width='2' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E") 12px center no-repeat;
  font-size: 0.85rem;
  font-family: var(--font);
  outline: none;
  color: var(--text-primary);
  transition: all 0.25s ease;
}

.sidebar-search input:focus {
  border-color: var(--xero-blue);
  background-color: white;
  box-shadow: 0 0 0 3px rgba(0, 107, 230, 0.08);
}

.sidebar-toolbar {
  padding: 4px 12px;
  display: flex;
  justify-content: flex-end;
  background: white;
  border-bottom: 1px solid var(--border-subtle);
  width: 100%;
  box-sizing: border-box;
}

.sidebar-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto; /* Force right alignment */
}

.sidebar-controls button {
  width: 18px;
  height: 18px;
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

#expand-all-btn { background: #0fb5c1; } /* Teal */
#collapse-all-btn { background: #e74c3c; } /* Red */

.sidebar-controls button:hover {
  transform: scale(1.15);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  filter: brightness(1.1);
}

.sidebar-controls button svg {
  width: 10px;
  height: 10px;
  stroke: white;
  stroke-width: 4.5;
}

.nav-content {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0 20px;
}

/* ── Collapsible Sidebar Groups ──────────────────────────────────────────────── */
.sidebar-group { margin-bottom: 2px; }

.sidebar-group-header {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--text-secondary);
  text-align: left;
  transition: background 0.15s;
}
.sidebar-group-header:hover { background: var(--bg-main); }

.sidebar-group-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
}
.sidebar-group-header:hover .sidebar-group-title { color: var(--xero-mid-blue); }

.chevron {
  color: var(--text-tertiary);
  transition: transform 0.2s;
  flex-shrink: 0;
}
.sidebar-group-header.collapsed .chevron { transform: rotate(-90deg); }

/* ── Entity Sub-group ────────────────────────────────────────────────────────── */
.entity-group { border-left: none; }

.entity-group-header {
  width: 100%;
  background: none;
  border: none;
  display: flex;
  align-items: center;
  padding: 6px 14px 6px 20px;
  cursor: pointer;
  gap: 6px;
  color: var(--text-secondary);
  font-size: 0.825rem;
  font-weight: 500;
  transition: background 0.15s;
  text-align: left;
  border-left: 2px solid transparent;
}
.entity-group-header:hover { background: rgba(19,181,234,0.04); color: var(--xero-mid-blue); }
.entity-group-header.open { color: var(--xero-mid-blue); border-left-color: var(--xero-blue); }

.entity-group-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entity-count {
  font-size: 0.65rem;
  background: var(--bg-main);
  color: var(--text-tertiary);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 1px 6px;
  font-weight: 600;
  flex-shrink: 0;
}
.entity-group-body { padding-left: 4px; }

.chevron-small { color: var(--text-tertiary); transition: transform 0.2s; flex-shrink: 0; }
.entity-group-header.open .chevron-small { transform: rotate(180deg); }

/* ── Nav Items (endpoints) ───────────────────────────────────────────────────── */
.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px 5px 28px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.78rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  overflow: hidden;
}
.nav-item:hover { background: rgba(19,181,234,0.04); color: var(--text-primary); }
.nav-item.active {
  background: rgba(19,181,234,0.06);
  color: var(--xero-mid-blue);
  border-left-color: var(--xero-blue);
  font-weight: 500;
}

.nav-method-pill {
  font-size: 0.6rem;
  font-weight: 700;
  font-family: var(--mono);
  width: 36px;
  text-align: center;
  border-radius: 3px;
  padding: 2px 0;
  flex-shrink: 0;
}
.get-pill    { background: rgba(16,185,129,0.1); color: var(--badge-get); }
.post-pill   { background: rgba(59,130,246,0.1); color: var(--badge-post); }
.put-pill    { background: rgba(245,158,11,0.1); color: var(--badge-put); }
.delete-pill { background: rgba(239,68,68,0.1);  color: var(--badge-delete); }

.nav-endpoint-name { flex: 1; overflow: hidden; text-overflow: ellipsis; }

/* ── Content Area ────────────────────────────────────────────────────────────── */
.content-area {
  flex: 1;
  overflow-y: auto;
  padding: 0 0 80px;
  background: var(--bg-main);
}

/* ── Intro Section ───────────────────────────────────────────────────────────── */
.intro-section {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 40px 48px;
  max-width: 100%;
}

.intro-hero { margin-bottom: 28px; }

.intro-badge {
  display: inline-block;
  background: rgba(19,181,234,0.1);
  color: var(--xero-blue);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
  text-transform: uppercase;
}

.intro-section h1 {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  line-height: 1.2;
}

.intro-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ── Markdown Body ───────────────────────────────────────────────────────────── */
.markdown-body { max-width: 860px; }
.markdown-body h1 { font-size: 1.5rem; font-weight: 700; margin: 28px 0 10px; color: var(--text-primary); }
.markdown-body h2 { font-size: 1.2rem; font-weight: 600; margin: 24px 0 8px; color: var(--text-primary); border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.markdown-body h3 { font-size: 1rem; font-weight: 600; margin: 16px 0 6px; color: var(--text-primary); }
.markdown-body p  { color: var(--text-secondary); line-height: 1.75; margin-bottom: 14px; font-size: 0.9rem; }
.markdown-body ul, .markdown-body ol { padding-left: 20px; margin-bottom: 14px; }
.markdown-body li { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.7; margin-bottom: 4px; }
.markdown-body strong { color: var(--text-primary); font-weight: 600; }

.markdown-body code {
  background: rgba(99,102,241,0.07);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--accent-indigo);
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  margin-bottom: 20px;
}
.markdown-body th {
  text-align: left;
  padding: 8px 12px;
  background: var(--bg-main);
  border-bottom: 2px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}
.markdown-body td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
}

/* ── Module Section Headers ──────────────────────────────────────────────────── */
.module-section-header {
  padding: 28px 40px 16px;
  border-bottom: 1px solid var(--border);
  background: white;
  margin-top: 24px;
  margin-bottom: 0;
}

.module-badge {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--xero-blue);
  background: rgba(19,181,234,0.08);
  padding: 2px 8px;
  border-radius: 10px;
  margin-bottom: 6px;
}

.module-section-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.module-section-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  max-width: 640px;
}

/* ── Entity Section Headers ──────────────────────────────────────────────────── */
.entity-section-header {
  padding: 20px 40px 12px;
  border-bottom: 1px solid var(--border);
  background: #fafbfd;
}

.entity-heading {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.entity-heading::before {
  content: '';
  display: inline-block;
  width: 3px;
  height: 16px;
  background: var(--xero-blue);
  border-radius: 2px;
}

.entity-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  max-width: 680px;
  line-height: 1.65;
}

/* ── Endpoint Cards ──────────────────────────────────────────────────────────── */
.endpoint-card {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  transition: box-shadow 0.2s;
}
.endpoint-card:hover { box-shadow: inset 3px 0 0 var(--xero-blue); }

.endpoint-card-inner {
  padding: 24px 40px;
  max-width: 960px;
}

.endpoint-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
}

.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 500;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  padding: 3px 9px;
  border-radius: 20px;
}

.auth-chip-open {
  background: #f0fdf4;
  color: #15803d;
  border-color: #bbf7d0;
}

/* URL Block */
.url-block {
  display: flex;
  align-items: center;
  background: var(--bg-main);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 0.78rem;
  gap: 0;
  overflow-x: auto;
  white-space: nowrap;
}

.method-badge {
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--mono);
  padding: 3px 8px;
  border-radius: 4px;
  color: white;
  margin-right: 12px;
  flex-shrink: 0;
  letter-spacing: 0.03em;
}

.get-bg    { background: var(--badge-get); }
.post-bg   { background: var(--badge-post); }
.put-bg    { background: var(--badge-put); }
.delete-bg { background: var(--badge-delete); }

.url-path {
  color: var(--text-primary);
  word-break: break-all;
  white-space: normal;
}

/* ── Section Labels ──────────────────────────────────────────────────────────── */
.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-tertiary);
  margin: 20px 0 8px;
}

.card-desc { margin: 10px 0 16px; }

/* ── Params Table ────────────────────────────────────────────────────────────── */
.params-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; margin-bottom: 4px; }
.params-table th {
  text-align: left;
  padding: 7px 12px;
  background: var(--bg-main);
  border-bottom: 2px solid var(--border);
  color: var(--text-tertiary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.params-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: top;
  font-size: 0.82rem;
}
.params-table td:first-child {
  font-family: var(--mono);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.8rem;
}
.params-table tr:last-child td { border-bottom: none; }

.type-pill {
  display: inline-block;
  background: rgba(99,102,241,0.08);
  color: var(--accent-indigo);
  font-size: 0.68rem;
  font-weight: 600;
  font-family: var(--mono);
  padding: 1px 7px;
  border-radius: 3px;
}

.muted { color: var(--muted); font-style: italic; }

/* ── Code Blocks ─────────────────────────────────────────────────────────────── */
.code-wrapper {
  background: var(--bg-code);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  margin-bottom: 24px;
}

.code-header {
  background: var(--bg-code-header);
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
}

.code-lang {
  color: var(--text-primary);
  font-size: 0.85rem;
  font-family: var(--font);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.code-lang::before {
  content: '</>';
  font-size: 0.6rem;
  color: var(--xero-blue);
  opacity: 0.8;
}

.copy-btn {
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.15s;
  font-family: var(--font);
}
.copy-btn:hover { color: var(--text-primary); background: rgba(255,255,255,0.08); }

.code-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Premium cURL button styling */
.curl-btn {
  background: linear-gradient(135deg, #6366f1, #3b82f6);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ffffff;
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 6px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-family: var(--font);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.15);
  letter-spacing: 0.03em;
}
.curl-btn:hover {
  background: linear-gradient(135deg, #4f46e5, #2563eb);
  box-shadow: 0 4px 6px rgba(0,0,0,0.15), inset 0 1px 0 rgba(255,255,255,0.1);
  transform: translateY(-1px);
}
.curl-btn:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

pre[class*="language-"] {
  margin: 0 !important;
  padding: 0 24px 24px !important;
  background: transparent !important;
  font-size: 0.85rem !important;
  max-height: 500px;
  overflow-y: auto;
  tab-size: 2;
  font-family: var(--mono);
  color: var(--text-primary);
}

/* ── Scrollbar ───────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }
.content-area::-webkit-scrollbar-thumb { background: #d1d5db; }

/* ── Static Nav Items (Overview / Endpoint Index) ────────────────────────────── */
.static-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 18px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  cursor: pointer;
  border-left: 2px solid transparent;
  transition: all 0.15s;
}
.static-nav-item:hover { background: rgba(19,181,234,0.04); color: var(--xero-mid-blue); }
.static-nav-item.active {
  background: rgba(19,181,234,0.06);
  color: var(--xero-mid-blue);
  border-left-color: var(--xero-blue);
  font-weight: 500;
}

.static-nav-icon { font-size: 0.85rem; width: 18px; text-align: center; flex-shrink: 0; }
.static-nav-label { flex: 1; }

.summary-count {
  font-size: 0.65rem;
  background: rgba(19,181,234,0.08);
  color: var(--xero-blue);
  border: 1px solid rgba(19,181,234,0.2);
  border-radius: 9px;
  padding: 1px 6px;
  font-weight: 700;
  margin-left: auto;
  flex-shrink: 0;
}

.view-all-link {
  font-weight: 600;
  color: var(--xero-mid-blue) !important;
  margin-top: 2px;
  font-size: 0.8rem;
}

/* ── Sidebar Separator ───────────────────────────────────────────────────────── */
.sidebar-separator {
  display: flex;
  align-items: center;
  margin: 10px 14px 6px;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.sidebar-separator::before,
.sidebar-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Endpoints Summary Section ───────────────────────────────────────────────── */
.summary-section {
  background: white;
  border-bottom: 2px solid var(--border);
  margin-bottom: 0;
}

.summary-header {
  padding: 28px 40px 16px;
  border-bottom: 1px solid var(--border);
  background: white;
}

.summary-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 6px 0 4px;
}

.summary-header p {
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.summary-module-block {
  padding: 0 40px 24px;
  background: white;
  border-bottom: 1px solid var(--border);
}

.summary-module-label {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 16px 0 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

.summary-module-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-module-count {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.summary-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.summary-table th {
  text-align: left;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-tertiary);
}

.summary-table td {
  padding: 7px 12px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  color: var(--text-secondary);
}
.summary-table tr:last-child td { border-bottom: none; }
.summary-table tr:hover td { background: rgba(19,181,234,0.03); }

.sum-entity-tag {
  display: inline-block;
  background: #f1f5f9;
  color: var(--text-secondary);
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.sum-ep-link {
  color: var(--xero-mid-blue);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.8rem;
}
.sum-ep-link:hover { text-decoration: underline; color: var(--xero-blue); }

.sum-url {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text-tertiary);
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── PrismJS Syntax Highlighting (High Contrast) ───────────────────────────── */
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
  color: #64748b;
}

.token.punctuation {
  color: var(--token-punct);
}

.token.property,
.token.tag,
.token.constant,
.token.symbol,
.token.deleted {
  color: var(--token-property);
  font-weight: 600;
}

.token.boolean,
.token.number {
  color: var(--token-number);
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
  color: var(--token-string);
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable {
  color: #fbbf24;
}

.token.atrule,
.token.attr-value,
.token.function,
.token.class-name {
  color: #38bdf8;
}

.token.keyword {
  color: var(--token-keyword);
}

.token.regex,
.token.important {
  color: #fbbf24;
}

.token.important,
.token.bold {
  font-weight: bold;
}

.token.italic {
  font-style: italic;
}

.token.entity {
  cursor: help;
}

