/* ── Rovlin design tokens (matches rovlin.com/css/style.css) ── */
:root {
    --seal-brown: #0e0708;
    --black: #000000;
    --white: #ffffff;
    --dark-gray: #232323;
    --medium-gray: #717580;
    --light-gray: #a8a8a8;
    --very-light-gray: #f7f7f7;
    --light-medium-gray: #eaeaeb;
    --extra-medium-gray: #e4e4e4;
    --green: #2ebb79;
    --red: #dc3131;
    --light-red: #feedec;
    --orange: #ef991f;
    --golden-yellow: #fd961e;
    --cornflower-blue: #377dff;
    --selago: #e8f1ff;
    --solitude-blue: #f0f5ff;
    --white-ice: #d8f5ef;
    --majorelle-blue: #724ade;
    --charcoal-blue: #202329;

    /* Semantic aliases */
    --brown: var(--seal-brown);
    --dark: var(--dark-gray);
    --mid: var(--medium-gray);
    --light: var(--light-gray);
    --bg: var(--very-light-gray);
    --border: var(--light-medium-gray);
    --blue: #377dff;
    --green-dim: rgba(46, 187, 121, 0.13);
    --blue-dim: rgba(55, 125, 255, 0.08);
    --orange-dim: rgba(239, 153, 31, 0.11);
    --red-dim: var(--light-red);

    --sw: 264px;
    --th: 58px;
    --font: 'Inter', sans-serif;
    --mono: 'JetBrains Mono', monospace;
    --r: 8px;
    --rl: 12px;
    --ease: 0.18s ease;
}

/* TOPBAR */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--th);
    background: var(--dark);
    display: flex;
    align-items: center;
    padding: 0 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-img {
    height: 28px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.logo-fallback {
    display: none;
    width: 30px;
    height: 30px;
    background: var(--green);
    border-radius: 7px;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--white);
    font-family: var(--font);
}

.topbar-sep {
    width: 1px;
    height: 20px;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 20px;
}

.topbar-label {
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.8rem;
}

.topbar-name {
    color: var(--white);
    font-size: 0.82rem;
    font-weight: 600;
    margin-left: 6px;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-btn {
    background: var(--green);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 6px 16px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    font-family: var(--font);
    transition: background var(--ease), opacity var(--ease);
}

.login-btn:hover {
    opacity: 0.88;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    padding: 4px;
    align-items: center;
}

/* LAYOUT */
.layout {
    display: flex;
    margin-top: var(--th);
    min-height: calc(100vh - var(--th));
}

/* SIDEBAR */
.sidebar {
    width: var(--sw);
    min-width: var(--sw);
    background: var(--bg);
    border-right: 1px solid var(--border);
    position: fixed;
    top: var(--th);
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 0 48px;
}

.sidebar::-webkit-scrollbar {
    width: 3px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.nav-label {
    font-size: 0.63rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--light);
    padding: 16px 20px 6px;
}

.nav-link {
    display: block;
    padding: 6px 20px;
    color: var(--mid);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    border-left: 2px solid transparent;
    transition: color var(--ease), background var(--ease), border-color var(--ease);
    cursor: pointer;
}

.nav-link:hover {
    color: var(--brown);
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: var(--blue);
    background: var(--blue-dim);
    border-left-color: var(--blue);
    font-weight: 600;
}

.nav-sub {
    padding-left: 34px;
    font-size: 0.78rem;
}

.nav-hr {
    height: 1px;
    background: var(--border);
    margin: 10px 20px;
}

/* MAIN */
.main {
    margin-left: var(--sw);
    flex: 1;
    padding: 48px 72px 96px;
    max-width: calc(var(--sw) + 860px);
}

.doc-section {
    scroll-margin-top: calc(var(--th) + 28px);
    margin-bottom: 72px;
}

/* TYPE */
.eyebrow {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--blue);
    margin-bottom: 10px;
}

h1.pg-title {
    font-size: 2.4rem;
    font-weight: 800;
    letter-spacing: -0.8px;
    line-height: 1.1;
    color: var(--brown);
    margin-bottom: 18px;
}

.pg-lead {
    font-size: 1rem;
    color: var(--mid);
    line-height: 1.7;
    max-width: 640px;
    margin-bottom: 28px;
}

