/* ============================================================
   static/css/base.css — fonts, reset, document defaults.
   Loaded in the `base` layer (see mithura.css). Tokens only.
   ============================================================ */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/InterVariable.8e433c0592f7.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/JetBrainsMonoVariable.b058178d7f30.woff2") format("woff2");
}

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

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  height: 100%;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}

h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: var(--weight-semibold); line-height: var(--leading-tight); color: var(--color-text); }
h1 { font-size: var(--text-2xl); letter-spacing: var(--tracking-tight); }
h2 { font-size: var(--text-lg); }
h3 { font-size: var(--text-base); }
p:where(:not([class])) { margin: 0 0 var(--space-3); }
p:where(:not([class])):last-child { margin-bottom: 0; }
:where(ul, ol):where(:not([class])) { margin: 0 0 var(--space-3); padding-left: 20px; }
small { font-size: var(--text-sm); }
strong, b { font-weight: var(--weight-semibold); }
hr { border: 0; border-top: var(--border-w) solid var(--color-border); margin: var(--space-6) 0; }

/* Unclassed only: a legacy class that recolours a link must keep winning even from a lower layer. */
a:where(:not([class])) { color: var(--color-link); text-decoration: none; }
a:where(:not([class])):hover { text-decoration: underline; }
a[class] { text-decoration: none; }

img, svg, video { max-width: 100%; }
img { height: auto; }

code, kbd, pre, samp { font-family: var(--font-mono); font-size: 92%; }
code:where(:not([class])) { background: var(--color-surface-3); padding: 1px 5px; border-radius: var(--radius-sm); }
pre { background: var(--color-surface-2); border: var(--border-w) solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-3) var(--space-4); overflow-x: auto; }
pre code { background: none; padding: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
table { border-collapse: collapse; border-spacing: 0; }
th { text-align: left; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
::selection { background: var(--color-primary-soft-hover); }

* { scrollbar-width: thin; scrollbar-color: var(--color-border-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { background: var(--color-border-strong); border-radius: var(--radius-full); }
*::-webkit-scrollbar-track { background: transparent; }

.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 { transition-duration: 0s !important; animation-duration: 0s !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

@media print {
  .sidebar, .topbar, .toasts, .overlay, .drawer { display: none !important; }
  .app { display: block; }
  body { background: white; color: black; }
}
