/* Nursing Ready — compatibility layer.
 *
 * The migrated guides, calculators and legal pages carry Tailwind utility
 * classes inline from the v1 site. Rather than rewrite ~28 pages of markup
 * by hand, this file implements exactly the utilities those pages use and
 * RE-TOKENIZES the colour ones onto the warm-clinical palette — so
 * `text-teal-600` renders pine, `bg-white` renders warm surface, and
 * `bg-gray-900` renders warm ink. No Tailwind CDN, no build step.
 *
 * Inventory generated by scripts/site_v2/extract_classes.py (198 classes,
 * minus the nav/footer/hero ones whose markup is replaced wholesale).
 * Loaded LAST so an explicit utility can still win over .prose defaults.
 */

/* ---------- Layout ---------- */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid { display: grid; }
.hidden { display: none; }
.block { display: block; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1 1 0%; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.relative { position: relative; }
.absolute { position: absolute; }
.inset-0 { inset: 0; }
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-6 > * + * { margin-left: 24px; }
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-8 > * + * { margin-top: 32px; }

/* ---------- Sizing ---------- */
.w-full { width: 100%; }
.w-6 { width: 24px; }
.w-8 { width: 32px; }
.w-64 { width: 256px; }
.h-6 { height: 24px; }
.h-8 { height: 32px; }
.h-64 { height: 256px; }
.mx-auto { margin-inline: auto; }
.max-w-none { max-width: none; }
.max-w-2xl { max-width: 672px; }
.max-w-3xl { max-width: 720px; }
.max-w-4xl { max-width: 880px; }
.max-w-6xl { max-width: 1080px; }
.max-w-7xl { max-width: 1120px; }

/* ---------- Spacing ---------- */
.mt-0\.5 { margin-top: 2px; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }
.mt-12 { margin-top: 48px; }
.mt-14 { margin-top: 56px; }
.mt-16 { margin-top: 64px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }
.mb-14 { margin-bottom: 56px; }
.my-3 { margin-block: 12px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-6 { padding: 24px; }
.p-7 { padding: 28px; }
.p-8 { padding: 32px; }
.pb-8 { padding-bottom: 32px; }
.pb-10 { padding-bottom: 40px; }
.pb-12 { padding-bottom: 48px; }
.pt-8 { padding-top: 32px; }
.pl-6 { padding-left: 24px; }
.px-3 { padding-inline: 12px; }
.px-4 { padding-inline: 16px; }
.px-5 { padding-inline: 20px; }
.px-8 { padding-inline: 32px; }
.py-1\.5 { padding-block: 6px; }
.py-3\.5 { padding-block: 14px; }
.py-6 { padding-block: 24px; }
.py-8 { padding-block: 32px; }
.py-10 { padding-block: 40px; }
.py-12 { padding-block: 48px; }
.py-16 { padding-block: 64px; }

/* ---------- Type ---------- */
.text-xs { font-size: 12px; line-height: 16px; }
.text-sm { font-size: 14px; line-height: 20px; }
.text-base { font-size: 16px; line-height: 24px; }
.text-lg { font-size: 18px; line-height: 26px; }
.text-xl { font-size: 20px; line-height: 28px; }
.text-2xl {
  font-size: 24px;
  line-height: 31px;
  letter-spacing: -0.012em;
}
.text-3xl {
  font-family: var(--font-display);
  font-size: 30px;
  line-height: 1.22;
  letter-spacing: -0.015em;
}
.text-4xl {
  font-family: var(--font-display);
  font-size: 36px;
  line-height: 1.18;
  letter-spacing: -0.018em;
}
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.font-extrabold { font-weight: 700; }
.leading-relaxed { line-height: 1.68; }
.uppercase { text-transform: uppercase; }
.tracking-wider { letter-spacing: 0.06em; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.list-disc { list-style-type: disc; }
.list-decimal { list-style-type: decimal; }

@media (min-width: 640px) {
  .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sm\:px-6 { padding-inline: 24px; }
  .sm\:text-4xl { font-size: 36px; line-height: 1.18; }
  .sm\:text-5xl { font-size: 44px; line-height: 1.14; }
}
@media (min-width: 1024px) {
  .lg\:px-8 { padding-inline: 32px; }
}

/* ---------- Colour, re-tokenized onto the warm palette ---------- */
.text-gray-400 { color: var(--ink-ghost); }
.text-gray-500 { color: var(--ink-faint); }
.text-gray-600 { color: var(--ink-soft); }
.text-gray-800 { color: var(--ink); }
.text-gray-900 { color: var(--ink); }
.text-white { color: #fffdf9; }
.text-white\/80 { color: rgb(255 253 249 / 0.8); }
.text-white\/90 { color: rgb(255 253 249 / 0.9); }
.text-teal-200 { color: var(--brand-tint); }
.text-teal-400 { color: var(--brand-line); }
.text-teal-600 { color: var(--brand-strong); }
.text-teal-700 { color: var(--brand-strong); }
.text-teal-900 { color: var(--brand-edge); }
.text-sky-700 { color: var(--info); }
.text-sky-900 { color: var(--brand-edge); }

.bg-white { background-color: var(--surface); }
.bg-gray-50 { background-color: var(--sunken); }
.bg-gray-900 { background-color: var(--ink); }
.bg-teal-50 { background-color: var(--brand-soft); }
.bg-teal-600 { background-color: var(--brand); }
.bg-sky-50 { background-color: var(--brand-soft); }

.border { border: 1px solid var(--hairline); }
.border-t { border-top: 1px solid var(--hairline); }
.border-b { border-bottom: 1px solid var(--hairline); }
.border-gray-100,
.border-gray-200 { border-color: var(--hairline); }
.border-gray-800 { border-color: var(--hairline-strong); }
.border-teal-100 { border-color: var(--brand-soft); }
.border-teal-200 { border-color: var(--brand-tint); }
.border-sky-200 { border-color: var(--brand-tint); }

/* The v1 teal→sky hero gradient becomes the paper wash. */
.bg-gradient-to-br { background-image: var(--grad-paper); }
.from-teal-50,
.to-sky-50 { --tw-unused: 0; }

.rounded-lg { border-radius: var(--r-md); }
.rounded-xl { border-radius: var(--r-lg); }
.rounded-2xl { border-radius: var(--r-2xl); }
.rounded-full { border-radius: var(--r-pill); }

.transition-all,
.transition-colors {
  transition: color var(--d-fast) var(--e-out),
    background-color var(--d-fast) var(--e-out),
    border-color var(--d-fast) var(--e-out);
}
.hover\:text-teal-600:hover { color: var(--brand-strong); }
.hover\:text-teal-400:hover { color: var(--brand-line); }
.hover\:bg-teal-700:hover { background-color: var(--brand-strong); }
.hover\:border-teal-300:hover { border-color: var(--brand-tint-strong); }
.hover\:underline:hover { text-decoration: underline; }
.hover\:shadow-sm:hover { box-shadow: var(--sh-card); }
.opacity-90 { opacity: 0.9; }

/* v1 decoration that has no place in the new design */
.blur-3xl,
.backdrop-blur-md,
.btn-glow,
.opacity-10 { }

/* ---------- v1 custom classes mapped onto new components ---------- */
.calc-context,
.guide-content {
  max-width: var(--w-prose);
  font-size: 17px;
  line-height: 1.72;
  color: var(--ink-soft);
}
.calc-context > :where(* + *),
.guide-content > :where(* + *) { margin-top: 1.1em; }
.calc-context h2,
.guide-content h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 30px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin-top: 2em;
  margin-bottom: 0.5em;
  padding-top: 1.2em;
  border-top: 1px solid var(--hairline);
}
.calc-context > h2:first-child,
.guide-content > h2:first-child {
  border-top: 0;
  padding-top: 0;
  margin-top: 0;
}
.calc-context h3,
.guide-content h3 {
  font-size: 19px;
  font-weight: 700;
  color: var(--ink);
  margin-top: 1.7em;
  margin-bottom: 0.4em;
}
.calc-context p,
.guide-content p { margin: 0; }
.calc-context strong,
.guide-content strong { color: var(--ink); font-weight: 600; }
.calc-context ul,
.calc-context ol,
.guide-content ul,
.guide-content ol { padding-left: 1.3em; }
.calc-context li + li,
.guide-content li + li { margin-top: 0.45em; }
.calc-context li::marker,
.guide-content li::marker { color: var(--brand); }
.guide-content a { font-weight: 500; }
.calc-context pre,
.guide-content pre {
  background: #14100d;
  color: #d5eae1;
  border-radius: var(--r-lg);
  padding: 18px 20px;
  overflow-x: auto;
  font-size: 14px;
}
.calc-context code,
.guide-content code {
  font-family: var(--font-code, monospace);
  font-size: 0.88em;
}

/* Data tables inside migrated guides */
.lab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.lab-table th,
.lab-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
}
.lab-table thead th {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--sunken);
  font-weight: 600;
}
.lab-table tbody tr:last-child td { border-bottom: 0; }
.lab-table td:first-child { font-weight: 600; color: var(--ink); }

.diff-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0;
}
.diff-pills span {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12px;
  font-weight: 600;
}

.muted { color: var(--ink-faint); }