h2.sec {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--brown);
    letter-spacing: -0.3px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sec-icon {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}

h3.sub {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--brown);
    margin: 26px 0 12px;
}

p {
    color: var(--mid);
    line-height: 1.75;
    margin-bottom: 14px;
    font-size: 0.88rem;
}

a {
    color: var(--blue);
    text-decoration: underline;
    text-decoration-color: rgba(55, 125, 255, 0.3);
    text-underline-offset: 2px;
}

a:hover {
    text-decoration-color: var(--blue);
}

ul.dlist {
    padding-left: 20px;
    margin-bottom: 14px;
}

ul.dlist li {
    color: var(--mid);
    line-height: 1.7;
    font-size: 0.88rem;
    margin-bottom: 4px;
}

/* CALLOUTS */
.callout {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 14px 18px;
    border-radius: var(--r);
    margin-bottom: 20px;
    font-size: 0.85rem;
    line-height: 1.65;
    border: 1px solid;
}

.ci {
    font-size: 1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.cb {
    flex: 1;
}

.cb strong {
    font-weight: 700;
}

.c-info {
    background: rgba(55, 125, 255, 0.07);
    border-color: rgba(55, 125, 255, 0.15);
    color: #1a4db8;
}

.c-warn {
    background: rgba(239, 153, 31, 0.09);
    border-color: rgba(239, 153, 31, 0.28);
    color: #7a4900;
}

.c-tip {
    background: var(--white-ice);
    border-color: rgba(46, 187, 121, 0.3);
    color: #0c4526;
}

/* CODE */
.code-block {
    background: var(--brown);
    border-radius: var(--rl);
    margin: 16px 0 24px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.code-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(255, 255, 255, 0.03);
}

.code-lang {
    font-family: var(--mono);
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.3);
}

.copy-btn {
    font-size: 0.7rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    padding: 3px 10px;
    cursor: pointer;
    font-family: var(--font);
    transition: all var(--ease);
}

.copy-btn:hover {
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.25);
}

pre {
    padding: 18px 20px;
    overflow-x: auto;
    font-family: var(--mono);
    font-size: 0.79rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.82);
}

.tk {
    color: #7dd3fc;
}

.ts {
    color: #86efac;
}

.tn {
    color: #fca5a5;
}

.tw {
    color: #c4b5fd;
}

.tc {
    color: rgba(255, 255, 255, 0.28);
}

.tg {
    color: var(--green);
}

code {
    font-family: var(--mono);
    font-size: 0.82em;
    background: var(--bg);
    color: #2a3fa0;
    padding: 2px 6px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

/* ENDPOINTS */
.ep {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 11px 16px;
    border: 1px solid var(--border);
    border-radius: var(--r);
    margin-bottom: 10px;
    background: var(--bg);
    font-size: 0.84rem;
}

.ep:hover {
    border-color: #c8c8cc;
}

.method {
    font-family: var(--mono);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 5px;
    flex-shrink: 0;
}

.get {
    background: var(--green-dim);
    color: #1a7a4a;
}

.post {
    background: var(--blue-dim);
    color: #1a57cc;
}

.put {
    background: var(--orange-dim);
    color: #8a5000;
}

.del {
    background: var(--red-dim);
    color: #991b1b;
}

.ep-path {
    font-family: var(--mono);
    font-size: 0.81rem;
    color: var(--brown);
    flex: 1;
}

.ep-note {
    color: var(--light);
    font-size: 0.78rem;
}

/* TOOL CARDS */
.tool {
    border: 1px solid var(--border);
    border-radius: var(--rl);
    margin-bottom: 14px;
    overflow: hidden;
    transition: box-shadow var(--ease), border-color var(--ease);
}

.tool:hover {
    border-color: #c4c4c8;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.05);
}

.tool-hdr {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
    background: var(--white);
    cursor: pointer;
    user-select: none;
}

.tool.open .tool-hdr {
    border-bottom: 1px solid var(--border);
}

.fn-name {
    font-family: var(--mono);
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--brown);
    margin-bottom: 4px;
}

.fn-desc {
    font-size: 0.8rem;
    color: var(--mid);
    line-height: 1.5;
}

