/* Ryan Review Center — reset + base typography */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    color: var(--ink);
    /* Subtle two-tone wash instead of a flat fill — adds depth without noise. */
    background:
        radial-gradient(1200px 480px at 100% -10%, rgba(22, 87, 217, 0.06), transparent 60%),
        var(--mist);
    background-attachment: fixed;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, h5 {
    font-family: var(--font-head);
    color: var(--navy);
    margin: 0 0 var(--space-3);
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: balance;
}

h1 { font-size: var(--fs-xl); font-weight: 700; }
h2 { font-size: var(--fs-lg); font-weight: 600; }
h3 { font-size: var(--fs-md); font-weight: 600; }

@media (min-width: 1024px) {
    h1 { font-size: var(--fs-2xl); }
}

p { margin: 0 0 var(--space-3); max-width: 72ch; }

a {
    color: var(--police-blue);
    text-decoration: none;
    text-underline-offset: 2px;
    transition: color var(--dur-fast) var(--ease-out);
}
a:hover { text-decoration: underline; color: var(--police-blue-700); }

::selection { background: rgba(22, 87, 217, 0.16); color: var(--navy); }

img { max-width: 100%; display: block; }

ul { margin: 0; padding: 0; list-style: none; }

/* Utility */
.text-muted { color: var(--muted); }
.text-slate { color: var(--slate); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mb-0 { margin-bottom: 0; }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.hidden, [hidden] { display: none !important; }

.stack { display: flex; flex-direction: column; gap: var(--space-3); }
.row { display: flex; gap: var(--space-3); align-items: center; }
.row-between { display: flex; gap: var(--space-3); align-items: center; justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1 1 auto; }

.page-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    margin-bottom: var(--space-5);
    flex-wrap: wrap;
}
.page-title-row h1 { margin-bottom: 0; }
/* Optional supporting line under a page title. */
.page-lead {
    color: var(--slate);
    font-size: var(--fs-sm);
    margin: calc(var(--space-1) * -1) 0 var(--space-5);
    max-width: 68ch;
}

/* Small print / meta text used across cards and rows. */
.text-xs { font-size: var(--fs-xs); }
.text-sm { font-size: var(--fs-sm); }
.mt-1 { margin-top: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.gap-2 { gap: var(--space-2); }

/* Fade-in used by lists/cards as they render (respects reduced-motion below). */
.fade-in { animation: fade-in var(--dur-slow) var(--ease-out) both; }
@keyframes fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: none; }
}

/* Respect users who prefer reduced motion: neutralize animations/transitions
   while keeping functional scrolling and layout intact. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
