/* ============================================================================
   Rooted Stack — Base / reset, page ground, focus, motion
   ============================================================================ */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
    font-family: var(--rs-sans);
    font-size: var(--rs-fs-body);
    line-height: var(--rs-lh-body);
    color: var(--rs-text);
    background-color: var(--rs-chart-paper);
    /* Chart-paper ground: an almost-invisible 5° graticule, echoing the map.
       Everything else is photography — this stays a whisper, never a pattern. */
    background-image:
        linear-gradient(rgba(15,58,62,.020) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15,58,62,.020) 1px, transparent 1px);
    background-size: 64px 64px;
    background-position: -1px -1px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--rs-link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

::selection { background: rgba(226,154,45,.24); color: var(--rs-ink); }

/* Visible, on-brand keyboard focus (ochre ring is allowed here — it marks
   position, and focus IS position). Pointer focus stays quiet. */
:focus { outline: none; }
:focus-visible {
    outline: 2px solid var(--rs-ochre);
    outline-offset: 2px;
    border-radius: 3px;
}

[x-cloak] { display: none !important; }

/* Skip link */
.rs-skip {
    position: absolute; left: 8px; top: -48px;
    background: var(--rs-deep-water); color: var(--rs-on-ink);
    padding: 10px 16px; border-radius: var(--rs-radius-md);
    font: 600 var(--rs-fs-sm)/1 var(--rs-sans);
    z-index: calc(var(--rs-z-header) + 10);
    transition: top var(--rs-dur-2) var(--rs-ease);
}
.rs-skip:focus { top: 8px; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}
