/* ============================================================
   BASE — reset, typography, focus states, scrollbars
   ============================================================ */

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

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: var(--pf-font-ui);
  font-size: var(--pf-fs-base);
  line-height: var(--pf-lh-base);
  color: var(--pf-text-primary);
  background: var(--pf-bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1, "cv11" 1; /* tabular numerals for figures */
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: var(--pf-fw-semibold);
  line-height: var(--pf-lh-tight);
  letter-spacing: -0.01em;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; list-style: none; }

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

table {
  border-collapse: collapse;
  width: 100%;
}

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

/* ---- Accessibility: visible keyboard focus, always ---- */
:focus-visible {
  outline: 2px solid var(--pf-action-600);
  outline-offset: 2px;
  border-radius: var(--pf-radius-sm);
}

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

/* ---- Scrollbars — quiet, not the browser default chrome look ---- */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--pf-border-strong);
  border-radius: 6px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--pf-text-tertiary);
  background-clip: padding-box;
}

/* ---- Utility text classes ---- */
.pf-text-secondary { color: var(--pf-text-secondary); }
.pf-text-tertiary { color: var(--pf-text-tertiary); }
.pf-text-sm { font-size: var(--pf-fs-sm); }
.pf-text-xs { font-size: var(--pf-fs-xs); }
.pf-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;
}
