/* Nursing Ready — base layer: reset, canvas, type scale, primitives. */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Class-based display rules (.lead-form, .card…) otherwise outrank the UA
   [hidden] rule, and an element told to hide stays on screen. */
[hidden] {
  display: none !important;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

hr {
  border: 0;
  border-top: 1px solid var(--hairline);
  margin: 2rem 0;
}

/* ---------- Type scale (from the app's tailwind fontSize map) ---------- */

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: 700;
  color: var(--ink);
}

.display-2xl,
.display-xl,
.display-lg,
.display-md,
.title-lg {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 700;
}

.display-2xl {
  font-size: clamp(38px, 5.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.display-xl {
  font-size: clamp(32px, 4.2vw, 44px);
  line-height: 1.16;
  letter-spacing: -0.018em;
}
.display-lg {
  font-size: clamp(28px, 3.4vw, 36px);
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.display-md {
  font-size: clamp(23px, 2.6vw, 28px);
  line-height: 1.28;
  letter-spacing: -0.012em;
}
.title-lg {
  font-size: 22px;
  line-height: 28px;
  letter-spacing: -0.008em;
}
.title-md {
  font-family: var(--font-ui);
  font-size: 18px;
  line-height: 24px;
  letter-spacing: -0.01em;
  font-weight: 600;
}
.body-lg {
  font-size: 17px;
  line-height: 27px;
}
.body-md {
  font-size: 14px;
  line-height: 20px;
}
.caption {
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.03em;
  font-weight: 500;
  text-transform: uppercase;
}
.tiny {
  font-size: 11px;
  line-height: 14px;
  letter-spacing: 0.02em;
}

/* Brand-ink second line: same display face, no italics, pine colour does
   the work. */
.serif-accent {
  font-family: var(--font-display);
  color: var(--brand-strong);
}

/* Every number is mono + tabular. It's a signature move, and it stops
   digits jittering when they count up. */
.tabular,
.stat {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

.stat {
  font-size: 36px;
  line-height: 40px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.eyebrow {
  font-family: var(--font-ui);
  font-size: 12px;
  line-height: 16px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  font-weight: 600;
}

/* ---------- Ink tones ---------- */
.t-soft {
  color: var(--ink-soft);
}
.t-faint {
  color: var(--ink-faint);
}
.t-ghost {
  color: var(--ink-ghost);
}
.t-brand {
  color: var(--brand-strong);
}
.t-accent {
  color: var(--accent);
}
.t-success {
  color: var(--success);
}
.t-danger {
  color: var(--danger);
}
.t-warning {
  color: var(--warning);
}
.t-inverse {
  color: var(--ink-inverse);
}

/* ---------- Links ---------- */
a {
  color: var(--brand-strong);
  text-decoration-color: rgb(var(--rgb-brand) / 0.35);
  text-underline-offset: 2px;
}
a:hover {
  text-decoration-color: currentColor;
}

::selection {
  background: rgb(var(--rgb-brand) / 0.18);
  color: var(--ink);
}

*:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 6px;
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgb(var(--rgb-ink) / 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: rgb(var(--rgb-ink) / 0.24);
  background-clip: padding-box;
}

/* ---------- Layout helpers ---------- */
.wrap {
  width: 100%;
  max-width: var(--w-page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap-content {
  max-width: var(--w-content);
}
.wrap-prose {
  max-width: var(--w-prose);
}
.wrap-narrow {
  max-width: var(--w-narrow);
}

.section {
  padding-block: clamp(48px, 7vw, 88px);
}
.section-tight {
  padding-block: clamp(32px, 5vw, 56px);
}

.stack > * + * {
  margin-top: var(--stack-gap, 16px);
}

.center {
  text-align: center;
}

.hairline-top {
  border-top: 1px solid var(--hairline);
}
.hairline-bottom {
  border-bottom: 1px solid var(--hairline);
}

/* ---------- Motion ---------- */
.stagger > * {
  opacity: 0;
  transform: translateY(10px);
  animation: fade-up var(--d-slow) var(--e-out) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}

@keyframes fade-up {
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .stagger > * {
    opacity: 1;
    transform: none;
  }
}

/* ---------- Accessibility ---------- */
.visually-hidden {
  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: 50%;
  top: 8px;
  transform: translate(-50%, -200%);
  z-index: 100;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-weight: 600;
  box-shadow: var(--sh-elev);
  transition: transform var(--d-fast) var(--e-out);
}
.skip-link:focus {
  transform: translate(-50%, 0);
}

/* ---------- Print: the cheat sheets have to survive paper ---------- */
@media print {
  .site-nav,
  .site-footer,
  .no-print,
  .cta-band,
  .lead-form,
  .micro-quiz {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }
  a {
    color: #000;
    text-decoration: none;
  }
  .card,
  .table {
    box-shadow: none;
    border-color: #bbb;
  }
  h2,
  h3 {
    break-after: avoid;
  }
  table,
  tr,
  .card {
    break-inside: avoid;
  }
}
