/* Base element styles. Requires tokens.css. */

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

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

body.hive {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "cv11", "ss01";
}

.hive h1, .hive h2, .hive h3, .hive h4, .hive h5 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.hive h1 { font-size: var(--fs-2xl); }
.hive h2 { font-size: var(--fs-xl); }
.hive h3 { font-size: var(--fs-lg); }
.hive h4 { font-size: var(--fs-md); }

.hive a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 2px; }
.hive a:hover { color: var(--ember-800); }
/* Links styled as buttons keep the button's colours (the rule above would
   otherwise win on specificity and paint primary buttons orange-on-orange). */
.hive a.btn { color: var(--bs-btn-color); text-decoration: none; }
.hive a.btn:hover, .hive a.btn:focus-visible { color: var(--bs-btn-hover-color); }

.hive code, .hive kbd, .hive pre, .mono { font-family: var(--mono); }
.hive code {
  font-size: 0.86em;
  background: var(--chip);
  color: var(--text);
  padding: 1px 5px;
  border-radius: 5px;
}
.hive pre {
  font-size: var(--fs-sm);
  background: var(--ink-900);
  color: var(--ink-text);
  border-radius: var(--r-md);
  padding: var(--sp-4);
  overflow: auto;
}
.hive pre code { background: none; color: inherit; padding: 0; }

kbd {
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 5px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
}

/* Focus: always visible, never hidden behind sticky chrome (WCAG 2.4.11). */
.hive :focus-visible {
  outline: 2px solid var(--ember-500);
  outline-offset: 2px;
  box-shadow: none;
}
/* Anchors scroll inside the content region, which already starts below the
   top bar and tabs. */
.hive [id] { scroll-margin-top: var(--sp-4); }

.skip-link {
  position: absolute;
  left: var(--sp-3);
  top: -60px;
  z-index: 100;
  background: var(--ink-900);
  color: #fff;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
}
.skip-link:focus { top: var(--sp-3); color: #fff; }

.visually-hidden-focusable:not(:focus):not(:focus-within),
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.stack { display: flex; flex-direction: column; gap: var(--sp-4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--sp-2); }
.row-flex { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }
