/* Base styles — reset + typography + focus + container */

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

[hidden] { display: none !important; }

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  transition: background-color 150ms ease, color 150ms ease;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 700;
  color: var(--fg);
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover {
  color: var(--accent-hover);
}

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

input,
textarea,
select {
  font-family: inherit;
  color: inherit;
  background: transparent;
  border: 0;
  outline: 0;
}

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

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

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

::selection {
  background: var(--accent);
  color: var(--on-accent);
}

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

/* --- Utilities (semantic, not utility-fest) --- */
.mono {
  font-family: var(--font-mono);
}

.container {
  max-width: var(--content-max);
  margin-inline: auto;
}

.rule-b {
  border-bottom: 1px solid var(--rule);
}
.rule-strong-b {
  border-bottom: 1px solid var(--rule-strong);
}
.rule-r {
  border-right: 1px solid var(--rule);
}

.section-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: var(--tr-mono-section);
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 400;
}

.col-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono-label);
  letter-spacing: var(--tr-mono-label);
  text-transform: uppercase;
  color: var(--fg-muted);
  font-weight: 400;
}

/* Long tech identifiers on mobile — break inside a word if needed */
@media (max-width: 767px) {
  h1, h2, h3 {
    overflow-wrap: anywhere;
  }
}

/* Fade-in helper for results appearing */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.fade-in {
  animation: fadeIn 180ms ease-out;
}
