/*!
 * Republjika Vilgerska · vilgeria.com
 * © 2026 RV Software Board. All rights reserved.
 */

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body > main { flex: 1 0 auto; }

.hub { padding: calc(var(--topbar-h) + 72px) 0 110px; }

.hub__head { margin-bottom: 44px; }

.hub__feature {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 30px;
    padding: 34px 36px;
    margin-bottom: 64px;
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: #fff;
    background:
        radial-gradient(520px circle at 100% 0%, rgba(95, 174, 126, 0.2), transparent 55%),
        linear-gradient(160deg, #173022, #0e1511 70%);
    border: 1px solid rgba(95, 174, 126, 0.25);
    transition: border-color 0.3s, transform 0.4s var(--ease), opacity 0.9s var(--ease);
}

.hub__feature:hover { border-color: rgba(95, 174, 126, 0.55); }

.hub__feature img { width: 84px; height: 84px; object-fit: contain; }

.hub__feature h2 {
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 2.2vw, 1.5rem);
    line-height: 1.25;
    margin: 6px 0 6px;
}

.hub__feature p { color: var(--muted); }

.hub__tag {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
}

.hub__arrow {
    font-size: 1.4rem;
    color: var(--muted);
    transition: transform 0.3s var(--ease), color 0.3s;
}

.hub__feature:hover .hub__arrow,
.hub__item:hover .hub__arrow { transform: translateX(5px); color: #fff; }

.hub__group {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin: 0 0 18px;
}

.hub__group span {
    font-family: var(--font-body);
    font-size: 12px;
    letter-spacing: 0;
    padding: 2px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--muted);
}

.hub__list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 56px;
}

.hub__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    text-decoration: none;
    color: #fff;
    transition: border-color 0.3s, background 0.3s;
}

a.hub__item:hover { border-color: var(--line-strong); background: var(--surface-2); }

.hub__item h3 {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.35;
    margin-bottom: 4px;
}

.hub__item p { font-size: 14px; color: var(--muted); }

.hub__item.is-soon h3 { color: rgba(255, 255, 255, 0.72); }

.hub__soon {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    color: var(--dim);
}

.read-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 2100;
    background: linear-gradient(90deg, var(--green-2), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
}

.docs { padding-top: var(--topbar-h); }

.doc-container { width: 100%; }

.docs-layout {
    display: grid;
    grid-template-columns: 1fr minmax(0, 780px) 1fr;
    column-gap: 56px;
    padding: 64px 24px 100px;
    align-items: start;
}

.docs-layout--single {
    grid-template-columns: minmax(0, 780px);
    justify-content: center;
}

.docs-layout--single .doc-content { grid-column: 1; }

.doc-content > .eyebrow { margin-bottom: 10px; }

.doc-sidebar {
    grid-column: 1;
    justify-self: end;
    width: 250px;
    position: sticky;
    top: calc(var(--topbar-h) + 32px);
    max-height: calc(100vh - var(--topbar-h) - 64px);
    overflow-y: auto;
    scrollbar-width: none;
}

.doc-sidebar::-webkit-scrollbar { display: none; }

.doc-sidebar__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 14px;
}

.doc-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-left: 1px solid var(--line);
}

.nav-link {
    display: block;
    margin-left: -1px;
    padding: 6px 0 6px 16px;
    border-left: 2px solid transparent;
    font-size: 13px;
    line-height: 1.4;
    color: var(--dim);
    text-decoration: none;
    transition: color 0.25s, border-color 0.25s;
}

.nav-link:hover { color: #fff; }

.nav-link.active {
    color: #fff;
    font-weight: 600;
    border-left-color: var(--accent);
}

.doc-content {
    grid-column: 2;
    width: 100%;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16.5px;
    line-height: 1.8;
}

.doc-content .section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    margin-bottom: 32px;
}

.doc-content h2,
.doc-content h3,
.doc-content h4 {
    color: #fff;
    font-weight: 700;
    scroll-margin-top: calc(var(--topbar-h) + 24px);
}

.doc-content h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    letter-spacing: 0.02em;
    margin: 56px 0 18px;
    padding-top: 28px;
    border-top: 1px solid var(--line);
}

.doc-content h3 {
    font-size: 1.1rem;
    letter-spacing: 0.04em;
    margin: 32px 0 12px;
    padding-left: 14px;
    border-left: 3px solid var(--accent);
}

.doc-content h4 {
    font-size: 1rem;
    margin: 24px 0 10px;
}

.doc-content p { margin-bottom: 16px; }

