/* Hallmark: existing-site document typography, shared with the rules-page direction. */
/* Critique: remove decorative panels, keep content and technical examples readable. */
:root {
    --document-measure: 800px;
    --document-text-size: 17px;
    --document-leading: 1.75;
    --document-gap: 20px;
    --document-section-gap: 48px;
    --document-code-bg: #f5f5f5;
    --document-border: #d9dcdf;
    --document-code-font: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.page .page__container.document {
    max-width: var(--document-measure);
    min-width: 0;
    margin-inline: auto;
    align-items: stretch;
}

.document .section__title {
    width: 100%;
    margin-bottom: 24px;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.2;
    text-align: left;
    overflow-wrap: break-word;
}

.document p,
.document .section__text {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0 0 var(--document-gap);
    padding: 0;
    font-size: var(--document-text-size);
    font-weight: 400;
    line-height: var(--document-leading);
    text-align: left;
    overflow-wrap: break-word;
}

.document h2 {
    margin: var(--document-section-gap) 0 20px;
    font-size: clamp(22px, 3vw, 28px);
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: break-word;
}

.document h3 {
    margin: 28px 0 12px;
    font-size: 19px;
    line-height: 1.4;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.document a {
    font-size: inherit;
    font-weight: inherit;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    overflow-wrap: anywhere;
}

.document a:hover { text-decoration-thickness: 2px; }
.document a:focus-visible,
.document pre:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

.document code,
.document pre {
    font-family: var(--document-code-font);
    background: var(--document-code-bg);
}

.document :not(pre) > code { padding: 2px 4px; }
.document pre {
    max-width: 100%;
    min-width: 0;
    margin: 0 0 var(--document-gap);
    padding: 20px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.65;
    text-align: left;
    white-space: pre;
    tab-size: 4;
}

.document table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 16px;
    line-height: 1.65;
    font-weight: 400;
}

.document th,
.document td {
    padding: 20px 12px;
    border-bottom: 1px solid var(--document-border);
    text-align: left;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.document th { font-weight: 600; }
.document th:first-child,
.document td:first-child { width: 48px; padding-left: 0; }
.document th:last-child,
.document td:last-child { padding-right: 0; }
.document .document__note { margin-top: 28px; }

@media (max-width: 600px) {
    .page .page__container.document {
        padding-inline: 20px;
        --document-text-size: 16px;
        --document-section-gap: 36px;
    }
    .document th,
    .document td { padding: 16px 8px; font-size: 14px; }
    .document th:first-child,
    .document td:first-child { width: 30px; }
    .document pre { padding: 16px; }
}

@media print {
    .page .page__container.document { max-width: none; }
    .document h2, .document h3 { break-after: avoid; }
    .document p { orphans: 3; widows: 3; }
    .document pre { white-space: pre-wrap; overflow-wrap: anywhere; }
    .document tr { break-inside: avoid; }
}
