/* UTIWizard — clinical SaaS style: white, deep navy, teal accent.
 * System font stack only (no third-party requests): keeps the page
 * fully self-contained for the HIPAA-aligned posture. */
:root {
  --navy: #102a43;
  --ink: #243b53;
  --muted: #5b7186;
  --teal: #0d9488;
  --teal-dark: #0b7c72;
  --teal-soft: #e6f6f4;
  --bg: #ffffff;
  --wash: #f3f8f8;
  --tint-blue: #edf4fa;
  --tint-teal: #e9f6f5;
  --line: #dfe9ea;
  --amber: #b45309;
  --amber-soft: #fef3e2;
  --green: #15803d;
  --green-soft: #e7f6ec;
  --red: #b91c1c;
  --red-soft: #fdecec;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(16, 42, 67, 0.08);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: 720px; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; margin: 0 0 12px; }
h1 { font-size: clamp(2.1rem, 5vw, 3.2rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 12px; }

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--teal-dark);
  margin-bottom: 10px;
}
.section-label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.section-sub { font-size: 1.1rem; color: var(--navy); font-weight: 600; }
.section-body { color: var(--muted); max-width: 46rem; }
.section { padding: 72px 0; scroll-margin-top: 72px; }
.section-wash { background: var(--wash); }
.section-tint { background: var(--tint-blue); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 28px;
  height: 66px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--teal);
  display: inline-flex; align-items: center; justify-content: center;
}
.brand-word { font-weight: 800; font-size: 1.2rem; color: var(--navy); letter-spacing: -0.01em; }
.brand-word em { font-style: normal; color: var(--teal-dark); }
.main-nav { display: flex; gap: 22px; margin-left: 8px; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { color: var(--teal-dark); }
.header-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font); font-weight: 700; font-size: 0.98rem;
  border-radius: 10px; padding: 12px 22px;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
}
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn-sm { padding: 9px 16px; font-size: 0.9rem; }

/* Hero */
.hero {
  padding: 84px 0 64px;
  background: linear-gradient(180deg, var(--tint-teal) 0%, #f7fcfc 55%, #ffffff 100%);
}
.hero-inner { text-align: center; max-width: 760px; margin: 0 auto; }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40rem; margin: 0 auto 26px; }
.hero-cta { display: flex; align-items: center; justify-content: center; gap: 18px; margin-bottom: 28px; flex-wrap: wrap; }
.no-account { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.no-account span { color: var(--green); }
.chips { list-style: none; display: flex; gap: 10px; padding: 0; margin: 0; flex-wrap: wrap; justify-content: center; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 7px 14px; font-size: 0.83rem; font-weight: 600;
}
.chip-warn { background: var(--amber-soft); border-color: #f0d9b5; color: var(--amber); }

/* Calculator — dense layout: all inputs + result fit one viewport, no scrolling */
#calculator.section { padding: 44px 0; }
#calculator h2 { margin-bottom: 6px; }
#calculator .section-body { margin-bottom: 4px; }
.calc-grid {
  display: grid; grid-template-columns: 1fr 320px; gap: 20px;
  margin-top: 18px; align-items: start;
}
.calc-inputs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px 16px; }
.field-label { font-weight: 700; font-size: 0.8rem; color: var(--navy); margin-bottom: 5px; display: block; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill {
  font-family: var(--font); font-size: 0.78rem; font-weight: 600;
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  border-radius: 999px; padding: 5px 10px; cursor: pointer;
}
.pill:hover { border-color: var(--teal); }
.pill[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.age-input {
  font-family: var(--font); font-size: 0.9rem; font-weight: 600; color: var(--navy);
  border: 1.5px solid var(--line); border-radius: 10px; padding: 7px 10px; width: 110px;
}
.age-input:focus { outline: 2px solid var(--teal); border-color: var(--teal); }
.field-hint { font-size: 0.72rem; color: var(--muted); margin-top: 3px; }

.result-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; position: sticky; top: 92px;
}
.result-label {
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.75rem; font-weight: 800; color: var(--muted); margin-bottom: 8px;
}
.result-pct { font-size: 2.4rem; font-weight: 800; color: var(--navy); letter-spacing: -0.02em; margin: 0 0 8px; }
.threshold-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.threshold-list li {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff;
}
.t-name { font-size: 0.8rem; font-weight: 600; color: var(--ink); }
.t-val { color: var(--muted); font-weight: 700; white-space: nowrap; }
.t-outcome { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.05em; white-space: nowrap; }
.t-outcome.pos { color: var(--red); }
.t-outcome.neg { color: var(--green); }
.result-card hr { border: none; border-top: 1px solid var(--line); margin: 10px 0; }
.result-note { font-size: 0.75rem; color: var(--muted); }

/* Selectable context chips */
.chips-select { justify-content: flex-start; }
.chips-select .chip { cursor: pointer; }
.chips-select .chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Steps / stats / future cards */
.steps { margin: 26px 0 0; padding: 0; list-style: none; display: grid; gap: 16px; counter-reset: step; }
.steps li {
  counter-increment: step; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 20px 18px 64px; position: relative;
}
.steps li::before {
  content: counter(step); position: absolute; left: 20px; top: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal-dark);
  font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 28px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--navy); margin: 0 0 6px; letter-spacing: -0.01em; }
