/* ============================================================
   Cardora API Docs — "Midnight Blueprint" theme
   A developer-centric design with depth, precision & warmth
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Source+Sans+3:ital,wght@0,400;0,500;0,600;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* --- Design tokens --- */
:root {
    --c-bg:          #f7f8fc;
    --c-surface:     #ffffff;
    --c-surface-alt: #f0f2f8;
    --c-border:      #e2e5ef;
    --c-border-soft: #eceef5;

    --c-navy:        #141a2e;
    --c-navy-light:  #2a3152;
    --c-slate:       #5c6380;
    --c-muted:       #8b90a5;

    --c-accent:      #e85d26;
    --c-accent-soft: #fff4ef;
    --c-accent-hover:#d04d1a;
    --c-blue:        #3b6cf5;
    --c-blue-soft:   #eef2ff;
    --c-green:       #16a34a;
    --c-green-soft:  #ecfdf5;
    --c-amber:       #d97706;
    --c-amber-soft:  #fffbeb;
    --c-red:         #dc2626;
    --c-red-soft:    #fef2f2;

    --c-code-bg:     #0d1117;
    --c-code-fg:     #c9d1d9;
    --c-code-accent: #79c0ff;
    --c-code-string: #a5d6ff;
    --c-code-num:    #ff7b72;

    --ff-display:    'Outfit', system-ui, sans-serif;
    --ff-body:       'Source Sans 3', system-ui, sans-serif;
    --ff-mono:       'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;

    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-xl:     20px;

    --shadow-sm:     0 1px 2px rgba(20,26,46,.04), 0 1px 3px rgba(20,26,46,.06);
    --shadow-md:     0 2px 8px rgba(20,26,46,.05), 0 4px 16px rgba(20,26,46,.06);
    --shadow-lg:     0 4px 12px rgba(20,26,46,.06), 0 8px 32px rgba(20,26,46,.08);
    --shadow-glow:   0 0 0 3px rgba(59,108,245,.15);

    --ease-out:      cubic-bezier(.22,1,.36,1);
    --ease-spring:   cubic-bezier(.34,1.56,.64,1);
}

/* --- Reset --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
    font-family: var(--ff-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--c-navy-light);
    background: var(--c-bg);
    min-height: 100vh;
}

/* --- Background texture --- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(20,26,46,.03) 1px, transparent 0);
    background-size: 24px 24px;
    pointer-events: none;
    z-index: 0;
}

body[data-hub]::before { display: none; }

body > * { position: relative; z-index: 1; }

/* ============================================================
   Top navigation bar
   ============================================================ */
.docs-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.82);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--c-border);
    padding: 0 24px;
}

.docs-topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    gap: 16px;
}

.docs-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--c-navy);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.docs-logo-mark {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    flex-shrink: 0;
    object-fit: contain;
}

.docs-topbar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.docs-topbar-nav a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    font-family: var(--ff-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--c-slate);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all .15s var(--ease-out);
    white-space: nowrap;
}

.docs-topbar-nav a:hover {
    background: var(--c-surface-alt);
    color: var(--c-navy);
    text-decoration: none;
}

.docs-topbar-nav a.active {
    background: var(--c-blue-soft);
    color: var(--c-blue);
}

.docs-lang-switch {
    display: inline-flex;
    gap: 2px;
    background: var(--c-surface-alt);
    padding: 3px;
    border-radius: var(--radius-sm);
}

.docs-lang-switch a {
    padding: 4px 10px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--c-muted);
    text-decoration: none;
    border-radius: 4px;
    transition: all .15s var(--ease-out);
}

.docs-lang-switch a:hover {
    color: var(--c-navy);
    text-decoration: none;
}

.docs-lang-switch a.active {
    background: var(--c-surface);
    color: var(--c-navy);
    box-shadow: var(--shadow-sm);
}

/* ============================================================
   Hero header
   ============================================================ */
.docs-hero {
    position: relative;
    overflow: hidden;
    background: var(--c-navy);
    padding: 72px 24px 64px;
    text-align: center;
    color: white;
}

.docs-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 30% 20%, rgba(59,108,245,.2), transparent),
        radial-gradient(ellipse 500px 300px at 70% 80%, rgba(232,93,38,.15), transparent);
    pointer-events: none;
}

