/* Certus Deploy — base elements and utilities. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100dvh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; color: var(--text); }
p { margin: 0; }
a { color: var(--certus-accent-hover); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
code, .mono { font-family: var(--font-mono); font-size: 0.86em; }
code { color: var(--certus-blue-700); }
img { max-width: 100%; }

:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- Utilities ---------- */

.tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-subtle); }
.small { font-size: var(--fs-caption); }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.truncate { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.text-ok { color: var(--success); }
.text-err { color: var(--danger); }
.text-warn { color: var(--warning); font-weight: 600; }
.text-muted { color: var(--text-muted); }
.compact { margin: var(--space-1) 0 0; font-size: 0.84rem; }
[hidden] { display: none !important; }

.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;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--certus-primary); color: #fff; padding: 0.6rem 1rem; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 1rem; }

/* ---------- Motion ---------- */

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ping { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(3); opacity: 0; } }
@keyframes blink { 50% { opacity: 0; } }

.page-enter > * { animation: rise 0.36s var(--ease) both; }
.page-enter > *:nth-child(2) { animation-delay: 0.03s; }
.page-enter > *:nth-child(3) { animation-delay: 0.06s; }
.page-enter > *:nth-child(n+4) { animation-delay: 0.09s; }
.page-enter > dialog { animation: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important; animation-iteration-count: 1 !important;
    animation-delay: 0s !important; transition-duration: 0.001ms !important;
  }
  .live-dot::after, .cursor, .mdi-spin { animation: none !important; }
}
