﻿/* ==========================================================================
   Diplodocus â€” Structural CSS (Mintlify-aligned)
   --------------------------------------------------------------------------
   NO hardcoded colours. Every value flows through var(--dc-*) from theme.css.
   Change the look of your site by editing theme.css, not this file.
   ========================================================================== */

/* â”€â”€ Base â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
body,
html {
  font-family: var(--dc-font-body);
  font-size: var(--dc-font-size-base);
  color: var(--dc-text-primary);
  background: var(--dc-bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
}

/* â”€â”€ Prose (Mintlify article spec) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.prose {
  max-width: var(--dc-content-max);
  color: var(--dc-text-primary);
  line-height: 1.625;
}

.prose h1 {
  font-size: 1.7rem;
  /* 40px */
  font-weight: 700;
  line-height: 1.1111111;
  color: var(--dc-brand-primary);
  margin-top: 0;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.prose h2 {
  font-size: 1.5rem;
  /* 27.2px */
  font-weight: 800;
  line-height: 1.3;
  color: var(--dc-text-primary);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.015em;
}

.prose h3 {
  font-size: 1.2rem;
  /* 22.4px */
  font-weight: 700;
  line-height: 1.4;
  color: var(--dc-text-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.prose h4 {
  font-size: 1.2rem;
  /* 19.2px */
  font-weight: 600;
  line-height: 1.4;
  color: var(--dc-text-primary);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p,
.prose ul,
.prose ol {
  font-size: 1rem;
  line-height: 1.625;
  color: var(--dc-text-secondary);
  margin-top: 1.25em;
  margin-bottom: 1.25em;
}

.prose a {
  color: var(--dc-text-link);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.prose a:hover {
  border-bottom-color: var(--dc-text-link);
}

/* Inline code â€” Mintlify: bg-gray-100/.5, px-2 py-0.5, rounded-md */
.prose code {
  background: var(--dc-bg-elevated);
  color: var(--dc-brand-primary);
  padding: 0.125rem 0.5rem;
  border-radius: var(--dc-radius-sm);
  font-family: var(--dc-font-mono);
  font-size: 0.875em;
  font-weight: 500;
  border: 1px solid var(--dc-border-subtle);
}

.prose pre {
  background: var(--dc-bg-code) !important;
  color: var(--dc-text-code) !important;
  border-radius: var(--dc-radius-lg);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-family: var(--dc-font-mono);
  font-size: 0.875rem;
  line-height: 1.6;
}

.prose pre code {
  background: transparent;
  color: inherit;
  padding: 0;
  font-size: inherit;
}

/* Blockquote (Mintlify callout-ish) */
.prose blockquote {
  border-left: 3px solid var(--dc-border-default);
  padding: 0.75rem 1rem;
  margin: 1.5rem 0;
  color: var(--dc-text-muted);
  font-style: normal;
  background: var(--dc-bg-subtle);
  border-radius: 0 4px 4px 0;
}

/* Callout variants â€” styled by first <strong> child label */
.prose blockquote:has(> p:first-child > strong:first-child) {
  position: relative;
}

.prose blockquote>p:first-child>strong:first-child {
  display: inline-block;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  margin-right: 0.25rem;
}

/* Note â€” blue/info */
.prose blockquote:has(> p:first-child > strong:first-child:is([data-callout="note"])),
.prose blockquote.callout-note,
.prose blockquote:has(> p > strong:first-child)>p:first-child:has(strong:first-child) {
  /* fallback â€” use attribute selector on the STRONG text content isn't possible in pure CSS,
     so we rely on a post-processor to add data-callout attrs. See below. */
}

.prose blockquote[data-callout="note"] {
  border-left-color: #3b82f6;
  background: color-mix(in srgb, #3b82f6 8%, var(--dc-bg-subtle));
}

.prose blockquote[data-callout="note"]>p:first-child>strong:first-child {
  color: #3b82f6;
}

.prose blockquote[data-callout="tip"] {
  border-left-color: #10b981;
  background: color-mix(in srgb, #10b981 8%, var(--dc-bg-subtle));
}

.prose blockquote[data-callout="tip"]>p:first-child>strong:first-child {
  color: #10b981;
}

.prose blockquote[data-callout="warning"] {
  border-left-color: #f59e0b;
  background: color-mix(in srgb, #f59e0b 8%, var(--dc-bg-subtle));
}

.prose blockquote[data-callout="warning"]>p:first-child>strong:first-child {
  color: #f59e0b;
}

.prose blockquote[data-callout="danger"] {
  border-left-color: #ef4444;
  background: color-mix(in srgb, #ef4444 10%, var(--dc-bg-subtle));
}

.prose blockquote[data-callout="danger"]>p:first-child>strong:first-child {
  color: #ef4444;
}

.prose blockquote[data-callout="example"] {
  border-left-color: #8b5cf6;
  background: color-mix(in srgb, #8b5cf6 8%, var(--dc-bg-subtle));
}

.prose blockquote[data-callout="example"]>p:first-child>strong:first-child {
  color: #8b5cf6;
}

/* Task list items (GFM) */
.prose ul.task-list,
.prose ul li.task-list-item {
  list-style: none;
}

.prose ul li.task-list-item {
  padding-left: 0;
  margin-left: -1.25rem;
}

.prose li.task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: default;
  accent-color: var(--dc-brand-primary);
}

/* â”€â”€ Syntax highlighting â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.hljs {
  background: var(--dc-bg-code) !important;
  color: var(--dc-text-code);
}

.hljs-keyword {
  color: var(--dc-hl-keyword);
}

.hljs-string {
  color: var(--dc-hl-string);
}

.hljs-number {
  color: var(--dc-hl-number);
}

.hljs-comment {
  color: var(--dc-hl-comment);
}

/* â”€â”€ Tables (Mintlify: clean, border-collapse) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.5rem 0;
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-md);
  overflow: hidden;
  font-size: 0.875rem;
}

table thead,
table thead th,
table th {
  background: var(--dc-table-header-bg);
  color: var(--dc-table-header-text);
  font-weight: 600;
  padding: 0.625rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--dc-border-default);
}

table tbody td,
table td {
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--dc-border-subtle);
  color: var(--dc-text-secondary);
}

table tbody tr:last-child td {
  border-bottom: none;
}

table tbody tr:hover td {
  background: var(--dc-table-row-hover);
}

/* â”€â”€ Mintlify card â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-card {
  display: block;
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-xl);
  /* 16px */
  background: var(--dc-bg-surface);
  padding: 1.25rem;
  transition: border-color 0.15s ease, transform 0.15s ease;
  text-decoration: none;
  color: inherit;
}

.dc-card:hover {
  border-color: var(--dc-brand-primary);
}

.dc-card-icon {
  width: 2rem;
  height: 2rem;
  border-radius: var(--dc-radius-sm);
  background: var(--dc-brand-primary-soft);
  color: var(--dc-brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.dc-card-icon svg {
  width: 1rem;
  height: 1rem;
}

.dc-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dc-text-primary);
  margin-bottom: 0.25rem;
}

.dc-card-desc {
  font-size: 0.875rem;
  color: var(--dc-text-muted);
  line-height: 1.5;
}

/* â”€â”€ Sidebar (Mintlify 288px) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-sidebar {
  width: var(--dc-sidebar-width);
  flex-shrink: 0;
  background: var(--dc-bg-sidebar);
  border-right: 1px solid var(--dc-border-subtle);
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem 1rem 2rem;
  /* pl-8 pr-5 pt-4 pb-4 */
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.dc-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  height: 1.5rem;
  /* h-6 = 24px */
  margin-bottom: 1.25rem;
}

.dc-sidebar-brand-mark {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--dc-radius-sm);
  background: var(--dc-brand-primary);
  color: var(--dc-text-inverse);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

.dc-sidebar-brand-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dc-text-primary);
  letter-spacing: -0.01em;
}

.dc-sidebar-search {
  width: 100%;
  background: var(--dc-bg-elevated);
  border: 1px solid var(--dc-border-default);
  border-radius: 0;
  padding: 0.5rem 2.25rem 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--dc-text-primary);
  transition: border-color 0.15s ease;
  margin-bottom: 1.25rem;
}

.dc-sidebar-search:focus {
  outline: none;
  border-color: var(--dc-brand-primary);
}

.dc-sidebar-search::placeholder {
  color: var(--dc-text-subtle);
}

/* Search results dropdown â€” absolutely positioned inside the relative wrapper */
.dc-search-results {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  right: 0;
  background: var(--dc-bg-sidebar);
  border: 1px solid var(--dc-border-default);
  border-radius: var(--dc-radius-md);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  max-height: 55vh;
  overflow-y: auto;
  z-index: 50;
}

.dc-search-hit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--dc-text-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--dc-border-subtle);
  transition: background 0.1s ease;
}

.dc-search-hit:last-child {
  border-bottom: none;
}

.dc-search-hit:hover {
  background: var(--dc-bg-hover);
}

.dc-search-hit-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.dc-search-hit-meta {
  font-size: 0.7rem;
  color: var(--dc-text-muted);
  flex-shrink: 0;
  background: var(--dc-bg-elevated);
  padding: 0.1rem 0.4rem;
  border-radius: var(--dc-radius-sm);
}

.dc-search-empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--dc-text-muted);
  font-size: 0.875rem;
}