.docs-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.6), transparent);
    pointer-events: none;
}

.docs-hero-inner {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.docs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 100px;
    font-family: var(--ff-mono);
    font-size: 0.78rem;
    font-weight: 500;
    color: rgba(255,255,255,.75);
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.docs-hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--c-green);
    box-shadow: 0 0 8px rgba(22,163,74,.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: .4; }
}

.docs-hero-logo {
    height: 40px;
    margin-bottom: 20px;
    object-fit: contain;
}

.docs-hero h1 {
    font-family: var(--ff-display);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 16px;
    color: white;
    border: none;
    padding: 0;
}

.docs-hero p {
    font-size: 1.15rem;
    color: rgba(255,255,255,.65);
    line-height: 1.6;
    max-width: 540px;
    margin: 0 auto;
}

/* ============================================================
   Page container
   ============================================================ */
.docs-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
}

.docs-container--narrow {
    max-width: 860px;
}

/* ============================================================
   Section cards (used on index pages)
   ============================================================ */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin: 32px 0;
}

.docs-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all .2s var(--ease-out);
    position: relative;
    overflow: hidden;
}

.docs-card:hover {
    border-color: var(--c-blue);
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(59,108,245,.1);
    transform: translateY(-2px);
}

.docs-card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.docs-card-icon--blue   { background: var(--c-blue-soft); color: var(--c-blue); }
.docs-card-icon--green  { background: var(--c-green-soft); color: var(--c-green); }
.docs-card-icon--accent { background: var(--c-accent-soft); color: var(--c-accent); }
.docs-card-icon--amber  { background: var(--c-amber-soft); color: var(--c-amber); }

.docs-card h3 {
    font-family: var(--ff-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-navy);
    margin-bottom: 8px;
    margin-top: 0;
    border: none;
    padding: 0;
}

.docs-card p {
    font-size: 0.9rem;
    color: var(--c-slate);
    line-height: 1.55;
    margin-bottom: 0;
}

.docs-card-link {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-blue);
    text-decoration: none;
    transition: gap .15s var(--ease-out);
}

.docs-card-link:hover {
    gap: 8px;
    text-decoration: none;
}

.docs-card-link::after {
    content: '\2192';
}

/* Link card (clickable full card) */
a.docs-card {
    text-decoration: none;
    color: inherit;
    display: block;
}

a.docs-card:hover {
    text-decoration: none;
}

/* ============================================================
   Content body (README / endpoints pages)
   ============================================================ */
.docs-content {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-xl);
    padding: 48px 56px;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
    .docs-content { padding: 28px 20px; }
}

/* Breadcrumb / format links bar */
.docs-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--c-border);
}

.docs-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--c-slate);
    text-decoration: none;
    background: var(--c-surface-alt);
    border-radius: var(--radius-sm);
    transition: all .15s var(--ease-out);
}

.docs-breadcrumb a:hover {
    background: var(--c-blue-soft);
    color: var(--c-blue);
    text-decoration: none;
}

/* --- Typography in content --- */
.docs-content h1 {
    font-family: var(--ff-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--c-navy);
    letter-spacing: -0.02em;
    margin-top: 48px;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--c-border);
    line-height: 1.25;
}

.docs-content h1:first-child { margin-top: 0; }

.docs-content h2 {
    font-family: var(--ff-display);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--c-navy);
    letter-spacing: -0.015em;
    margin-top: 40px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-border-soft);
    line-height: 1.3;
}

.docs-content h3 {
    font-family: var(--ff-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--c-navy-light);
    margin-top: 28px;
    margin-bottom: 12px;
    line-height: 1.35;
}

.docs-content p {
    margin-bottom: 16px;
    color: var(--c-navy-light);
}

.docs-content a {
    color: var(--c-blue);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: border-color .15s;
}

.docs-content a:hover {
    border-bottom-color: var(--c-blue);
    text-decoration: none;
}

.docs-content ul, .docs-content ol {
    margin-left: 24px;
    margin-bottom: 20px;
}

.docs-content li {
    margin-bottom: 8px;
    color: var(--c-navy-light);
}

