:root {
    --doc-shell: rgba(255, 255, 255, 0.86);
    --doc-line: rgba(15, 118, 110, 0.16);
    --doc-shadow: 0 20px 44px rgba(15, 23, 42, 0.08);
    --doc-muted: #475569;
    --doc-accent: #0f766e;
    --doc-accent-strong: #0369a1;
}

body {
    min-height: 100vh;
    font-family: "Space Grotesk", "Noto Sans KR", sans-serif;
}

.doc-tools-page {
    max-width: 1160px;
    margin: 20px auto 0;
    padding: 6px;
}

.studio-shell {
    border: 1px solid var(--doc-line);
    border-radius: 24px;
    background: var(--doc-shell);
    box-shadow: var(--doc-shadow);
    padding: 22px;
    display: grid;
    gap: 20px;
}

.tool-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
    gap: 18px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(14, 116, 144, 0.12);
}

.tool-eyebrow,
.section-kicker,
.doc-view-eyebrow,
.doc-section-title,
.doc-code-title {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--doc-accent);
}

.hero-copy h1,
.section-head h2,
.section-head h3,
.docs-dashboard-head h3,
.doc-view-head h3,
.doc-empty-hero h3 {
    margin: 8px 0 0;
    font-size: clamp(1.55rem, 2vw, 2.25rem);
    line-height: 1.08;
    color: #0f172a;
}

.tool-lead,
.hero-status,
.field-hint,
.doc-view-summary,
.doc-endpoint-summary,
.doc-empty-card p,
.doc-mini-card span,
.doc-mini-card small,
.doc-column-chip span,
.doc-column-chip small,
.doc-structure-tile p,
.doc-structure-tile small,
.doc-list-meta,
.doc-list-row p {
    margin: 0;
    color: var(--doc-muted);
    line-height: 1.55;
}

.hero-actions {
    display: grid;
    align-content: start;
}

.hero-action-card,
.stage-shell,
.panel-block {
    border: 1px solid var(--doc-line);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.hero-action-card {
    padding: 18px;
    display: grid;
    gap: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 249, 255, 0.86));
}

.hero-action-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--doc-muted);
}

.hero-primary-actions,
.section-actions,
.control-grid {
    display: grid;
    gap: 10px;
}

.workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 340px);
    gap: 18px;
}

.stage-shell,
.panel-block {
    padding: 18px;
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.docs-heading-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.docs-heading-copy .section-kicker,
.docs-heading-copy h2,
.docs-heading-copy .hero-status {
    margin: 0;
}

.docs-heading-status {
    max-width: 42rem;
}

.docs-dashboard-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px;
    margin-bottom: 14px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 249, 255, 0.92), rgba(236, 253, 245, 0.96));
}

.doc-quick-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.docs-status-strip {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 10px;
    padding: 0 2px;
}

.docs-status-strip .hero-status {
    margin: 0;
}

.section-actions {
    min-width: min(100%, 380px);
}

.docs-actions-column {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.docs-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.docs-actions-column .field-input,
.docs-action-buttons .secondary-btn,
.docs-action-buttons .ghost-btn {
    width: 100%;
}

.docs-output {
    min-height: 420px;
    max-height: 72vh;
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: #f8fafc;
    padding: 14px;
}

.docs-output pre,
.docs-output code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.docs-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #0f172a;
}

.doc-view-shell {
    display: grid;
    gap: 18px;
}

.doc-board-shell {
    gap: 22px;
}

.doc-board-hero {
    display: grid;
    grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
    gap: 14px;
}

.doc-spotlight-card {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(150deg, rgba(15, 118, 110, 0.92), rgba(14, 165, 233, 0.88));
    color: #ecfeff;
    box-shadow: 0 16px 30px rgba(14, 116, 144, 0.18);
    display: grid;
    gap: 10px;
}

.doc-spotlight-card h4 {
    margin: 0;
    font-size: 1.2rem;
    color: #ffffff;
}

.doc-spotlight-card .doc-view-summary,
.doc-spotlight-card .doc-view-eyebrow {
    color: rgba(236, 254, 255, 0.92);
}

.doc-spotlight-list {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-spotlight-item {
    display: inline-flex;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
}

.doc-repo-hero {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 12px;
    padding: 14px;
    border-radius: 20px;
    overflow: hidden;
    background:
        radial-gradient(circle at top left, rgba(14, 165, 233, 0.24), transparent 34%),
        radial-gradient(circle at bottom right, rgba(15, 118, 110, 0.22), transparent 36%),
        linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(15, 23, 42, 0.02));
    border: 1px solid rgba(14, 165, 233, 0.14);
}

