/*
  Dashboard base — fonts, reset, typography, focus, links
*/

@font-face {
  font-family: "Archivo";
  src: url("../fonts/Archivo-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 100%;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Space Mono";
  src: url("../fonts/SpaceMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Archivo for UI; Space Mono Regular for buttons + tags */

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--dash-font-ui);
  font-size: var(--dash-text-base);
  line-height: var(--dash-leading-normal);
  color: var(--dash-ink);
  background: var(--dash-canvas);
  overflow-x: hidden;
}

img,
svg {
  display: block;
  max-width: 100%;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* Brand manual: Space Mono Regular on every button (size stays per component) */
button {
  font-family: var(--dash-font-label, var(--dash-font-ui));
}

a {
  color: var(--dash-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--dash-primary-hover);
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 2px solid var(--dash-focus);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -100%;
  z-index: var(--z-skip);
  padding: var(--space-2) var(--space-4);
  background: var(--dash-surface);
  color: var(--dash-ink);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-1);
}

.skip-link:focus {
  top: var(--space-4);
}

h1,
.h1 {
  font-family: var(--dash-font-display);
  font-size: var(--dash-text-xl);
  font-weight: 700;
  line-height: var(--dash-leading-tight);
  margin: 0;
}

@media (min-width: 1200px) {
  h1,
  .h1 {
    font-size: var(--dash-text-2xl);
  }
}

h2,
.h2 {
  font-family: var(--dash-font-ui);
  font-size: var(--dash-text-lg);
  font-weight: 700;
  line-height: var(--dash-leading-snug);
  margin: 0;
}

h3,
.h3 {
  font-family: var(--dash-font-ui);
  font-size: var(--dash-text-base);
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0;
}

.numeric {
  font-variant-numeric: tabular-nums;
}

/* [hidden] must beat component display rules (e.g. .btn inline-flex) */
[hidden] {
  display: none !important;
}

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