.docs-content li::marker {
    color: var(--c-muted);
}

.docs-content strong {
    color: var(--c-navy);
    font-weight: 600;
}

.docs-content hr {
    border: none;
    border-top: 1px solid var(--c-border);
    margin: 36px 0;
}

.docs-content small {
    font-size: 0.85rem;
    color: var(--c-muted);
}

/* --- Inline code --- */
.docs-content code {
    font-family: var(--ff-mono);
    font-size: 0.85em;
    font-weight: 500;
    background: var(--c-surface-alt);
    color: var(--c-accent);
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid var(--c-border-soft);
    word-break: break-word;
}

/* --- Code blocks --- */
.docs-content pre {
    position: relative;
    background: var(--c-code-bg);
    color: var(--c-code-fg);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,.06);
    font-size: 0.875rem;
    line-height: 1.65;
}

.docs-content pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}

/* Copy button for code blocks */
.code-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 5px 10px;
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: rgba(255,255,255,.4);
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 5px;
    cursor: pointer;
    transition: all .15s var(--ease-out);
    opacity: 0;
    z-index: 2;
}

pre:hover .code-copy-btn { opacity: 1; }

.code-copy-btn:hover {
    color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.12);
}

.code-copy-btn.copied {
    color: var(--c-green);
    border-color: rgba(22,163,74,.3);
}

/* --- Tables --- */
.docs-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--c-border);
    font-size: 0.9rem;
}

.docs-content th {
    background: var(--c-surface-alt);
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 0.82rem;
    color: var(--c-slate);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

.docs-content td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--c-border-soft);
    vertical-align: top;
}

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

.docs-content tr:hover td {
    background: rgba(59,108,245,.02);
}

/* --- Table of contents --- */
.docs-toc {
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 24px 28px;
    margin: 24px 0 32px;
}

.docs-toc h2 {
    font-family: var(--ff-display);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
    margin: 0 0 14px 0;
    padding: 0;
    border: none;
}

.docs-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-toc > ul > li {
    margin-bottom: 4px;
}

.docs-toc ul ul {
    margin-left: 18px;
    margin-top: 2px;
    margin-bottom: 4px;
}

.docs-toc a {
    display: inline-block;
    padding: 3px 0;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--c-navy-light);
    text-decoration: none;
    border-bottom: none;
    transition: color .12s;
}

.docs-toc a:hover {
    color: var(--c-blue);
    border-bottom: none;
}

.docs-toc ul ul a {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--c-slate);
}

/* ============================================================
   Endpoint blocks (endpoints page)
   ============================================================ */
.endpoint-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin: 24px 0 16px;
}

.endpoint-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    border-radius: 5px;
    min-width: 52px;
    text-align: center;
}

.endpoint-method--get    { background: var(--c-green-soft); color: var(--c-green); }
.endpoint-method--post   { background: var(--c-blue-soft); color: var(--c-blue); }
.endpoint-method--put    { background: var(--c-amber-soft); color: var(--c-amber); }
.endpoint-method--patch  { background: var(--c-amber-soft); color: var(--c-amber); }
.endpoint-method--delete { background: var(--c-red-soft); color: var(--c-red); }

/* fallback for generic use */
.endpoint-method:not([class*="--"]) {
    background: var(--c-blue-soft);
    color: var(--c-blue);
}

.endpoint-path {
    font-family: var(--ff-mono);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--c-navy);
}

/* ============================================================
   Info / feature cards in content
   ============================================================ */
.docs-info-card {
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin: 16px 0;
}

.docs-info-card h3 {
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--c-navy);
    margin: 0 0 10px 0;
}

.docs-info-card ul {
    margin-bottom: 0;
}

.docs-info-card--accent {
    border-left: 3px solid var(--c-accent);
    background: var(--c-accent-soft);
}

.docs-info-card--blue {
    border-left: 3px solid var(--c-blue);
    background: var(--c-blue-soft);
}

/* ============================================================
   Endpoint summary table (index page)
   ============================================================ */
.docs-endpoint-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--c-border);
    margin: 20px 0;
    font-size: 0.9rem;
}