.doc-repo-hero-copy,
.doc-repo-nebula {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
}

.doc-repo-title-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.doc-repo-orb {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    font-weight: 800;
    color: #ecfeff;
    background: linear-gradient(140deg, #0f766e, #0ea5e9);
    box-shadow: 0 16px 30px rgba(14, 116, 144, 0.24);
}

.doc-repo-title-block {
    display: grid;
    gap: 5px;
}

.doc-repo-title-block h4 {
    margin: 0;
    font-size: clamp(1.15rem, 1.55vw, 1.7rem);
    line-height: 1.06;
    color: #0f172a;
}

.doc-repo-title-block .doc-view-summary {
    font-size: 0.9rem;
    line-height: 1.45;
}

.doc-repo-topics {
    align-items: center;
}

.doc-repo-link-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-repo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(120deg, #0f766e, #0ea5e9);
    box-shadow: 0 12px 20px rgba(14, 116, 144, 0.18);
}

.doc-repo-link.is-ghost {
    color: var(--doc-accent-strong);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(14, 165, 233, 0.18);
    box-shadow: none;
}

.doc-repo-meta-strip,
.doc-repo-signal-grid,
.doc-repo-entry-map {
    display: grid;
    gap: 8px;
}

.doc-repo-meta-strip {
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
}

.doc-repo-metric,
.doc-repo-signal,
.doc-repo-node {
    position: relative;
    border-radius: 18px;
    border: 1px solid rgba(14, 165, 233, 0.16);
    background: rgba(255, 255, 255, 0.82);
}

.doc-repo-metric,
.doc-repo-signal {
    padding: 10px 11px;
    display: grid;
    gap: 4px;
}

.doc-repo-metric span,
.doc-repo-signal p {
    font-size: 0.78rem;
}

.doc-repo-metric strong,
.doc-repo-signal strong {
    font-size: 0.96rem;
}

.doc-repo-metric span,
.doc-repo-signal p,
.doc-repo-node p,
.doc-repo-node small {
    margin: 0;
    color: var(--doc-muted);
}

.doc-repo-metric strong,
.doc-repo-signal strong,
.doc-repo-node strong {
    color: #0f172a;
}

.doc-repo-signal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-repo-signal-grid.is-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.doc-repo-summary-card {
    border: 1px solid rgba(14, 165, 233, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.84);
    padding: 12px;
}

.doc-repo-entry-map {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.doc-repo-node {
    padding: 16px;
    display: grid;
    gap: 8px;
    text-decoration: none;
    overflow: hidden;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.05);
}

.doc-repo-node::after {
    content: "";
    position: absolute;
    inset: auto -24px -24px auto;
    width: 90px;
    height: 90px;
    border-radius: 999px;
    background: rgba(14, 165, 233, 0.1);
}

.doc-repo-node.is-dir::after {
    background: rgba(15, 118, 110, 0.14);
}

.doc-repo-node-index {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgba(14, 165, 233, 0.8);
}

.doc-explorer-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
    gap: 12px;
}

.doc-explorer-pane,
.doc-explorer-aside {
    display: grid;
    gap: 14px;
}

.doc-explorer-pane {
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    padding: 12px;
}

.doc-explorer-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.doc-explorer-breadcrumb {
    margin-top: 4px;
    font-size: 0.78rem;
    color: var(--doc-muted);
}

.doc-explorer-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.doc-explorer-crumb {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    background: transparent;
    color: var(--doc-accent-strong);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
}

.doc-explorer-crumb.is-current {
    color: #0f172a;
    cursor: default;
}

.doc-explorer-list {
    display: grid;
    gap: 6px;
}

.doc-explorer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 9px 11px;
    border-radius: 14px;
    text-decoration: none;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.88));
    transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.doc-explorer-row:hover {
    transform: translateY(-1px);
    border-color: rgba(14, 165, 233, 0.28);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.doc-explorer-row.is-parent {
    width: 100%;
    appearance: none;
    text-align: left;
    cursor: pointer;
}

.doc-explorer-row-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.doc-explorer-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-size: 0.64rem;
    font-weight: 800;
    color: #0f766e;
    background: linear-gradient(135deg, rgba(204, 251, 241, 0.96), rgba(224, 242, 254, 0.96));
}

