/* Element defaults. No component lives here, and no literal colour: every
 * value comes from tokens.css. */

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

/* THE `hidden` ATTRIBUTE MUST WIN OVER A COMPONENT'S OWN `display`.
 *
 * The UA stylesheet has `[hidden] { display: none }`, and an AUTHOR rule that
 * sets `display` beats it whatever the order or the specificity, because author
 * origin outranks user-agent origin. Two components paired the two and neither
 * could ever hide:
 *
 *   .palette  display:flex + position:fixed + inset:0 + z-index:60
 *             -> a full-screen search overlay permanently on top of the
 *                console, reported as "the search bar is always on top"
 *   .bulkbar  display:flex, toggled by `bar.hidden = n === 0`
 *             -> a permanent strip of destructive buttons under every table,
 *                which is the exact thing its own comment says it replaces
 *
 * Both are driven from JavaScript by assigning `el.hidden`, so the symptom is
 * indistinguishable from the script not running -- and `palette.js` was working
 * perfectly the whole time.
 *
 * GLOBAL AND `!important` DELIBERATELY. A per-component `.x[hidden]` rule fixes
 * the two that are broken today and leaves the next component to pair `display`
 * with `hidden` broken in the same silent way. There is no element that wants
 * to be `hidden` and displayed, so there is nothing for this to get wrong.
 */
[hidden] { display: none !important; }

html { background: var(--ink); }

body {
  margin: 0;
  background: var(--ink);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: 1.15rem; }
h2 { font-size: 1rem; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

code, .mono { font-family: var(--font-mono); font-size: 0.86em; }

/* Michroma. Short strings only: eyebrows, labels, the wordmark. */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-3);
}

::selection { background: var(--royal); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
