/* Credence Zero-Build Documentation & Blog Master Stylesheet */
@import url('assets/credence-ui.css');

/* Layout structure */
.docs-layout {
  display: flex;
  min-height: calc(100vh - 70px);
}

/* Sidebar navigation */
.docs-sidebar {
  width: 300px;
  background: rgba(10, 15, 29, 0.96);
  border-right: 1px solid var(--border-cyan, rgba(56, 189, 248, 0.15));
  padding: 1.5rem 1rem 3rem 1.5rem;
  overflow-y: auto;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  flex-shrink: 0;
}

.search-container {
  margin-bottom: 1.5rem;
}

.search-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  color: var(--text-light, #f8fafc);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--accent-cyan, #38bdf8);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

.sidebar-controls {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.6rem;
  padding: 0 0.25rem;
}

.sidebar-toggle-btn {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  color: var(--text-muted, #94a3b8);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.15s ease;
  font-family: inherit;
}

.sidebar-toggle-btn:hover {
  color: var(--accent-cyan, #38bdf8);
  border-color: rgba(56, 189, 248, 0.4);
  background: rgba(56, 189, 248, 0.08);
}

details.sidebar-group {
  margin-bottom: 0.5rem;
  border-radius: 8px;
  transition: background 0.15s ease;
}

details.sidebar-group > summary.sidebar-heading {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--accent-cyan, #38bdf8);
  margin-bottom: 0.25rem;
  padding: 0.35rem 0.45rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 6px;
  transition: background 0.15s ease, color 0.15s ease;
}

details.sidebar-group > summary.sidebar-heading::-webkit-details-marker {
  display: none;
}

details.sidebar-group > summary.sidebar-heading:hover {
  background: rgba(56, 189, 248, 0.06);
}

.sidebar-heading-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.sidebar-chevron {
  font-size: 0.62rem;
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--text-muted, #94a3b8);
}

details.sidebar-group[open] > summary .sidebar-chevron {
  transform: rotate(90deg);
  color: var(--accent-cyan, #38bdf8);
}

.sidebar-badge {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent-cyan, #38bdf8);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.sidebar-list {
  list-style: none;
  padding: 0 0 0 0.35rem;
  margin: 0.15rem 0 0.5rem 0;
  border-left: 1px solid rgba(56, 189, 248, 0.12);
  margin-left: 0.65rem;
}

.sidebar-item {
  margin-bottom: 0.2rem;
}

.sidebar-link {
  display: block;
  padding: 0.45rem 0.65rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  font-size: 0.875rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  line-height: 1.35;
}

.sidebar-link:hover {
  color: var(--text-light, #f8fafc);
  background: rgba(56, 189, 248, 0.08);
}

.sidebar-link.active {
  color: var(--accent-cyan, #38bdf8);
  background: rgba(56, 189, 248, 0.15);
  font-weight: 600;
  border-left: 3px solid var(--accent-cyan, #38bdf8);
}

/* Main Content Area */
.docs-main {
  flex-grow: 1;
  max-width: 960px;
  padding: 2.5rem 3rem 5rem 3rem;
  margin: 0 auto;
}

/* Table of Contents sidebar */
.toc-sidebar {
  width: 240px;
  padding: 2.5rem 1.5rem 2rem 0;
  position: sticky;
  top: 70px;
  height: calc(100vh - 70px);
  overflow-y: auto;
  flex-shrink: 0;
  font-size: 0.8rem;
}

.toc-heading {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.75rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-left: 1px solid rgba(56, 189, 248, 0.15);
}

.toc-item {
  margin-bottom: 0.35rem;
}

.toc-link {
  display: block;
  padding-left: 0.75rem;
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  transition: color 0.15s;
}

.toc-link:hover {
  color: var(--accent-cyan, #38bdf8);
}

/* Markdown prose rendering */
.markdown-body {
  color: var(--text-light, #f8fafc);
  line-height: 1.75;
}

.markdown-body h1 {
  font-size: 2.35rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 0.85rem;
  color: #fff;
  border-bottom: 1px solid rgba(56, 189, 248, 0.25);
  padding-bottom: 0.85rem;
}

.markdown-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 0.85rem;
  color: #f1f5f9;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  padding-bottom: 0.45rem;
}

.markdown-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 1.85rem;
  margin-bottom: 0.6rem;
  color: var(--accent-cyan, #38bdf8);
}

.markdown-body h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.markdown-body p {
  margin-bottom: 1.35rem;
  color: #cbd5e1;
}

.markdown-body a {
  color: var(--accent-cyan, #38bdf8);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s;
}

.markdown-body a:hover {
  color: #7dd3fc;
}

.markdown-body code {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.875em;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.2em 0.45em;
  border-radius: 5px;
  color: #38bdf8;
}

/* Code Blocks & Wrappers */
.code-block-wrapper {
  background: #030712;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  margin: 1.75rem 0;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #0b1120;
  padding: 0.45rem 1rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  font-family: var(--font-mono);
}

.code-lang {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--accent-cyan, #38bdf8);
  letter-spacing: 0.05em;
  font-weight: 600;
}

.code-block-wrapper pre {
  margin: 0;
  border: none;
  background: transparent;
  padding: 1.25rem;
  overflow-x: auto;
}

.code-block-wrapper pre code {
  background: none;
  border: none;
  padding: 0;
  color: #e2e8f0;
  font-size: 0.875rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

.copy-btn {
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #cbd5e1;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  background: var(--accent-cyan, #38bdf8);
  color: #050b14;
  font-weight: 600;
}

/* Mermaid Diagrams Framed Window Container */
.mermaid-wrapper {
  margin: 2rem 0;
  width: 100%;
}

.mermaid-window {
  background: rgba(13, 18, 31, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.mermaid-window-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(15, 23, 42, 0.85);
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.window-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.window-dot.red { background: #ef4444; }
.window-dot.yellow { background: #f59e0b; }
.window-dot.green { background: #22c55e; }

.mermaid-window-title {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: #94a3b8;
  margin-left: 0.35rem;
  text-transform: uppercase;
}

.mermaid-code {
  padding: 1.5rem 1rem;
}

.mermaid-rendered {
  width: 100%;
  padding: 1.5rem 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-x: auto;
}

.mermaid-rendered svg {
  max-width: 100%;
  height: auto;
}

/* Anti-Light-on-Light SVG Typography Enforcement (WCAG 2.1 AA/AAA) */
.mermaid-rendered svg text,
.mermaid-rendered svg .nodeLabel,
.mermaid-rendered svg .edgeLabel,
.mermaid-rendered svg .actor,
.mermaid-rendered svg .messageText,
.mermaid-rendered svg .noteText,
.mermaid-rendered svg .loopText {
  fill: #f8fafc !important;
  color: #f8fafc !important;
  font-family: var(--font-sans, system-ui, -apple-system, sans-serif) !important;
  font-size: 13px !important;
}

.mermaid-rendered svg .edgeLabel rect,
.mermaid-rendered svg .labelBox {
  fill: #0f172a !important;
  stroke: #334155 !important;
}

.mermaid-rendered svg .note {
  fill: #1e293b !important;
  stroke: #f59e0b !important;
}

.mermaid-fallback {
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
}

/* Accessible Focus-Visible Rings Across All Interactive Controls */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.tab-btn:focus-visible {
  outline: 2px solid #38bdf8 !important;
  outline-offset: 2px !important;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4) !important;
}

/* LaTeX & Math Blocks */
.math-block {
  text-align: center;
  margin: 1.5rem 0;
  padding: 1.1rem 1.25rem;
  background: rgba(18, 25, 43, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  overflow-x: auto;
  color: var(--accent-cyan, #38bdf8);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
}

.math-inline {
  font-family: var(--font-mono);
  color: var(--accent-cyan, #38bdf8);
  font-style: italic;
  padding: 0 0.15rem;
}

/* GitHub Alert Callouts */
.alert-box {
  padding: 1.1rem 1.4rem;
  margin: 1.75rem 0;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  border-left: 4px solid;
  font-size: 0.92rem;
  line-height: 1.65;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.alert-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
}

.alert-content {
  color: #e2e8f0;
}

.alert-note {
  background: rgba(56, 189, 248, 0.08);
  border-color: #38bdf8;
  color: #e0f2fe;
}
.alert-note .alert-header { color: #38bdf8; }

.alert-tip {
  background: rgba(34, 197, 94, 0.08);
  border-color: #4ade80;
  color: #dcfce7;
}
.alert-tip .alert-header { color: #4ade80; }

.alert-important {
  background: rgba(96, 165, 250, 0.08);
  border-color: #60a5fa;
  color: #eff6ff;
}
.alert-important .alert-header { color: #60a5fa; }

.alert-warning {
  background: rgba(245, 158, 11, 0.08);
  border-color: #f59e0b;
  color: #fef3c7;
}
.alert-warning .alert-header { color: #f59e0b; }

.alert-caution {
  background: rgba(239, 68, 68, 0.08);
  border-color: #ef4444;
  color: #fee2e2;
}
.alert-caution .alert-header { color: #ef4444; }

/* Blockquotes */
.markdown-body blockquote {
  border-left: 4px solid var(--accent-cyan, #38bdf8);
  background: rgba(56, 189, 248, 0.06);
  padding: 1rem 1.4rem;
  margin: 1.5rem 0;
  border-radius: 0 10px 10px 0;
  color: #e2e8f0;
  font-style: italic;
  line-height: 1.7;
}

/* Tables */
.table-container {
  overflow-x: auto;
  margin: 1.75rem 0;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  -webkit-overflow-scrolling: touch;
}

.markdown-body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
  line-height: 1.5;
}

.markdown-body th,
.markdown-body td {
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
  border-right: 1px solid rgba(56, 189, 248, 0.08);
  padding: 0.6rem 0.85rem;
  text-align: left;
  vertical-align: top;
}

.markdown-body th:last-child,
.markdown-body td:last-child {
  border-right: none;
}

.markdown-body tr:last-child td {
  border-bottom: none;
}

.markdown-body th {
  background: rgba(15, 23, 42, 0.95);
  color: var(--accent-cyan, #38bdf8);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.markdown-body tr:nth-child(even) {
  background: rgba(15, 23, 42, 0.45);
}

.markdown-body tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

/* Lists */
.markdown-body ul, 
.markdown-body ol {
  margin-bottom: 1.35rem;
  padding-left: 1.6rem;
  color: #cbd5e1;
  line-height: 1.7;
}

.markdown-body li {
  margin-bottom: 0.45rem;
}

.task-checkbox {
  vertical-align: middle;
  margin-right: 0.4rem;
  accent-color: var(--accent-cyan, #38bdf8);
}

.markdown-body hr {
  border: none;
  border-top: 1px solid rgba(56, 189, 248, 0.18);
  margin: 2.5rem 0;
}

/* Callout cards */
.doc-card {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
}

/* ========================================================
   Interactive Zero-Build Widgets & Playgrounds
   ======================================================== */

.interactive-widget {
  background: rgba(13, 18, 31, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2.25rem 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.widget-row {
  display: flex;
  gap: 2rem;
  align-items: stretch;
}

.widget-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.widget-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light, #f8fafc);
  margin-top: 1rem;
  margin-bottom: 0.35rem;
}

.widget-label:first-child {
  margin-top: 0;
}

.widget-val {
  color: var(--accent-cyan, #38bdf8);
  font-family: var(--font-mono, monospace);
  font-weight: 700;
}

.widget-slider {
  width: 100%;
  accent-color: var(--accent-cyan, #38bdf8);
  cursor: pointer;
  margin-bottom: 0.5rem;
}

.widget-result-box {
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 10px;
  padding: 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.widget-metric-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 0.5rem;
}

.widget-score-big {
  font-size: 3rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 0.75rem;
  font-family: var(--font-mono, monospace);
}

.widget-submetrics {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
  font-size: 0.8rem;
  color: var(--text-muted, #94a3b8);
  display: flex;
  justify-content: space-between;
}

.widget-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.widget-btn {
  padding: 0.6rem 1.1rem;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.9);
  color: var(--text-light, #f8fafc);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.widget-btn:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--accent-cyan, #38bdf8);
}

.widget-btn.primary {
  background: var(--accent-cyan, #38bdf8);
  color: #050b14;
  font-weight: 700;
  border-color: var(--accent-cyan, #38bdf8);
}

.widget-btn.primary:hover {
  background: #7dd3fc;
}

.widget-textarea {
  width: 100%;
  height: 140px;
  padding: 0.85rem;
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  color: #e2e8f0;
  font-family: var(--font-mono, monospace);
  font-size: 0.85rem;
  line-height: 1.4;
  resize: vertical;
  outline: none;
}

.widget-textarea:focus {
  border-color: var(--accent-cyan, #38bdf8);
}

.widget-status {
  margin-top: 1rem;
  padding: 0.85rem 1.1rem;
  border-radius: 8px;
  font-size: 0.85rem;
}

.widget-status.idle {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.15);
  color: var(--text-muted, #94a3b8);
}

.widget-status.verified {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #4ade80;
}

.widget-status.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* Verdict Tags */
.verdict-tag {
  display: inline-block;
  padding: 0.35rem 0.85rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.verdict-tag.reliable {
  background: rgba(34, 197, 94, 0.2);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.verdict-tag.mixed {
  background: rgba(234, 179, 8, 0.2);
  color: #facc15;
  border: 1px solid rgba(234, 179, 8, 0.4);
}

.verdict-tag.suspicious {
  background: rgba(249, 115, 22, 0.2);
  color: #fb923c;
  border: 1px solid rgba(249, 115, 22, 0.4);
}

.verdict-tag.disinfo,
.verdict-tag.deceptive {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.5);
}

/* 64-Bit SimHash Bit-Diff Grid */
.bit-diff-grid {
  display: grid;
  grid-template-columns: repeat(32, 1fr);
  gap: 3px;
  margin-top: 0.75rem;
  background: rgba(5, 10, 20, 0.8);
  padding: 0.5rem;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.15);
}

@media (max-width: 600px) {
  .bit-diff-grid {
    grid-template-columns: repeat(16, 1fr);
  }
}

.bit-tile {
  aspect-ratio: 1;
  border-radius: 2px;
  background: #1e293b;
  transition: all 0.2s ease;
}

.bit-tile.match {
  background: #10b981;
  box-shadow: 0 0 4px rgba(16, 185, 129, 0.4);
}

.bit-tile.diff {
  background: #ef4444;
  box-shadow: 0 0 6px rgba(239, 68, 68, 0.8);
}

/* Grounding Live Text Preview */
.grounding-preview-box {
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 1rem;
  font-family: var(--font-mono, monospace);
  font-size: 0.9rem;
  line-height: 1.6;
  color: #cbd5e1;
  min-height: 70px;
}

.highlight-match {
  background: rgba(56, 189, 248, 0.25);
  border-bottom: 2px solid #38bdf8;
  color: #38bdf8;
  font-weight: 700;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
}

.highlight-fail {
  background: rgba(239, 68, 68, 0.25);
  border-bottom: 2px solid #ef4444;
  color: #f87171;
  padding: 0.1rem 0.25rem;
  border-radius: 3px;
}

/* Filter Chip Groups */
.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-chip {
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.25);
  background: rgba(15, 23, 42, 0.8);
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-chip:hover {
  border-color: var(--accent-cyan, #38bdf8);
  color: #f8fafc;
}

.filter-chip.active {
  background: var(--accent-cyan, #38bdf8);
  color: #050b14;
  border-color: var(--accent-cyan, #38bdf8);
}

/* Node Inspector Card */
.node-inspector-card {
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.3);
  border-radius: 8px;
  padding: 0.85rem 1.25rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Epistemic Text Scanner */
.scanner-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.scanner-highlight-pane {
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 8px;
  padding: 1.1rem;
  font-size: 0.95rem;
  line-height: 1.7;
  color: #e2e8f0;
  min-height: 80px;
}

.epistemic-span {
  position: relative;
  cursor: help;
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-weight: 600;
}

.epistemic-span.clickbait {
  background: rgba(249, 115, 22, 0.25);
  border-bottom: 2px solid #fb923c;
  color: #fb923c;
}

.epistemic-span.superlative {
  background: rgba(234, 179, 8, 0.25);
  border-bottom: 2px solid #facc15;
  color: #facc15;
}

.epistemic-span.urgency {
  background: rgba(239, 68, 68, 0.25);
  border-bottom: 2px solid #ef4444;
  color: #f87171;
}

.epistemic-span.weasel {
  background: rgba(168, 85, 247, 0.25);
  border-bottom: 2px solid #c084fc;
  color: #c084fc;
}

/* Consensus Histogram & Galileo Simulator */
.consensus-histogram {
  display: flex;
  align-items: flex-end;
  height: 120px;
  gap: 6px;
  background: rgba(5, 10, 20, 0.9);
  padding: 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
  margin-top: 1rem;
}

.consensus-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
}

.consensus-bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  transition: height 0.3s ease;
  min-height: 4px;
}

.consensus-bar.swarm {
  background: #38bdf8;
}

.consensus-bar.expert {
  background: #10b981;
}

.consensus-bar.sybil {
  background: #ef4444;
}

/* Headroom Gauge for Token Governor */
.headroom-gauge-track {
  width: 100%;
  height: 24px;
  background: rgba(15, 23, 42, 0.9);
  border-radius: 9999px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  overflow: hidden;
  position: relative;
  margin-top: 0.5rem;
}

.headroom-gauge-fill {
  height: 100%;
  transition: width 0.3s ease, background 0.3s ease;
}

.headroom-threshold-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #ef4444;
  left: 30%;
  z-index: 2;
}

.headroom-threshold-label {
  position: absolute;
  top: -18px;
  left: 30%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.05em;
}

/* Severity Badges */
.severity-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-mono, monospace);
}

.severity-badge.sev-1 { background: rgba(56, 189, 248, 0.2); color: #38bdf8; border: 1px solid rgba(56, 189, 248, 0.3); font-weight: 700; }
.severity-badge.sev-2 { background: rgba(34, 197, 94, 0.2); color: #4ade80; border: 1px solid rgba(34, 197, 94, 0.3); font-weight: 700; }
.severity-badge.sev-3 { background: rgba(234, 179, 8, 0.2); color: #facc15; border: 1px solid rgba(234, 179, 8, 0.3); font-weight: 700; }
.severity-badge.sev-4 { background: rgba(249, 115, 22, 0.25); color: #fb923c; border: 1px solid rgba(249, 115, 22, 0.35); font-weight: 700; }
.severity-badge.sev-5 { background: rgba(239, 68, 68, 0.3); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.4); font-weight: 700; }

/* Redesigned Taxonomy Rule Explorer (Invariant 38 Natural Flow & Zero Scrollbars) */
.taxonomy-controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin: 1rem 0 0.5rem 0;
}

.taxonomy-stats-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.4rem 0.2rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}

.taxonomy-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.5rem;
  width: 100%;
}

.taxonomy-rule-card {
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.taxonomy-rule-card:hover {
  border-color: var(--accent-cyan, #38bdf8);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.08);
}

.taxonomy-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.taxonomy-card-title-group {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.taxonomy-rule-id-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.82rem;
  font-weight: 800;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.3);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
}

.taxonomy-rule-title {
  font-size: 1.02rem;
  font-weight: 700;
  color: #f8fafc;
}

.taxonomy-card-meta-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.taxonomy-uri-badge {
  font-family: var(--font-mono, monospace);
  font-size: 0.76rem;
  color: #94a3b8;
  background: #020617;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  word-break: break-all;
}

.uri-copy-btn {
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 4px;
  color: #38bdf8;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.15s ease;
}

.uri-copy-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  color: #fff;
}

.taxonomy-rule-desc {
  font-size: 0.9rem;
  color: #e2e8f0;
  line-height: 1.55;
  margin: 0.1rem 0;
}

.taxonomy-signals-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.25rem;
}

.taxonomy-signal-tag {
  font-size: 0.75rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-family: var(--font-mono, monospace);
}

.taxonomy-guidelines-box {
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(15, 23, 42, 0.6);
  padding: 0.4rem 0.65rem;
  border-radius: 4px;
  border-left: 2px solid var(--accent-cyan);
  line-height: 1.45;
}

.taxonomy-pagination-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85rem;
  margin-top: 1.25rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
}

.mesh-visualizer-container {
  width: 100%;
  height: 380px;
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  margin: 1.25rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.mesh-svg-canvas {
  width: 100%;
  height: 100%;
  max-width: 600px;
}

/* Model Comparator Grid & Cards */
.model-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.model-comp-card {
  background: rgba(10, 15, 29, 0.95);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 1.25rem;
  transition: border-color 0.2s, transform 0.2s;
}

.model-comp-card:hover {
  border-color: var(--accent-cyan, #38bdf8);
  transform: translateY(-2px);
}

.model-price-val {
  font-size: 1.85rem;
  font-weight: 800;
  color: #fff;
  font-family: var(--font-mono, monospace);
  margin-top: 0.25rem;
}

.model-metrics-row {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid rgba(56, 189, 248, 0.15);
  padding-top: 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
}

/* Responsive queries */
@media (max-width: 1080px) {
  .toc-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
  }
  .docs-sidebar {
    width: 100%;
    height: auto;
    position: relative;
    top: 0;
    border-right: none;
    border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  }
  .docs-main {
    padding: 1.5rem;
  }
  .widget-row {
    flex-direction: column;
  }
}

/* GCP-Style Interface Tab Container */
.tab-group {
  margin: 1.75rem 0;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.tab-header {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: #090e17;
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0 0.5rem;
  gap: 0.25rem;
}

.tab-header::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.75rem 1rem;
  cursor: pointer;
  position: relative;
  transition: color 0.15s ease, background-color 0.15s ease;
  outline: none;
}

.tab-btn:hover {
  color: #f8fafc;
}

.tab-btn.active {
  color: #38bdf8;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0.5rem;
  right: 0.5rem;
  height: 2px;
  background: #38bdf8;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
  border-radius: 2px 2px 0 0;
}

.tab-panels {
  background: transparent;
}

.tab-panel {
  display: none;
  padding: 1.25rem;
}

.tab-panel.active {
  display: block;
  animation: fadeInTab 0.15s ease-in-out;
}

@keyframes fadeInTab {
  from { opacity: 0.6; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.tab-panel > :first-child {
  margin-top: 0;
}

.tab-panel > :last-child {
  margin-bottom: 0;
}

.tab-panel .code-block-wrapper {
  margin: 0.5rem 0;
}

/* Document Metadata Header Row */
.doc-metadata-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: -0.5rem 0 1.75rem 0;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
}

.meta-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.25);
  color: #e2e8f0;
  text-decoration: none;
  transition: all 0.15s ease;
}

.meta-badge.verified-latest {
  background: rgba(34, 197, 94, 0.16);
  border-color: rgba(74, 222, 128, 0.5);
  color: #4ade80;
  font-weight: 700;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.15);
}

.meta-badge.verified-older {
  background: rgba(234, 179, 8, 0.14);
  border-color: rgba(250, 204, 21, 0.4);
  color: #facc15;
  font-weight: 600;
}

.meta-badge.since-version {
  background: rgba(148, 163, 184, 0.12);
  border-color: rgba(148, 163, 184, 0.3);
  color: #cbd5e1;
}

.meta-badge.difficulty {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
}

.meta-badge.read-time {
  color: #94a3b8;
  border-color: rgba(148, 163, 184, 0.2);
}

.meta-badge.interface {
  background: rgba(96, 165, 250, 0.12);
  border-color: rgba(96, 165, 250, 0.3);
  color: #93c5fd;
}

.meta-badge.invariant {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.35);
  color: #4ade80;
}

.meta-badge.invariant:hover {
  background: rgba(34, 197, 94, 0.25);
  border-color: #4ade80;
  transform: translateY(-1px);
}

/* Invariant Cards & Highlight */
.invariant-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-left: 3px solid #38bdf8;
  border-radius: 0 8px 8px 0;
  padding: 1.25rem;
  margin: 1.5rem 0;
  transition: all 0.3s ease;
}

.invariant-card:hover, .invariant-card.highlight-anchor {
  border-color: #38bdf8;
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.95);
}

.invariant-card h3 {
  margin-top: 0 !important;
  color: #f8fafc !important;
}

.invariant-card h3 a {
  color: inherit;
  text-decoration: none;
}

/* Search input wrapper & Keyboard shortcut */
.search-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.search-kbd {
  position: absolute;
  right: 0.75rem;
  background: #1e293b;
  color: #94a3b8;
  font-family: var(--font-mono, monospace);
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid #334155;
  pointer-events: none;
}

/* Filter pills */
.search-filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.5rem;
}

.filter-pill {
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #94a3b8;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: #38bdf8;
  color: #f8fafc;
}

.filter-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Document Images & TUI Vector SVGs */
.doc-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 1.5rem auto;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

/* ========================================================
   Interactive Forensic Epistemic Workbench & Highlights
   ======================================================== */

.violation-highlight {
  background: rgba(239, 68, 68, 0.22);
  color: #fca5a5;
  border-bottom: 2px dashed #ef4444;
  padding: 0.15rem 0.35rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.violation-highlight:hover,
.violation-highlight.active {
  background: rgba(239, 68, 68, 0.45);
  color: #fff;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
}

.violation-highlight.warning {
  background: rgba(245, 158, 11, 0.22);
  color: #fde68a;
  border-bottom-color: #f59e0b;
}

.violation-highlight.warning:hover,
.violation-highlight.warning.active {
  background: rgba(245, 158, 11, 0.45);
  color: #fff;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
}

.forensics-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 1.5rem;
  margin-top: 1.25rem;
}

@media (max-width: 900px) {
  .forensics-grid {
    grid-template-columns: 1fr;
  }
}

.article-preview-pane {
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 10px;
  padding: 1.5rem;
  font-size: 0.92rem;
  line-height: 1.7;
  height: auto;
  overflow: visible;
}

.article-meta-header {
  border-bottom: 1px solid rgba(56, 189, 248, 0.15);
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
}

.article-meta-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem 0;
}

.article-meta-details {
  font-size: 0.78rem;
  color: var(--text-muted, #94a3b8);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.metrics-pane {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.rule-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  transition: all 0.2s ease;
}

.rule-card:hover,
.rule-card.active {
  border-color: var(--accent-cyan, #38bdf8);
  background: rgba(15, 23, 42, 0.95);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.rule-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.rule-id-badge {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.8rem;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

.rule-card-title {
  font-weight: 600;
  font-size: 0.88rem;
  color: #fff;
  margin-bottom: 0.35rem;
}

.rule-card-reasoning {
  font-size: 0.8rem;
  color: #cbd5e1;
  line-height: 1.5;
}

/* Publisher Aggregate Forensic Metrics Card */
.pub-card {
  background: #090d16;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1.75rem 0;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.45);
}

.pub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
  margin-bottom: 1.5rem;
}

.pub-domain-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
}

.pub-tab-group {
  display: flex;
  gap: 0.5rem;
  background: rgba(15, 23, 42, 0.8);
  padding: 0.25rem;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.pub-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pub-tab-btn:hover {
  color: #fff;
  background: rgba(56, 189, 248, 0.1);
}

.pub-tab-btn.active {
  background: var(--accent-cyan, #38bdf8);
  color: #090d16;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

.pub-hero-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 820px) {
  .pub-hero-grid {
    grid-template-columns: 1fr;
  }
}

.pub-score-box {
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.pub-score-number {
  font-size: 2.75rem;
  font-weight: 800;
  color: #f59e0b;
  font-family: var(--font-mono, monospace);
  line-height: 1.1;
  margin: 0.35rem 0;
}

.pub-spectrum-box {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 10px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pub-spectrum-track {
  height: 12px;
  border-radius: 9999px;
  background: linear-gradient(to right, #ef4444 0%, #f59e0b 50%, #38bdf8 75%, #22c55e 100%);
  position: relative;
  margin: 1.25rem 0 0.75rem 0;
}

.pub-spectrum-marker {
  position: absolute;
  top: -6px;
  width: 24px;
  height: 24px;
  background: #fff;
  border: 3px solid #f59e0b;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.8);
}

.pub-spectrum-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

.pub-ratios-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.pub-ratio-card {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(56, 189, 248, 0.15);
  border-radius: 8px;
  padding: 1rem 1.15rem;
  transition: transform 0.2s, border-color 0.2s;
}

.pub-ratio-card:hover {
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-2px);
}

.pub-ratio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
}

.pub-ratio-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #e2e8f0;
}

.pub-ratio-value {
  font-family: var(--font-mono, monospace);
  font-weight: 700;
  font-size: 0.95rem;
}

.pub-meter-track {
  height: 8px;
  background: rgba(30, 41, 59, 0.8);
  border-radius: 9999px;
  overflow: hidden;
  margin: 0.45rem 0;
}

.pub-meter-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.5s ease-in-out;
}

.pub-meter-fill.danger { background: #ef4444; }
.pub-meter-fill.warning { background: #f59e0b; }
.pub-meter-fill.success { background: #22c55e; }
.pub-meter-fill.info { background: #38bdf8; }

.pub-ratio-desc {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  line-height: 1.4;
}

.pub-rules-grid {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.pub-rule-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 6px;
  padding: 0.65rem 0.9rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pub-rule-row:hover {
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.3);
}

.live-monitor-callout {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 14, 26, 0.98));
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-left: 4px solid var(--accent-cyan, #38bdf8);
  border-radius: 10px;
  padding: 1.35rem 1.5rem;
  margin: 2rem 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* Unified Cross-Domain Ecosystem Footer */
footer.credence-footer {
  padding: 3rem 1.5rem 2rem;
  border-top: 1px solid var(--border, rgba(56, 189, 248, 0.15));
  background: linear-gradient(180deg, rgba(11, 15, 25, 0.95), rgba(5, 8, 15, 0.98));
  color: var(--text-muted, #94a3b8);
  font-size: 0.9rem;
  margin-top: 4rem;
  border-radius: 8px;
  container-type: inline-size;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  text-align: left;
}

/* Dedicated Docs Layout: center column renders as spacious, balanced 2x2 grid */
.docs-main .footer-grid {
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem 2rem;
  max-width: 760px;
  margin: 0 auto 2.5rem auto;
}

.docs-main .footer-col {
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(56, 189, 248, 0.12);
  border-radius: 8px;
  padding: 1.35rem 1.5rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.docs-main .footer-col:hover {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(15, 23, 42, 0.65);
}

@container (max-width: 820px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.5rem;
  }
}

@container (max-width: 480px) {
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1.5rem;
  }
}

@media (max-width: 520px) {
  .docs-main .footer-grid,
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

.footer-col h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-col a {
  color: var(--text-muted, #94a3b8);
  text-decoration: none;
  font-size: 0.88rem;
  line-height: 1.35;
  transition: color 0.15s ease, transform 0.15s ease;
  display: inline-block;
}

.footer-col a:hover {
  color: var(--accent-cyan, #38bdf8);
  transform: translateX(2px);
}

.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-dim, #64748b);
}

.footer-bottom-links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.footer-bottom-links a {
  color: var(--text-dim, #64748b);
  text-decoration: none;
}

.footer-bottom-links a:hover {
  color: var(--accent-cyan, #38bdf8);
}




