:root {
  --navy: #0f173f;
  --navy-80: #3b4266;
  --navy-60: #6b7191;
  --navy-30: #bcc0d0;
  --navy-10: #e8eaf0;
  --navy-05: #f4f5f9;

  --blue: #33ade1;
  --blue-50: #93d0ed;
  --blue-20: #d6ecf7;
  --blue-10: #ebf5fb;

  --orange: #ff9900;
  --orange-50: #ffbc66;
  --orange-20: #ffd9a8;
  --orange-10: #fff0d9;

  --clay: #555555;
  --clay-50: #767676;
  --clay-20: #c3c3c3;
  --clay-10: #dddddd;

  --sage: #0f173f;
  --sage-50: #6f748c;
  --sage-20: #aab4d0;
  --sage-10: #ccd4e6;

  --gap: #d1495b;
  --gap-bg: #fbe9ec;
  --good: #0f173f;
  --good-bg: #93d0ed;

  --border: rgba(15, 23, 63, 0.12);
  --border-strong: rgba(15, 23, 63, 0.24);

  --shadow: 1 2px 4px rgba(15, 23, 63, 0.04), 0 6px 20px rgba(15, 23, 63, 0.06);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-05);
  color: var(--navy);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

main.briefing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 48px;
}

/* ---------- HEADER ---------- */
header.top {
  background: var(--navy);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
header.top::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle at center, rgba(51, 173, 225, 0.18), transparent 70%);
  pointer-events: none;
}
header.top .eyebrow {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 10px;
}
header.top h1 {
  font-size: 30px;
  font-weight: 600;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
  line-height: 1.15;
}
header.top h1 em {
  color: var(--orange);
  font-style: normal;
}
header.top p.lede {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.78);
  margin: 0 0 20px;
  max-width: 780px;
}

.program-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}
.stat {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 12px 14px;
}
.stat .num {
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
}
.stat .num .accent-o { color: var(--orange); }
.stat .num .accent-b { color: var(--blue); }
.stat .num .unit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 500;
}
.stat .lbl {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- TAKEAWAY (inside header) ---------- */
.takeaway-inline {
  position: relative;
  margin-top: 22px;
  padding-top: 22px;
  border-top: 0px solid rgba(255, 255, 255, 0.14);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
}
.takeaway-inline .label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  font-weight: 600;
  margin-bottom: 8px;
}
.takeaway-inline p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.92);
}
.takeaway-inline p strong {
  color: var(--blue);
  font-weight: 600;
}
.takeaway-inline .metrics {
  display: flex;
  gap: 18px;
  padding-left: 20px;
  border-left: 1px solid rgba(255, 255, 255, 0.18);
}
.takeaway-inline .metrics .mini {
  text-align: center;
}
.takeaway-inline .metrics .mini .v {
  font-size: 22px;
  font-weight: 600;
  line-height: 1;
}
.takeaway-inline .metrics .mini .v.orange { color: var(--orange); }
.takeaway-inline .metrics .mini .v.blue { color: var(--blue); }
.takeaway-inline .metrics .mini .v.gap { color: var(--gap); }
.takeaway-inline .metrics .mini .k {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-top: 4px;
}

/* ---------- SECTION HEADINGS ---------- */
section { margin-bottom: 20px; }
h2.section-title {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy-60);
  font-weight: 600;
  margin: 0 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--orange);
}

/* ---------- MATRIX / CARD BASE ---------- */
.matrix-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

/* Two-up row for maturity + dimensions */
.two-up {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.mini-card-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy-60);
  margin: 0 0 14px;
}

/* Maturity bars */
.mat-row {
  display: grid;
  grid-template-columns: 100px 1fr 36px;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 13px;
}
.mat-label { color: var(--navy); font-weight: 500; }
.mat-bar-bg {
  height: 18px;
  background: var(--navy-10);
  border-radius: 4px;
  overflow: hidden;
}
.mat-bar-fill {
  height: 100%;
  border-radius: 4px;
}
.mat-count {
  text-align: right;
  font-weight: 600;
  font-size: 12px;
  color: var(--navy-80);
}

.mat-bar-fill.l5 { background: var(--orange); }
.mat-bar-fill.l4 { background: var(--orange); }
.mat-bar-fill.l3 { background: var(--orange); }
.mat-bar-fill.l2 { background: var(--orange); }
.mat-bar-fill.l1 { background: var(--orange); }

