/* The Fence Guys — reset, typography, shared utilities */
* { box-sizing: border-box; }

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  background: var(--app-bg);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  font-weight: var(--fw-regular);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: var(--brand-accent-strong); text-decoration: none; }
a:hover { color: var(--brand-accent-text); }
h1, h2, h3, h4, p { margin: 0; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--brand-accent) 70%, transparent);
  outline-offset: 2px;
}

.mono { font-family: var(--font-mono); }
.tnum { font-variant-numeric: tabular-nums; }

::selection {
  background: color-mix(in srgb, var(--brand-accent-soft) 78%, var(--surface-primary));
  color: var(--text-primary);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--text-primary) 16%, transparent);
  border-radius: 20px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: color-mix(in srgb, var(--text-primary) 24%, transparent); }

/* keyframes shared across components */
@keyframes bcpop { from { opacity: 0; transform: translateY(4px) scale(.985); } }
@keyframes bctoast { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes bcflout { to { opacity: 0; transform: translateX(16px); height: 0; margin: 0; padding-top: 0; padding-bottom: 0; } }
@keyframes bcpulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes bcspin { to { transform: rotate(360deg); } }

/* generic helpers */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.row { display: flex; align-items: center; }
.spread { display: flex; align-items: center; justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.nowrap { white-space: nowrap; }
.hidden, [hidden] { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon { display: inline-block; vertical-align: middle; }

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

/* visually-hidden for a11y labels */
.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;
}