.doc-explorer-row.is-file .doc-explorer-icon {
    color: #0369a1;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.96), rgba(239, 246, 255, 0.96));
}

.doc-explorer-nameblock {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.doc-explorer-nameblock strong,
.doc-explorer-nameblock p,
.doc-explorer-meta small {
    margin: 0;
}

.doc-explorer-nameblock strong {
    color: #0f172a;
    font-size: 0.92rem;
}

.doc-explorer-nameblock p,
.doc-explorer-meta small {
    color: var(--doc-muted);
    word-break: break-word;
    font-size: 0.76rem;
}

.doc-explorer-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    flex: 0 0 auto;
}

.doc-empty-state {
    display: grid;
    gap: 18px;
}

.doc-empty-hero {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.94), rgba(209, 250, 229, 0.94));
    border: 1px solid rgba(14, 165, 233, 0.16);
}

.doc-empty-grid,
.doc-feature-grid,
.doc-structure-grid,
.doc-card-grid,
.doc-column-grid,
.doc-sample-grid {
    display: grid;
    gap: 12px;
}

.doc-empty-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-feature-grid,
.doc-structure-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.doc-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.doc-column-grid,
.doc-sample-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.doc-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.doc-empty-card,
.doc-stat-card,
.doc-mini-card,
.doc-endpoint-card,
.doc-code-block,
.doc-column-chip,
.doc-list-row,
.doc-feature-card,
.doc-structure-tile,
.doc-sample-card,
.doc-sample-item {
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
}

.doc-empty-card,
.doc-stat-card,
.doc-mini-card,
.doc-endpoint-card,
.doc-code-block,
.doc-column-chip,
.doc-feature-card,
.doc-structure-tile,
.doc-sample-card,
.doc-sample-item {
    padding: 14px;
}

.doc-empty-card,
.doc-mini-card,
.doc-endpoint-card,
.doc-feature-card,
.doc-structure-tile,
.doc-sample-card,
.doc-sample-item {
    display: grid;
    gap: 8px;
}

.doc-empty-card strong,
.doc-stat-card strong,
.doc-mini-card strong,
.doc-list-row strong,
.doc-column-chip strong,
.doc-endpoint-head strong,
.doc-feature-card strong,
.doc-structure-tile strong {
    color: #0f172a;
}

.doc-mini-card,
.doc-structure-tile,
.doc-list-row {
    text-decoration: none;
}

.doc-mini-card.is-block,
.doc-schema-card {
    gap: 10px;
}

.doc-list {
    display: grid;
    gap: 8px;
}

.doc-list-row {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.doc-badge,
.doc-pill,
.doc-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 4px 8px;
    font-size: 0.68rem;
    font-weight: 800;
}

.doc-badge,
.doc-pill {
    background: rgba(224, 242, 254, 0.9);
    color: var(--doc-accent-strong);
}

.doc-pill-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-stack {
    display: grid;
    gap: 14px;
}

.doc-endpoint-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.doc-endpoint-accordion {
    padding: 0;
    overflow: hidden;
}

.doc-endpoint-summary-row {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    cursor: pointer;
}

.doc-endpoint-summary-row::-webkit-details-marker {
    display: none;
}