.docs-endpoint-table th {
    background: var(--c-navy);
    color: rgba(255,255,255,.85);
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 16px;
    text-align: left;
    border-bottom: none;
}

.docs-endpoint-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--c-border-soft);
    vertical-align: middle;
}

.docs-endpoint-table tr:last-child td { border-bottom: none; }

.docs-endpoint-table tr:hover td { background: var(--c-surface-alt); }

.docs-endpoint-table code {
    font-size: 0.82rem;
}

/* ============================================================
   Quick start / getting started steps
   ============================================================ */
.docs-steps {
    counter-reset: step;
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-steps li {
    position: relative;
    padding-left: 56px;
    margin-bottom: 24px;
    counter-increment: step;
}

.docs-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 1px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c-blue-soft);
    color: var(--c-blue);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 0.9rem;
    display: grid;
    place-items: center;
    border: 2px solid var(--c-blue);
}

/* ============================================================
   Footer
   ============================================================ */
.docs-footer {
    text-align: center;
    padding: 32px 24px;
    margin-top: 48px;
    border-top: 1px solid var(--c-border);
    color: var(--c-muted);
    font-size: 0.85rem;
}

.docs-footer a {
    color: var(--c-slate);
    text-decoration: none;
    font-weight: 500;
}

.docs-footer a:hover { color: var(--c-blue); }

/* ============================================================
   Quick-start callout box
   ============================================================ */
.docs-callout {
    background: linear-gradient(135deg, var(--c-blue-soft), #f0edff);
    border: 1px solid rgba(59,108,245,.15);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin: 24px 0;
}

.docs-callout h3 {
    font-family: var(--ff-display);
    font-weight: 700;
    color: var(--c-navy);
    margin: 0 0 12px 0;
    font-size: 1.1rem;
}

.docs-callout ol, .docs-callout ul {
    margin-bottom: 0;
}

/* ============================================================
   Doc file links (index page)
   ============================================================ */
.docs-file-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-file-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 18px 20px;
    margin-bottom: 8px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    transition: all .15s var(--ease-out);
}

.docs-file-item:hover {
    border-color: var(--c-blue);
    box-shadow: var(--shadow-sm);
}

.docs-file-item a {
    text-decoration: none;
    color: var(--c-navy);
    font-weight: 600;
    font-family: var(--ff-display);
}

.docs-file-item a:hover { color: var(--c-blue); }

.docs-file-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: var(--c-blue-soft);
    color: var(--c-blue);
}

.docs-file-meta {
    font-size: 0.85rem;
    color: var(--c-muted);
    margin-top: 4px;
}

.docs-file-meta a {
    font-weight: 500;
    color: var(--c-slate);
    font-family: var(--ff-body);
}

/* ============================================================
   Section divider
   ============================================================ */
.section-divider {
    border: none;
    border-top: 2px solid var(--c-border);
    margin: 40px 0;
}

/* ============================================================
   Animations
   ============================================================ */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate-in {
    animation: fade-up .5s var(--ease-out) both;
}

.animate-in:nth-child(1) { animation-delay: .05s; }
.animate-in:nth-child(2) { animation-delay: .1s; }
.animate-in:nth-child(3) { animation-delay: .15s; }
.animate-in:nth-child(4) { animation-delay: .2s; }
.animate-in:nth-child(5) { animation-delay: .25s; }
.animate-in:nth-child(6) { animation-delay: .3s; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
    .docs-topbar-inner { height: 48px; }
    .docs-topbar-nav a { padding: 4px 8px; font-size: 0.8rem; }
    .docs-hero { padding: 48px 20px 40px; }
    .docs-hero h1 { font-size: 1.75rem; }
    .docs-container { padding: 24px 16px 60px; }
    .docs-grid { grid-template-columns: 1fr; }
    .docs-content { padding: 24px 18px; border-radius: var(--radius-md); }
    .docs-callout { padding: 20px; }
    .endpoint-header { flex-wrap: wrap; gap: 8px; }
    .docs-breadcrumb { gap: 4px; }
    .docs-breadcrumb a { padding: 4px 8px; font-size: 0.78rem; }
    .docs-topbar-nav { overflow-x: auto; }
}

