/**
 * Precedent.news — Base Reset & Global Styles
 */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400;1,600&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,500;1,8..60,400&family=DM+Mono:wght@300;400;500&display=swap');

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--white);
  color: var(--black);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }

/* Selection */
::selection {
  background: var(--orange);
  color: var(--white);
}

/* Scrollbar */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--gray-05); }
::-webkit-scrollbar-thumb { background: var(--gray-30); }
::-webkit-scrollbar-thumb:hover { background: var(--orange); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

/* Skip link */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--gutter);
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-ui);
  font-size: 11px;
  padding: var(--s2) var(--s4);
  z-index: 9999;
  transition: top var(--fast);
}
.skip-link:focus { top: var(--s4); }

/* Container */
.wrap {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Horizontal rules */
hr {
  border: none;
  border-top: var(--border-light);
}

/* Category label — shared utility */
.cat {
  font-family: var(--font-ui);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--orange);
}

/* Timestamp — shared utility */
.ts {
  font-family: var(--font-ui);
  font-size: 10px;
  color: var(--gray-50);
  letter-spacing: 0.5px;
}

/* Screen reader only */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* Animations */
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

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