/* ============================================================
   MCP Explained — style.css
   Light documentation theme · Sora + IBM Plex Sans + IBM Plex Mono
   ============================================================ */

:root {
  --ink: #14161C;
  --body: #3A4150;
  --muted: #5C6575;
  --faint: #8A93A5;
  --bg: #F4F6F9;
  --surface: #FFFFFF;
  --border: #E3E7EE;
  --accent: oklch(0.49 0.16 265);
  --accent-deep: oklch(0.42 0.16 265);
  --accent-soft: oklch(0.95 0.03 265);
  --teal: oklch(0.49 0.13 195);
  --teal-deep: oklch(0.4 0.12 195);
  --teal-soft: oklch(0.95 0.04 195);
  --code-bg: #161B28;
  --code-text: #D7DEEC;
  --warn-bg: #FFF9F2;
  --warn-border: #F0DFC8;
  --warn-ink: #6B5B45;
  --danger-bg: #FDECEA;
  --danger-ink: #B42318;
}

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, .font-display { font-family: 'Sora', sans-serif; letter-spacing: -0.5px; }
code, pre, .mono { font-family: 'IBM Plex Mono', monospace; }

::selection { background: oklch(0.9 0.06 265); }

/* ---------- Navbar ---------- */
.navbar-mcp {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.navbar-mcp .nav-link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
}
.navbar-mcp .nav-link.active,
.navbar-mcp .nav-link:hover { color: var(--accent-deep); background: var(--accent-soft); }
.brand-mark {
  width: 28px; height: 28px; border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), var(--teal));
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px;
}
.brand-word { font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px; color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(150deg, oklch(0.972 0.014 265) 0%, #FFFFFF 48%, oklch(0.968 0.018 195) 100%);
  border-bottom: 1px solid #E9ECF2;
}
.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.08; letter-spacing: -1.5px; }
.hero .lede { font-size: clamp(16px, 2vw, 19px); line-height: 1.65; color: var(--muted); text-wrap: pretty; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px;
  border-radius: 999px; background: #fff; border: 1px solid var(--border);
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em;
}
.hero-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); }

.btn-mcp-primary {
  background: var(--accent); color: #fff; border: none; border-radius: 10px;
  padding: 13px 26px; font-weight: 600; font-size: 15px;
  box-shadow: 0 2px 8px oklch(0.49 0.16 265 / 0.3);
}
.btn-mcp-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-mcp-secondary {
  background: #fff; color: var(--ink); border: 1px solid #D8DDE6; border-radius: 10px;
  padding: 13px 26px; font-weight: 600; font-size: 15px;
}
.btn-mcp-secondary:hover { border-color: var(--accent); color: var(--accent-deep); }

/* ---------- Sections ---------- */
.section { padding-top: 96px; }
.eyebrow {
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent-deep); font-weight: 600;
}
.section h2 { font-size: clamp(28px, 3.5vw, 36px); line-height: 1.15; margin: 12px 0 14px; }
.section .lede { font-size: 16.5px; line-height: 1.65; color: var(--muted); max-width: 720px; text-wrap: pretty; }
.note { font-size: 13.5px; color: var(--faint); }

/* ---------- Cards ---------- */
.card-mcp {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 24px; box-shadow: 0 1px 2px rgba(22, 26, 34, 0.05); height: 100%;
}
.card-mini { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; }
.card-title-mcp { font-family: 'Sora', sans-serif; font-weight: 600; font-size: 17px; color: var(--ink); }

.block-icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; font-weight: 600; font-size: 15px;
}
.block-icon.indigo { background: var(--accent-soft); color: var(--accent-deep); }
.block-icon.teal { background: var(--teal-soft); color: var(--teal-deep); }

