/* TPR Unified foundation: reset, type, accessibility and document flow. */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--tpr-surface);
    color: var(--tpr-text);
    font-family: var(--tpr-font-sans);
    font-size: var(--tpr-text-base);
    line-height: 1.58;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

body,
button,
input,
select,
textarea {
    font-family: var(--tpr-font-sans);
}

img,
picture,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    height: auto;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
[type="button"],
[type="submit"] {
    cursor: pointer;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
figure,
blockquote,
dl,
dd {
    margin-block-start: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--tpr-section-ink);
    font-family: var(--tpr-font-display);
    font-weight: 800;
    line-height: 0.98;
    text-wrap: balance;
}

h1 {
    font-size: var(--tpr-text-4xl);
    letter-spacing: -0.045em;
}

h2 {
    font-size: var(--tpr-text-3xl);
    letter-spacing: -0.035em;
}

h3 {
    font-size: var(--tpr-text-2xl);
    letter-spacing: -0.025em;
}

p,
li,
dd {
    text-wrap: pretty;
}

a {
    color: inherit;
    text-decoration-thickness: 0.08em;
    text-underline-offset: 0.18em;
}

a:hover {
    color: var(--tpr-accent-strong);
}

::selection {
    background: var(--tpr-accent);
    color: var(--tpr-accent-contrast);
}

:focus-visible {
    outline: 2px solid var(--tpr-accent);
    outline-offset: 3px;
    box-shadow: var(--tpr-ring);
}

[hidden] {
    display: none !important;
}

.screen-reader-text,
.tpr-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.screen-reader-text:focus {
    z-index: 100000;
    top: 8px;
    left: 8px;
    width: auto !important;
    height: auto !important;
    padding: 0.75rem 1rem !important;
    margin: 0 !important;
    overflow: visible !important;
    clip: auto !important;
    background: var(--tpr-white);
    color: var(--tpr-black);
    box-shadow: var(--tpr-shadow-md);
}

.tpr-shell,
.tpr-shell-wide,
.tpr-content-shell {
    width: min(calc(100% - (var(--tpr-gutter) * 2)), var(--tpr-shell));
    margin-inline: auto;
}

.tpr-shell-wide {
    max-width: var(--tpr-shell-wide);
}

.tpr-content-shell {
    max-width: var(--tpr-content);
}

.tpr-site-main {
    min-height: 52vh;
}

.tpr-prose {
    color: var(--tpr-text);
    font-size: var(--tpr-text-lg);
    line-height: 1.72;
}

.tpr-prose > * + * {
    margin-block-start: 1.35em;
}

.tpr-prose h2,
.tpr-prose h3,
.tpr-prose h4 {
    margin-block-start: 1.65em;
    margin-block-end: 0.55em;
}

.tpr-prose a:not(.tpr-button) {
    color: var(--tpr-accent-strong);
    font-weight: 700;
}

.tpr-prose blockquote {
    margin-inline: 0;
    padding: var(--tpr-space-6) var(--tpr-space-8);
    border-inline-start: 5px solid var(--tpr-accent);
    background: var(--tpr-paper);
    font-size: var(--tpr-text-xl);
    font-weight: 700;
}

.tpr-prose code,
.tpr-prose pre {
    font-family: var(--tpr-font-mono);
}

.tpr-prose pre {
    max-width: 100%;
    overflow-x: auto;
    padding: var(--tpr-space-6);
    background: var(--tpr-black);
    color: var(--tpr-white);
}

.alignwide {
    width: min(100%, var(--tpr-shell));
    max-width: var(--tpr-shell);
    margin-inline: auto;
}

.alignfull {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
}

@media (max-width: 782px) {
    html {
        scroll-padding-top: 46px;
    }
}
