:root {
  --font-space-grotesk: "Space Grotesk", sans-serif;
  --font-ibm-plex-mono: "IBM Plex Mono", monospace;
  --font-heading: var(--font-space-grotesk);
  --font-ui: var(--font-ibm-plex-mono);
}

/* Tailwind preflight (stripped from style.css) — keeps pill widths correct */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

.navbar,
.navbar-inner {
  box-sizing: border-box;
}

.navbar-actions {
  flex-shrink: 0;
}

.navbar-actions .btn-dark {
  white-space: nowrap;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.post-card-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Quiz/selvtest links rely on .chapter-resource-link in style.css;
   ensure they stay visible if JS is slow to add .is-visible */
.content-body a.chapter-resource-link:not(.is-visible) {
  opacity: 1;
  transform: none;
}

.backup-access-popup {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.backup-access-popup.is-visible {
  opacity: 1;
}
.backup-access-modal {
  background: rgba(21, 23, 26, 0.72);
  color: #fff;
  text-align: center;
  width: min(100%, 300px);
  padding: 1.15rem 1.35rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
  pointer-events: auto;
  transform: translateY(8px);
  transition: transform 0.3s ease;
}
.backup-access-popup.is-visible .backup-access-modal {
  transform: translateY(0);
}
.backup-access-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.4rem;
}
.backup-access-subtitle {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.45;
  margin: 0;
}

.account-dropdown-static {
  cursor: default;
  opacity: 0.85;
}

@media (max-width: 576px) {
  .post-feature-image img {
    height: 220px !important;
  }
  .backup-access-modal {
    width: min(100%, 280px);
    padding: 1rem 1.15rem;
  }
}