.stat-label { font-size: 0.88rem; color: var(--muted); margin: 0; }
.future-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.future-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.future-label { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.72rem; font-weight: 800; color: var(--teal-dark); margin: 0 0 8px; }
.future-card p { color: var(--muted); font-size: 0.95rem; }

/* Team page */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.team-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.team-card h3 { margin-bottom: 10px; }
.avatar {
  width: 168px; height: 168px; border-radius: 50%;
  background: var(--teal-soft); color: var(--teal-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2.4rem; margin-bottom: 18px;
  border: 4px solid var(--teal-soft);
}
.team-role {
  text-transform: uppercase; letter-spacing: 0.1em;
  font-size: 0.72rem; font-weight: 800; color: var(--teal-dark);
  margin: 0 0 6px;
}
.team-card .bio { color: var(--muted); font-size: 0.92rem; margin: 0; }
.avatar-img {
  width: 168px; height: 168px; border-radius: 50%; object-fit: cover;
  display: block; margin-bottom: 18px; background: var(--teal-soft);
  border: 4px solid var(--teal-soft);
}
.mascot-photos { display: flex; gap: 16px; justify-content: center; margin-bottom: 18px; }
.mascot-photos img {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; box-shadow: var(--shadow);
}
.main-nav a.active { color: var(--teal-dark); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0 40px; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0 0 4px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--navy); color: #fff; font-weight: 600; font-size: 0.92rem;
  padding: 12px 20px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: opacity 0.25s, transform 0.25s; z-index: 100; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 10px;
  background: transparent; border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; margin-left: auto;
}
.menu-toggle span {
  display: block; height: 2.5px; width: 100%;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
body.nav-open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.nav-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Responsive */
@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-inputs { grid-template-columns: repeat(2, 1fr); gap: 10px 12px; }
  .result-card { position: static; }
  .stat-grid, .future-grid, .team-grid { grid-template-columns: 1fr 1fr; }
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; }
  body.nav-open .main-nav {
    display: flex;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; margin-left: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 6px 20px 12px; z-index: 60;
    box-shadow: 0 12px 24px rgba(15, 42, 62, 0.08);
  }
  body.nav-open .main-nav a { padding: 11px 0; font-size: 1.02rem; border-bottom: 1px solid var(--line); }
  body.nav-open .main-nav a:last-child { border-bottom: 0; }
}
@media (max-width: 600px) {
  .stat-grid, .future-grid, .team-grid { grid-template-columns: 1fr; }
  .header-actions .btn-ghost { display: none; }
  .section { padding: 52px 0; }
}

/* Admin page */
.admin-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #b45309;
  vertical-align: middle;
}
