/**
 * Quorum · 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-*, .q-*) 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;
}

html {
    font-size: 100%;
    overflow-x: clip;
    scroll-padding-top: calc(var(--ts-sticky-offset, 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;
}

/* The two-colour focus indicator (design spec §6.1, W3C C40): a 2px ring in --ts-focus (ink on
   the light board, hi-vis yellow after hours) around a 2px band in --ts-focus-gap (yellow / near
   black), so it reads on white cells, on teal buttons and on the yellow strip alike. Flush cells
   (header, drawer, tabs) pull the ring inside in layout.css. */
:focus-visible {
    outline: var(--ts-focus-width, 2px) solid var(--ts-focus);
    outline-offset: 2px;
    box-shadow: 0 0 0 2px var(--ts-focus-gap);
}

::selection {
    background-color: var(--q-tint);
    color: var(--ec-fg);
}

[hidden] {
    display: none !important;
}

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

/* Highlighted text (search hits): the accent tint with its strong text (design spec §1.8 keeps
   yellow for Pinned, Today and You); no inline padding, so a hit inside a word never splits it. */
mark {
    padding: 0;
    background-color: var(--q-tint);
    color: var(--q-accent-strong);
}