.chev {
    margin-left: auto;
    color: var(--light);
    transition: transform 0.2s, color 0.2s;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 3px;
}

.chev svg {
    width: 16px;
    height: 16px;
    display: block;
}

.tool.open .chev {
    transform: rotate(90deg);
    color: var(--blue);
}

.tool-body {
    display: none;
    padding: 20px 20px 22px;
    background: var(--bg);
}

.tool.open .tool-body {
    display: block;
}

.tool-body p {
    font-size: 0.83rem;
    margin-bottom: 12px;
}

/* PARAM TABLE */
.ptable {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-top: 10px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--r);
    overflow: hidden;
}

.ptable th {
    text-align: left;
    padding: 8px 14px;
    background: var(--bg);
    color: var(--mid);
    font-weight: 700;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    border-bottom: 1px solid var(--border);
}

.ptable td {
    padding: 9px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.55;
}

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

.ptable tr:hover td {
    background: rgba(55, 125, 255, 0.025);
}

.pn {
    font-family: var(--mono);
    font-size: 0.79rem;
    color: var(--blue);
}

.pt {
    display: inline-block;
    background: var(--bg);
    color: var(--mid);
    font-family: var(--mono);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.pr {
    display: inline-block;
    margin-left: 4px;
    background: var(--red-dim);
    color: var(--red);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 4px;
}

.po {
    display: inline-block;
    margin-left: 4px;
    background: var(--bg);
    color: var(--light);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid var(--border);
}

.pd {
    color: var(--mid);
    font-size: 0.8rem;
}

.none-row td {
    color: var(--light);
    text-align: center;
    font-style: italic;
    font-size: 0.8rem;
    padding: 14px;
}

/* STEPS */
.steps {
    margin-bottom: 20px;
}

.step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.step-n {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--dark-gray);
    color: var(--white);
    font-size: 0.75rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.step-t {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 5px;
}

.step-d {
    font-size: 0.83rem;
    color: var(--mid);
    line-height: 1.65;
}

/* CARDS */
.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 24px;
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--rl);
    padding: 18px 20px;
    background: var(--white);
    transition: border-color var(--ease), box-shadow var(--ease);
}

.card:hover {
    border-color: #bbb;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

.card-icon {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--brown);
    margin-bottom: 5px;
}

.card-desc {
    font-size: 0.8rem;
    color: var(--mid);
    line-height: 1.6;
}

/* TOOL CATEGORY */
.tcat {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--mid);
    margin: 28px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tcat::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* FOOTER */
/* RESPONSIVE */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
        z-index: 150;
        position: fixed;
        transition: transform 0.25s ease;
    }

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

    .main {
        margin-left: 0;
        padding: 32px 24px 64px;
    }

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

    h1.pg-title {
        font-size: 1.8rem;
    }

    .pg-lead {
        font-size: 1.1rem;
    }

    p {
        font-size: 1rem;
    }

    ul.dlist li {
        font-size: 1rem;
    }

    .callout {
        font-size: 0.95rem;
    }

    .tool-body p {
        font-size: 0.95rem;
    }

    h3.sub {
        font-size: 1.05rem;
    }

    h2.sec {
        font-size: 1.45rem;
    }

    .fn-name {
        font-size: 0.95rem;
    }

    .fn-desc {
        font-size: 0.9rem;
    }

    .ptable {
        font-size: 0.9rem;
    }

    .ptable th {
        font-size: 0.75rem;
    }

    .pn {
        font-size: 0.88rem;
    }

    .pt {
        font-size: 0.78rem;
    }

    .pd {
        font-size: 0.9rem;
    }

    .step-t {
        font-size: 1rem;
    }

    .step-d {
        font-size: 0.95rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-desc {
        font-size: 0.9rem;
    }

    .tcat {
        font-size: 0.75rem;
    }

    .none-row td {
        font-size: 0.9rem;
    }

    pre {
        font-size: 0.85rem;
    }

    .ep {
        font-size: 0.92rem;
    }

    .method {
        font-size: 0.72rem;
    }

    .menu-btn {
        display: flex !important;
    }
}

.mcp-wrapper .sidebar {
    top: 70px;
}

.mcp-wrapper .layout {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
}