/* Reset and base typography. */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
  -webkit-font-smoothing: antialiased;
  /* A word longer than its box (common in Finnish and German) breaks inside the box instead of spilling out of it.
     "anywhere" also lets flex and grid items shrink below the width of their longest word. */
  overflow-wrap: anywhere;
}
/* Tables keep whole words and scroll sideways in their wrapper instead of squeezing columns letter by letter. */
table { overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--font-heading); line-height: 1.3; margin: 0; font-weight: 700; }
h1 { font-size: var(--fs-xxl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); font-weight: 600; }
h4 { font-size: var(--fs-md); font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { display: block; max-width: 100%; }
.icon { display: inline-block; vertical-align: middle; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: 8px; }
[hidden] { display: none !important; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--text-muted); }
.subtle { color: var(--text-subtle); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.strong { font-weight: 600; }
.danger-text { color: var(--tone-danger-fg); }
.success-text { color: var(--tone-success-fg); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; inset-inline-start: 12px; top: -48px; z-index: 1000;
  background: var(--primary); color: #fff; padding: 8px 14px; border-radius: var(--radius-control);
}
.skip-link:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
/* arrows point the reading direction */
[dir="rtl"] .icon.flip { transform: scaleX(-1); }

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

/* boot screen (before the app is ready) */
.boot { min-height: 100vh; display: grid; place-items: center; color: var(--text-muted); }
[dir="ltr"] .icon.flip-ltr { transform: scaleX(-1); }
#main:focus, #main:focus-visible { outline: none; box-shadow: none; }
.grow { flex: 1; min-width: 0; }
.narrow { max-width: 600px; margin-inline: auto; width: 100%; }
.plain-link { color: inherit; text-decoration: none; }
.plain-link:hover .strong { text-decoration: underline; }
.title-xl { font-size: var(--fs-xxl); font-family: var(--font-heading); font-weight: 700; margin: 0; line-height: 1.3; }
.center-text { text-align: center; }
.noscript { padding: 24px; text-align: center; }