@media (max-width: 480px) {
    .docs-topbar-nav a span { display: none; }
    .docs-content pre { padding: 14px 12px; font-size: 0.8rem; }
    .docs-endpoint-table { font-size: 0.8rem; }
    .docs-endpoint-table th, .docs-endpoint-table td { padding: 10px 10px; }
}

/* ============================================================
   Tabbed hub (index-en.html)
   ============================================================ */
.docs-topbar--hub {
    background: var(--c-navy);
    border-bottom: 1px solid rgba(255,255,255,.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.docs-topbar--hub .docs-logo {
    color: white;
}

.docs-topbar--hub .docs-lang-switch {
    background: rgba(255,255,255,.08);
}

.docs-topbar--hub .docs-lang-switch a {
    color: rgba(255,255,255,.55);
}

.docs-topbar--hub .docs-lang-switch a:hover {
    color: white;
}

.docs-topbar--hub .docs-lang-switch a.active {
    background: rgba(255,255,255,.12);
    color: white;
    box-shadow: none;
}

.docs-topbar--hub .docs-topbar-inner {
    max-width: 1280px;
}

.docs-topbar--hub .topbar-tabs {
    flex: 1;
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
}

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

.topbar-tab {
    padding: 8px 14px;
    font-family: var(--ff-body);
    font-size: 0.875rem;
    font-weight: 500;
    color: rgba(255,255,255,.55);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s var(--ease-out);
    white-space: nowrap;
    position: relative;
}

.topbar-tab:hover {
    color: rgba(255,255,255,.9);
    background: rgba(255,255,255,.06);
}

.topbar-tab.active {
    color: white;
    background: rgba(255,255,255,.08);
}

.topbar-tab.active::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 2px;
    height: 2px;
    background: var(--c-accent);
    border-radius: 2px;
}

.hub-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px 80px;
}

.tab-panel {
    display: none;
    padding-top: 28px;
    min-height: calc(100vh - 56px);
}

.tab-panel.active {
    display: flex;
    gap: 32px;
    align-items: flex-start;
}

.tab-panel--static.active {
    display: block;
}

.hub-sidebar {
    width: 240px;
    flex-shrink: 0;
    position: sticky;
    top: 72px;
    max-height: calc(100vh - 88px);
    overflow-y: auto;
    padding-bottom: 24px;
}

.hub-sidebar-title {
    font-family: var(--ff-display);
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-muted);
    margin-bottom: 10px;
    padding: 0 12px;
}

.hub-sidebar-group {
    margin-bottom: 20px;
}

.ref-sidebar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    text-align: left;
    padding: 7px 10px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--c-slate);
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .12s var(--ease-out);
    text-decoration: none;
    font-family: var(--ff-body);
    line-height: 1.4;
}

.ref-sidebar-item:hover {
    background: var(--c-surface-alt);
    color: var(--c-navy);
}

.ref-sidebar-item.active {
    background: var(--c-blue-soft);
    color: var(--c-blue);
}

/* Guide sidebar items — icon + title + subtitle layout */
.guide-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    padding: 10px 10px;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all .15s var(--ease-out);
    font-family: var(--ff-body);
    margin-bottom: 4px;
}

.guide-item:hover {
    background: var(--c-surface-alt);
    border-left-color: var(--c-border);
}

.guide-item.active {
    background: var(--c-accent-soft);
    border-left-color: var(--c-accent);
}

.guide-item-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: grid;
    place-items: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: var(--c-surface-alt);
    transition: background .15s;
    line-height: 1;
}

.guide-item.active .guide-item-icon {
    background: rgba(232,93,38,.12);
}

.guide-item-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.guide-item-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-navy);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guide-item.active .guide-item-title {
    color: var(--c-accent);
}

.guide-item-sub {
    font-size: 0.75rem;
    color: var(--c-muted);
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guide-item.active .guide-item-sub {
    color: rgba(232,93,38,.65);
}

.ref-sidebar-item .endpoint-method {
    min-width: 44px;
    padding: 2px 6px;
    font-size: 0.65rem;
}

.hub-main {
    flex: 1;
    min-width: 0;
}

.guide-panel {
    display: none;
}

.guide-panel.active {
    display: block;
    animation: fade-up .35s var(--ease-out) both;
}

.guide-eyebrow {
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--c-accent);
    margin-bottom: 8px;
}

