:root {
    --bg: #11130f;
    --surface: #171a15;
    --surface-2: #20251e;
    --surface-3: #282f26;
    --line: rgba(233, 226, 198, 0.13);
    --line-strong: rgba(233, 226, 198, 0.24);
    --text: #f2ead5;
    --muted: #b8b196;
    --soft: #817b67;
    --gold: #d4a848;
    --green: #73a766;
    --teal: #67a6a1;
    --red: #bd6b58;
    --ink: #0b0d0a;
    --shadow: 0 18px 54px rgba(0, 0, 0, 0.36);
    --radius: 8px;
    --panel: var(--surface);
    --panel-soft: var(--surface-2);
    --border: var(--line);
    --border-strong: var(--line-strong);
    --primary: var(--gold);
    --primary-soft: rgba(212, 168, 72, 0.12);
    --sidebar-width: 320px;
    color-scheme: dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(115, 167, 102, 0.11), transparent 34rem),
        radial-gradient(circle at bottom right, rgba(212, 168, 72, 0.08), transparent 30rem),
        var(--bg);
    color: var(--text);
}

body {
    overflow-x: hidden;
    overflow-y: auto;
}

body::-webkit-scrollbar {
    width: 12px;
}

body::-webkit-scrollbar-track {
    background: rgba(10, 13, 9, 0.94);
}

body::-webkit-scrollbar-thumb {
    border: 3px solid rgba(10, 13, 9, 0.94);
    border-radius: 999px;
    background: rgba(212, 168, 72, 0.42);
}

.ambient-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 1;
}

button,
input,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

input,
textarea,
.content-host,
.editor-preview {
    user-select: text;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: 72px auto;
    position: relative;
    z-index: 1;
}

.topbar {
    position: sticky;
    top: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(17, 19, 15, 0.86);
    backdrop-filter: blur(16px);
    z-index: 20;
}

.topbar-inner {
    height: 72px;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 250px;
    color: inherit;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(212, 168, 72, 0.6);
    background:
        linear-gradient(145deg, rgba(212, 168, 72, 0.28), rgba(115, 167, 102, 0.12)),
        #1a1d18;
    border-radius: var(--radius);
    color: #ffe1a0;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    box-shadow: inset 0 0 18px rgba(212, 168, 72, 0.14);
}

.brand-title {
    display: block;
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: 0;
    font-size: 17px;
}

.brand-subtitle {
    display: block;
    color: var(--muted);
    font-size: 11px;
    margin-top: 3px;
}

.top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    min-width: 0;
    overflow-x: auto;
    padding: 2px 0;
    scrollbar-width: none;
}

.top-actions::-webkit-scrollbar {
    display: none;
}

.tag,
.chip {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 999px;
    color: var(--muted);
}

.top-actions .btn {
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
}

.shell {
    min-height: calc(100vh - 72px);
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    top: 72px;
    height: calc(100vh - 72px);
    min-height: calc(100vh - 72px);
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--line);
    background: rgba(20, 23, 18, 0.78);
    overflow: hidden;
    padding: 18px 14px;
}

.search-box {
    z-index: 2;
    flex: 0 0 auto;
    background: linear-gradient(rgba(20, 23, 18, 0.98), rgba(20, 23, 18, 0.92));
    padding: 0 0 14px;
}

.search-box label,
.field span,
.tree-caption span,
.path-chip span {
    display: block;
    color: var(--soft);
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: 0;
}

.search-box input,
.field input,
.editor-field textarea {
    width: 100%;
    border: 1px solid var(--line);
    background: #0f120e;
    color: var(--text);
    border-radius: var(--radius);
    outline: none;
}

.search-box input,
.field input {
    height: 42px;
    padding: 0 12px;
}

.search-box input:focus,
.field input:focus,
.editor-field textarea:focus {
    border-color: rgba(212, 168, 72, 0.62);
    box-shadow: 0 0 0 3px rgba(212, 168, 72, 0.12);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    font-weight: 800;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.btn:hover,
.btn:focus-visible {
    color: var(--text);
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.07);
    outline: none;
}

.btn-primary {
    color: #161910;
    background: var(--gold);
    border-color: rgba(212, 168, 72, 0.86);
}