.dc-sidebar-search-icon {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 0.875rem;
  height: 0.875rem;
  color: var(--dc-text-subtle);
  pointer-events: none;
}

.dc-sidebar-group {
  margin-bottom: 1.25rem;
}

.dc-sidebar-group-header {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-left: 0.25rem;
  margin-bottom: 0.625rem;
  font-size: 0.75rem;
  /* text-xs */
  font-weight: 600;
  color: var(--dc-text-subtle);
  /* gray-400 */
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dc-sidebar-link {
  display: flex;
  align-items: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  /* text-sm */
  font-weight: 500;
  color: var(--dc-text-secondary);
  border-radius: var(--dc-radius-sm);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s ease, background 0.15s ease;
}

.dc-sidebar-link:hover {
  color: var(--dc-text-primary);
}

.dc-sidebar-link.is-active {
  color: var(--dc-brand-primary);
  background: var(--dc-brand-primary-soft);
  font-weight: 600;
}

.dc-sidebar-children {
  margin-left: 0.25rem;
  padding-left: 0.75rem;
  border-left: 1px solid var(--dc-border-subtle);
  margin-top: 0.25rem;
}

.dc-sidebar-child {
  display: block;
  padding: 0.3125rem 0.75rem;
  font-size: 0.8125rem;
  /* 13px */
  font-weight: 500;
  color: var(--dc-text-muted);
  text-decoration: none;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s ease;
}

.dc-sidebar-child:hover {
  color: var(--dc-text-primary);
}

.dc-sidebar-child.is-active {
  color: var(--dc-brand-primary);
  font-weight: 600;
}

/* â”€â”€ Sidebar groups (feature-driven spec) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-sidebar-group {
  margin: 0.25rem 0 0.5rem 0;
}

.dc-sidebar-group-label {
  display: block;
  padding: 0.3125rem 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--dc-text-primary);
  text-decoration: none;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s ease;
}

.dc-sidebar-group-label:hover {
  color: var(--dc-brand-primary);
}

.dc-sidebar-group.is-active > .dc-sidebar-group-label {
  color: var(--dc-brand-primary);
}

.dc-sidebar-group.is-active > .dc-sidebar-children {
  border-left-color: var(--dc-brand-primary);
}

.dc-sidebar-footer {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--dc-border-subtle);
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

/* Interaction controls in sidebar footer */
.dc-ix-controls {
  border-top: 1px solid var(--dc-border-subtle);
  margin-top: 0.25rem;
}

/* Toggle row */
.dc-ix-controls-summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  padding: 0.5rem 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dc-text-muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: left;
  transition: color 0.15s;
}