.callout {
  font-size: 12.5px;
  color: var(--navy-80);
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.callout strong.gap { color: var(--gap); font-weight: 600; }
.callout strong.good { color: var(--good); font-weight: 600; }

/* Dimension bars */
.dim-row {
  display: grid;
  grid-template-columns: 130px 1fr 38px;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
  font-size: 13px;
}
.dim-label {
  color: var(--navy-80);
  font-weight: 500;
  text-align: right;
}
.dim-label.gap { color: var(--gap); font-weight: 600; }
.dim-bar-bg {
  height: 18px;
  background: var(--navy-10);
  border-radius: 4px;
  overflow: hidden;
}
.dim-bar-fill { height: 100%; border-radius: 4px; }
.dim-bar-fill.good { background: var(--good); }
.dim-bar-fill.orange { background: var(--orange); }
.dim-bar-fill.blue { background: var(--blue); }
.dim-bar-fill.gap { background: var(--gap); }
.dim-val { font-weight: 600; font-size: 13px; text-align: right; }
.dim-val.good { color: var(--good); }
.dim-val.orange { color: #8a5200; }
.dim-val.gap { color: var(--gap); }

/* ---------- HEATMAP ---------- */
.heat-card-wrap {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 16px;
}

.heat-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 3px;
  font-size: 13px;
}
.heat-table th {
  padding: 8px 6px;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--navy-60);
  text-align: center;
}
.heat-table th:first-child { text-align: left; padding-left: 12px; }
.heat-table td {
  padding: 9px 6px;
  text-align: center;
  font-weight: 600;
  border-radius: 6px;
}
.heat-table td:first-child {
  text-align: left;
  font-weight: 500;
  color: var(--navy);
  background: var(--navy-05);
  border-left: 3px solid var(--navy);
  padding-left: 12px;
  border-radius: 6px;
}

.hc-strong   { background: var(--good-bg); color: var(--good); }
.hc-adequate { background: var(--navy-10); color: var(--navy-80); }
.hc-develop  { background: var(--orange-10); color: #8a5200; }
.hc-critical { background: var(--gap-bg); color: var(--gap); }

.heat-total {
  font-weight: 700;
  border-radius: 6px;
}
.heat-total.strong   { background: var(--good-bg); color: var(--good); }
.heat-total.adequate { background: var(--orange-10); color: #8a5200; }
.heat-total.critical { background: var(--gap-bg); color: var(--gap); }

.heat-legend {
  font-size: 11px;
  color: var(--navy-60);
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.heat-legend .item { display: inline-flex; align-items: center; gap: 6px; }
.heat-legend .swatch {
  width: 12px; height: 12px; border-radius: 3px; display: inline-block;
}
.sw-strong   { background: var(--good-bg); border: 1px solid var(--good); }
.sw-adequate { background: var(--navy-10); border: 1px solid var(--navy-30); }
.sw-develop  { background: var(--orange-10); border: 1px solid var(--orange); }
.sw-critical { background: var(--gap-bg); border: 1px solid var(--gap); }

/* ---------- TEAM STRIPS ---------- */
.team-strip-block {
  margin-bottom: 16px;
}
.team-strip-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.team-strip-label.gap { color: var(--gap); }
.team-strip-label.good { color: var(--good); }
.team-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.team-chip {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: 500;
}
.team-chip.gap  { background: var(--gap-bg); color: var(--gap); }
.team-chip.good { background: var(--good-bg); color: var(--good); }

.gap-alert {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  margin-top: 12px;
}
.gap-alert .hd {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 6px;
}
.gap-alert p {
  font-size: 13px;
  color: var(--navy-80);
  margin: 0;
  line-height: 1.55;
}
.gap-alert .pos { color: var(--good); font-weight: 600; }
.gap-alert .neg { color: var(--gap); font-weight: 600; }

/* ---------- FINDINGS AS PATTERN CARDS ---------- */
.findings {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.finding-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border-top: 4px solid var(--blue);
}
.finding-card.gap    { border-top-color: var(--gap); }
.finding-card.amber  { border-top-color: var(--orange); }
.finding-card.good   { border-top-color: var(--good); }
.finding-card .tag {
  display: inline-block;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--navy-60);
}
.finding-card.gap .tag   { color: var(--gap); }
.finding-card.amber .tag { color: #8a5200; }
.finding-card.good .tag  { color: var(--good); }
.finding-card h3 {
  font-size: 14.5px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--navy);
  line-height: 1.35;
}
.finding-card p {
  font-size: 13px;
  color: var(--navy-80);
  margin: 0;
  line-height: 1.55;
}

/* ---------- ACTIONS (plays list) ---------- */
.actions-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid var(--border);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}
.actions-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--navy);
}
.actions-card .sub {
  font-size: 13px;
  color: var(--navy-60);
  margin: 0 0 12px;
  font-style: italic;
}
.plays {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--border);
  counter-reset: play;
}
.plays li {
  font-size: 13.5px;
  padding: 12px 0 12px 32px;
  border-bottom: 1px solid var(--border);
  position: relative;
  line-height: 1.55;
  color: var(--navy-80);
}
.plays li:last-child { border-bottom: none; }
.plays li::before {
  content: counter(play);
  counter-increment: play;
  position: absolute;
  left: 0;
  top: 12px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
}
.plays b { font-weight: 600; color: var(--navy); }

