/* ── wavekey Developer Docs — Shared Styles ── */
:root {
    --bg-1: #ffffff;
    --bg-2: #f4f7fb;
    --bg-body: #f8f9fc;
    --text: #334155;
    --text-bright: #0f172a;
    --muted: #64748b;
    --accent: #2563eb;
    --accent-deep: #1d4ed8;
    --accent-dim: rgba(37, 99, 235, 0.07);
    --danger: #dc2626;
    --success: #16a34a;
    --warning: #d97706;
    --sidebar-bg: #0b1a2e;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --card-bg: #ffffff;
    --card-border: #e2e8f0;
    --code-bg: #f1f5f9;
    --code-border: #e2e8f0;
    --table-stripe: #f8fafc;
    --table-border: #e2e8f0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    background: var(--bg-body);
    color: var(--text);
    display: flex;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 260px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 0;
    overflow-y: auto;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0 1.2rem 1.2rem;
    text-decoration: none;
    border-bottom: 1px solid var(--sidebar-border);
    margin-bottom: 1rem;
}

.sidebar-logo img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.sidebar-logo .brand-word {
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 1.6px;
    text-transform: lowercase;
}

.sidebar-logo .brand-docs {
    font-size: 0.76rem;
    font-weight: 600;
    color: #8fb3d9;
    letter-spacing: 0.9px;
    text-transform: uppercase;
}

/* Brand word styling for content areas */
.wk {
    letter-spacing: 1.6px;
    font-weight: 700;
}

.sidebar {
    box-shadow: 1px 0 0 var(--sidebar-border);
}

.sidebar-section {
    padding: 0 0.8rem;
    margin-bottom: 0.6rem;
}

.sidebar-heading {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #8494b2;
    padding: 0.6rem 0.6rem 0.3rem;
    font-weight: 600;
}

.sidebar-link {
    display: block;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: #c8d6e5;
    text-decoration: none;
    font-size: 0.88rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.sidebar-link.active {
    background: rgba(62, 160, 255, 0.15);
    color: #5cb3ff;
    font-weight: 600;
}

.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.2rem 0;
    border-top: 1px solid var(--sidebar-border);
}

.sidebar-footer a {
    color: #8494b2;
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.15s;
}

.sidebar-footer a:hover {
    color: #5cb3ff;
}

/* ── Mobile menu ── */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    background: #0b1a2e;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #ffffff;
    padding: 0.5rem;
    cursor: pointer;
}

/* ── Main content ── */
.content {
    margin-left: 260px;
    flex: 1;
    min-width: 0;
}

.content-inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 2.5rem 2.5rem 4rem;
}

/* ── Breadcrumb ── */
.breadcrumb {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--muted);
    margin-bottom: 0.5rem;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--accent);
}

/* ── Typography ── */
h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.2;
    margin-bottom: 0.8rem;
}

h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-bright);
    margin-bottom: 0.6rem;
    padding-top: 0.5rem;
}

h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-bright);
    margin-bottom: 0.4rem;
}

.lead {
    font-size: 1.08rem;
    color: var(--muted);
    line-height: 1.7;
    margin-bottom: 2rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ── Sections ── */
.doc-section {
    margin-top: 2.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--table-border);
}

.doc-section:first-of-type {
    border-top: none;
}

/* ── Card grid (index page) ── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
    margin-bottom: 2rem;
}

.doc-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 1.5rem;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.doc-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.10);
    text-decoration: none;
}

.doc-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border: 1px solid rgba(37, 99, 235, 0.15);
    border-radius: 10px;
    margin-bottom: 1rem;
    color: var(--accent);
}

.doc-card h3 {
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.doc-card p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ── Info box / callout ── */
.info-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin: 1rem 0 1.5rem;
}

.info-box-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.info-box ol,
.info-box ul {
    padding-left: 1.4rem;
    margin-bottom: 0;
}

.info-box li {
    margin-bottom: 0.35rem;
    font-size: 0.92rem;
}

.warn-box {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

.warn-box-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--warning);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.note-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin: 1rem 0 1.5rem;
    font-size: 0.9rem;
}

.note-box strong {
    color: var(--accent);
}

/* ── Tables ── */
.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0 1.5rem;
    font-size: 0.88rem;
}

.doc-table th {
    text-align: left;
    padding: 0.6rem 0.8rem;
    background: var(--card-bg);
    border-bottom: 2px solid var(--table-border);
    color: var(--muted);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.doc-table td {
    padding: 0.55rem 0.8rem;
    border-bottom: 1px solid var(--table-border);
    vertical-align: top;
}

.doc-table tbody tr:nth-child(even) {
    background: var(--table-stripe);
}

.doc-table a {
    font-weight: 500;
}

/* ── Code blocks ── */
pre {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    overflow-x: auto;
    margin: 0.8rem 0 1.2rem;
    font-size: 0.82rem;
    line-height: 1.6;
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    color: #334155;
}

code {
    font-family: "SF Mono", "Fira Code", "Cascadia Code", monospace;
    font-size: 0.85em;
    background: #f1f5f9;
    padding: 0.15em 0.4em;
    border-radius: 4px;
    color: #0f4c81;
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    color: inherit;
    font-size: inherit;
}

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    vertical-align: middle;
}

.badge-get {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: var(--success);
}

.badge-post {
    background: #dbeafe;
    border: 1px solid #93c5fd;
    color: var(--accent);
}

.badge-admin {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    color: var(--warning);
}

.badge-available {
    background: #dcfce7;
    color: var(--success);
}

.badge-soon {
    background: #f1f5f9;
    color: var(--muted);
}

/* ── Steps ── */
.steps-list {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 1rem 0 1.5rem;
}

.steps-list li {
    counter-increment: step;
    position: relative;
    padding-left: 2.4rem;
    margin-bottom: 0.8rem;
    font-size: 0.92rem;
}

.steps-list li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0.1rem;
    width: 1.6rem;
    height: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
}

/* ── Flow diagram (ASCII-style) ── */
.flow-block {
    background: var(--code-bg);
    border: 1px solid var(--code-border);
    border-radius: 8px;
    padding: 1.2rem 1.5rem;
    overflow-x: auto;
    margin: 1rem 0 1.5rem;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    color: var(--muted);
    white-space: pre;
}

/* ── Lists ── */
ul,
ol {
    padding-left: 1.4rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.3rem;
}

/* ── Endpoint block ── */
.endpoint {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 1.2rem 1.4rem;
    margin: 1.2rem 0 1.5rem;
}

.endpoint-method {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
    font-family: "SF Mono", "Fira Code", monospace;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-bright);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.1);
    }

    .mobile-menu-btn {
        display: flex;
    }

    .content {
        margin-left: 0;
    }

    .content-inner {
        padding: 3.5rem 1.2rem 3rem;
    }

    h1 {
        font-size: 1.5rem;
    }

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