.btn-primary:hover,
.btn-primary:focus-visible {
    color: #11130f;
    background: #e0b75f;
    border-color: #e0b75f;
}

.path-chip {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
}

.path-chip span {
    margin-bottom: 0;
}

.path-chip strong {
    color: var(--text);
    font-size: 13px;
}

.tree-panel {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
    padding-top: 8px;
}

.tree-caption {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    padding: 8px 8px 10px;
}

.tree-caption span {
    margin: 0;
}

.tree-caption strong {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.tree-root {
    min-height: 0;
    flex: 1 1 auto;
    display: grid;
    align-content: start;
    gap: 1px;
    overflow: auto;
    padding: 4px 4px 18px 0;
    scrollbar-color: rgba(212, 168, 72, 0.42) transparent;
    scrollbar-width: thin;
}

.tree-root::-webkit-scrollbar,
.content-host::-webkit-scrollbar,
.editor-host::-webkit-scrollbar,
.editor-preview::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.tree-root::-webkit-scrollbar-track,
.content-host::-webkit-scrollbar-track,
.editor-host::-webkit-scrollbar-track,
.editor-preview::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.tree-root::-webkit-scrollbar-thumb,
.content-host::-webkit-scrollbar-thumb,
.editor-host::-webkit-scrollbar-thumb,
.editor-preview::-webkit-scrollbar-thumb {
    border: 2px solid rgba(15, 18, 14, 0.94);
    border-radius: 999px;
    background: rgba(212, 168, 72, 0.38);
}

.tree-node {
    width: 100%;
}

.tree-directory {
    display: flex;
    flex-direction: column;
}

.tree-entry {
    width: 100%;
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--muted);
    border-radius: var(--radius);
    padding: 7px 8px 7px calc(8px + (var(--tree-depth, 0) * 13px));
    cursor: pointer;
    text-align: left;
    font-size: 13px;
    line-height: 1.2;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.tree-entry:hover,
.tree-entry:focus-visible,
.tree-entry.is-active {
    color: var(--text);
    border-color: var(--line);
    background: rgba(255, 255, 255, 0.05);
    outline: none;
}

.tree-entry.is-active {
    border-color: rgba(212, 168, 72, 0.45);
    background:
        linear-gradient(90deg, rgba(212, 168, 72, 0.16), rgba(115, 167, 102, 0.07)),
        rgba(255, 255, 255, 0.045);
}

.tree-entry-directory {
    color: var(--muted);
    border-top: 1px solid var(--line);
    border-radius: 0;
    margin-top: 4px;
    font-weight: 900;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
}

.tree-entry-directory.is-open {
    color: var(--text);
}

.tree-file {
    justify-content: flex-start;
    color: var(--muted);
    font-weight: 650;
    text-transform: none;
    padding-left: calc(16px + (var(--tree-depth, 0) * 13px));
}

.tree-caret {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-grid;
    place-items: center;
    color: var(--soft);
    font-size: 16px;
    font-weight: 900;
    line-height: 1;
    opacity: 0.9;
}

.tree-caret::before {
    content: "+";
}

.tree-entry.is-open .tree-caret::before {
    content: "-";
}

.tree-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tree-children {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 8px;
}

.tree-directory.is-open > .tree-children {
    display: flex;
}

.workspace {
    min-height: calc(100vh - 72px);
    overflow: visible;
}

.article {
    width: min(1420px, calc(100% - 64px));
    height: auto;
    margin: 0 auto;
    padding: 24px 0 72px;
    display: block;
    min-height: calc(100vh - 72px);
}

.article-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    border: 1px solid var(--line);
    background:
        linear-gradient(135deg, rgba(212, 168, 72, 0.12), rgba(103, 166, 161, 0.06)),
        rgba(23, 26, 21, 0.9);
    border-radius: var(--radius);
    padding: clamp(22px, 4vw, 34px);
    box-shadow: var(--shadow);
}

.article-copy {
    min-width: 0;
}

.kicker {
    color: var(--gold);
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0;
    margin-bottom: 8px;
}

h1,
h2,
h3,
p {
    margin: 0;
}

.article-head h1 {
    font-size: clamp(30px, 5.2vw, 52px);
    letter-spacing: 0;
    line-height: 1;
    overflow-wrap: anywhere;
}

