/* SerpKeep: archival ledger design system.
   Type: Newsreader (display), IBM Plex Sans (text), JetBrains Mono (data and code).
   Structure: 1px rules, 2px ink top rules on tabular matter, near-square corners. */

:root {
  --ink: #111820;
  --ink-soft: #2b3440;
  --ink-muted: #4b5563;
  --ink-faint: #7b8490;
  --paper: #f7f6f2;
  --paper-deep: #efede6;
  --surface: #ffffff;
  --rule: #d9d6cc;
  --rule-soft: #e7e4db;
  --border: var(--rule);
  --cobalt: #1d4ed8;
  --cobalt-dark: #1e40af;
  --cobalt-tint: #eef2fd;
  --emerald: #0f766e;
  --emerald-tint: #e6f4f1;
  --terracotta: #c2410c;
  --terracotta-tint: #fbece3;
  --night: #0d131b;
  --night-surface: #151e29;
  --night-rule: #263242;
  --night-text: #c5cedb;
  --radius: 2px;
  --gutter: 1.5rem;
  --font-display: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --font-sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
[id] { scroll-margin-top: 5.5rem; }
img { max-width: 100%; height: auto; }
p { margin: 0 0 1rem; }
a { color: var(--cobalt); text-decoration: underline; text-decoration-color: rgba(29, 78, 216, 0.3); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 2px; }
::selection { background: var(--cobalt); color: #fff; }

code, pre, kbd { font-family: var(--font-mono); font-size: 0.86em; font-variant-ligatures: none; }
:not(pre) > code { background: rgba(17, 24, 32, 0.055); padding: 0.08em 0.32em; border-radius: var(--radius); overflow-wrap: anywhere; }
pre { margin: 0; overflow-x: auto; padding: 1.1rem 1.25rem; background: var(--night); color: #e3e8ef; line-height: 1.65; font-size: 0.82rem; tab-size: 2; }

h1, h2 { font-family: var(--font-display); font-weight: 500; font-variant-numeric: lining-nums; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); line-height: 1.06; letter-spacing: -0.022em; margin: 0 0 1.1rem; max-width: 24ch; }
h2 { font-size: clamp(1.6rem, 2.7vw, 2.3rem); line-height: 1.14; letter-spacing: -0.016em; margin: 0 0 0.8rem; }
h3 { font-size: 1.08rem; font-weight: 600; line-height: 1.3; letter-spacing: -0.005em; margin: 0 0 0.5rem; }
h1 code, h2 code { font-size: 0.72em; background: none; padding: 0; color: var(--cobalt); }

.container { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 760px; }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--ink); color: #fff; padding: 0.5rem 0.75rem; z-index: 100; }

/* Header */

.site-header { background: rgba(247, 246, 242, 0.92); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--ink); position: sticky; top: 0; z-index: 30; }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 60px; }
.brand-lockup { display: inline-flex; align-items: center; gap: 0.6rem; color: var(--ink); font-family: var(--font-display); font-weight: 500; font-size: 1.4rem; letter-spacing: -0.02em; line-height: 1; text-decoration: none; }
.brand-mark { display: block; flex: none; }
.site-nav { display: flex; gap: 1.75rem; margin-right: auto; align-self: stretch; }
.nav-link { display: inline-flex; align-items: center; color: var(--ink-muted); font-size: 0.92rem; font-weight: 500; text-decoration: none; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; }
.nav-link:hover { color: var(--ink); }
.nav-link.is-active { color: var(--ink); box-shadow: inset 0 -2px 0 var(--ink); }
.header-actions { flex: none; }

