/* Shared layout for documentation article pages (linked from docs/*/index.html) */

body {
    margin-top: 900px;
}

.doc-header {
    margin-top: 800px;
    padding-top: 40px;
    padding-bottom: 40px;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    padding-left: 24px;
    padding-right: 24px;
}

.doc-title {
    font-size: clamp(1.85rem, 4.2vw, 2.65rem);
    font-weight: 600;
    color: #fff;
    margin: 0 auto 0;
    padding-top: 8px;
    line-height: 1.12;
    letter-spacing: -0.03em;
    text-align: center;
    width: 100%;
    max-width: 100%;
}

.doc-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin: 20px auto 0;
    line-height: 1.65;
    max-width: 640px;
    text-align: center;
    width: 100%;
}

.doc-hero-image {
    max-width: 720px;
    margin: 44px auto 48px;
    padding: 0 20px;
}

.doc-hero-image-inner {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.doc-content {
    max-width: 700px;
    margin: 0 auto 56px;
    padding: 0 20px;
}

.doc-section {
    margin-bottom: 44px;
}

.doc-section h2 {
    font-size: 1.45rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 14px;
    text-align: left;
}

.doc-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    margin-top: 22px;
    margin-bottom: 10px;
}

.doc-section p {
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 14px;
}

.doc-section ul {
    list-style: none;
    padding: 0;
    margin-bottom: 14px;
}

.doc-section li {
    font-size: 0.95rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 10px;
    padding-left: 24px;
    position: relative;
}

.doc-section li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent-primary);
}

.doc-section ul.doc-checklist li::before {
    content: "✓";
    font-weight: 700;
}

.code-block {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    margin: 18px 0;
    overflow-x: auto;
}

.code-block code {
    font-family: ui-monospace, "Cascadia Code", "Monaco", monospace;
    font-size: 0.85rem;
    color: #22d3ee;
}

/* Related docs — single row, framed bar */
.doc-related {
    max-width: 960px;
    margin: 0 auto 40px;
    padding: 16px 16px 14px;
    background: #000;
    border: 1px solid rgba(150, 150, 160, 0.55);
    border-radius: 12px;
}

.doc-related-heading {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin: 0 0 16px;
}

.doc-related-row {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 14px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
}

.doc-related-card {
    flex: 1 1 0;
    min-width: 0;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.2s ease;
}

.doc-related-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.doc-related-thumb {
    width: 100%;
    aspect-ratio: 16 / 10;
    background: rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.doc-related-body {
    padding: 12px 10px 14px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 0;
}

.doc-related-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.doc-related-date {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-align: left;
}

@media (max-width: 768px) {
    body {
        margin-top: 800px;
    }

    .doc-header {
        margin-top: 700px;
    }

    .doc-related-card {
        flex: 0 0 42%;
        min-width: 140px;
    }
}
