/* Northline Health — base stylesheet */

:root {
  --ink: #16212b;
  --ink-soft: #46586a;
  --ink-faint: #74869a;
  --line: #dde5ec;
  --line-soft: #eef3f7;
  --bg: #ffffff;
  --bg-tint: #f5f9fc;
  --brand: #14657a;
  --brand-dark: #0d4b5c;
  --brand-tint: #e6f2f5;
  --amber: #8a5a00;
  --amber-tint: #fdf4e3;
  --alert: #8b2b2b;
  --alert-tint: #fbeeee;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(22, 33, 43, .06), 0 8px 24px rgba(22, 33, 43, .05);
  --wrap: 1100px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
}

img, svg { max-width: 100%; }

a { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; color: var(--ink); margin: 0 0 .5em; font-weight: 600; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.7rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.8rem); margin-top: 2.2em; }
h3 { font-size: 1.16rem; margin-top: 1.8em; font-family: var(--font); font-weight: 700; }
h4 { font-size: 1rem; margin-top: 1.4em; font-family: var(--font); font-weight: 700; }

p, ul, ol, dl, table { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: .45em; }
li > ul, li > ol { margin-top: .45em; }

strong { font-weight: 650; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

.container { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #fff; padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid #3d9dbb; outline-offset: 2px; border-radius: 3px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand-mark { width: 30px; height: 30px; flex: none; }
.brand-text { font-family: var(--font-head); font-size: 1.22rem; font-weight: 600; letter-spacing: -.01em; }
.brand-text span { color: var(--brand); }

.nav-toggle {
  display: none; align-items: center; gap: 8px;
  font: inherit; font-size: .95rem; font-weight: 600;
  background: #fff; color: var(--ink); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 13px; cursor: pointer;
}
.nav-toggle:hover { border-color: var(--brand); color: var(--brand); }

.site-nav ul { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 11px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 550; color: var(--ink-soft); text-decoration: none;
}
.site-nav a:hover { background: var(--bg-tint); color: var(--brand); }
.site-nav a[aria-current="page"] { color: var(--brand-dark); background: var(--brand-tint); }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px 20px 16px;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; max-width: var(--wrap); margin: 0 auto; }
  .site-nav li { margin: 0; border-top: 1px solid var(--line-soft); }
  .site-nav a { padding: 13px 4px; font-size: 1rem; }
}

/* ---------- Page scaffolding ---------- */

main { display: block; }

.page-head { background: var(--bg-tint); border-bottom: 1px solid var(--line); padding: 30px 0 34px; }
.page-head .lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 62ch; margin-bottom: 0; }
.page-head h1 { margin-bottom: .35em; }

.breadcrumb { font-size: .86rem; color: var(--ink-faint); margin: 0 0 14px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { margin: 0; }
.breadcrumb li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.breadcrumb a { color: var(--ink-faint); }

.byline {
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font-size: .85rem; color: var(--ink-faint); margin: 18px 0 0;
}

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 52px; padding: 44px 0 72px; align-items: start; }
@media (max-width: 960px) { .layout { grid-template-columns: minmax(0, 1fr); gap: 36px; padding-bottom: 56px; } }

.prose { max-width: 72ch; }
.prose > :first-child { margin-top: 0; }
.prose h2 { padding-top: .2em; }

.aside { position: sticky; top: 92px; display: grid; gap: 20px; font-size: .94rem; }
@media (max-width: 960px) { .aside { position: static; } }

/* ---------- Components ---------- */

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px 22px; box-shadow: var(--shadow);
}
.card h2, .card h3 { margin-top: 0; }
.card > :last-child { margin-bottom: 0; }