/* Buttons */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; border: 1px solid transparent; border-radius: var(--radius); padding: 0.62rem 1.1rem; font-family: var(--font-sans); font-weight: 600; font-size: 0.92rem; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }
.btn-xs { padding: 0.28rem 0.6rem; font-size: 0.78rem; white-space: nowrap; }
.btn-lg { padding: 0.82rem 1.4rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--cobalt); color: #fff; border-color: var(--cobalt); }
.btn-primary:hover { background: var(--cobalt-dark); border-color: var(--cobalt-dark); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: #fff; }
.btn-light { background: #fff; color: var(--night); border-color: #fff; }
.btn-light:hover { background: var(--paper-deep); border-color: var(--paper-deep); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }
.btn-outline-light:hover { border-color: #fff; }
.btn:disabled { background: transparent; color: var(--ink-faint); border-color: var(--rule); cursor: not-allowed; }

/* Shared text roles */

.eyebrow { font-size: 0.86rem; font-weight: 600; letter-spacing: 0; color: var(--cobalt); margin: 0 0 0.85rem; }
.eyebrow-light { color: #9db8f5; }
.hero-lead, .section-lead { color: var(--ink-muted); font-size: 1.09rem; line-height: 1.6; margin: 0 0 1.5rem; max-width: 64ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-bottom: 1rem; }
.hero-status { font-size: 0.86rem; line-height: 1.5; color: var(--ink-muted); margin: 0; max-width: 52ch; }

/* Home hero */

.hero { position: relative; padding: 4.5rem 0 5rem; border-bottom: 1px solid var(--ink); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(17, 24, 32, 0.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(17, 24, 32, 0.055) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.55) 45%, transparent 92%);
}
.hero-grid { position: relative; }
.hero-copy { margin-bottom: 3.5rem; }
.hero-copy h1 { font-size: clamp(2.6rem, 7vw, 5.4rem); line-height: 0.98; letter-spacing: -0.03em; max-width: 15ch; margin-bottom: 2.25rem; }
.hero-brief { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; align-items: start; padding-top: 1.5rem; border-top: 1px solid var(--ink); }
.hero-brief .hero-lead { margin: 0; color: var(--ink-soft); }

/* Hero archive ledger */

.hero-ledger { position: relative; background: var(--surface); border: 1px solid var(--ink); }
.hero-ledger::before { content: ""; position: absolute; top: 16px; right: 16px; bottom: -9px; left: -9px; border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); pointer-events: none; }
.ledger-header, .ledger-footer { display: flex; align-items: center; gap: 0.75rem; padding: 0.7rem 1.25rem; font-size: 0.8rem; }
.ledger-header { border-bottom: 1px solid var(--ink); font-family: var(--font-mono); }
.ledger-title { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.ledger-footer { justify-content: space-between; flex-wrap: wrap; border-top: 1px solid var(--rule); color: var(--ink-muted); background: var(--paper); }
.ledger-footer a { font-weight: 600; }
.ledger-dot { flex: none; width: 8px; height: 8px; background: var(--emerald); display: inline-block; }
.ledger-tag { flex: none; color: var(--emerald); border: 1px solid currentColor; font-weight: 500; padding: 0.1rem 0.5rem; font-size: 0.74rem; white-space: nowrap; }
.ledger-kpis { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--ink); }
.kpi-block { padding: 1.25rem 1.25rem 1.1rem; border-right: 1px solid var(--rule); }
.kpi-block:last-child { border-right: 0; }
.kpi-label { display: block; font-size: 0.8rem; font-weight: 500; color: var(--ink-muted); }
.kpi-value { display: block; font-family: var(--font-display); font-weight: 500; font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.05; letter-spacing: -0.025em; font-variant-numeric: lining-nums tabular-nums; margin: 0.3rem 0 0.25rem; }
.kpi-sub { display: block; font-size: 0.8rem; color: var(--ink-faint); }
.kpi-alert, .cell-alert { color: var(--terracotta); }
.kpi-gain, .cell-gain { color: var(--emerald); }
.ledger-preview-table { overflow-x: auto; }
.ledger-preview-table table { min-width: 640px; }
.ledger-preview-table th, .ledger-preview-table td { padding-left: 1.25rem; padding-right: 0.75rem; }
.ledger-preview-table th:last-child, .ledger-preview-table td:last-child { padding-right: 1.25rem; }
.ledger-preview-table tbody tr:last-child td { border-bottom: 0; }

/* Sections */

.section { padding: 4.5rem 0; }
.section-head { max-width: 760px; margin-bottom: 2.5rem; }
.section-head .section-lead { margin-bottom: 0; }
.page-hero { padding: 3.75rem 0 2.75rem; border-bottom: 1px solid var(--ink); }
.page-hero-compact { padding: 2rem 0 2.25rem; }
.page-hero .hero-lead:last-child, .page-hero .hero-actions:last-child { margin-bottom: 0; }
.section-compare { background: var(--paper-deep); border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.section-tool-app { padding-top: 2.5rem; }

/* Tool index cards: one ruled sheet, three columns */

.cards-three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-top: 2px solid var(--ink); }
.tool-card { background: var(--surface); padding: 1.75rem 1.6rem 1.6rem; display: flex; flex-direction: column; gap: 0.6rem; }
.tool-card-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--ink-faint); margin-bottom: 0.9rem; }
.tool-card h3 { font-family: var(--font-display); font-weight: 500; font-size: 1.5rem; line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
.tool-card p { color: var(--ink-muted); font-size: 0.95rem; margin: 0; }
.card-cta { margin-top: auto; padding-top: 1.1rem; font-weight: 600; font-size: 0.95rem; }

/* Tables */

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--ink); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 0.72rem 1rem; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
thead th { font-size: 0.78rem; font-weight: 600; color: var(--ink-muted); border-bottom: 1px solid var(--ink); white-space: nowrap; vertical-align: bottom; }
tbody tr:last-child td { border-bottom: 0; }
.cell-num { text-align: right; font-family: var(--font-mono); font-size: 0.82rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
thead .cell-num { font-family: var(--font-sans); font-size: 0.78rem; }
.cell-mono { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-muted); white-space: nowrap; }
.cell-strong { font-weight: 600; }
.cell-url { max-width: 280px; overflow-wrap: anywhere; font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-muted); }
.cell-url code { background: none; padding: 0; font-size: 1em; }
.data-table { min-width: 820px; }
.data-table tbody tr:hover td { background: var(--paper); }

.compare-table { font-size: 0.95rem; }
.compare-table th, .compare-table td { padding: 1.05rem 1.25rem; }
.compare-table thead th { font-size: 0.86rem; color: var(--ink); white-space: normal; }
.compare-table th:first-child { width: 24%; }
.compare-table th:nth-child(2) { width: 34%; }
.compare-table td:nth-child(2) { color: var(--ink-muted); }
.col-highlight { background: var(--cobalt-tint); }
.compare-table thead .col-highlight { color: var(--cobalt); box-shadow: inset 0 3px 0 var(--cobalt); }
.compare-table td.col-highlight { color: var(--ink); border-bottom-color: #d5defa; }

/* Dark MCP band and code cards */

.section-mcp-band { background: var(--night); color: #f1f4f8; }
.section-mcp-band h2 { color: #fff; }
.section-mcp-band p { color: var(--night-text); }
.section-mcp-band code, .code-card code { background: none; padding: 0; }
.split-band, .two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 3.5rem; align-items: start; }
.split-band { align-items: center; }
.split-copy p { max-width: 58ch; }
.tool-pill-list { list-style: none; padding: 0; margin: 1.75rem 0 2rem; border-top: 1px solid var(--night-rule); }
.tool-pill-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--night-rule); color: #e3e8ef; font-size: 0.94rem; }
.tool-pill-list li::before { content: ""; display: inline-block; width: 6px; height: 6px; background: #5b8af0; margin-right: 0.8rem; vertical-align: 0.12em; }
.section-mcp-band .hero-actions { margin-bottom: 0; }

.code-card { border: 1px solid var(--night-rule); overflow: hidden; margin-bottom: 1.25rem; background: var(--night); color: #e3e8ef; }
.code-card-head, .code-card-foot { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; padding: 0.65rem 1.25rem; background: var(--night-surface); font-size: 0.8rem; color: #93a1b5; }
.code-card-head { border-bottom: 1px solid var(--night-rule); }
.code-card-foot { border-top: 1px solid var(--night-rule); }
.code-badge { color: #9db8f5; border: 1px solid rgba(157, 184, 245, 0.35); padding: 0.08rem 0.45rem; font-family: var(--font-mono); font-size: 0.72rem; white-space: nowrap; }
.section-mcp-band .code-card { margin-bottom: 0; border-color: #33415a; }
.section-mcp-band .code-card pre { padding: 1.75rem 1.5rem; font-size: 0.92rem; }

/* Pricing: four columns ruled as one sheet */

.pricing-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-top: 2px solid var(--ink); }
.price-card { background: var(--surface); padding: 1.75rem 1.5rem 1.5rem; display: flex; flex-direction: column; }
.price-card.is-featured { box-shadow: inset 0 4px 0 var(--cobalt); background: #fbfcff; }
.price-card-top { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; }
.price-card-top h3 { margin: 0; font-size: 1rem; }
.tier-badge { font-size: 0.78rem; font-weight: 600; color: var(--cobalt); white-space: nowrap; }
.price-amount { margin: 1.1rem 0 0.9rem; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 0.4rem; }
.price-amount strong { font-family: var(--font-display); font-weight: 500; font-size: 3.2rem; line-height: 1; letter-spacing: -0.035em; font-variant-numeric: lining-nums; }
.price-amount span { color: var(--ink-muted); font-size: 0.88rem; }
.price-summary { font-size: 0.92rem; line-height: 1.5; color: var(--ink-muted); margin: 0 0 1.25rem; }
.price-list { list-style: none; padding: 0; margin: 0 0 1.75rem; font-size: 0.88rem; line-height: 1.45; flex: 1; border-top: 1px solid var(--rule); }
.price-list li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule-soft); }
.checkout-feedback { margin-top: 1.25rem; font-weight: 600; color: var(--cobalt); min-height: 1.6rem; }

/* Browser tool pages */

.tools-subnav { display: flex; gap: 1.75rem; margin-bottom: 2rem; border-bottom: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
.tools-subnav::-webkit-scrollbar { display: none; }
.subnav-pill { flex: none; padding: 0.5rem 0 0.7rem; color: var(--ink-muted); font-size: 0.88rem; font-weight: 500; text-decoration: none; box-shadow: inset 0 -2px 0 transparent; white-space: nowrap; }
.subnav-pill:hover { color: var(--ink); }
.subnav-pill.is-active { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--ink); }

.tool-workbench { background: var(--surface); border: 1px solid var(--ink); padding: 1.5rem; }
.input-bar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: -1.5rem -1.5rem 1.5rem; padding: 0.9rem 1.5rem; background: var(--paper); border-bottom: 1px solid var(--ink); }
.file-drop-btn { position: relative; display: inline-flex; align-items: center; background: var(--surface); color: var(--cobalt); border: 1px dashed var(--cobalt); border-radius: var(--radius); padding: 0.62rem 1.1rem; font-weight: 600; font-size: 0.92rem; line-height: 1.25; cursor: pointer; }
.file-drop-btn:hover { background: var(--cobalt-tint); }
.file-drop-btn:focus-within, .inline-upload:focus-within { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.file-drop-btn input, .inline-upload input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.inline-upload { position: relative; font-size: 0.82rem; color: var(--cobalt); font-weight: 600; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(29, 78, 216, 0.3); text-underline-offset: 0.18em; white-space: nowrap; }
.controls-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0 1.25rem; margin-bottom: 0.25rem; align-items: end; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.1rem; min-width: 0; }
.field-label-row { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.field label { font-size: 0.84rem; font-weight: 600; line-height: 1.35; }
.field input[type="number"], .field input[type="text"], .field select, .field textarea { width: 100%; border: 1px solid #a9a698; border-radius: var(--radius); padding: 0.58rem 0.7rem; font: inherit; font-size: 0.94rem; color: var(--ink); background: var(--surface); }
.field input[type="number"] { font-family: var(--font-mono); font-size: 0.88rem; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 2.1rem; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%23111820' stroke-width='1.5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.8rem center; }
.field textarea { font-family: var(--font-mono); font-size: 0.8rem; line-height: 1.6; resize: vertical; background: var(--paper); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--cobalt); outline-offset: 0; border-color: var(--cobalt); background-color: var(--surface); }
.field ::placeholder { color: var(--ink-faint); opacity: 1; }
.field-checkbox label { display: flex; gap: 0.55rem; align-items: flex-start; font-weight: 500; padding-bottom: 0.55rem; }
.field-checkbox input { flex: none; width: 1rem; height: 1rem; margin: 0.15rem 0 0; accent-color: var(--cobalt); }
.privacy-pill { font-size: 0.86rem; line-height: 1.5; color: var(--emerald); background: var(--emerald-tint); border-left: 3px solid var(--emerald); padding: 0.6rem 0.9rem; margin: 0.25rem 0 0; }

.workbench-results { margin: 1.5rem -1.5rem -1.5rem; padding: 1.5rem; border-top: 1px solid var(--ink); background: var(--paper); }
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0.75rem; margin-bottom: 1.25rem; }
.kpi-card { background: var(--surface); border: 1px solid var(--rule); border-top: 2px solid var(--ink); padding: 0.85rem 1rem 0.8rem; }
.kpi-card .kpi-value { font-size: 2rem; margin-bottom: 0; }
.sev-badge { display: inline-block; padding: 0.12rem 0.5rem; border-radius: var(--radius); font-size: 0.76rem; font-weight: 600; text-transform: capitalize; white-space: nowrap; }
.sev-high, .sev-loser, .sev-lost { background: var(--terracotta-tint); color: var(--terracotta); }
.sev-medium { background: #f8efd2; color: #7c5a0a; }
.sev-low, .sev-winner, .sev-new { background: var(--emerald-tint); color: var(--emerald); }
.sev-flat { background: var(--paper-deep); color: var(--ink-muted); }
.url-line { margin-bottom: 0.3rem; font-size: 0.8rem; line-height: 1.5; color: var(--ink-muted); }
.url-line code { background: none; padding: 0; color: var(--ink); }
.url-tag { font-weight: 600; color: var(--ink); }

.tool-guide { margin-top: 3.5rem; max-width: 720px; }
.tool-guide h2 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); }
.tool-guide p, .tool-guide li { color: var(--ink-soft); }
.tool-guide ol { padding-left: 1.3rem; margin: 0; }
.tool-guide li { margin-bottom: 0.6rem; padding-left: 0.3rem; }
.tool-guide li::marker { font-family: var(--font-mono); font-size: 0.86em; color: var(--ink-faint); }

/* MCP page */

.mcp-tool-list { border-top: 2px solid var(--ink); }
.mcp-tool-item { padding: 1.1rem 0; border-bottom: 1px solid var(--rule); }
.mcp-tool-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 0.75rem; margin-bottom: 0.45rem; }
.mcp-tool-head code { font-size: 0.92rem; font-weight: 500; background: none; padding: 0; }
.mcp-tool-item p { margin: 0; font-size: 0.92rem; color: var(--ink-muted); }
.section-playground { background: var(--paper-deep); border-top: 1px solid var(--rule); }
.playground-shell { background: var(--surface); border: 1px solid var(--ink); }
.playground-controls { display: grid; grid-template-columns: 260px minmax(0, 1fr) auto; gap: 1.25rem; align-items: start; padding: 1.5rem 1.5rem 0.4rem; }
.playground-btns { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1.6rem; }
.playground-output .code-card { margin: 0; border-width: 1px 0 0; border-color: var(--ink); }
.playground-output pre { max-height: 520px; overflow: auto; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Notices, FAQ, prose */

.notice { padding: 0.75rem 1rem; font-size: 0.94rem; margin: 1.5rem 0 0; max-width: 72ch; border-left: 3px solid; }
.notice-info { background: var(--cobalt-tint); border-color: var(--cobalt); color: #1c2f6b; }
.notice-ok { background: var(--emerald-tint); border-color: var(--emerald); color: #0b4f4a; }

.section-faq { border-top: 1px solid var(--rule); }
.faq-list { margin-top: 1.75rem; border-top: 2px solid var(--ink); }
.faq-list details { border-bottom: 1px solid var(--rule); }
.faq-list summary { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: 1.05rem 0; font-weight: 600; font-size: 1.02rem; cursor: pointer; list-style: none; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; flex: none; font-family: var(--font-mono); font-weight: 400; font-size: 1.1rem; color: var(--ink-muted); }
.faq-list details[open] summary::after { content: "\2212"; }
.faq-list summary:hover { color: var(--cobalt); }
.faq-list details p { margin: 0; padding: 0 2.5rem 1.25rem 0; color: var(--ink-muted); }

.prose { font-size: 1.04rem; line-height: 1.68; }
.prose h2 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); margin: 3rem 0 0.9rem; padding-top: 1.25rem; border-top: 1px solid var(--rule); }
.prose h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.prose p, .prose li { color: var(--ink-soft); }
.prose ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.prose li { margin-bottom: 0.5rem; }
.prose li::marker { color: var(--ink-faint); }

/* Footer */

.site-footer { border-top: 1px solid var(--ink); padding: 3.5rem 0 2rem; background: var(--paper-deep); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-col h3 { font-size: 0.86rem; font-weight: 600; color: var(--ink); margin-bottom: 0.9rem; padding-bottom: 0.6rem; border-bottom: 1px solid var(--ink); }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.footer-col a { color: var(--ink-soft); text-decoration-color: transparent; overflow-wrap: anywhere; }
.footer-col a:hover { color: var(--cobalt); text-decoration-color: currentColor; }
.footer-note { font-size: 0.92rem; color: var(--ink-muted); margin: 0.9rem 0 0; max-width: 38ch; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.25rem; font-size: 0.82rem; color: var(--ink-muted); }
.footer-bottom p { margin: 0; }

/* Responsive */

@media (max-width: 1020px) {
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .playground-controls { grid-template-columns: 220px minmax(0, 1fr); }
  .playground-btns { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; padding-top: 0; padding-bottom: 1.1rem; }
}

@media (max-width: 900px) {
  .split-band, .two-col { grid-template-columns: minmax(0, 1fr); gap: 2.5rem; }
  .tool-workbench .two-col { gap: 0; }
  .cards-three { grid-template-columns: 1fr; }
  .hero-brief { grid-template-columns: 1fr; gap: 1.75rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  :root { --gutter: 1.25rem; }
  [id] { scroll-margin-top: 1rem; }
  .site-header { position: static; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--paper); }
  .header-inner { flex-wrap: wrap; justify-content: space-between; gap: 0 1rem; padding-top: 0.6rem; }
  .site-nav { order: 3; flex: 0 0 calc(100% + 2 * var(--gutter)); margin: 0.6rem calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter); gap: 1.5rem; border-top: 1px solid var(--rule); overflow-x: auto; scrollbar-width: none; }
  .site-nav::-webkit-scrollbar { display: none; }
  .nav-link { flex: none; padding: 0.7rem 0; }

  .hero { padding: 2.75rem 0 3.5rem; }
  .hero-copy { margin-bottom: 2.5rem; }
  .hero-copy h1 { margin-bottom: 1.5rem; }
  .section { padding: 3.25rem 0; }
  .section-tool-app { padding-top: 1.75rem; }
  .section-head { margin-bottom: 1.75rem; }
  .page-hero { padding: 2.5rem 0 2rem; }
  .page-hero-compact { padding: 1.25rem 0 1.75rem; }
  .hero-lead, .section-lead { font-size: 1.03rem; }

  .ledger-kpis { grid-template-columns: 1fr; }
  .kpi-block { border-right: 0; border-bottom: 1px solid var(--rule); padding: 1rem 1.25rem; }
  .kpi-block:last-child { border-bottom: 0; }

  .compare-table, .compare-table tbody, .compare-table tr, .compare-table td { display: block; }
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .compare-table tr { border-bottom: 1px solid var(--ink); }
  .compare-table tr:last-child { border-bottom: 0; }
  .compare-table td { border-bottom: 0; padding: 0.85rem 1.1rem; }
  .compare-table td:first-child { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; line-height: 1.2; padding-top: 1.25rem; padding-bottom: 0.4rem; }
  .compare-table td:nth-child(2)::before, .compare-table td:nth-child(3)::before { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 0.2rem; }
  .compare-table td:nth-child(2)::before { content: "Native Google Search Console"; color: var(--ink-faint); }
  .compare-table td:nth-child(3)::before { content: "SerpKeep"; color: var(--cobalt); }
  .compare-table td.col-highlight { box-shadow: inset 3px 0 0 var(--cobalt); }

  .playground-controls { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 1.25rem 1.25rem 0.25rem; }
  .field-checkbox label { padding-bottom: 0; }
  .tool-workbench { padding: 1.25rem; }
  .input-bar { margin: -1.25rem -1.25rem 1.25rem; padding: 0.9rem 1.25rem; }
  .workbench-results { margin: 1.25rem -1.25rem -1.25rem; padding: 1.25rem; }
  .faq-list details p { padding-right: 0; }
}

@media (max-width: 560px) {
  .pricing-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-actions .btn-lg, .input-bar .btn, .input-bar .file-drop-btn, .playground-btns .btn { flex: 1 1 100%; justify-content: center; }
  .header-actions .btn { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
  .brand-lockup { font-size: 1.25rem; }
  .section-mcp-band .code-card pre { padding: 1.25rem; font-size: 0.82rem; }
}

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

@media print {
  .site-header { position: static; }
  .hero::before { display: none; }
}