.guide-panel h1 {
    font-family: var(--ff-display);
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--c-navy);
    letter-spacing: -0.02em;
    margin-bottom: 12px;
    line-height: 1.2;
}

.guide-intro {
    font-size: 1.05rem;
    color: var(--c-slate);
    margin-bottom: 24px;
    max-width: 640px;
}

.prereq-callout {
    background: var(--c-blue-soft);
    border: 1px solid rgba(59,108,245,.15);
    border-left: 3px solid var(--c-blue);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.prereq-callout strong {
    color: var(--c-navy);
}

.steps {
    list-style: none;
    margin: 0;
    padding: 0;
}

.step {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
    padding-bottom: 32px;
    position: relative;
}

.step-connector {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    width: 36px;
}

.step-num {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--c-blue-soft);
    color: var(--c-blue);
    font-family: var(--ff-display);
    font-weight: 700;
    font-size: 0.9rem;
    display: grid;
    place-items: center;
    border: 2px solid var(--c-blue);
    flex-shrink: 0;
    z-index: 1;
}

.step:not(:last-child) .step-connector::after {
    content: '';
    flex: 1;
    width: 2px;
    background: var(--c-border);
    margin-top: 8px;
    min-height: 24px;
}

.step-body {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
}

.step-body h3 {
    font-family: var(--ff-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--c-navy);
    margin: 0 0 8px;
}

.step-body p {
    color: var(--c-navy-light);
    margin-bottom: 12px;
    font-size: 0.95rem;
}

.step-callout {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    margin: 12px 0;
    line-height: 1.55;
}

.step-callout--info {
    background: var(--c-blue-soft);
    border-left: 3px solid var(--c-blue);
    color: var(--c-navy-light);
}

.step-callout--warn {
    background: var(--c-amber-soft);
    border-left: 3px solid var(--c-amber);
    color: var(--c-navy-light);
}

.branching-note {
    background: var(--c-accent-soft);
    border: 1px solid rgba(232,93,38,.2);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.88rem;
    margin: 12px 0;
    color: var(--c-navy-light);
}

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

.endpoint-pill {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 14px;
    background: var(--c-surface-alt);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    margin: 12px 0;
    font-size: 0.85rem;
}

.endpoint-pill .endpoint-method {
    min-width: 48px;
}

.endpoint-pill code {
    font-family: var(--ff-mono);
    font-size: 0.82rem;
    color: var(--c-navy);
    background: none;
    border: none;
    padding: 0;
}

.endpoint-pill a {
    color: var(--c-blue);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.82rem;
    margin-left: auto;
}

.endpoint-pill a:hover {
    text-decoration: underline;
}

.code-wrap {
    margin: 16px 0;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--c-code-bg);
}

.code-tabs {
    display: flex;
    gap: 0;
    background: rgba(255,255,255,.04);
    border-bottom: 1px solid rgba(255,255,255,.08);
    padding: 0 4px;
}

.code-tab {
    padding: 8px 14px;
    font-family: var(--ff-mono);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,.4);
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all .12s;
    margin-bottom: -1px;
}

.code-tab:hover {
    color: rgba(255,255,255,.7);
}

.code-tab.active {
    color: var(--c-code-accent);
    border-bottom-color: var(--c-code-accent);
}

.code-wrap pre {
    display: none;
    margin: 0;
    border: none;
    border-radius: 0;
    padding: 18px 20px;
    font-size: 0.82rem;
    background: var(--c-code-bg);
    color: var(--c-code-fg);
}

.code-wrap pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
    font-weight: 400;
}

.code-wrap pre.active {
    display: block;
}

.ref-endpoint {
    scroll-margin-top: 80px;
    margin-bottom: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid var(--c-border);
}

.ref-endpoint:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ref-endpoint > p {
    color: var(--c-slate);
    margin: 12px 0 20px;
    font-size: 0.95rem;
}

.ref-section-title {
    font-family: var(--ff-display);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--c-muted);
    margin: 24px 0 12px;
}

.param-table,
.error-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 8px;
}