.lead {
    max-width: 820px;
    margin-top: 12px;
    color: var(--muted);
    line-height: 1.6;
    font-size: 15px;
    overflow-wrap: anywhere;
}

.doc-trail {
    max-width: 100%;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 13px;
    color: var(--muted);
}

.doc-trail-home,
.doc-crumb,
.doc-trail-empty {
    display: inline-flex;
    align-items: center;
    line-height: 1;
}

.doc-trail-home {
    width: 18px;
    height: 18px;
    color: #e0bd67;
}

.doc-trail-home svg {
    width: 18px;
    height: 18px;
    display: block;
}

.doc-crumb {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.doc-crumb.is-current {
    color: var(--text);
    font-weight: 800;
}

.doc-trail-separator {
    color: rgba(184, 177, 150, 0.62);
    font-size: 14px;
    font-weight: 500;
}

.doc-trail-empty {
    color: var(--muted);
    font-size: 13px;
}

.chip-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 800;
}

.tag.gold {
    color: #f3d38d;
    border-color: rgba(212, 168, 72, 0.35);
    background: rgba(212, 168, 72, 0.1);
}

.tag.green {
    color: #b8dda8;
    border-color: rgba(115, 167, 102, 0.35);
    background: rgba(115, 167, 102, 0.1);
}

.tag.teal {
    color: #b9e2df;
    border-color: rgba(103, 166, 161, 0.35);
    background: rgba(103, 166, 161, 0.1);
}

.content-card {
    min-height: auto;
    display: block;
    margin-top: 18px;
    border: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.content-meta {
    width: fit-content;
    max-width: 100%;
    margin: 0 0 10px;
    padding: 8px 11px;
    border: 1px solid rgba(233, 226, 198, 0.1);
    border-radius: var(--radius);
    background: rgba(17, 19, 15, 0.52);
    color: var(--soft);
    font-size: 11px;
    font-weight: 800;
    backdrop-filter: blur(10px);
}

.content-host {
    min-height: auto;
    overflow: visible;
    padding: 18px 8px 72px;
    line-height: 1.65;
}

.is-hidden {
    display: none !important;
}

.empty-state {
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius);
    padding: 28px 18px;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    text-align: center;
}

.empty-state strong {
    color: var(--text);
}

.editor-host {
    min-height: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
    overflow: auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.72);
    scrollbar-color: rgba(212, 168, 72, 0.42) transparent;
    scrollbar-width: thin;
}

.editor-head {
    display: flex;
    gap: 12px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field span {
    margin: 0;
}

.editor-path-field,
.editor-field {
    min-width: 0;
    flex: 1 1 auto;
}

.editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
    align-items: stretch;
}

.editor-toolbar {
    position: sticky;
    top: 12px;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 26, 21, 0.96);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
}

.editor-tool-group {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0;
    border: 0;
    background: transparent;
}

.editor-tool-group-title {
    display: none;
}

.editor-tool {
    position: relative;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.editor-tool:hover,
.editor-tool:focus-visible {
    background: rgba(212, 168, 72, 0.12);
    border-color: rgba(212, 168, 72, 0.45);
    color: var(--text);
    outline: none;
}

.editor-tool::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    bottom: calc(100% + 8px);
    transform: translateX(-50%) translateY(4px);
    padding: 6px 8px;
    border-radius: var(--radius);
    background: rgba(10, 12, 9, 0.96);
    color: var(--text);
    border: 1px solid var(--line);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 140ms ease, transform 140ms ease;
    z-index: 20;
}

.editor-tool-icon,
.editor-tool-icon svg {
    width: 15px;
    height: 15px;
}

.editor-separator {
    width: 1px;
    height: 26px;
    background: var(--line);
    margin: 0 2px;
}

.editor-field textarea {
    min-height: 640px;
    height: calc(100vh - 260px);
    resize: vertical;
    padding: 14px 16px;
    font: 13px/1.6 Consolas, "Courier New", monospace;
}

.editor-preview-card {
    display: flex;
    flex-direction: column;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(23, 26, 21, 0.82);
    overflow: hidden;
}

