/* База: сброс и типографика. Никаких размеров и отступов на тегах форм — только на классах компонентов. */
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  [hidden] { display: none !important; }  /* атрибут hidden сильнее display у кнопок и блоков */
  html { -webkit-text-size-adjust: 100%; }
  body {
    margin: 0; background: var(--bg-page); color: var(--text-primary);
    font: var(--fw-regular) var(--fs-14)/var(--lh) var(--font-ui); letter-spacing: var(--tracking);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  }
  h1, h2, h3, h4 { margin: 0; font-weight: var(--fw-semibold); line-height: var(--lh-tight); letter-spacing: -.005em; }
  h1 { font-size: var(--fs-24); }
  h2 { font-size: var(--fs-20); }
  h3 { font-size: var(--fs-16); }
  h4 { font-size: var(--fs-14); }
  p { margin: 0 0 var(--s-3); }
  a { color: var(--text-link); text-decoration: none; }
  a:hover { text-decoration: underline; text-underline-offset: 2px; }
  img, svg { display: block; max-width: 100%; }
  button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
  button { cursor: pointer; }
  :focus-visible { outline: none; box-shadow: var(--focus-ring); }
  ::selection { background: var(--a-200); }
  code, kbd, .mono { font-family: var(--font-mono); font-size: .92em; }
  hr { border: 0; border-top: 1px solid var(--divider); margin: var(--s-6) 0; }

  .num, .tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }
  :is(.v2, .side, .topbar) .muted { color: var(--text-secondary); }
  .faint { color: var(--text-tertiary); }
  :is(.v2, .side, .topbar) .small { font-size: var(--fs-12); }
  :is(.v2, .side, .topbar) .pos { color: var(--positive); }
  :is(.v2, .side, .topbar) .neg { color: var(--negative); }
  .nowrap { white-space: nowrap; }
  .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
  .icon.sm { width: 16px; height: 16px; }
  .icon.lg { width: 20px; height: 20px; }
  .icon.xl { width: 24px; height: 24px; }
}
