/* Shared by the public pages and the app: reset, typography and focus. Colours and spacing come
   from tokens.css. */

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

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

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* For keyboard navigation only; on mouse clicks a ring looks like a defect. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: var(--r-control);
}
:focus:not(:focus-visible) { outline: none; }

/* FocusOnNavigate focuses the h1 through tabindex="-1", which drew a ring across the top of every
   page. Nobody reaches such an element by keyboard; the focus move itself stays for screen readers. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible { outline: none; }

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

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

h1, h2, h3 { margin: 0 0 var(--s-2); text-wrap: balance; font-weight: 600; letter-spacing: -0.011em; }
h1 { font-size: var(--fs-2xl); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-lg); line-height: var(--lh-snug); }
h3 { font-size: var(--fs-md); line-height: var(--lh-snug); }
p { margin: 0 0 var(--s-3); }

/* Identifiers (JIB, IBAN, codes), where 0 and O must differ; amounts, whose figures line up. */
.mono { font-family: var(--font-mono); font-size: .95em; letter-spacing: -0.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-muted); }
.table-scroll { overflow-x: auto; }

/* The small caps above a value: "JIB", "Rok plaćanja", a tile's title. */
.label {
  display: block;
  font-size: var(--fs-micro);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-subtle);
}
