/* Amos base - fonts, reset, body type (BRIEF.md 4.2, 4.3).
   Font files are vendored (SIL OFL 1.1, see fonts/OFL.txt). The ?v= on
   each url() puts them in the service worker's versioned static cache;
   bump it if a file is ever replaced. */

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-latin-wght-normal.woff2?v=fs530") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono-latin-400-normal.woff2?v=fs530") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

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

/* Everything below is scoped to .am-ui (see tokens.css): the old
   stylesheets still draw the screens not yet rebuilt, and these resets
   must not reach them. :where() keeps the resets at zero specificity so
   any component rule wins over them. */

.am-ui {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: var(--fs-16);
  line-height: var(--lh-16);
  font-weight: var(--fw-regular);
  letter-spacing: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
}
body.am-ui { margin: 0; background: var(--bg-app); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

:where(.am-ui) :where(h1, h2, h3, h4, p, ul, ol, figure, dl, dd) { margin: 0; }
:where(.am-ui) :where(h1, h2, h3, h4) { font: inherit; }
:where(.am-ui) :where(ul, ol) { padding: 0; list-style: none; }
:where(.am-ui) :where(img, svg) { display: block; }
:where(.am-ui) :where(a) { color: inherit; text-decoration: none; }
:where(.am-ui) :where(button, input, select, textarea) { font: inherit; color: inherit; letter-spacing: inherit; }
:where(.am-ui) :where(button) { background: none; border: 0; padding: 0; margin: 0; cursor: pointer; }
:where(.am-ui) :where(:focus) { outline: none; }
:where(.am-ui) :where(:focus-visible) { outline: none; box-shadow: var(--focus-ring); }
.am-ui ::selection { background: var(--accent-soft); color: var(--text); }

/* Numbers that must line up: amounts, times, counts (4.2). */
.am-num { font-variant-numeric: tabular-nums; }
.am-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

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

/* Icons from rd/icons.svg: <svg class="am-i" aria-hidden="true"><use href="..#i-x"/></svg> */
.am-i {
  width: 24px;
  height: 24px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.am-i--sm { width: 16px; height: 16px; }
.am-i--md { width: 20px; height: 20px; }
