/* BUTTONS (Intrinsic) */
.btn {
  /* Size relative to text */
  padding: 0.6em 1.2em;
  font-size: var(--step-0);
  font-family: var(--mono);
  font-weight: bold;
  text-transform: uppercase;
  background: transparent;
  color: var(--txt);
  border: var(--border-width) solid var(--txt);
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.1s;
  display: inline-block;
  text-decoration: none;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--accent);
}
.btn:active {
  transform: translate(0,0);
  box-shadow: none;
}

.btn-small {
  padding: 0.3em 0.6em;
  font-size: 0.8rem;
  font-family: var(--mono);
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
.btn-small:hover {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* Navigation Link Active State */
.nav-link.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

/* FORMS (Protected) */
/* Only target text-based inputs to avoid breaking radios/checkboxes */
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  width: 100%;
  padding: 0.8rem;
  border: var(--border-width) solid var(--txt);
  background: var(--bg);
  color: var(--txt);
  font-family: var(--mono);
  font-size: 1rem;
}
input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 4px 4px 0 var(--accent);
}

/* TYPOGRAPHY */
h1, h2, h3, .brand {
  font-family: var(--head);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.1;
  margin: 0;
  letter-spacing: -0.02em;
}
h1 { font-size: var(--step-5); max-width: 15ch; }
h2 { font-size: var(--step-3); display: inline-block; border-bottom: 2px solid var(--txt); }
h3 { font-size: var(--step-2); }
p, li { max-width: 60ch; }
hr {
  width: 100%;
  height: 1px;
  background: var(--txt);
  border: 0;
  opacity: 0.2;
}
blockquote {
  border-left: 4px solid var(--accent);
  padding-left: 1rem;
  font-size: 1.1em;
  font-weight: 500;
}

.mono {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.85em;
  letter-spacing: 0.05em;
  opacity: 0.8;
}
.lead {
  font-size: var(--step-1);
  font-weight: 600;
}

/* UTILS */
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-block: 1rem;
}
th, td {
  border: 1px solid var(--txt);
  padding: 0.75rem;
  text-align: left;
}
th {
  background: var(--mute);
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.8rem;
}

/* Code Block Fix */
pre {
  background: var(--mute);
  padding: var(--s0);
  overflow-x: auto;
  border: 1px solid var(--txt);
}
code {
  font-family: var(--mono);
  background: rgba(125,125,125,0.1);
  padding: 0.1em 0.3em;
}
pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

details {
  border: var(--border-width) solid var(--txt);
  padding: 0.5rem;
}
summary {
  font-family: var(--mono);
  cursor: pointer;
  font-weight: bold;
}
details[open] summary {
  margin-bottom: 0.5rem;
  border-bottom: 1px solid var(--txt);
  padding-bottom: 0.5rem;
}

/* TELEMETRY VISUALS */
.telemetry-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}
.telemetry-bar {
  width: 100%;
  height: 6px;
  background: var(--bg);
  border: 1px solid var(--txt);
}
.telemetry-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s ease-out;
}