.doc-endpoint-summary-main {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.doc-endpoint-toggle {
    flex: 0 0 auto;
    font-size: 0.74rem;
    font-weight: 800;
    color: var(--doc-accent-strong);
}

.doc-endpoint-accordion[open] .doc-endpoint-toggle {
    color: var(--doc-accent);
}

.doc-endpoint-accordion[open] .doc-endpoint-toggle::after {
    content: ' 접기';
}

.doc-endpoint-accordion:not([open]) .doc-endpoint-toggle::after {
    content: '';
}

.doc-endpoint-accordion-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
    border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.doc-method {
    min-width: 64px;
    color: #ffffff;
}

.doc-method-get { background: linear-gradient(120deg, #0f766e, #14b8a6); }
.doc-method-post { background: linear-gradient(120deg, #0ea5e9, #2563eb); }
.doc-method-put { background: linear-gradient(120deg, #d97706, #f59e0b); }
.doc-method-patch { background: linear-gradient(120deg, #7c3aed, #a855f7); }
.doc-method-delete { background: linear-gradient(120deg, #dc2626, #f97316); }

.doc-preview-split,
.doc-sql-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.doc-preview-placeholder {
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 16px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--doc-muted);
    font-weight: 700;
}

.doc-code-block {
    display: grid;
    gap: 8px;
    background: #f8fafc;
}

.doc-code-block pre {
    margin: 0;
    overflow: auto;
}

.doc-sample-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.86));
}

.doc-sample-key {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--doc-accent);
}

.doc-sample-value {
    color: #0f172a;
    word-break: break-word;
    line-height: 1.5;
}

.doc-sample-value.is-empty,
.doc-sample-value.is-object {
    color: var(--doc-muted);
}

.doc-object-preview {
    display: grid;
    gap: 8px;
}

.doc-raw-details {
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 12px;
}

.doc-raw-details summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--doc-accent-strong);
    list-style: none;
}

.doc-raw-details summary::-webkit-details-marker {
    display: none;
}

.doc-raw-body {
    margin-top: 10px;
}

.field-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}

.field-label {
    display: grid;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    border-radius: 14px;
    padding: 11px 14px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.primary-btn {
    border: 0;
    color: #ffffff;
    background: linear-gradient(120deg, var(--doc-accent), #0ea5e9);
}

.secondary-btn {
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--doc-accent-strong);
    background: rgba(224, 242, 254, 0.86);
}

.ghost-btn {
    border: 1px solid rgba(15, 118, 110, 0.18);
    color: var(--doc-accent);
    background: rgba(255, 255, 255, 0.92);
}

body[data-theme='dark'] .studio-shell,
body[data-theme='dark'] .hero-action-card,
body[data-theme='dark'] .stage-shell,
body[data-theme='dark'] .panel-block {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.3);
}

body[data-theme='dark'] .tool-hero {
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

body[data-theme='dark'] .hero-copy h1,
body[data-theme='dark'] .section-head h2,
body[data-theme='dark'] .section-head h3,
body[data-theme='dark'] .docs-dashboard-head h3,
body[data-theme='dark'] .doc-view-head h3,
body[data-theme='dark'] .doc-empty-hero h3,
body[data-theme='dark'] .doc-empty-card strong,
body[data-theme='dark'] .doc-stat-card strong,
body[data-theme='dark'] .doc-mini-card strong,
body[data-theme='dark'] .doc-list-row strong,
body[data-theme='dark'] .doc-column-chip strong,
body[data-theme='dark'] .doc-endpoint-head strong,
body[data-theme='dark'] .doc-feature-card strong,
body[data-theme='dark'] .doc-structure-tile strong,
body[data-theme='dark'] .doc-sample-value,
body[data-theme='dark'] .docs-output pre,
body[data-theme='dark'] .field-input,
body[data-theme='dark'] .field-label {
    color: #e5e7eb;
}

body[data-theme='dark'] .tool-lead,
body[data-theme='dark'] .hero-action-kicker,
body[data-theme='dark'] .hero-status,
body[data-theme='dark'] .field-hint,
body[data-theme='dark'] .doc-view-summary,
body[data-theme='dark'] .doc-endpoint-summary,
body[data-theme='dark'] .doc-empty-card p,
body[data-theme='dark'] .doc-mini-card span,
body[data-theme='dark'] .doc-mini-card small,
body[data-theme='dark'] .doc-column-chip span,
body[data-theme='dark'] .doc-column-chip small,
body[data-theme='dark'] .doc-structure-tile p,
body[data-theme='dark'] .doc-structure-tile small,
body[data-theme='dark'] .doc-list-meta,
body[data-theme='dark'] .doc-list-row p,
body[data-theme='dark'] .doc-preview-placeholder,
body[data-theme='dark'] .doc-sample-value.is-empty,
body[data-theme='dark'] .doc-sample-value.is-object {
    color: #94a3b8;
}

body[data-theme='dark'] .docs-output,
body[data-theme='dark'] .ghost-btn,
body[data-theme='dark'] .docs-dashboard-head,
body[data-theme='dark'] .doc-empty-card,
body[data-theme='dark'] .doc-stat-card,
body[data-theme='dark'] .doc-mini-card,
body[data-theme='dark'] .doc-endpoint-card,
body[data-theme='dark'] .doc-code-block,
body[data-theme='dark'] .doc-column-chip,
body[data-theme='dark'] .doc-list-row,
body[data-theme='dark'] .doc-feature-card,
body[data-theme='dark'] .doc-structure-tile,
body[data-theme='dark'] .doc-sample-card,
body[data-theme='dark'] .doc-sample-item,
body[data-theme='dark'] .doc-raw-details,
body[data-theme='dark'] .doc-preview-placeholder,
body[data-theme='dark'] .field-input {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme='dark'] .doc-empty-hero {
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.88), rgba(17, 94, 89, 0.86));
    border-color: rgba(125, 211, 252, 0.18);
}

body[data-theme='dark'] .doc-spotlight-card {
    background: linear-gradient(150deg, rgba(8, 47, 73, 0.96), rgba(15, 23, 42, 0.94));
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.36);
}

body[data-theme='dark'] .doc-repo-hero,
body[data-theme='dark'] .doc-repo-metric,
body[data-theme='dark'] .doc-repo-signal,
body[data-theme='dark'] .doc-repo-node,
body[data-theme='dark'] .doc-repo-summary-card {
    background: rgba(15, 23, 42, 0.84);
    border-color: rgba(125, 211, 252, 0.18);
}

body[data-theme='dark'] .doc-repo-title-block h4,
body[data-theme='dark'] .doc-repo-metric strong,
body[data-theme='dark'] .doc-repo-signal strong,
body[data-theme='dark'] .doc-repo-node strong {
    color: #e5e7eb;
}

body[data-theme='dark'] .doc-repo-metric span,
body[data-theme='dark'] .doc-repo-signal p,
body[data-theme='dark'] .doc-repo-node p,
body[data-theme='dark'] .doc-repo-node small,
body[data-theme='dark'] .doc-repo-node-index {
    color: #94a3b8;
}

body[data-theme='dark'] .doc-repo-link.is-ghost {
    background: rgba(8, 47, 73, 0.82);
    color: #7dd3fc;
    border-color: rgba(125, 211, 252, 0.18);
}

body[data-theme='dark'] .doc-endpoint-toggle {
    color: #7dd3fc;
}

body[data-theme='dark'] .doc-endpoint-accordion-body {
    border-top-color: rgba(148, 163, 184, 0.14);
}

body[data-theme='dark'] .doc-explorer-pane,
body[data-theme='dark'] .doc-explorer-row {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme='dark'] .doc-explorer-toolbar {
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

body[data-theme='dark'] .doc-explorer-icon {
    color: #99f6e4;
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.94), rgba(14, 116, 144, 0.88));
}

