/* docs.goviva.ai/mcp — shared by pages/docs/mcp*.html. Base styles match the other
   docs.goviva.ai pages (pages/docs/relay.html), plus the tool reference. */
:root {
    --primary: #4F46E5;
    --primary-dark: #4338CA;
    --primary-light: #818CF8;
    --text: #1e293b;
    --text-light: #64748b;
    --bg: #ffffff;
    --bg-alt: #f8fafc;
    --bg-code: #1e293b;
    --border: #e2e8f0;
    --success: #10b981;
    --warning: #f59e0b;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text);
    line-height: 1.7;
    background: var(--bg);
}

/* Header */
.header {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    color: white;
    padding: 24px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: white;
}

.logo svg { width: 36px; height: 36px; }
.logo-text { font-size: 22px; font-weight: 700; }
.logo-text span { color: var(--primary-light); }

.header-nav {
    display: flex;
    gap: 8px;
    align-items: center;
}

.header-nav a {
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.header-nav a:hover { color: white; background: rgba(255,255,255,0.1); }
.header-nav a.active { color: white; background: rgba(255,255,255,0.15); }

.btn-primary {
    background: var(--primary);
    color: white !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s;
    margin-left: 8px;
}

.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Hero */
.hero {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
}

.hero h1 { font-size: 48px; font-weight: 800; margin-bottom: 16px; line-height: 1.2; }
.hero p { font-size: 20px; opacity: 0.9; max-width: 600px; margin: 0 auto 32px; }

.hero-badges { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.badge { background: rgba(255,255,255,0.15); padding: 8px 16px; border-radius: 20px; font-size: 14px; font-weight: 500; }

/* Main Layout */
.main-container { display: flex; max-width: 1200px; margin: 0 auto; min-height: calc(100vh - 200px); }

/* Sidebar */
.sidebar {
    width: 260px;
    padding: 32px 24px;
    border-right: 1px solid var(--border);
    position: sticky;
    top: 80px;
    height: fit-content;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-section { margin-bottom: 28px; }
.sidebar-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); margin-bottom: 12px; }
.sidebar-link { display: block; color: var(--text); text-decoration: none; padding: 8px 12px; border-radius: 6px; font-size: 14px; margin-bottom: 2px; transition: all 0.15s; }
.sidebar-link:hover { background: var(--bg-alt); color: var(--primary); }
.sidebar-link.active { background: #eef2ff; color: var(--primary); font-weight: 600; }

/* Content */
.content { flex: 1; padding: 48px; max-width: 800px; }
.content h2 { font-size: 32px; font-weight: 700; margin-bottom: 16px; padding-top: 24px; border-top: 1px solid var(--border); margin-top: 48px; }
.content h2:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.content h3 { font-size: 22px; font-weight: 600; margin: 32px 0 16px; }
.content h4 { font-size: 17px; font-weight: 600; margin: 24px 0 12px; }
.content p { margin-bottom: 16px; }
.content ul, .content ol { margin-bottom: 16px; padding-left: 24px; }
.content li { margin-bottom: 8px; }

/* Code */
pre { background: var(--bg-code); color: #e2e8f0; padding: 20px; border-radius: 12px; overflow-x: auto; margin: 20px 0; position: relative; font-size: 14px; line-height: 1.6; }
code { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; }
.inline-code { background: var(--bg-alt); color: var(--primary-dark); padding: 2px 8px; border-radius: 4px; font-size: 14px; }
.copy-btn { position: absolute; top: 12px; right: 12px; background: rgba(255,255,255,0.1); border: none; color: #94a3b8; padding: 8px 14px; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; transition: all 0.2s; }
.copy-btn:hover { background: rgba(255,255,255,0.2); color: white; }
.copy-btn.copied { background: var(--success); color: white; }

/* Tables */
table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 14px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: var(--bg-alt); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-light); }
tr:hover td { background: var(--bg-alt); }

/* Callouts */
.callout { padding: 16px 20px; border-radius: 10px; margin: 20px 0; display: flex; gap: 12px; align-items: flex-start; }
.callout-icon { flex-shrink: 0; width: 20px; height: 20px; margin-top: 2px; }
.callout-icon svg { width: 20px; height: 20px; }
.callout-info { background: #eff6ff; border-left: 4px solid #3b82f6; }
.callout-success { background: #ecfdf5; border-left: 4px solid var(--success); }
.callout-warning { background: #fffbeb; border-left: 4px solid var(--warning); }
.callout p { margin: 0; }

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 48px 24px; margin-top: 64px; }
.footer-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 24px; }
.footer-content span { color: var(--text-light); font-size: 14px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--text-light); text-decoration: none; font-size: 14px; }
.footer-links a:hover { color: var(--primary); }

/* Responsive */
@media (max-width: 900px) {
    .sidebar { display: none; }
    .content { padding: 32px 24px; }
    .hero h1 { font-size: 32px; }
    .hero p { font-size: 16px; }
    .header-nav { display: none; }
}

html { scroll-behavior: smooth; }
h2[id], h3[id] { scroll-margin-top: 100px; }

/* ── MCP pages ─────────────────────────────────────────────── */
.content { min-width: 0; }
.content a { color: var(--primary); }

/* Overview / Tools / Clients — always visible, the header nav hides on phones */
.mcp-tabs { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.mcp-tabs a { color: white; text-decoration: none; font-size: 15px; font-weight: 600; padding: 10px 18px; border-radius: 999px; background: rgba(255,255,255,0.12); min-height: 44px; display: inline-flex; align-items: center; }
.mcp-tabs a:hover { background: rgba(255,255,255,0.22); }
.mcp-tabs a.active { background: white; color: var(--primary-dark); }

.table-wrap { overflow-x: auto; margin: 20px 0; }
.table-wrap table { margin: 0; }

.mcp-url { display: flex; gap: 8px; align-items: center; background: var(--bg-alt); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 16px 0; flex-wrap: wrap; }
.mcp-url code { font-size: 16px; font-weight: 600; color: var(--primary-dark); word-break: break-all; flex: 1; }
.mcp-url button { background: var(--primary); color: white; border: none; border-radius: 8px; padding: 10px 16px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 44px; }
.mcp-url button:hover { background: var(--primary-dark); }

/* Permission + credit pills */
.pill { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 999px; white-space: nowrap; margin: 0 4px 4px 0; }
.pill-read { background: #ecfdf5; color: #047857; }
.pill-write { background: #eef2ff; color: #4338ca; }
.pill-send { background: #fef2f2; color: #b91c1c; }
.pill-credits { background: #fffbeb; color: #b45309; }

/* Tool reference */
.tools-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.tools-filter input { flex: 1 1 220px; font-size: 16px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 8px; min-height: 44px; }
.tools-filter select { font-size: 16px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: white; min-height: 44px; }
.tools-count { color: var(--text-light); font-size: 14px; margin-bottom: 16px; }
.tool { border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 14px; }
.tool-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.tool-name { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; font-size: 15px; font-weight: 700; color: var(--text); word-break: break-all; }
.tool-desc { font-size: 15px; margin-bottom: 8px; }
.tool-example { font-size: 14px; color: var(--text-light); margin-bottom: 8px; }
.tool-example em { color: var(--text); }
.tool details summary { cursor: pointer; font-size: 14px; color: var(--primary); font-weight: 500; min-height: 32px; }
.tool .param { font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--bg-alt); }
.tool .param code { font-weight: 600; }
.tools-status { color: var(--text-light); padding: 24px 0; }
.tools-status.error { color: #b91c1c; }

.client h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.status-tested { background: #ecfdf5; color: #047857; }
.status-untested { background: var(--bg-alt); color: var(--text-light); }

.docs-version { font-size: 12px; color: var(--text-light); }

@media (max-width: 600px) {
    .hero { padding: 48px 16px; }
    .content { padding: 24px 16px; }
    .content h2 { font-size: 26px; }
    .header-content { padding: 0 16px; }
    pre { font-size: 13px; }
}

.content-wide { max-width: 900px; margin: 0 auto; }
