/* Reset, @font-face and typography: docs/ui.md §4. Colors come from tokens.css only. */
@font-face {
  font-family: 'Roboto';
  src: url("../fonts/Roboto%5Bwght%5D.woff2") format("woff2");
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--tiag-nav-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -0.005em;
  color: var(--tiag-text);
  background: var(--tiag-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { vertical-align: middle; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 .5rem;
  color: var(--tiag-heading);
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 500;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; font-weight: 600; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.5rem; }
hr { border: 0; border-top: 1px solid var(--tiag-border); margin: 1.5rem 0; }
small, .small { font-size: .875rem; }

a { color: var(--tiag-accent); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--tiag-hover); }
*:focus-visible { outline: 2px solid var(--tiag-accent); outline-offset: 2px; }
::selection { background: var(--tiag-accent-ring); }

code, kbd, pre, samp, .mono { font-family: var(--font-mono); font-size: .875em; }
code { overflow-wrap: anywhere; }
pre { margin: 0; }
time { white-space: nowrap; }
table { border-collapse: collapse; }
button, input, select, textarea { font: inherit; color: inherit; }

/* Text helpers */
.lead { font-size: 1.25rem; font-weight: 300; color: var(--tiag-lead); }
.metric { font-size: 2.25rem; font-weight: 700; color: var(--tiag-accent); letter-spacing: -0.02em; line-height: 1.1; }
.muted { color: var(--tiag-muted); }
.text-center { text-align: center; }

/* Accessibility */
.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;
  left: 1rem; top: -100px;
  z-index: 2000;
  padding: .6rem 1rem;
  background: var(--tiag-accent);
  color: var(--white);
  border-radius: var(--tiag-radius-sm);
  font-weight: 600;
}
.skip-link:focus { top: 1rem; color: var(--white); }

/* Icons (vendored Bootstrap Icons sprite) */
.icon {
  width: 1em; height: 1em;
  fill: currentColor;
  vertical-align: -.125em;
  flex-shrink: 0;
}

/* Spacing & layout utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: .25rem !important; }
.mt-2 { margin-top: .5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: .5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.stack { display: flex; flex-direction: column; gap: 1rem; }
.stack > * { margin-top: 0; margin-bottom: 0; }
.stack-lg { display: flex; flex-direction: column; gap: 1.5rem; }
.stack-lg > * { margin-top: 0; margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.inline-form { display: inline; margin: 0; }
.prose { max-width: 54rem; }
.prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.2rem; margin-top: 1.5rem; }

/* Heading-size utilities for semantic headings styled smaller (docs/ui.md §4). */
.h3 { font-size: 1.75rem; font-weight: 600; color: var(--tiag-heading); letter-spacing: -0.02em; }
.h5 { font-size: 1.25rem; font-weight: 600; color: var(--tiag-heading); letter-spacing: -0.02em; }
.h6 { font-size: 1rem; font-weight: 600; color: var(--tiag-heading); letter-spacing: -0.02em; }