.editor-preview-head {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.035);
    color: var(--soft);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.editor-preview {
    min-height: 640px;
    height: calc(100vh - 260px);
    overflow: auto;
    padding: 20px;
    scrollbar-color: rgba(212, 168, 72, 0.42) transparent;
    scrollbar-width: thin;
}

.sidebar-overlay {
    display: none;
}

.doc-block + .doc-block {
    margin-top: 16px;
}

.doc-heading {
    margin: 0 0 10px;
    color: var(--text);
    line-height: 1.22;
    letter-spacing: 0;
}

.doc-heading.h1 {
    font-size: clamp(24px, 2.6vw, 34px);
}

.doc-heading.h2 {
    font-size: clamp(20px, 2vw, 26px);
}

.doc-heading.h3 {
    font-size: 17px;
}

.doc-paragraph {
    color: var(--muted);
    line-height: 1.68;
    font-size: 14px;
}

.doc-link {
    color: #e7c36d;
    text-decoration: none;
    font-weight: 800;
}

.doc-link:hover {
    text-decoration: underline;
}

.doc-code,
.doc-pre {
    margin: 0;
    position: relative;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0c0f0b;
    color: #edf3df;
    overflow: auto;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.55;
}

.doc-pre[class*="language-"] {
    padding-top: 40px;
}

.doc-pre code[class*="language-"] {
    display: block;
    background: transparent;
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    white-space: pre;
}

.doc-code-language {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    min-height: 20px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(212, 168, 72, 0.12);
    color: #f3d38d;
    border: 1px solid rgba(212, 168, 72, 0.24);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.doc-inline-code,
.doc-span.muted,
.doc-span.muted-note {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 1px 7px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.045);
    color: #f0d088;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.9em;
    font-weight: 700;
    line-height: 1.35;
    vertical-align: baseline;
}

.doc-label,
.doc-span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 8px;
    border: 1px solid rgba(103, 166, 161, 0.28);
    border-radius: 999px;
    background: rgba(103, 166, 161, 0.1);
    color: #b9e2df;
    font-size: 12px;
    font-weight: 800;
}

.doc-quote {
    margin: 0;
    padding: 14px 16px;
    border-left: 4px solid var(--gold);
    background: rgba(212, 168, 72, 0.08);
    color: #e4d0a1;
    border-radius: 0 var(--radius) var(--radius) 0;
}

.doc-rule {
    border: 0;
    border-top: 1px solid var(--line);
}

.doc-list {
    margin: 0;
    padding-left: 22px;
    color: var(--muted);
}

.doc-list-rich {
    display: grid;
    gap: 8px;
    padding-left: 24px;
}

.doc-list-rich li > .doc-block {
    margin-top: 8px;
}

.doc-callout {
    display: grid;
    grid-template-columns: 34px 1fr;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 20px;
    border: 1px solid transparent;
    border-left: 4px solid transparent;
    border-radius: var(--radius);
}

.doc-callout::before {
    width: 24px;
    height: 24px;
    margin-top: 1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid currentColor;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1;
}

.doc-callout-title {
    display: none;
}

.doc-callout-body {
    font-size: 15px;
    line-height: 1.5;
    color: inherit;
}

.doc-callout-warning {
    background: rgba(212, 168, 72, 0.1);
    border-color: rgba(212, 168, 72, 0.28);
    border-left-color: var(--gold);
    color: #e5c47b;
}

.doc-callout-warning::before {
    content: "!";
}

.doc-callout-success {
    background: rgba(115, 167, 102, 0.1);
    border-color: rgba(115, 167, 102, 0.3);
    border-left-color: var(--green);
    color: #b8dda8;
}

.doc-callout-success::before {
    content: "OK";
    font-size: 8px;
}

.doc-callout-error {
    background: rgba(189, 107, 88, 0.1);
    border-color: rgba(189, 107, 88, 0.32);
    border-left-color: var(--red);
    color: #e2a090;
}

.doc-callout-error::before {
    content: "x";
}

.doc-callout-info {
    background: rgba(103, 166, 161, 0.1);
    border-color: rgba(103, 166, 161, 0.3);
    border-left-color: var(--teal);
    color: #b9e2df;
}

.doc-callout-info::before {
    content: "i";
}

.doc-download {
    display: grid;
    grid-template-columns: 42px 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text);
    text-decoration: none;
    transition: background 140ms ease, border-color 140ms ease;
}