.doc-content strong,
.doc-content b { color: #fff; font-weight: 700; }

.doc-quote {
    margin: 24px 0;
    padding: 20px 24px;
    background: rgba(95, 174, 126, 0.06);
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
}

.doc-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    margin: -14px 0 28px;
    font-size: 13px;
    color: var(--dim);
}

.doc-summary {
    margin: 0 0 36px;
    padding: 22px 24px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 3px solid var(--accent);
}

.doc-summary h2 {
    margin: 0 0 12px !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 0.8rem !important;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent) !important;
}

.doc-summary ul { margin: 0 !important; }
.doc-summary li { margin-bottom: 6px !important; }

.doc-content .nested-list {
    list-style: none;
    counter-reset: item;
    margin: 16px 0;
}

.doc-content .nested-list li {
    display: table;
    width: 100%;
    counter-increment: item;
    margin-bottom: 8px;
}

.doc-content .nested-list li::before {
    content: counters(item, ".") ". ";
    display: table-cell;
    width: 1%;
    padding-right: 12px;
    white-space: nowrap;
    color: var(--accent);
    font-weight: 700;
}

.doc-content .nested-list .nested-list {
    counter-reset: item;
    margin: 10px 0 10px 24px;
}

.doc-content ul:not(.nested-list) {
    list-style: none;
    margin: 16px 0;
}

.doc-content ul:not(.nested-list) li {
    display: table;
    width: 100%;
    margin-bottom: 8px;
}

.doc-content ul:not(.nested-list) li::before {
    content: "•";
    display: table-cell;
    width: 1%;
    padding-right: 12px;
    color: var(--accent);
    font-weight: 700;
}

.doc-code {
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    font-family: Consolas, Monaco, monospace;
    font-size: 0.9em;
}

.doc-content hr {
    border: none;
    height: 1px;
    background: var(--line-strong);
    margin: 32px 0;
}

.doc-content a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.25s, border-color 0.25s;
}

.doc-content a:hover { color: #fff; border-bottom-color: #fff; }

.doc-table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin: 24px 0;
    border-radius: var(--radius);
    border: 1px solid var(--line-strong);
}

.doc-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    text-align: left;
}

.doc-content th {
    padding: 14px 20px;
    background: rgba(95, 174, 126, 0.08);
    border-bottom: 1px solid var(--line-strong);
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.doc-content td {
    padding: 12px 20px;
    border-bottom: 1px solid var(--line);
}

.doc-content tr:last-child td { border-bottom: none; }

.copy-tooltip {
    position: absolute;
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    background: var(--surface-2);
    color: #fff;
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    animation: tooltip-in 0.2s var(--ease) forwards;
}

.copy-tooltip:hover { background: var(--green); border-color: var(--green-2); }

@keyframes tooltip-in {
    from { opacity: 0; transform: translateY(4px) scale(0.95); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 1180px) {
    .docs-layout:not(.docs-layout--single) { grid-template-columns: 230px minmax(0, 1fr); column-gap: 40px; }
    .doc-sidebar { width: 100%; }
    .doc-content { grid-column: 2; }
}

@media (max-width: 900px) {
    .hub__list { grid-template-columns: 1fr; }
    .hub__feature { grid-template-columns: 1fr auto; padding: 26px; }
    .hub__feature img { display: none; }

    .docs-layout { display: block; padding: 0 0 80px; }

    .doc-sidebar {
        position: sticky;
        top: var(--topbar-h);
        z-index: 100;
        width: 100%;
        max-height: none;
        padding: 12px 16px;
        margin-bottom: 36px;
        background: rgba(8, 9, 10, 0.92);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--line);
    }

    .doc-sidebar__title { display: none; }

    .doc-nav {
        flex-direction: row;
        gap: 18px;
        overflow-x: auto;
        white-space: nowrap;
        border-left: none;
        scrollbar-width: none;
    }

    .doc-nav::-webkit-scrollbar { display: none; }

    .nav-link {
        margin: 0;
        padding: 4px 0;
        border-left: none;
        border-bottom: 2px solid transparent;
    }

    .nav-link.active { border-bottom-color: var(--accent); }

    .doc-content { padding: 32px 16px 0; font-size: 16px; }
}

@media (max-width: 560px) {
    .hub { padding: calc(var(--topbar-h) + 44px) 0 80px; }
    .hub .section-title,
    .doc-content .section-title { font-size: 1.35rem; }
    .doc-content h2 { font-size: 1.1rem; margin-top: 44px; }
    .hub__feature { padding: 22px 20px; gap: 16px; margin-bottom: 48px; }
    .hub__item { padding: 16px 18px; }
}