body[data-theme='dark'] .doc-explorer-row.is-file .doc-explorer-icon {
    color: #7dd3fc;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(3, 105, 161, 0.88));
}

body[data-theme='dark'] .doc-explorer-nameblock strong {
    color: #e5e7eb;
}

body[data-theme='dark'] .doc-explorer-nameblock p,
body[data-theme='dark'] .doc-explorer-meta small,
body[data-theme='dark'] .doc-explorer-breadcrumb,
body[data-theme='dark'] .doc-explorer-crumb {
    color: #94a3b8;
}

body[data-theme='dark'] .doc-explorer-crumb.is-current {
    color: #e5e7eb;
}

body[data-theme='dark'] .secondary-btn {
    color: #7dd3fc;
    background: rgba(8, 47, 73, 0.82);
    border-color: rgba(125, 211, 252, 0.22);
}

body[data-theme='dark'] .doc-badge,
body[data-theme='dark'] .doc-pill {
    background: rgba(8, 47, 73, 0.82);
    color: #7dd3fc;
}

body[data-theme='dark'] .doc-raw-details summary,
body[data-theme='dark'] .doc-sample-key {
    color: #7dd3fc;
}

@media (max-width: 920px) {
    .tool-hero,
    .workspace-grid,
    .doc-board-hero,
    .doc-repo-hero,
    .doc-explorer-shell,
    .doc-preview-split,
    .doc-sql-grid,
    .doc-empty-grid {
        grid-template-columns: 1fr;
    }

    .docs-status-strip,
    .docs-dashboard-head,
    .doc-quick-meta,
    .section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-actions {
        width: 100%;
    }

    .doc-repo-signal-grid {
        grid-template-columns: 1fr;
    }

    .doc-explorer-toolbar,
    .doc-explorer-row,
    .doc-endpoint-summary-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .doc-explorer-meta {
        justify-items: flex-start;
    }
}

.docs-dashboard-head h3 {
    margin: 6px 0 0;
    font-size: 1.2rem;
    color: #0f172a;
}

.doc-quick-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.section-actions {
    min-width: min(100%, 380px);
}

.docs-output {
    min-height: 420px;
    max-height: 72vh;
    overflow: auto;
    border-radius: 16px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    background: #f8fafc;
    padding: 14px;
}

