/* =========================================================
   base.css — reset + document defaults
========================================================= */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    line-height: 1.65;
    font-size: var(--fs-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

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

a {
    color: inherit;
    text-decoration: none;
}

button {
    font: inherit;
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
}

ul {
    list-style: none;
}

:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 4px;
    border-radius: 6px;
}

::selection {
    background: rgba(14, 123, 107, .18);
}

/* Skip link for keyboard users */
.skip-link {
    position: absolute;
    left: 50%;
    top: -100px;
    transform: translateX(-50%);
    background: var(--navy);
    color: var(--white);
    padding: 12px 22px;
    border-radius: var(--r-pill);
    z-index: 2000;
    transition: top var(--dur-fast) var(--ease);
}

.skip-link:focus {
    top: 16px;
}

/* Shared layout primitive — same width as .nav__inner so every section
   lines up with the nav edges. */
.container,
.container--wide {
    width: min(var(--container-wide), 92%);
    margin-inline: auto;
}

.chapter {
    position: relative;
    padding-block: var(--chapter);
}

.chapter--sm { padding-block: clamp(4rem, 3rem + 4vw, 6rem); }