.kv-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--faint);
}
.kv-row { font-size: 13.5px; line-height: 1.55; color: var(--muted); }
.card-divider { border-top: 1px solid #EEF1F5; padding-top: 12px; }

code.inline {
  font-size: 0.85em; background: #F1F3F7; padding: 1px 6px; border-radius: 4px; color: var(--ink);
}

/* ---------- Badges ---------- */
.badge-mcp {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}
.badge-mcp.sm { padding: 2px 8px; font-size: 10px; }
.badge-old { background: #F1F3F7; color: var(--muted); border: 1px solid var(--border); }
.badge-new { background: var(--teal-soft); color: var(--teal-deep); }
.badge-breaking { background: var(--danger-bg); color: var(--danger-ink); }
.badge-gateway { background: var(--accent-soft); color: var(--accent-deep); }
.badge-prod { background: #EAF5EE; color: #2E7D4F; }
.badge-local { background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- Diagrams ---------- */
.diagram-box {
  padding: 8px 13px; background: #F1F3F7; border: 1px solid var(--border); border-radius: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px; white-space: nowrap;
}
.diagram-box.indigo { background: var(--accent-soft); border-color: oklch(0.88 0.05 265); color: oklch(0.38 0.15 265); }
.diagram-box.teal { background: var(--teal-soft); border-color: oklch(0.88 0.04 195); color: oklch(0.36 0.11 195); }
.diagram-arrow { color: var(--accent); font-size: 18px; }
.custom-link {
  flex: 1; text-align: center; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px;
  color: #B4540A; border-top: 2px dashed #E8C9A8; padding-top: 3px;
}

/* ---------- Pills / tabs ---------- */
.nav-pills-mcp .nav-link {
  padding: 9px 18px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  border: 1px solid #D8DDE6; background: #fff; color: var(--muted);
}
.nav-pills-mcp .nav-link.active { background: var(--accent); color: #fff; border-color: transparent; }

/* ---------- Code blocks ---------- */
.codeblock { background: var(--code-bg); border-radius: 12px; overflow: hidden; }
.codeblock-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.codeblock-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 10.5px; color: var(--faint);
  letter-spacing: 0.1em; text-transform: uppercase;
}
.copy-btn {
  background: rgba(255, 255, 255, 0.08); color: #C6CEDD; border: none; border-radius: 6px;
  padding: 4px 12px; font-family: 'IBM Plex Mono', monospace; font-size: 11px; cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); }
.codeblock pre {
  margin: 0; padding: 18px 20px; color: var(--code-text);
  font-size: 12.5px; line-height: 1.65; overflow: auto;
}
.codeblock .c-comment { color: #7E8AA3; }
.codeblock .c-old { color: #F0B26B; }
.codeblock .c-new { color: #7FD4C1; }

/* ---------- Comparison ---------- */
.panel-new { border-color: oklch(0.85 0.05 195) !important; box-shadow: 0 2px 10px oklch(0.49 0.13 195 / 0.08); }
.compare-item { display: flex; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--body); }
.compare-item .dot { width: 6px; height: 6px; border-radius: 50%; background: #C2C9D4; margin-top: 8px; flex-shrink: 0; }
.compare-item .dot.teal { background: oklch(0.6 0.13 195); }

/* ---------- Table ---------- */
.table-mcp { font-size: 13.5px; min-width: 760px; margin: 0; }
.table-mcp thead th {
  background: #F6F8FA; font-family: 'IBM Plex Mono', monospace; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--faint); font-weight: 600;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.table-mcp td { padding: 14px 18px; color: var(--body); border-bottom: 1px solid #EEF1F5; }
.table-mcp tr:last-child td { border-bottom: none; }
.table-mcp td.mono { font-size: 12.5px; color: var(--ink); white-space: nowrap; }

/* ---------- Security callouts ---------- */
.callout-warn { background: var(--warn-bg); border: 1px solid var(--warn-border); border-radius: 12px; padding: 20px; height: 100%; }
.callout-warn p { color: var(--warn-ink); font-size: 14px; line-height: 1.6; margin: 0; }
.warn-icon {
  width: 22px; height: 22px; border-radius: 7px; background: #B4540A; color: #fff; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}

/* ---------- Glossary ---------- */
#glossary-search {
  padding: 12px 18px; border-radius: 10px; border: 1px solid #D8DDE6;
  font-size: 14.5px; max-width: 440px;
}
#glossary-search:focus { outline: 2px solid var(--accent); border-color: transparent; box-shadow: none; }
.gloss-term { font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600; color: var(--accent-deep); }
.gloss-def { font-size: 13.5px; line-height: 1.6; color: var(--muted); }

/* ---------- Checklist ---------- */
.check-row {
  display: flex; gap: 13px; align-items: flex-start; padding: 14px 18px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; margin: 0;
}
.check-row input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); cursor: pointer; flex-shrink: 0; }
.check-row span { font-size: 14.5px; line-height: 1.55; color: var(--body); }
.check-row input:checked + span { color: #9AA3B2; text-decoration: line-through; }
.progress-mcp { height: 8px; background: #E7EAF0; border-radius: 999px; overflow: hidden; }
.progress-mcp .bar { height: 100%; border-radius: 999px; background: var(--accent); width: 0%; transition: width 0.3s ease; }

/* ---------- Footer ---------- */
.footer-mcp { margin-top: 110px; background: var(--ink); color: #B6BDCB; }
.footer-mcp p { font-size: 13.5px; line-height: 1.7; max-width: 680px; }