.toc { background: var(--bg-tint); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px 22px; }
.toc h2 { font-family: var(--font); font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint); margin: 0 0 10px; }
.toc ol { margin: 0; padding-left: 1.1em; }
.toc li { margin-bottom: .3em; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.tile {
  display: flex; flex-direction: column; gap: 6px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 22px; text-decoration: none; color: inherit;
  transition: border-color .15s ease, transform .15s ease;
}
a.tile:hover { border-color: var(--brand); transform: translateY(-2px); }
.tile .eyebrow { font-size: .74rem; text-transform: uppercase; letter-spacing: .09em; color: var(--brand); font-weight: 700; }
.tile h3 { font-family: var(--font-head); font-weight: 600; font-size: 1.14rem; margin: 0; }
.tile p { color: var(--ink-soft); font-size: .95rem; margin: 0; }
.tile .more { margin-top: auto; padding-top: 10px; font-size: .9rem; font-weight: 600; color: var(--brand); }

.callout {
  border: 1px solid var(--line); border-left: 4px solid var(--brand);
  background: var(--brand-tint); border-radius: 0 var(--radius) var(--radius) 0;
  padding: 16px 20px; margin: 1.6em 0;
}
.callout > :last-child { margin-bottom: 0; }
.callout .callout-title { display: block; font-weight: 700; font-size: .95rem; margin-bottom: .35em; }

.callout-warning { border-left-color: var(--amber); background: var(--amber-tint); }
.callout-warning .callout-title { color: var(--amber); }
.callout-urgent { border-left-color: var(--alert); background: var(--alert-tint); }
.callout-urgent .callout-title { color: var(--alert); }

.disclaimer-bar { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.disclaimer-bar p { margin: 0; padding: 14px 0; font-size: .88rem; color: var(--ink-soft); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand); color: #fff; text-decoration: none;
  font-weight: 600; font-size: .97rem; padding: 12px 20px; border-radius: var(--radius);
  border: 1px solid var(--brand);
}
.btn:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: #fff; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-dark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.6em 0 0; }

table { width: 100%; border-collapse: collapse; font-size: .95rem; }
caption { text-align: left; font-size: .85rem; color: var(--ink-faint); padding-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 11px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--bg-tint); font-size: .84rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.table-wrap { overflow-x: auto; margin-bottom: 1.2em; }

details { border: 1px solid var(--line); border-radius: var(--radius); padding: 0 18px; margin-bottom: 10px; background: #fff; }
details[open] { background: var(--bg-tint); }
summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
summary::marker { color: var(--brand); }
details > *:not(summary) { margin-bottom: 1em; }

.source-list { font-size: .92rem; color: var(--ink-soft); }
.source-list li { margin-bottom: .7em; }

.meta-note { font-size: .86rem; color: var(--ink-faint); }

/* ---------- Home hero ---------- */

.hero { padding: 56px 0 44px; border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero { padding: 40px 0 32px; } .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; } }
.hero .eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; color: var(--brand); font-weight: 700; margin-bottom: 12px; }
.hero p { font-size: 1.12rem; color: var(--ink-soft); max-width: 60ch; }

.section { padding: 52px 0; }
.section + .section { border-top: 1px solid var(--line-soft); }
.section-head { max-width: 66ch; margin-bottom: 28px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--ink-soft); margin-bottom: 0; }
.section-tint { background: var(--bg-tint); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 22px; }
.stat .num { font-family: var(--font-head); font-size: 1.75rem; color: var(--brand-dark); display: block; line-height: 1.2; }
.stat p { font-size: .92rem; color: var(--ink-soft); margin: 6px 0 0; }

/* ---------- Footer ---------- */

.site-footer { background: #10222b; color: #c5d4dd; margin-top: 0; padding: 48px 0 28px; font-size: .93rem; }
.site-footer h2 { font-family: var(--font); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #7d97a5; margin: 0 0 12px; }
.site-footer a { color: #e4edf2; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); } }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: .55em; }
.footer-about p { color: #9db3bf; max-width: 42ch; }
.footer-about .brand-text { color: #fff; }
.footer-about .brand-text span { color: #6fc0d6; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 36px; padding-top: 20px;
  display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between;
  font-size: .85rem; color: #8ba4b1;
}

/* ---------- Cookie consent ---------- */

.consent {
  position: fixed; inset: auto 0 0 0; z-index: 80;
  background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -8px 30px rgba(22, 33, 43, .12);
}
.consent-inner {
  width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 18px 20px;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px 32px; align-items: center;
}
.consent p { font-size: .9rem; color: var(--ink-soft); margin: 0; max-width: 78ch; }
.consent .consent-title { font-weight: 700; color: var(--ink); font-size: .95rem; margin-bottom: 4px; }
.consent-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.consent-actions .btn { padding: 10px 18px; font-size: .92rem; white-space: nowrap; }
@media (max-width: 720px) {
  .consent-inner { grid-template-columns: minmax(0, 1fr); }
  .consent-actions .btn { flex: 1 1 auto; justify-content: center; }
}

.consent-reopen {
  font: inherit; font-size: .85rem; color: #e4edf2;
  background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.consent-reopen:hover { color: #fff; }

/* ---------- Utilities ---------- */

.center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-gap { margin-top: 20px; }
.mb-gap { margin-bottom: 1.4em; }
.label {
  font-family: var(--font); font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-faint);
}
.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;
}

@media print {
  .site-header, .site-footer, .aside, .nav-toggle { display: none; }
  body { font-size: 12pt; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
