/* Accessibility: unitless line-heights and scalable font sizes */
:root {
    /* Line-height scale */
    --lh-body: 1.5;
    --lh-head: 1.2;
    --lh-code: 1.45;

    /* Font-size scale (respect user settings) */
    --fs-body: 1rem;
    --fs-small: 0.9375rem;
    --fs-mono: 0.95rem;

    /* Responsive, bounded headings */
    --fs-h1: clamp(1.8rem, 1.2rem + 1.5vw, 2.4rem);
    --fs-h2: clamp(1.5rem, 1.1rem + 1.0vw, 2.0rem);
    --fs-h3: clamp(1.3rem, 1.05rem + 0.6vw, 1.6rem);
    --fs-h4: 1.125rem;
    --fs-h5: 1rem;
    --fs-h6: 0.95rem;
}

/* Root sizing and baseline */
html {
    font-size: 100%;          /* keep root scalable */
    line-height: var(--lh-body);
}

/* Body and main content baseline */
body,
.rst-content {
    font-size: var(--fs-body) !important;
    line-height: inherit !important;
}

/* Body text and lists inherit baseline */
.rst-content :is(p, li, dd, dt) {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Tables inherit baseline and sizing */
:is(.rst-content table, .wy-table),
:is(.rst-content td, .wy-table td),
:is(.rst-content th, .wy-table th) {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Headings */
.rst-content :is(h1, h2, h3, h4, h5, h6) {
    line-height: var(--lh-head) !important;
}
.rst-content h1 { font-size: var(--fs-h1) !important; }
.rst-content h2 { font-size: var(--fs-h2) !important; }
.rst-content h3 { font-size: var(--fs-h3) !important; }
.rst-content h4 { font-size: var(--fs-h4) !important; }
.rst-content h5 { font-size: var(--fs-h5) !important; }
.rst-content h6 { font-size: var(--fs-h6) !important; }

/* Code (inline and blocks) */
.rst-content code,
.rst-content tt,
.rst-content pre,
.rst-content div[class*="highlight"] pre {
    font-size: var(--fs-mono) !important;
    line-height: var(--lh-code) !important;
}

/* Admonitions and blockquotes inherit baseline */
.rst-content .admonition,
.rst-content .admonition p,
.rst-content blockquote {
    line-height: inherit !important;
}

/* Navigation and sidebar */
.wy-nav-top,
.wy-nav-top a,
.wy-nav-side,
.wy-menu-vertical,
.wy-menu-vertical a,
.wy-menu-vertical .caption,
.wy-side-nav-search {
    font-size: var(--fs-body) !important;
    line-height: var(--lh-body) !important;
}

/* Breadcrumbs and footer inherit baseline and size */
.wy-breadcrumbs,
footer,
footer * {
    font-size: inherit !important;
    line-height: inherit !important;
}

/* Forms (search input and button) */
.wy-side-nav-search input[type="text"],
.wy-side-nav-search input[type="search"],
.wy-side-nav-search button {
    font-size: var(--fs-body) !important;
    line-height: var(--lh-body) !important;
    min-height: 2.25rem; /* ensure accessible target size */
}

/* Utility: smaller text helper (use sparingly) */
.rst-content .small,
.small {
    font-size: var(--fs-small) !important;
}

/* Accessibility: Contrast ratio 7:1 or higher */
a { color: #005326; }
a:hover,
a:visited { color: #00421E; }

/* Admonition colors */
.admonition.admonition-field-requirement .admonition-title,
.admonition.admonition-question .admonition-title {
    background-color: #0b5394 !important;
}
.admonition.note .admonition-title {
    background: #0E606C !important;
}

.admonition.warning .admonition-title {
    background: #8A4B00 !important;
}

/* Navigation background and footer text */
.wy-nav-side { background-color: #252323 !important; }
footer { color: #545454; }

/* Clearly identify links in footer */
footer a { text-decoration: underline; }

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