/* /benchmarks (templates/benchmarks/benchmarks.ftl): a research article on the info layout. The body mirrors the MCP
   docs body (mcp.css, which this page does not load): a reading column, a table of contents, tables that scroll
   inside their own box on a phone, footnotes as the reference list.

   Two theme facts shape it: H2/H3 sizes are the theme's !important ones, so nothing here sets a heading's size; and
   the theme names a code font it never defines (--font-code-family), so the page defines it. */

/* Positioned, or the layout's two absolutely positioned hero backgrounds (layout_info.ftl) paint over the first
   screen of the article: every unpositioned element under them — the H1, the lead, the contents, the strip's
   labels — disappeared, and only positioned ones such as the strip's numbers showed. */
.bm-page {
    --font-code-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
    --font-family-code: var(--font-code-family);
    position: relative;
    padding-bottom: 1rem;
}

/* The reading column: a line of body text at most ~80 characters. */
.bm-header,
.bm-col {
    max-width: 780px;
    margin-left: auto;
    margin-right: auto;
}

.bm-header {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1.75rem;
}

.bm-breadcrumb {
    margin: 0;
    font-size: .875rem;
    color: #4B5563;
}

.bm-breadcrumb a {
    color: inherit;
}

.bm-lead {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.7;
    color: #1F2937;
}

.bm-asof {
    margin: 0;
    font-size: .875rem;
    color: #4B5563;
}

.bm-page .key-numbers {
    margin-bottom: 2rem;
}

/* ------------------------------------------------------------------ table of contents */
.bm-toc {
    margin: 0 0 2rem;
    padding: 1rem 1.25rem;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    background: #fff;
}

.bm-toc-title {
    margin: 0 0 .5rem;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #4B5563;
}

.bm-toc ol {
    margin: 0;
    padding-left: 1.25rem;
}

.bm-toc li {
    margin: .2rem 0;
    break-inside: avoid;
}

.bm-toc a {
    color: #16404B;
}

@media (min-width: 768px) {
    .bm-toc ol {
        columns: 2;
        column-gap: 2rem;
    }
}

/* ------------------------------------------------------------------ the article */
.bm-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #1F2937;
}

/* Every anchor target lands below the sticky header: the sections, the FAQ questions, the footnotes and the
   references back to them. */
.bm-body h2,
.bm-body h3,
.bm-body [id] {
    scroll-margin-top: 110px;
}

.bm-body h2 {
    margin-top: 2.5rem;
}

/* The theme's heading sizes are large and !important, and German compounds are long: "Entwicklungstempo" alone
   pushed /de/benchmarks 65px wider than a phone. Hyphenate by the page's language, and break what still does not fit. */
.bm-header h1,
.bm-body h2,
.bm-body h3,
.bm-cta-title {
    overflow-wrap: break-word;
    hyphens: auto;
    /* Only long words: "dau-ert" and "Kos-ten" read as mistakes, "Entwicklungs-tempo" does not. */
    hyphenate-limit-chars: 10 4 4;
}

.bm-body h3 {
    margin-top: 1.5rem;
}

.bm-body p,
.bm-body ul,
.bm-body ol {
    margin: 0 0 1rem;
}

.bm-body ul,
.bm-body ol {
    padding-left: 1.25rem;
}

.bm-body li {
    margin: .35rem 0;
}

.bm-body a {
    color: #16404B;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.bm-body code {
    font-family: var(--font-code-family);
    font-size: .9em;
}

.bm-table {
    margin: 1rem 0 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.bm-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    line-height: 1.5;
}

.bm-table th,
.bm-table td {
    padding: .55rem .75rem;
    border-bottom: 1px solid #E5E7EB;
    text-align: left;
    vertical-align: top;
}

.bm-table th {
    background: #F9FAFB;
    font-weight: 700;
}

/* Footnote references: small, unlinked-looking numbers. */
.bm-body .footnote-ref a {
    padding: 0 .1em;
    font-size: .75em;
    text-decoration: none;
}

.bm-body .footnotes {
    margin-top: 1rem;
    padding-top: .5rem;
    border-top: 1px solid #E5E7EB;
    font-size: .9rem;
    line-height: 1.6;
    color: #374151;
}

.bm-body .footnotes ol {
    padding-left: 1.5rem;
}

/* A reference is mostly a long URL: let it break anywhere rather than widen the page on a phone. */
.bm-body .footnotes a {
    overflow-wrap: anywhere;
}

.bm-body .footnote-backref {
    text-decoration: none;
}

/* ------------------------------------------------------------------ the call to action */
.bm-cta {
    margin-top: 3rem;
    text-align: center;
}

.bm-cta-title {
    margin: 0 0 .5rem;
}

.bm-cta-text {
    margin: 0 auto 1.5rem;
    max-width: 640px;
    font-size: 1.05rem;
    color: #374151;
}

/* The theme's dark mode (an .uc-dark ancestor). */
:where(.uc-dark) .bm-breadcrumb,
:where(.uc-dark) .bm-asof,
:where(.uc-dark) .bm-toc-title {
    color: #9CA3AF;
}

:where(.uc-dark) .bm-lead,
:where(.uc-dark) .bm-body,
:where(.uc-dark) .bm-cta-text,
:where(.uc-dark) .bm-body .footnotes {
    color: #E5E7EB;
}

:where(.uc-dark) .bm-toc {
    background: #111827;
    border-color: #1F2937;
}

:where(.uc-dark) .bm-toc a,
:where(.uc-dark) .bm-body a {
    color: #E0FFD3;
}

:where(.uc-dark) .bm-table th {
    background: #111827;
}

:where(.uc-dark) .bm-table th,
:where(.uc-dark) .bm-table td,
:where(.uc-dark) .bm-body .footnotes {
    border-color: #1F2937;
}
