/* Plain CSS that doesn't depend on Tailwind processing (loads even if the CDN is slow). */
html { scroll-behavior: smooth; }
/* Jump targets land below the sticky 64px header instead of underneath it. */
[id] { scroll-margin-top: 5.5rem; }
/* Sections focused by in-page links (for screen readers) shouldn't show a focus outline. */
[tabindex="-1"]:focus { outline: none; }
body { font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; background: #f6f7fb; color: #1b2548; }
[hidden] { display: none !important; }
/* Horizontal scrollers must contain absolutely positioned children (e.g. .sr-only labels in tables);
   otherwise those escape the scroller and make the whole page scroll sideways on phones. */
.overflow-x-auto:not(.sticky) { position: relative; }
/* Grid items default to min-width:auto, so long (truncated) text can force a card wider than the screen. */
.grid > * { min-width: 0; }

/* Skeleton shimmer */
.skeleton { position: relative; overflow: hidden; background: #eceff7; border-radius: .75rem; }
.skeleton::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.65), transparent);
  animation: nt-shimmer 1.3s infinite;
}
@keyframes nt-shimmer { 100% { transform: translateX(100%); } }

/* Image placeholder used when an entry has no image */
.img-placeholder { display: flex; align-items: center; justify-content: center; font-size: 2.5rem;
  background: radial-gradient(120% 120% at 0% 0%, #fff4e0 0%, #ffe3dc 45%, #fde1ea 100%); }

/* Toasts */
#nt-toasts { position: fixed; z-index: 80; left: 50%; bottom: 5.5rem; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 1024px) { #nt-toasts { bottom: 1.5rem; } }
.nt-toast { pointer-events: auto; display: flex; gap: .625rem; align-items: flex-start; padding: .75rem 1rem; border-radius: .875rem; font-size: .875rem; font-weight: 600;
  background: #1b2548; color: #fff; box-shadow: 0 12px 32px -8px rgba(16,22,47,.35); animation: nt-toast-in .25s ease-out; }
.nt-toast.success { background: #065f46; } .nt-toast.error { background: #be123c; } .nt-toast.warning { background: #92400e; }
@keyframes nt-toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Modal */
.nt-modal-backdrop { position: fixed; inset: 0; z-index: 70; background: rgba(16,22,47,.5); backdrop-filter: blur(2px); display: flex; align-items: flex-end; justify-content: center; padding: 0; }
@media (min-width: 640px) { .nt-modal-backdrop { align-items: center; padding: 1rem; } }

/* Long-form text in detail pages */
.nt-prose p { margin: 0 0 .75rem; line-height: 1.7; }
.nt-prose p:last-child { margin-bottom: 0; }

/* Safe-area padding for the mobile bottom nav */
.pb-safe { padding-bottom: calc(env(safe-area-inset-bottom) + .5rem); }

/* OTP input */
.otp-input { letter-spacing: .6em; text-align: center; font-variant-numeric: tabular-nums; }
