/* StillAdvisory — Nonprofit Executive Management Assessment
   Brand tokens pulled from the StillAdvisory / STER Analytics landing page. */
:root {
  --navy: #0b2343;
  --navy-deep: #071225;
  --navy-2: #172033;
  --gold: #d6a642;
  --gold-light: #f1c76b;
  --gold-dark: #a87314;
  --cream: #fffaf0;
  --paper: #f7f8fb;
  --line: #e7e9ee;
  --line-2: #d9e0ea;
  --ink: #172033;
  --muted: #5b6678;
  --muted-2: #8fa0b7;
  --green: #1b7f5f;
  --risk-high: #c0392b;
  --risk-med: #b98518;
  --risk-low: #1b7f5f;
  --shadow: 0 10px 40px rgba(7, 18, 37, 0.10);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, .display { font-family: "Playfair Display", Georgia, serif; font-weight: 800; color: var(--navy); line-height: 1.15; }
a { color: var(--gold-dark); }

/* ---- Header ---- */
.site-header {
  background: var(--navy);
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: #fff;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 30;
  border-bottom: 1px solid rgba(214,166,66,0.35);
}
.site-header .brand { display: flex; align-items: center; gap: 12px; }
.site-header img { height: 34px; width: auto; display: block; }
.site-header img.logo-print { display: none; }   /* dark logo: only in the printed PDF */
.site-header .tagline { color: var(--gold-light); font-size: 12.5px; letter-spacing: .04em; }
.site-header .header-cta {
  color: var(--navy); background: var(--gold); border: none; border-radius: 8px;
  padding: 9px 16px; font-weight: 700; font-size: 13px; cursor: pointer; text-decoration: none;
}
.site-header .header-cta:hover { background: var(--gold-light); }

/* ---- Layout ---- */
.wrap { max-width: 920px; margin: 0 auto; padding: 28px 20px 80px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px;
}
.eyebrow { color: var(--gold-dark); font-weight: 700; font-size: 12.5px; letter-spacing: .14em; text-transform: uppercase; }
.lead { color: var(--muted); font-size: 16px; max-width: 60ch; }

/* ---- Hero / intro ---- */
.hero { text-align: center; padding: 30px 0 6px; }
.hero h1 { font-size: clamp(28px, 4.5vw, 44px); margin: 10px 0 8px; }
.hero .gold { color: var(--gold-dark); }
.hero .sub { color: var(--muted); font-size: 17px; max-width: 64ch; margin: 0 auto 20px; }
.pillrow { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 18px 0 6px; }
.pill { background: var(--cream); border: 1px solid var(--line-2); color: var(--navy-2); border-radius: 999px; padding: 6px 13px; font-size: 12.5px; font-weight: 600; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer;
  border-radius: 10px; padding: 13px 22px; font-weight: 700; font-size: 15px; font-family: inherit; }
.btn-primary { background: var(--gold); color: var(--navy); }
.btn-primary:hover { background: var(--gold-light); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy:hover { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line-2); }
.btn-ghost:hover { background: var(--paper); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btnrow { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.spacer { flex: 1; }

/* ---- Forms ---- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: 13.5px; color: var(--navy-2); margin-bottom: 6px; }
.field .req { color: var(--risk-high); }
.field input, .field select {
  width: 100%; padding: 12px 13px; border: 1px solid var(--line-2); border-radius: 10px;
  font-size: 15px; font-family: inherit; color: var(--ink); background: #fff;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,166,66,0.2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .grid2 { grid-template-columns: 1fr; } }
.err { color: var(--risk-high); font-size: 12.5px; margin-top: 6px; display: none; }
.field.invalid .err { display: block; }
.field.invalid input, .field.invalid select { border-color: var(--risk-high); }

/* ---- Progress ---- */
.progress { position: sticky; top: 62px; z-index: 20; background: var(--paper); padding: 14px 0 10px; }
.progress .bar { height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.progress .bar > span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width .35s ease; }
.progress .meta { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-top: 7px; }

/* ---- Assessment ---- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
.section-head h2 { font-size: 24px; margin: 0; }
.section-head .count { color: var(--muted-2); font-size: 13px; font-weight: 600; }
.q { border-top: 1px solid var(--line); padding: 20px 0; }
.q:first-of-type { border-top: none; }
.q .qtext { font-weight: 600; color: var(--navy-2); font-size: 16px; }
.q .qstd { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.q .wtag { display: inline-block; margin-left: 8px; font-size: 11px; font-weight: 700; color: var(--gold-dark);
  background: var(--cream); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 8px; vertical-align: middle; }
.scale { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 14px; }
@media (max-width: 620px) { .scale { grid-template-columns: repeat(5, 1fr); gap: 5px; } }
.scale .opt { position: relative; }
.scale .opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.scale .opt label {
  display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 6px; background: #fff; text-align: center;
}
.scale .opt .num { font-weight: 800; font-size: 18px; color: var(--navy); }
.scale .opt .lab { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.scale .opt input:checked + label { border-color: var(--gold); background: var(--cream); box-shadow: 0 0 0 2px rgba(214,166,66,.25); }
.scale .opt input:focus-visible + label { box-shadow: 0 0 0 3px rgba(214,166,66,.4); }

/* ---- Results ---- */
.score-hero { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.gauge { --pct: 0; width: 168px; height: 168px; border-radius: 50%; flex: none;
  background: conic-gradient(var(--gold) calc(var(--pct) * 1%), var(--line) 0);
  display: grid; place-items: center; position: relative; }
.gauge::before { content: ""; position: absolute; inset: 14px; background: #fff; border-radius: 50%; }
.gauge .inner { position: relative; text-align: center; }
.gauge .num { font-family: "Playfair Display", serif; font-weight: 900; font-size: 44px; color: var(--navy); line-height: 1; }
.gauge .of { font-size: 12px; color: var(--muted); }
.band { font-family: "Playfair Display", serif; font-weight: 800; font-size: 22px; }
.band-action { color: var(--muted); margin-top: 4px; max-width: 46ch; }
.catbars { margin-top: 26px; }
.catbar { display: grid; grid-template-columns: 200px 1fr 44px; gap: 12px; align-items: center; padding: 7px 0; }
@media (max-width: 620px) { .catbar { grid-template-columns: 130px 1fr 38px; } }
.catbar .name { font-size: 13.5px; font-weight: 600; color: var(--navy-2); }
.catbar .track { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; }
.catbar .track > span { display: block; height: 100%; border-radius: 999px; }
.catbar .val { text-align: right; font-weight: 700; font-size: 13px; }
.riskdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.note { background: var(--cream); border: 1px solid var(--line-2); border-left: 4px solid var(--gold); border-radius: 10px; padding: 16px 18px; margin-top: 24px; color: var(--navy-2); }
.demo-cta { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 26px; margin-top: 22px; text-align: center; }
.demo-cta h3 { color: #fff; margin: 0 0 6px; }
.demo-cta p { color: #cdd5e1; margin: 0 0 16px; }

.privacy { display: flex; gap: 10px; align-items: flex-start; background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; margin: 18px 0 2px;
  font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.privacy .lock { font-size: 15px; line-height: 1.3; flex: none; }
.privacy strong { color: var(--navy-2); }
.privacy a { color: var(--gold-dark); font-weight: 600; }

.hidden { display: none !important; }
.footer { text-align: center; color: var(--muted-2); font-size: 12.5px; padding: 28px 20px; }

/* ---- OEHS report (hidden from the lead; rendered only into the PDF) ---- */
#oehsReport { position: absolute; left: -9999px; top: 0; width: 760px; background: #fff; padding: 8px 6px 4px; }
#oehsReport .report-head { margin-bottom: 18px; }
#oehsReport .report-head h2 { font-size: 26px; }
#oehsReport .report-meta { color: var(--muted); font-size: 13.5px; }

/* ---- Print / Save as PDF: ONLY the OEHS report, one page ---- */
@media print {
  /* Everything the lead sees is dropped — only the score report prints. */
  #intro, #assessment, #results, .footer,
  .site-header .header-cta { display: none !important; }

  /* Bring the off-screen report into the page flow. */
  #oehsReport { position: static !important; left: auto !important; top: auto !important; width: auto !important; padding: 0; }

  /* Header keeps its layout; logo swaps to the blue one. */
  .site-header { position: static; box-shadow: none; }
  .logo-screen { display: none !important; }
  .logo-print { display: block !important; }

  /* Let the brand colors (gauge ring, bars) render in the PDF. */
  .gauge, .catbar .track > span, .gauge::before, .riskdot {
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  @page { margin: 12mm; size: Letter; }
}
.spin { width: 18px; height: 18px; border: 2px solid rgba(11,35,67,.25); border-top-color: var(--navy); border-radius: 50%; animation: sp .7s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }
