.mcp-layout {
    display: grid;
    grid-template-columns: 176px minmax(0, 1fr);
    gap: 56px;
    padding-top: 56px;
}

.mcp-toc {
    position: sticky;
    top: 24px;
    align-self: start;
    min-width: 0;
}

.toc-label {
    margin: 0 0 18px;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.mcp-toc nav {
    display: grid;
    border-top: 1px solid var(--line);
}

.mcp-toc nav a {
    display: grid;
    grid-template-columns: 32px 1fr;
    gap: 10px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.8rem;
    text-decoration: none;
}

.mcp-toc nav a span:first-child {
    color: var(--coral);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
}

.mcp-toc nav a:hover {
    color: var(--paper);
}

.toc-runtime {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
}

.toc-runtime strong {
    color: var(--cyan);
    font-weight: 500;
}

.mcp-content {
    min-width: 0;
}

.mcp-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.42fr);
    gap: 48px;
    align-items: end;
    min-height: 330px;
    padding: 54px 0 72px;
    border-bottom: 1px solid var(--line);
}

.mcp-hero h1 {
    margin: 0;
    color: var(--paper);
    font-size: 4.75rem;
    font-weight: 600;
    line-height: 0.9;
}

.mcp-hero-lead {
    max-width: 58ch;
    margin: 28px 0 0;
    color: var(--muted);
    line-height: 1.7;
}

.runtime-signal {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 18px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.55;
}

.runtime-dot {
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    margin-top: 4px;
    background: var(--lime);
    box-shadow: 0 0 0 5px rgba(199, 244, 91, 0.09);
}

.runtime-signal.is-protected .runtime-dot {
    background: var(--coral);
    box-shadow: 0 0 0 5px rgba(255, 106, 85, 0.09);
}

.mcp-section {
    padding: 92px 0;
    border-bottom: 1px solid var(--line);
}

.mcp-section-header {
    display: grid;
    grid-template-columns: minmax(220px, 0.5fr) minmax(0, 1fr);
    gap: 48px;
    align-items: end;
    margin-bottom: 42px;
}

.mcp-section-header > div {
    display: flex;
    align-items: baseline;
    gap: 18px;
}

.section-number {
    color: var(--coral);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
}

.mcp-section-header h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 500;
}

.mcp-section-header > p {
    max-width: 56ch;
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.transport-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1fr;
    align-items: stretch;
    gap: 14px;
    margin-bottom: 54px;
}

.transport-flow > div {
    min-width: 0;
    padding: 20px;
    border: 1px solid var(--line);
}

.transport-flow > div span {
    display: block;
    margin-bottom: 24px;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
}

.transport-flow > div strong {
    font-size: 0.92rem;
    font-weight: 600;
}

.transport-flow > span {
    align-self: center;
    color: var(--cyan);
}

.mcp-reference-list {
    border-top: 1px solid var(--line);
}

.mcp-reference-row {
    border-bottom: 1px solid var(--line);
}

.reference-primary {
    display: grid;
    grid-template-columns: minmax(150px, 0.44fr) minmax(0, 1fr) 30px;
    gap: 28px;
    align-items: start;
    padding: 28px 0;
}

.reference-identity {
    display: grid;
    gap: 10px;
}

.method {
    color: var(--lime);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.66rem;
    font-weight: 500;
}

.endpoint-path {
    color: var(--cyan);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.73rem;
    overflow-wrap: anywhere;
}

.reference-primary h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 600;
}

.reference-primary p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.reference-primary p code {
    color: var(--paper);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.76rem;
}

.fragment-link {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    text-decoration: none;
}

.fragment-link:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.reference-details {
    padding: 0 0 24px calc(44% + 28px);
}

.reference-details summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--paper);
    font-size: 0.78rem;
    font-weight: 600;
    list-style: none;
    cursor: pointer;
}

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

.reference-details summary::before {
    content: "+";
    color: var(--cyan);
    font-family: 'IBM Plex Mono', monospace;
}

.reference-details[open] summary::before {
    content: "−";
}

.reference-detail-body {
    display: grid;
    gap: 20px;
    margin-top: 22px;
}

.reference-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
}

.reference-facts dt,
.reference-detail-body h4 {
    margin: 0 0 7px;
    color: var(--muted);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.64rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.reference-facts dd,
.reference-detail-body p {
    margin: 0;
    color: var(--paper);
    font-size: 0.84rem;
    line-height: 1.6;
}

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

.tool-detail-grid > div:last-child {
    grid-column: 1 / -1;
}

.example-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.example-tool {
    min-width: 0;
    border: 1px solid var(--line);
}

.example-tool > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 18px;
    border-bottom: 1px solid var(--line);
}

.example-tool h3 {
    margin: 6px 0 0;
    font-size: 0.95rem;
}

.example-path {
    display: block;
    margin-top: 8px;
    color: var(--cyan);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.66rem;
}

.example-tool > p {
    min-height: 88px;
    margin: 0;
    padding: 18px;
    color: var(--muted);
    line-height: 1.55;
}

.example-tool .code-block {
    border: 0;
    border-top: 1px solid var(--line);
}

.copy-button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
    color: var(--paper);
    font-size: 0.72rem;
    cursor: pointer;
}

.copy-button:hover {
    border-color: var(--cyan);
    color: var(--cyan);
}

.copy-feedback {
    min-height: 1.2em;
    margin: 16px 0 0;
    color: var(--cyan);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.68rem;
}

@media (max-width: 920px) {
    .mcp-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .mcp-toc {
        position: static;
        overflow-x: auto;
        border-bottom: 1px solid var(--line);
    }

    .mcp-toc .toc-label,
    .toc-runtime {
        display: none;
    }

    .mcp-toc nav {
        display: flex;
        min-width: max-content;
        border-top: 0;
    }

    .mcp-toc nav a {
        grid-template-columns: auto auto;
        min-width: 150px;
        padding: 14px 18px;
        border-right: 1px solid var(--line);
        border-bottom: 0;
    }

    .mcp-hero {
        grid-template-columns: 1fr;
        min-height: 0;
    }
}

@media (max-width: 680px) {
    .mcp-layout {
        padding-top: 30px;
    }

    .mcp-hero {
        padding: 36px 0 56px;
    }

    .mcp-hero h1 {
        font-size: 3.25rem;
    }

    .mcp-section {
        padding: 68px 0;
    }

    .mcp-section-header,
    .reference-primary,
    .example-grid {
        grid-template-columns: 1fr;
    }

    .mcp-section-header {
        gap: 22px;
    }

    .transport-flow {
        grid-template-columns: 1fr;
    }

    .transport-flow > span {
        justify-self: center;
        transform: rotate(90deg);
    }

    .reference-primary {
        gap: 18px;
    }

    .reference-primary .fragment-link {
        position: absolute;
        right: 0;
    }

    .mcp-reference-row {
        position: relative;
    }

    .reference-details {
        padding-left: 0;
    }

    .reference-facts,
    .tool-detail-grid {
        grid-template-columns: 1fr;
    }

    .tool-detail-grid > div:last-child {
        grid-column: 1;
    }

    .example-tool > p {
        min-height: 0;
    }
}
