/**
 * Mimeo · base: the global element rules of the contract §2.4 allow-list, and nothing else.
 *
 * Reduced motion is handled at the token layer (tokens.css zeroes --ec-dur-*), so every template
 * transition collapses to 0ms without touching the extensions' own animations.
 *
 * Every other element style lives under a template class (.ts-*, .mm-*) or under .ts-prose, so
 * the community apps that mount inside the page (Tailwind islands, shadcn themes) are never
 * reached. The body background is a hex token on purpose: Community Surveys tone-matches the
 * computed page colour.
 *
 * @copyright   Copyright (C) 2026 BulaSikku Technologies Private Limited. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

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

/* The sticky masthead keeps only its ruled navigation bar in view on wide screens (layout.css
   pulls the brand row up by --mm-sticky-hidden), so anchors clear the visible part only. */
html {
    font-size: 100%;
    overflow-x: clip;
    scroll-padding-top: calc(var(--ts-sticky-offset, 0px) - var(--mm-sticky-hidden, 0px) + 1rem);
}

body {
    margin: 0;
    background-color: var(--ec-bg);
    color: var(--ec-fg);
    font-family: var(--ec-font-body);
    line-height: 1.5;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* One ring for everything focusable (design spec §6.0): 3px ink on stock and paper, yellow in
   the Night edition; the band (masthead, cover) re-points --ts-focus to the yellow band ring. */
:focus-visible {
    outline: var(--ts-focus-width, 3px) solid var(--ts-focus);
    outline-offset: 2px;
}

::selection {
    background-color: var(--mm-yellow);
    color: var(--mm-yellow-ink);
}

[hidden] {
    display: none !important;
}

img,
video {
    max-inline-size: 100%;
    block-size: auto;
}

/* The yellow highlighter, always with ink text (design spec §1.2.13). */
mark {
    padding: 0 0.125em;
    background-color: var(--mm-yellow);
    color: var(--mm-yellow-ink);
}