.param-table th,
.error-table th {
    background: var(--c-surface-alt);
    font-family: var(--ff-display);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--c-slate);
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--c-border);
}

.param-table td,
.error-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--c-border-soft);
    vertical-align: top;
    color: var(--c-navy-light);
}

.param-table tr:last-child td,
.error-table tr:last-child td {
    border-bottom: none;
}

.param-table code,
.error-table code {
    font-size: 0.82em;
}

.response-block {
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 12px 0;
}

.response-header {
    padding: 8px 14px;
    background: var(--c-green-soft);
    font-family: var(--ff-mono);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--c-green);
    border-bottom: 1px solid var(--c-border);
}

.response-body {
    margin: 0;
    border: none;
    border-radius: 0;
    background: var(--c-code-bg);
    color: var(--c-code-fg);
    padding: 16px 18px;
    font-size: 0.82rem;
    overflow-x: auto;
}

.hub-static-card {
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-xl);
    padding: 40px 48px;
    box-shadow: var(--shadow-sm);
    max-width: 860px;
}

.hub-static-card h1 {
    font-family: var(--ff-display);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--c-navy);
    margin-bottom: 12px;
}

.hub-static-card > p {
    color: var(--c-slate);
    margin-bottom: 24px;
}

.tool-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin: 24px 0;
}

.tool-card {
    padding: 20px;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    transition: all .15s var(--ease-out);
}

.tool-card:hover {
    border-color: var(--c-blue);
    box-shadow: var(--shadow-sm);
}

.tool-card h3 {
    font-family: var(--ff-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--c-navy);
    margin-bottom: 8px;
}

.tool-card p {
    font-size: 0.88rem;
    color: var(--c-slate);
    margin: 0;
}

.tool-card a {
    display: inline-block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--c-blue);
    text-decoration: none;
}

.changelog-entry {
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--c-border);
}

.changelog-entry:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.changelog-version {
    font-family: var(--ff-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c-navy);
    margin-bottom: 4px;
}

.changelog-date {
    font-size: 0.85rem;
    color: var(--c-muted);
    margin-bottom: 16px;
}

.changelog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.changelog-tag {
    font-family: var(--ff-mono);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.changelog-tag--new { background: var(--c-green-soft); color: var(--c-green); }
.changelog-tag--fix { background: var(--c-blue-soft); color: var(--c-blue); }
.changelog-tag--note { background: var(--c-amber-soft); color: var(--c-amber); }

.changelog-entry ul {
    margin: 0 0 0 20px;
    color: var(--c-navy-light);
    font-size: 0.92rem;
}

.changelog-entry li {
    margin-bottom: 6px;
}

.test-values-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border: 1px solid var(--c-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    margin: 16px 0;
}

.test-values-table th {
    background: var(--c-navy);
    color: rgba(255,255,255,.9);
    font-family: var(--ff-display);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 10px 14px;
    text-align: left;
}

.test-values-table td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--c-border-soft);
    vertical-align: top;
}

.test-values-table tr:last-child td {
    border-bottom: none;
}

@media (max-width: 768px) {
    .tab-panel.active {
        flex-direction: column;
    }
    .hub-sidebar {
        width: 100%;
        position: static;
        max-height: none;
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding-bottom: 0;
    }
    .hub-sidebar-title,
    .hub-sidebar-group {
        width: 100%;
    }
    .guide-item {
        width: auto;
        flex-direction: row;
        border-left: none;
        border-radius: var(--radius-md);
        padding: 8px 12px;
        margin-bottom: 0;
    }
    .guide-item-sub { display: none; }
    .ref-sidebar-item {
        width: auto;
        display: inline-flex;
    }
    .topbar-tabs {
        display: none;
    }
    .hub-mobile-tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-bottom: 20px;
    }
}

.hub-mobile-tabs {
    display: none;
}

.hub-mobile-tabs .topbar-tab {
    color: var(--c-slate);
    background: var(--c-surface-alt);
}

.hub-mobile-tabs .topbar-tab.active {
    color: var(--c-blue);
    background: var(--c-blue-soft);
}

.hub-mobile-tabs .topbar-tab.active::after {
    display: none;
}