.docs-output pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.84rem;
    line-height: 1.6;
    color: #0f172a;
}

.docs-output code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.doc-view-shell {
    display: grid;
    gap: 18px;
}

.doc-empty-state {
    display: grid;
    gap: 18px;
}

.doc-empty-hero {
    padding: 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(224, 242, 254, 0.94), rgba(209, 250, 229, 0.94));
    border: 1px solid rgba(14, 165, 233, 0.16);
}

.doc-empty-hero h3 {
    margin: 8px 0 0;
    font-size: 1.45rem;
    color: #0f172a;
}

.doc-empty-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.doc-empty-card {
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.92);
    display: grid;
    gap: 10px;
}

.doc-empty-card strong {
    color: #0f172a;
}

.doc-empty-card p {
    margin: 0;
    color: var(--doc-muted);
    line-height: 1.55;
}

.doc-view-head {
    display: grid;
    gap: 10px;
}

.doc-view-eyebrow,
.doc-section-title,
.doc-code-title {
    margin: 0;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--doc-accent);
}

.doc-view-head h3 {
    margin: 0;
    font-size: 1.4rem;
    color: #0f172a;
}

.doc-view-summary,
.doc-endpoint-summary,
.doc-list-row p,
.doc-mini-card span,
.doc-mini-card small,
.doc-column-chip span,
.doc-column-chip small {
    margin: 0;
    color: var(--doc-muted);
    line-height: 1.55;
}

.doc-stat-grid,
.doc-card-grid,
.doc-column-grid {
    display: grid;
    gap: 12px;
}

.doc-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.doc-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.doc-stat-card,
.doc-mini-card,
.doc-endpoint-card,
.doc-code-block,
.doc-column-chip,
.doc-list-row {
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.88);
}

.doc-stat-card,
.doc-mini-card,
.doc-endpoint-card,
.doc-code-block,
.doc-column-chip {
    padding: 14px;
}

.doc-stat-card span,
.doc-mini-card span,
.doc-column-chip span,
.doc-column-chip small {
    display: block;
}

.doc-stat-card strong,
.doc-mini-card strong,
.doc-list-row strong,
.doc-column-chip strong,
.doc-endpoint-head strong {
    color: #0f172a;
}

.doc-mini-card {
    text-decoration: none;
    display: grid;
    gap: 6px;
}

.doc-mini-card.is-block {
    align-content: start;
}

.doc-list {
    display: grid;
    gap: 10px;
}

.doc-list-row {
    padding: 14px;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    text-decoration: none;
}

.doc-list-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--doc-muted);
    text-align: right;
}

.doc-badge,
.doc-pill,
.doc-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 0.72rem;
    font-weight: 800;
}

.doc-badge,
.doc-pill {
    background: rgba(224, 242, 254, 0.9);
    color: var(--doc-accent-strong);
}

.doc-pill-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.doc-stack {
    display: grid;
    gap: 14px;
}

.doc-endpoint-card {
    display: grid;
    gap: 12px;
}