.doc-download::before {
    content: "";
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background-color: rgba(212, 168, 72, 0.1);
    background-image: var(--bbcode-download-icon);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 20px 20px;
    filter: sepia(60%) saturate(140%) hue-rotate(350deg);
}

.doc-download::after {
    content: "Descargar";
    padding: 8px 12px;
    border-radius: 999px;
    background: var(--gold);
    color: #161910;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.doc-download:hover {
    border-color: rgba(212, 168, 72, 0.42);
    background: rgba(212, 168, 72, 0.08);
    text-decoration: none;
}

.doc-download-title {
    display: none;
}

.doc-download-name {
    color: var(--text);
    font-size: 15px;
    font-weight: 900;
}

.doc-youtube {
    border-radius: var(--radius);
    overflow: hidden;
    background: #0c0f0b;
    border: 1px solid var(--line);
}

.doc-youtube-frame {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
}

.doc-align {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.doc-align-left {
    text-align: left;
    align-items: flex-start;
}

.doc-align-center {
    text-align: center;
    align-items: center;
}

.doc-align-right {
    text-align: right;
    align-items: flex-end;
}

.doc-align-justify {
    text-align: justify;
    align-items: stretch;
}

.doc-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(15, 18, 14, 0.88);
}

.doc-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
}

.doc-table th,
.doc-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
    color: var(--muted);
    line-height: 1.45;
    font-size: 14px;
}

.doc-table th {
    color: var(--text);
    background: rgba(255, 255, 255, 0.045);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.doc-table tr:last-child td,
.doc-table tr:last-child th {
    border-bottom: 0;
}

.doc-hide {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.doc-hide-summary {
    padding: 12px 14px;
    cursor: pointer;
    color: var(--text);
    font-weight: 900;
    list-style: none;
}

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

.doc-hide-content {
    padding: 0 14px 14px;
    display: grid;
    gap: 10px;
}

.doc-figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.doc-image {
    display: block;
    max-width: 100%;
    height: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #0c0f0b;
}

.doc-figcaption {
    color: var(--soft);
    font-size: 12px;
}

@media (hover: hover) and (pointer: fine) {
    .editor-tool:hover::after {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
        transition-delay: 120ms;
    }
}

@media (max-width: 1060px) {
    body {
        overflow: auto;
    }

    .app-shell {
        grid-template-rows: 72px auto;
    }

    .topbar-inner {
        padding: 0 16px;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .top-actions {
        gap: 6px;
    }

    .top-actions .btn {
        min-height: 34px;
        padding: 0 9px;
        font-size: 12px;
    }

    .shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        inset: 72px auto 0 0;
        width: min(88vw, 340px);
        transform: translateX(-105%);
        transition: transform 160ms ease;
        z-index: 30;
        box-shadow: var(--shadow);
    }

    body.sidebar-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 72px 0 0;
        background: rgba(0, 0, 0, 0.46);
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease;
        z-index: 25;
    }

    body.sidebar-open .sidebar-overlay {
        opacity: 1;
        pointer-events: auto;
    }

    .workspace {
        overflow: visible;
    }

    .article {
        width: min(100% - 28px, 980px);
        height: auto;
        display: block;
        padding-top: 18px;
    }

    .content-card {
        margin-top: 18px;
    }

    .content-host {
        max-height: none;
        overflow: visible;
        padding-left: 0;
        padding-right: 0;
    }

    .article-head {
        flex-direction: column;
    }

    .editor-grid {
        grid-template-columns: 1fr;
    }

    .editor-preview,
    .editor-field textarea {
        min-height: 420px;
        height: auto;
    }
}

@media (max-width: 760px) {
    .brand {
        min-width: 0;
    }

    .brand-subtitle {
        display: none;
    }

    .content-host {
        padding: 22px 18px 48px;
    }

    .article-head {
        padding: 22px;
    }

    .btn {
        flex: 1 1 auto;
    }

    .doc-table {
        min-width: 620px;
    }

    .doc-download {
        grid-template-columns: 36px 1fr;
    }

    .doc-download::after {
        grid-column: 1 / -1;
        justify-content: center;
        text-align: center;
    }
}