.dc-ix-controls-summary:hover {
  color: var(--dc-text);
}

.dc-ix-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.25rem;
  height: 1.25rem;
  padding: 0 0.3rem;
  background: var(--dc-accent);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  border-radius: 999px;
  line-height: 1;
}

.dc-ix-controls-summary-label {
  flex: 1;
}

.dc-ix-controls-chevron {
  margin-left: auto;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.dc-ix-controls-summary.is-open .dc-ix-controls-chevron {
  transform: rotate(180deg);
}

/* Collapsible panel */
.dc-ix-controls-panel {
  padding: 0 0.75rem 0.6rem;
}

.dc-ix-controls-breakdown {
  font-size: 0.7rem;
  color: var(--dc-text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.dc-ix-controls-row {
  display: flex;
  gap: 0.35rem;
}

.dc-ix-controls-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  border: 1px solid var(--dc-border);
  border-radius: 6px;
  background: var(--dc-bg-elevated, #141717);
  color: var(--dc-text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s;
  line-height: 1;
}

.dc-ix-controls-btn:hover {
  border-color: var(--dc-accent);
  color: var(--dc-text);
}

.dc-ix-controls-btn--danger:hover {
  border-color: var(--dc-error, #e53e3e);
  color: var(--dc-error, #e53e3e);
}


/* â”€â”€ Header (Mintlify 48px sticky) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-header {
  height: var(--dc-header-height);
  background: var(--dc-bg-surface);
  border-bottom: 1px solid var(--dc-border-subtle);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 30;
}

.dc-breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--dc-text-muted);
}

.dc-breadcrumb a {
  color: var(--dc-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.dc-breadcrumb a:hover {
  color: var(--dc-text-primary);
}

.dc-breadcrumb-sep {
  width: 0.875rem;
  height: 0.875rem;
  color: var(--dc-text-subtle);
}

.dc-breadcrumb-current {
  color: var(--dc-text-primary);
  font-weight: 500;
}

.dc-header-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.25rem;
  /* h-9 = 36px */
  padding: 0 0.875rem;
  background: rgb(10 13 12 / 0.03);
  color: var(--dc-text-muted);
  border: none;
  border-radius: var(--dc-radius-full);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.dc-header-toggle:hover {
  background: rgb(10 13 12 / 0.08);
  color: var(--dc-text-primary);
}

/* â”€â”€ Table of contents (Mintlify 288px, sticky, left-border active) â”€ */
.dc-toc {
  width: var(--dc-toc-width);
  flex-shrink: 0;
  padding: 2rem 1.25rem 2rem 2rem;
  background: var(--dc-bg-base);
  position: sticky;
  top: var(--dc-header-height);
  height: calc(100vh - var(--dc-header-height));
  overflow-y: auto;
  align-self: flex-start;
}

.dc-toc-heading {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dc-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
}

.dc-toc-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  border-left: 1px solid var(--dc-border-subtle);
}

.dc-toc-link {
  position: relative;
  display: block;
  padding: 0.25rem 0 0.25rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--dc-text-muted);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -1px;
  transition: color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dc-toc-link:hover {
  color: var(--dc-text-primary);
}

.dc-toc-link.is-active {
  color: var(--dc-brand-primary);
  border-left-color: var(--dc-brand-primary);
}

.dc-toc-link[data-level="3"] {
  padding-left: 1.5rem;
}

.dc-toc-link[data-level="4"] {
  padding-left: 2.25rem;
}

/* â”€â”€ Main content area â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-main {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  padding: 2.5rem 3rem 4rem;
}

.dc-main-inner {
  width: 100%;
}

/* Prose (page view) gets the narrow reading cap; dashboard fills full width */
.dc-main-inner article.prose {
  max-width: var(--dc-content-max);
}

/* â”€â”€ Attachment Gallery (unchanged structure) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.attachment-gallery {
  margin: 2rem 0 1rem;
}

.attachment-tabs {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.attachment-tab.active {
  border-color: var(--dc-brand-accent);
}

.attachment-section {
  margin-top: 1rem;
}

.attachment-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: var(--dc-radius-xl);
}

.attachment-card:hover {
  transform: translateY(-2px);
}

.image-card {
  cursor: pointer;
  box-shadow: var(--dc-shadow-sm);
  border-radius: var(--dc-radius-xl);
  overflow: hidden;
}

.image-card:hover {
  transform: scale(1.02);
  box-shadow: var(--dc-shadow-lg);
}

.image-grid {
  gap: 1.25rem !important;
}

.image-card .tag-attachment {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.2s ease;
  background: var(--dc-bg-surface);
  border-radius: var(--dc-radius-full);
  padding: 0.375rem;
  box-shadow: var(--dc-shadow-md);
}

.image-card:hover .tag-attachment {
  opacity: 1;
}

.image-card .tag-attachment:hover {
  background: var(--dc-brand-primary);
  color: var(--dc-text-inverse);
}

/* â”€â”€ Data preview â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.data-preview table {
  font-size: 0.875rem;
}

.data-preview pre {
  background: var(--dc-bg-code-alt) !important;
  color: var(--dc-text-code) !important;
  max-height: 400px;
  overflow: auto;
}

.data-preview pre code {
  color: var(--dc-text-code) !important;
}

.data-preview .overflow-x-auto {
  max-height: 400px;
  overflow: auto;
}

.data-card {
  box-shadow: var(--dc-shadow-sm);
  margin-bottom: 1rem;
  border-radius: var(--dc-radius-xl);
}

.data-card:hover {
  box-shadow: var(--dc-shadow-md);
}

/* â”€â”€ Lightbox â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
[data-attachment-lightbox] {
  animation: dc-fadeIn 0.2s ease;
}

[data-attachment-lightbox] img {
  animation: dc-zoomIn 0.3s ease;
}

@keyframes dc-fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes dc-zoomIn {
  from {
    transform: scale(0.9);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.iframe-preview iframe {
  border: 1px solid var(--dc-border-default);
  border-radius: var(--dc-radius-md);
}

.tagged-attachment {
  transition: all 0.2s ease;
}

.tagged-attachment:hover {
  transform: translateX(4px);
}

.tagged-attachment .remove-tag {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tagged-attachment:hover .remove-tag {
  opacity: 1;
}

.floating-attachment {
  box-shadow: var(--dc-shadow-xl);
  border-radius: var(--dc-radius-xl);
}

/* â”€â”€ Dashboard (home + space landing) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-dashboard {
  width: 100%;
}

.dc-dashboard-header {
  margin-bottom: 2rem;
}

/* Hero: title left (~2/3), logo right (~1/3) */
.dc-dashboard-hero {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.dc-dashboard-hero-text {
  flex: 2;
  min-width: 0;
}

.dc-dashboard-hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.dc-dashboard-hero-image img {
  max-width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  opacity: 0.9;
}

@media (max-width: 600px) {
  .dc-dashboard-hero {
    flex-direction: column-reverse;
    gap: 1rem;
  }

  .dc-dashboard-hero-image img {
    max-height: 110px;
  }
}

.dc-dashboard-title {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--dc-text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.dc-dashboard-sub {
  font-size: 1rem;
  color: var(--dc-text-muted);
}

.dc-card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

@media (max-width: 1100px) {
  .dc-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 760px) {
  .dc-card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .dc-card-grid {
    grid-template-columns: 1fr;
  }
}

/* card overrides for grid layout */
.dc-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

.dc-card-num {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--dc-text-muted);
  margin-bottom: 0.5rem;
}

.dc-card-arrow {
  width: 0.9rem;
  height: 0.9rem;
  min-width: 0.9rem;
  min-height: 0.9rem;
  max-width: 0.9rem;
  max-height: 0.9rem;
  margin-top: 0.75rem;
  color: var(--dc-text-muted);
  transition: color 0.15s ease, transform 0.15s ease;
  flex-shrink: 0;
}

.dc-card:hover .dc-card-arrow {
  color: var(--dc-brand-primary);
  transform: translateX(3px);
}

/* â”€â”€ Sidebar extras â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--dc-text-muted);
  margin: 0.25rem 0 0.5rem 0.25rem;
}

.dc-sidebar-back {
  display: flex;
  align-items: center;
  font-size: 0.8rem;
  color: var(--dc-text-muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--dc-radius-sm);
  transition: color 0.15s ease, background 0.15s ease;
  margin-bottom: 0.25rem;
}

.dc-sidebar-back:hover {
  color: var(--dc-text-primary);
  background: var(--dc-bg-hover);
}

.dc-sidebar-badge {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--dc-bg-hover);
  color: var(--dc-text-muted);
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.dc-sidebar-link {
  display: flex;
  align-items: center;
}

/* â”€â”€ Responsive â€” collapse sidebar / toc at narrow widths â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
/* Tailwind's .hidden has low specificity; our .dc-sidebar rule wins.
   Add an explicit override so the hamburger toggle actually hides. */
.dc-sidebar.hidden,
aside.dc-sidebar.hidden {
  display: none;
}

.dc-toc.hidden,
aside.dc-toc.hidden {
  display: none;
}

/* Tablet â€” hide TOC, keep sidebar */
@media (max-width: 1024px) {
  .dc-toc {
    display: none;
  }
}

/* Mobile â€” hide sidebar by default, overlay when opened */
@media (max-width: 768px) {
  .dc-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 40;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.25);
  }

  .dc-sidebar:not(.is-open) {
    display: none;
  }

  .dc-sidebar.hidden {
    display: none;
  }

  /* The hamburger is inside the header; make it visible and prominent on mobile */
  .dc-header-toggle {
    display: inline-flex;
  }

  /* Let main content breathe */
  main[data-main-scroll] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .dc-main {
    padding: 1.5rem 1rem 3rem;
  }

  .prose {
    padding: 0 0.5rem;
  }

  /* Backdrop for when sidebar is open */
  body.is-sidebar-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30;
  }
}

/* On desktop, allow sidebar.is-open to be a no-op (sidebar is always visible unless .hidden) */
@media (min-width: 769px) {
  .dc-sidebar.is-open {
    /* no-op */
  }
}

/* â”€â”€ Mermaid diagrams â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-mermaid {
  margin: 1.5rem 0;
  text-align: center;
  overflow-x: auto;
}

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

.dc-mermaid-error {
  color: var(--dc-text-error, #ef4444);
  background: var(--dc-bg-subtle);
  padding: 0.75rem 1rem;
  border-left: 3px solid currentColor;
  font-size: 0.85rem;
  overflow-x: auto;
}

/* Hide original code block while mermaid replaces it â€” prevents flash */
[data-content-article] pre:has(> code.language-mermaid) {
  visibility: hidden;
  height: 0;
  padding: 0;
  margin: 0;
}

/* â”€â”€ Utilities â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.prose pre {
  overflow-x: auto;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.prose table {
  max-width: 100%;
}

.prose .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.5rem 0;
  border-radius: var(--dc-radius-md);
  border: 1px solid var(--dc-border-subtle);
}

/* Remove duplicate margin/border from table when inside wrapper */
.prose .table-wrap table {
  margin: 0;
  border: none;
  border-radius: 0;
  width: 100%;
  min-width: 480px;
}

/* â”€â”€ Interactive Content (Checkboxes) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.task-list-item {
  list-style: none;
}

.task-list-item input[type="checkbox"] {
  margin-right: 0.5rem;
  cursor: pointer;
  accent-color: var(--dc-accent);
  width: 1em;
  height: 1em;
  transition: opacity 0.15s;
}

.task-list-item input[type="checkbox"]:hover {
  opacity: 0.8;
}

.task-list-item input[type="checkbox"]:focus {
  outline: 2px solid var(--dc-accent);
  outline-offset: 2px;
}

/* Checked items saved as interactions — subtle highlight on the row */
.task-list-item:has(input[type="checkbox"]:checked) {
  color: var(--dc-text-muted);
  text-decoration: line-through;
  text-decoration-color: var(--dc-accent);
}

/* â”€â”€ Page Comments â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-add-comment-btn {
  transition: all 0.2s ease;
}

.dc-add-comment-btn:hover {
  opacity: 1;
  transform: translateY(-1px);
}

.dc-add-comment-btn:active {
  transform: translateY(0);
}

.dc-comments-panel {
  margin: 1.5rem 0;
  background: var(--dc-bg-elevated);
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-lg);
}

.dc-comments-empty {
  padding: 1.5rem;
  text-align: center;
  color: var(--dc-text-muted);
  font-size: 0.875rem;
}

.dc-comments-list {
  padding: 0.75rem;
}

.dc-comment {
  padding: 0.75rem;
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-sm);
  background: var(--dc-bg-surface);
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
  line-height: 1.5;
}

.dc-comment:last-child {
  margin-bottom: 0;
}

.dc-comment p {
  margin: 0.5rem 0 0;
  color: var(--dc-text-primary);
  word-wrap: break-word;
  white-space: pre-wrap;
}

.dc-delete-comment {
  background: none;
  border: none;
  color: var(--dc-text-muted);
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  transition: color 0.2s;
}

.dc-delete-comment:hover {
  color: var(--dc-text-error, #ef4444);
}

/* â”€â”€ Page Navigation (Prev/Next) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dc-page-nav {
  display: flex;
  gap: 1rem;
  padding: 1.5rem 1rem;
  border-top: 1px solid var(--dc-border-subtle);
  margin-top: 2rem;
}

.dc-nav-link {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--dc-border-subtle);
  border-radius: var(--dc-radius-md);
  background: var(--dc-bg-elevated);
  color: inherit;
  text-decoration: none;
  transition: all 0.2s ease;
}

.dc-nav-link:hover {
  background: var(--dc-brand-primary-soft);
  border-color: var(--dc-brand-primary);
}

.dc-nav-prev {
  text-align: left;
}

.dc-nav-next {
  text-align: right;
}

.dc-sidebar-progress {
  font-size: 0.8rem;
  color: var(--dc-text-muted);
  padding: 0.5rem 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--dc-border-subtle);
}

/* Annotations */

[data-content-article] {
  position: relative;
}

/* =============================================
   Interactions — trigger button
   ============================================= */
.dc-ix-trigger-btn {
  position: fixed;
  z-index: 8000;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1;
  background: var(--dc-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
  letter-spacing: 0.03em;
  transition: filter 0.15s, box-shadow 0.15s;
}

.dc-ix-trigger-btn:hover {
  filter: brightness(1.12);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

/* =============================================
   Interactions — modal overlay + panel
   ============================================= */
.dc-ix-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.dc-ix-modal[hidden] {
  display: none;
}

.dc-ix-modal-panel {
  background: var(--dc-bg-surface, #1a1d1d);
  border: 1px solid var(--dc-border);
  border-radius: 12px;
  width: 480px;
  max-width: calc(100vw - 2rem);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
  position: relative;
  z-index: 9001;
}

/* =============================================
   Interactions — tabs
   ============================================= */
.dc-ix-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--dc-bg-base, #0a0b0b);
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  padding: 0.25rem;
}

.dc-ix-tab {
  flex: 1;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 500;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  background: none;
  color: var(--dc-text-muted);
  transition: background 0.15s, color 0.15s;
}

.dc-ix-tab:hover {
  color: var(--dc-text);
}

.dc-ix-tab.is-active {
  background: var(--dc-accent);
  color: #fff;
}

/* =============================================
   Interactions — textarea
   ============================================= */
.dc-ix-textarea {
  width: 100%;
  min-height: 90px;
  resize: vertical;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  background: var(--dc-bg-base, #0a0b0b);
  color: var(--dc-text);
  font-size: 0.875rem;
  font-family: inherit;
  box-sizing: border-box;
  line-height: 1.5;
  transition: border-color 0.15s;
  outline: none;
}

.dc-ix-textarea:focus {
  border-color: var(--dc-accent);
}

/* =============================================
   Interactions — attachment picker
   ============================================= */
.dc-ix-attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 0.5rem;
  max-height: 200px;
  overflow-y: auto;
}

.dc-ix-attachment-item {
  border: 2px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  padding: 4px;
  text-align: center;
  background: var(--dc-bg-base, #0a0b0b);
  font-size: 0.7rem;
  color: var(--dc-text-muted);
  overflow: hidden;
  transition: border-color 0.15s, background 0.15s;
}

.dc-ix-attachment-item:hover {
  border-color: var(--dc-border);
  background: var(--dc-bg-elevated, #141717);
}

.dc-ix-attachment-item.is-selected {
  border-color: var(--dc-accent);
  background: color-mix(in srgb, var(--dc-accent) 15%, var(--dc-bg-base, #0a0b0b));
}

.dc-ix-attachment-item img {
  width: 100%;
  height: 48px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
  margin-bottom: 2px;
}

/* Inline SVG preview — grid thumbnail */
.dc-ix-attachment-preview {
  width: 100%;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 2px;
  background: var(--dc-bg-elevated, #141717);
}

.dc-ix-attachment-preview svg,
.dc-ix-svg-inline svg {
  width: 100%;
  height: 100%;
  max-height: 48px;
}

/* Inline SVG in popover thumb */
.dc-ix-thumb--svg {
  width: 100%;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 6px;
  background: var(--dc-bg-elevated, #141717);
  margin-bottom: 0.35rem;
}

.dc-ix-thumb--svg svg {
  width: 100%;
  height: 100%;
  max-height: 80px;
}

.dc-ix-attachment-item-icon {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

/* =============================================
   Interactions — modal action buttons
   ============================================= */
.dc-ix-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--dc-border);
}

.dc-ix-btn-cancel {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  background: var(--dc-bg-elevated, #141717);
  color: var(--dc-text-muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
}

.dc-ix-btn-cancel:hover {
  border-color: var(--dc-text-muted);
  color: var(--dc-text);
}

.dc-ix-btn-save {
  padding: 0.45rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--dc-accent);
  color: #fff;
  cursor: pointer;
  transition: filter 0.15s;
}

.dc-ix-btn-save:hover {
  filter: brightness(1.1);
}

.dc-ix-btn-save:disabled {
  opacity: 0.5;
  cursor: default;
}

.dc-ix-marker {
  position: absolute;
  right: -2rem;
  width: 1.5rem;
  z-index: 100;
}

.dc-ix-icon-btn {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 1px solid var(--dc-border);
  background: var(--dc-bg-elevated);
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
}

.dc-ix-icon-btn:hover {
  border-color: var(--dc-accent);
}

.dc-ix-popover {
  position: absolute;
  right: 2rem;
  top: 0;
  width: 220px;
  background: var(--dc-bg-surface, #0e1010);
  border: 1px solid var(--dc-border);
  border-radius: 8px;
  padding: 0.75rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
  z-index: 8500;
  font-size: 0.8rem;
}

.dc-ix-popover[hidden] {
  display: none;
}

.dc-ix-popover-body {
  background: var(--dc-bg-surface, #0e1010);
  padding: 0.25rem 0;
}

.dc-ix-popover-text {
  color: var(--dc-text);
  margin: 0 0 0.4rem;
  line-height: 1.5;
}

.dc-ix-popover-time {
  display: block;
  color: var(--dc-text-muted);
  font-size: 0.7rem;
  margin-bottom: 0.5rem;
}

.dc-ix-thumb {
  width: 100%;
  border-radius: 4px;
  margin-bottom: 0.4rem;
  display: block;
}

.dc-ix-filename {
  color: var(--dc-text-muted);
  word-break: break-all;
  display: block;
  margin-bottom: 0.4rem;
}

.dc-ix-popover-footer {
  border-top: 1px solid var(--dc-border-subtle);
  padding-top: 0.4rem;
  margin-top: 0.25rem;
}

.dc-ix-delete-btn {
  font-size: 0.7rem;
  color: var(--dc-error, #e53e3e);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.dc-ix-delete-btn:hover {
  text-decoration: underline;
}

.dc-ix-mobile-toggle {
  display: none;
}

@media (max-width: 768px) {
  .dc-ix-marker {
    display: none;
  }

  .dc-ix-marker.is-visible {
    display: block;
    position: static;
    width: auto;
    margin: 0.25rem 0;
  }

  .dc-ix-mobile-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    border: 1px solid var(--dc-border);
    border-radius: 4px;
    background: var(--dc-bg-elevated);
    color: var(--dc-text-muted);
    cursor: pointer;
    margin-bottom: 1rem;
  }
}