/* ---------- FOOTER ---------- */
footer.meta {
  margin-top: 20px;
  font-size: 11px;
  color: var(--navy-60);
  text-align: center;
  letter-spacing: 0.02em;
  line-height: 1.7;
}
footer.meta em { font-style: italic; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 880px) {
  .program-stats { grid-template-columns: repeat(2, 1fr); }
  .two-up { grid-template-columns: 1fr; }
  .heat-card-wrap { grid-template-columns: 1fr; }
  .findings { grid-template-columns: 1fr 1fr; }
  .takeaway-inline { grid-template-columns: 1fr; }
  .takeaway-inline .metrics {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid rgba(255,255,255,0.18);
    padding-top: 16px;
  }
  header.top h1 { font-size: 24px; }
}

@media (max-width: 560px) {
  .findings { grid-template-columns: 1fr; }
  header.top { padding: 20px; }
  main.briefing { padding: 16px 12px 32px; }
  .heat-table { font-size: 11px; }
}

/* ---------- PRINT ---------- */
@media print {
  html, body { background: #fff; font-size: 11px; }
  main.briefing { max-width: none; padding: 12px; }
  header.top {
    background: var(--navy) !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    box-shadow: none;
    break-inside: avoid;
  }

  body, main.briefing,
  h1, h2, h3, p, li, span, div, small, strong, em, b,
  .mat-label, .mat-count, .dim-label, .dim-val,
  .finding-card h3, .finding-card p, .finding-card .tag,
  .plays li, .plays b, .actions-card h3, .actions-card .sub,
  .team-chip, .team-strip-label,
  .stat .lbl, .stat .num,
  .callout, .gap-alert p, .gap-alert .hd,
  .heat-legend, .mini-card-title,
  footer.meta {
    color: #000000 !important;
  }

  header.top,
  header.top h1,
  header.top h1 em,
  header.top p.lede,
  header.top .stat .num,
  header.top .stat .lbl,
  header.top .takeaway-inline p,
  header.top .takeaway-inline p strong,
  header.top .takeaway-inline .metrics .mini .v,
  header.top .takeaway-inline .metrics .mini .k {
    color: #ffffff !important;
  }

  header.top .stat .num .accent-b,
  header.top .takeaway-inline .label,
  header.top .takeaway-inline .metrics .mini .v.blue,
  header.top .eyebrow {
    color: #33ade1 !important;
  }

  header.top .stat .num .accent-o,
  header.top .takeaway-inline .metrics .mini .v.orange {
    color: #ff9900 !important;
  }

  header.top .takeaway-inline .metrics .mini .v.gap {
    color: #d1495b !important;
  }

  section { margin-bottom: 12px; break-inside: avoid; }
  h2.section-title { break-after: avoid; page-break-after: avoid; }
  .matrix-card, .finding-card, .actions-card {
    box-shadow: none;
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .plays li { break-inside: avoid; }
  .stat, .takeaway-inline { break-inside: avoid; }
  p, li { orphans: 3; widows: 3; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
