/* ═══════════════════════════════════════════════════════════
   MCP DOCS — continuous sections in the landing page's style.
   Class names (hero, section-eyebrow, btn, code-block, faq, cta)
   and values mirror landing.css so both pages read as one site.
   ═══════════════════════════════════════════════════════════ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
}

/* Sections are separated by a centred hairline, never boxed */
.hero,
.docs-section,
.faq,
.cta {
    position: relative;
}

.docs-section::before,
.faq::before,
.cta::before {
    content: '';
    position: absolute;
    top: 0;
    right: 10%;
    left: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border-soft), transparent);
    pointer-events: none;
}

.section-eyebrow {
    margin-bottom: 1rem;
    color: var(--primary);
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0.9;
}

.hero code,
.docs-section code,
.faq code,
.code-body {
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
}

:target {
    scroll-margin-top: 6rem;
}

/* ── Buttons (same as landing) ───────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: 10px;
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    color: var(--text-bright);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--primary-rgb), 0.5);
}

.btn-ghost {
    border: 1.5px solid var(--border-soft);
    background: transparent;
    color: var(--text-muted);
}

.btn-ghost:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ── Hero: split, copy left and config right ─────────────── */
.hero {
    overflow: hidden;
    padding: 9.5rem 2rem 5.5rem;
    background:
        radial-gradient(ellipse at 18% 20%, rgba(var(--primary-rgb), 0.08), transparent 42%),
        radial-gradient(ellipse at 82% 18%, rgba(var(--accent-rgb), 0.05), transparent 40%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(var(--primary-rgb), 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(var(--primary-rgb), 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
}

.hero-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-left,
.hero-right {
    min-width: 0;
}

.hero-left h1 {
    margin-bottom: 1.5rem;
    color: var(--text-bright);
    font-size: clamp(3rem, 5vw, 4.25rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.05;
}

.hero-accent {
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    max-width: 500px;
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    font-size: 1.125rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.hero-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.hero-note a {
    color: var(--primary-light);
    text-underline-offset: 3px;
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    margin-top: 2rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-soft);
}

.hero-links a {
    color: var(--text-bright);
    font-family: 'JetBrains Mono', 'Monaco', 'Menlo', monospace;
    font-size: 0.75rem;
    text-decoration: none;
}

.hero-links a::after { content: ' ↘'; color: var(--primary); }
.hero-links a:hover { color: var(--primary-light); }

.hero-code-note {
    margin-top: 0.875rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Code window (same chrome as the landing MCP block) */
.code-block {
    overflow: hidden;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(var(--bg-rgb), 0.72);
    box-shadow: 0 20px 50px rgba(var(--bg-rgb), 0.38);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem 0.625rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: rgba(var(--bg-rgb), 0.55);
}

.code-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dot.red    { background: var(--danger); }
.code-dot.yellow { background: var(--warning); }
.code-dot.green  { background: var(--success); }

.code-title {
    margin-left: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.8rem;
}

.code-copy {
    margin-left: auto;
    min-height: 30px;
    padding: 0 0.75rem;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    background: transparent;
    color: var(--text-muted);
    font: inherit;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
}

.code-copy:hover {
    border-color: var(--primary);
    color: var(--text-bright);
}

.code-block.is-copied .code-copy {
    border-color: var(--success);
    color: var(--success);
}

.code-body {
    padding: 1.5rem;
    overflow-x: auto;
    color: var(--text-bright);
    font-size: 0.82rem;
    line-height: 1.75;
}

.code-string { color: var(--success); }
.code-key    { color: var(--primary-light); }

/* ── Content sections ────────────────────────────────────── */
.docs-section {
    padding: 7rem 2rem;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
}

.docs-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.docs-inner h2 {
    margin-bottom: 1.25rem;
    color: var(--text-bright);
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.15;
}

.docs-lead {
    max-width: 640px;
    margin-bottom: 3rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.75;
}

.docs-lead a,
.docs-steps p a,
.docs-clients dd a {
    color: var(--primary-light);
    text-underline-offset: 3px;
}

/* Supporting prose under the lead */
.docs-text {
    max-width: 720px;
    margin-bottom: 1rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

.docs-text + .docs-steps,
.docs-text + .docs-rows,
.docs-checklist + .docs-text {
    margin-top: 2rem;
}

/* Agent guidance: plain rules on hairline rows */
.docs-checklist {
    max-width: 720px;
    list-style: none;
}

.docs-checklist li {
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.docs-checklist li:last-child {
    border-bottom: 1px solid var(--border);
}

/* Inline code in prose */
.docs-lead code,
.docs-text code,
.docs-checklist code,
.docs-steps p code,
.docs-clients dd code,
.faq-item p code {
    padding: 0.1em 0.35em;
    border-radius: 4px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-subtle);
    font-size: 0.875em;
}

/* Quick start: three numbered columns on a shared rule */
.docs-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
    border-top: 1px solid var(--border);
    list-style: none;
}

.docs-steps li {
    padding-top: 1.5rem;
}

.docs-step-num {
    color: var(--primary);
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.8rem;
    font-weight: 600;
}

.docs-steps h3 {
    margin: 0.75rem 0 0.5rem;
    color: var(--text-bright);
    font-size: 1.15rem;
    font-weight: 700;
}

.docs-steps p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Hairline rows (tools, resources, prompts) */
.docs-rows > div {
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
}

.docs-rows > div:last-child {
    border-bottom: 1px solid var(--border);
}

.docs-rows dt {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1rem;
    color: var(--text-bright);
    font-weight: 600;
}

.docs-rows dt code {
    color: var(--primary-subtle);
    font-size: 0.875rem;
    font-weight: 500;
}

.docs-rows dd {
    margin-top: 0.35rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.docs-price {
    color: var(--text-muted);
    font-family: 'JetBrains Mono', 'Monaco', monospace;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.docs-prompt-note {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    line-height: 1.6;
}

.docs-prompt-note strong {
    color: var(--text-bright);
}

.docs-prompt-note a {
    color: var(--primary-subtle);
}

/* Tool rows: endpoint · tools · what you get */
.docs-tool-rows > div {
    display: grid;
    grid-template-columns: minmax(10rem, 1fr) minmax(0, 1.4fr) minmax(0, 1.4fr);
    gap: 0.5rem 2rem;
    align-items: baseline;
}

.docs-tool-rows dd {
    margin-top: 0;
}

.docs-tool-names {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.docs-tool-names code {
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-subtle);
    font-size: 0.8rem;
}

/* Resources + prompts side by side */
.docs-split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5rem;
}

.docs-split .docs-lead {
    margin-bottom: 2rem;
}

/* Clients: columns on a shared rule, like the steps */
/* Claude Code command beside the one-click editor installs */
.docs-install {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 2rem;
    align-items: center;
    margin-bottom: 3rem;
}

.docs-install .code-body {
    font-size: 0.78rem;
    white-space: pre;
}

.docs-install-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.docs-install-links p {
    flex-basis: 100%;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

.docs-clients {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem;
    border-top: 1px solid var(--border);
}

.docs-clients > div {
    padding-top: 1.5rem;
}

.docs-clients dt {
    color: var(--text-bright);
    font-weight: 700;
}

.docs-clients dd {
    margin-top: 0.5rem;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.65;
}

/* ── FAQ (same as landing) ───────────────────────────────── */
.faq {
    padding: 8rem 2rem;
    background: linear-gradient(180deg, var(--bg-deep) 0%, var(--bg) 100%);
}

.faq-inner {
    max-width: 720px;
    margin: 0 auto;
}

.faq h2 {
    margin-bottom: 3rem;
    color: var(--text-bright);
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.faq-item {
    border-top: 1px solid var(--border);
}

.faq-item:last-child {
    border-bottom: 1px solid var(--border);
}

.faq-item summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.25rem 0;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
    user-select: none;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: "+";
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 300;
    transition: transform 0.2s ease;
}

.faq-item[open] summary { color: var(--text-bright); }
.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item p {
    padding: 0 0 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.75;
}

/* ── Closing CTA (same as landing) ───────────────────────── */
.cta {
    padding: 8rem 2rem;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(var(--primary-rgb), 0.08), transparent 48%),
        linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
    text-align: center;
}

.cta-inner {
    max-width: 560px;
    margin: 0 auto;
}

.cta h2 {
    margin-bottom: 1rem;
    color: var(--text-bright);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.cta p {
    margin-bottom: 2.5rem;
    color: var(--text-muted);
    font-size: 1.05rem;
    line-height: 1.7;
}

.cta-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 1100px) {
    .docs-clients {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 960px) {
    .hero-inner,
    .docs-split,
    .docs-install {
        grid-template-columns: minmax(0, 1fr);
        gap: 3rem;
    }

    .hero-left h1 { font-size: clamp(2.5rem, 8vw, 4rem); }

    .docs-tool-rows > div {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .hero { padding: 7rem 1.25rem 4rem; }

    .docs-section,
    .faq,
    .cta { padding: 5rem 1.25rem; }

    .docs-steps {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .docs-steps li + li {
        margin-top: 1.5rem;
        border-top: 1px solid var(--border);
    }

    .docs-clients {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .hero-left h1 { font-size: clamp(2.25rem, 10vw, 2.75rem); }
    .hero-actions > *,
    .hero-actions .btn { width: 100%; justify-content: center; }
    .docs-clients { grid-template-columns: minmax(0, 1fr); }
}

/* Touch: 44px targets for the on-page links, as on the landing page */
@media (pointer: coarse) {
    .hero-links { row-gap: 0; }

    .hero-links a {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .btn { transition: none; }
}