.doc-endpoint-head {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.doc-method {
    min-width: 64px;
    color: #ffffff;
}

.doc-method-get { background: linear-gradient(120deg, #0f766e, #14b8a6); }
.doc-method-post { background: linear-gradient(120deg, #0ea5e9, #2563eb); }
.doc-method-put { background: linear-gradient(120deg, #d97706, #f59e0b); }
.doc-method-patch { background: linear-gradient(120deg, #7c3aed, #a855f7); }
.doc-method-delete { background: linear-gradient(120deg, #dc2626, #f97316); }

.doc-code-block {
    display: grid;
    gap: 8px;
    background: #f8fafc;
}

.doc-sample-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(240, 249, 255, 0.86));
}

.doc-sample-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 10px;
}

.doc-sample-item {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(14, 165, 233, 0.12);
    display: grid;
    gap: 8px;
}

.doc-sample-key {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--doc-accent);
}

.doc-sample-value {
    color: #0f172a;
    word-break: break-word;
    line-height: 1.5;
}

.doc-sample-value.is-empty,
.doc-sample-value.is-object {
    color: var(--doc-muted);
}

.doc-raw-details {
    border: 1px dashed rgba(148, 163, 184, 0.4);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.6);
    padding: 10px 12px;
}

.doc-raw-details summary {
    cursor: pointer;
    font-weight: 800;
    color: var(--doc-accent-strong);
    list-style: none;
}

.doc-raw-details summary::-webkit-details-marker {
    display: none;
}

.doc-raw-body {
    margin-top: 10px;
}

.doc-code-block pre {
    margin: 0;
    overflow: auto;
}

.doc-column-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.field-input {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    font: inherit;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
}

.field-label {
    display: grid;
    gap: 8px;
    font-size: 0.84rem;
    font-weight: 700;
    color: #334155;
}

.field-hint,
.hero-status {
    margin: 0;
    color: var(--doc-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
    border-radius: 14px;
    padding: 11px 14px;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 800;
    cursor: pointer;
}

.primary-btn {
    border: 0;
    color: #ffffff;
    background: linear-gradient(120deg, var(--doc-accent), #0ea5e9);
}

.secondary-btn {
    border: 1px solid rgba(14, 165, 233, 0.3);
    color: var(--doc-accent-strong);
    background: rgba(224, 242, 254, 0.86);
}

.ghost-btn {
    border: 1px solid rgba(15, 118, 110, 0.18);
    color: var(--doc-accent);
    background: rgba(255, 255, 255, 0.92);
}

body[data-theme='dark'] .studio-shell,
body[data-theme='dark'] .hero-action-card,
body[data-theme='dark'] .stage-shell,
body[data-theme='dark'] .panel-block {
    background: rgba(15, 23, 42, 0.92);
    border-color: rgba(148, 163, 184, 0.22);
    box-shadow: 0 18px 34px rgba(2, 6, 23, 0.3);
}

body[data-theme='dark'] .tool-hero {
    border-bottom-color: rgba(148, 163, 184, 0.14);
}

body[data-theme='dark'] .hero-copy h1,
body[data-theme='dark'] .section-head h2,
body[data-theme='dark'] .section-head h3,
body[data-theme='dark'] .docs-dashboard-head h3,
body[data-theme='dark'] .doc-empty-hero h3,
body[data-theme='dark'] .doc-empty-card strong,
body[data-theme='dark'] .doc-sample-value,
body[data-theme='dark'] .doc-view-head h3,
body[data-theme='dark'] .doc-stat-card strong,
body[data-theme='dark'] .doc-mini-card strong,
body[data-theme='dark'] .doc-list-row strong,
body[data-theme='dark'] .doc-endpoint-head strong,
body[data-theme='dark'] .doc-column-chip strong,
body[data-theme='dark'] .docs-output pre,
body[data-theme='dark'] .field-input,
body[data-theme='dark'] .field-label {
    color: #e5e7eb;
}

body[data-theme='dark'] .tool-lead,
body[data-theme='dark'] .hero-action-kicker,
body[data-theme='dark'] .field-hint,
body[data-theme='dark'] .hero-status,
body[data-theme='dark'] .doc-empty-card p,
body[data-theme='dark'] .doc-sample-value.is-empty,
body[data-theme='dark'] .doc-sample-value.is-object,
body[data-theme='dark'] .doc-view-summary,
body[data-theme='dark'] .doc-endpoint-summary,
body[data-theme='dark'] .doc-list-row p,
body[data-theme='dark'] .doc-mini-card span,
body[data-theme='dark'] .doc-mini-card small,
body[data-theme='dark'] .doc-column-chip span,
body[data-theme='dark'] .doc-column-chip small,
body[data-theme='dark'] .doc-list-meta {
    color: #94a3b8;
}

body[data-theme='dark'] .docs-output,
body[data-theme='dark'] .field-input,
body[data-theme='dark'] .ghost-btn,
body[data-theme='dark'] .docs-dashboard-head,
body[data-theme='dark'] .doc-empty-card,
body[data-theme='dark'] .doc-sample-card,
body[data-theme='dark'] .doc-sample-item,
body[data-theme='dark'] .doc-raw-details,
body[data-theme='dark'] .doc-stat-card,
body[data-theme='dark'] .doc-mini-card,
body[data-theme='dark'] .doc-endpoint-card,
body[data-theme='dark'] .doc-code-block,
body[data-theme='dark'] .doc-column-chip,
body[data-theme='dark'] .doc-list-row {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme='dark'] .doc-empty-hero {
    background: linear-gradient(135deg, rgba(8, 47, 73, 0.88), rgba(17, 94, 89, 0.86));
    border-color: rgba(125, 211, 252, 0.18);
}

body[data-theme='dark'] .doc-feature-card,
body[data-theme='dark'] .doc-structure-tile,
body[data-theme='dark'] .doc-preview-placeholder {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(148, 163, 184, 0.18);
}

body[data-theme='dark'] .doc-structure-tile p,
body[data-theme='dark'] .doc-structure-tile small,
body[data-theme='dark'] .doc-preview-placeholder {
    color: #94a3b8;
}

body[data-theme='dark'] .doc-spotlight-card {
    background: linear-gradient(150deg, rgba(8, 47, 73, 0.96), rgba(15, 23, 42, 0.94));
    box-shadow: 0 18px 30px rgba(2, 6, 23, 0.36);
}

body[data-theme='dark'] .secondary-btn {
    color: #7dd3fc;
    background: rgba(8, 47, 73, 0.82);
    border-color: rgba(125, 211, 252, 0.22);
}

body[data-theme='dark'] .doc-badge,
body[data-theme='dark'] .doc-pill {
    background: rgba(8, 47, 73, 0.82);
    color: #7dd3fc;
}

body[data-theme='dark'] .doc-raw-details summary,
body[data-theme='dark'] .doc-sample-key {
    color: #7dd3fc;
}

@media (max-width: 920px) {
    .tool-hero,
    .workspace-grid {
        grid-template-columns: 1fr;
    }

    .doc-board-hero,
    .doc-preview-split,
    .doc-sql-grid,
    .doc-empty-grid {
        grid-template-columns: 1fr;
    }

    .docs-dashboard-head,
    .doc-quick-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-head {
        align-items: start;
        flex-direction: column;
    }

    .section-actions {
        width: 100%;
    }
}

.section-actions.docs-actions-column {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    align-items: stretch;
    width: min(100%, 50%);
    max-width: 50%;
    margin-left: auto;
}

.docs-heading-copy {
    width: min(100%, 50%);
    max-width: 50%;
}

.section-actions.docs-actions-column > .field-input,
.section-actions.docs-actions-column > .docs-action-buttons {
    display: block;
    width: 100%;
}

.section-actions.docs-actions-column > .docs-action-buttons {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px !important;
}

.section-actions.docs-actions-column > .docs-action-buttons > .secondary-btn,
.section-actions.docs-actions-column > .docs-action-buttons > .ghost-btn {
    flex: 1 1 0;
    width: 100%;
}

#exportBtn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    filter: saturate(0.7);
}

#exportOpenBtn:disabled {
    cursor: not-allowed;
    opacity: 0.58;
    filter: saturate(0.7);
}

body.overlay-open {
    overflow: hidden;
}

.doc-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 20px;
}

.doc-overlay.is-hidden {
    display: none;
}

.doc-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(10px);
}

.doc-overlay-panel {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 26px 70px rgba(15, 23, 42, 0.2);
    padding: 22px;
    display: grid;
    gap: 18px;
}

.doc-overlay-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.doc-overlay-close {
    border: 1px solid rgba(15, 118, 110, 0.18);
    border-radius: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--doc-accent);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
    cursor: pointer;
}

.doc-help-grid {
    display: grid;
    gap: 12px;
}

.doc-help-card {
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 16px;
    background: rgba(248, 250, 252, 0.92);
    padding: 16px;
    display: grid;
    gap: 8px;
}

.doc-help-card strong {
    color: #0f172a;
}

.doc-help-card p {
    margin: 0;
    color: var(--doc-muted);
    line-height: 1.6;
}

body[data-theme='dark'] .doc-overlay-panel {
    background: rgba(15, 23, 42, 0.96);
    border-color: rgba(148, 163, 184, 0.22);
}

body[data-theme='dark'] .doc-overlay-close,
body[data-theme='dark'] .doc-help-card {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(148, 163, 184, 0.2);
}

body[data-theme='dark'] .doc-help-card strong {
    color: #e5e7eb;
}

body[data-theme='dark'] .doc-help-card p,
body[data-theme='dark'] .doc-overlay-close {
    color: #94a3b8;
}

@media (max-width: 900px) {
    .docs-heading-copy,
    .section-actions.docs-actions-column {
        width: 100%;
        max-width: 100%;
    }

    .section-actions.docs-actions-column {
        margin-left: 0;
    }

    .section-actions.docs-actions-column > .docs-action-buttons {
        flex-direction: column !important;
    }

    .doc-overlay {
        padding: 12px;
    }

    .doc-overlay-head {
        flex-direction: column;
    }

    .docs-status-strip {
        justify-content: flex-start;
    }
}
