/* =================================================================
 * Beyond CVSS — context-aware risk model
 * Custom styles layered on top of Tailwind Play CDN.
 * Palette: navy #1F3864 · blue #2E75B6 · teal #2A9D8F
 *          green #2E7D32 · amber #C9A227 · paper #F7F5EF
 * ================================================================= */

:root {
  --navy:  #1F3864;
  --blue:  #2E75B6;
  --teal:  #2A9D8F;
  --green: #2E7D32;
  --amber: #C9A227;
  --paper: #F7F5EF;

  /* Per-component colours used across stack bar, dots, breakdown, slope */
  --c-sev:  #1F3864; /* severity    → navy  */
  --c-exp:  #2E75B6; /* exploit     → blue  */
  --c-crit: #2A9D8F; /* criticality → teal  */
  --c-expo: #C9A227; /* exposure    → amber */
}

html { background-color: var(--paper); }
body { -webkit-font-smoothing: antialiased; }

/* Warm paper texture */
.paper-bg {
  background-color: var(--paper);
  background-image: radial-gradient(circle at 1px 1px, rgba(31, 56, 100, 0.045) 1px, transparent 0);
  background-size: 22px 22px;
}

.tnum { font-variant-numeric: tabular-nums; }

/* ---------- Dark hero accent ------------------------------------- */
.hero-dark {
  position: relative;
  background: linear-gradient(135deg, #15264a 0%, var(--navy) 55%, #16284c 100%);
  border-bottom: 3px solid var(--amber);
  overflow: hidden;
}
.hero-dark::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 1) 1px, transparent 0);
  background-size: 24px 24px;
  opacity: 0.05;
}
/* soft amber glow anchoring the headline */
.hero-dark::after {
  content: "";
  position: absolute;
  top: -30%; right: -10%;
  width: 60%; height: 120%;
  background: radial-gradient(closest-side, rgba(201, 162, 39, 0.16), transparent 70%);
  pointer-events: none;
}
.hero-dark > div { position: relative; z-index: 1; }

/* Formula card on a dark background.
   Note: uses .formula.formula-dark (specificity 0,2,0) so it overrides the
   base .formula rules defined later in this file. */
.formula.formula-dark {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.16);
  border-left: 3px solid var(--amber);
  box-shadow: 0 18px 50px -24px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}
.formula-dark .formula-eq { color: #fff; }
.formula-dark .formula-where > div { border-top-color: rgba(255, 255, 255, 0.12); }
.formula-dark .formula-where dt { color: #8fbce8; }
.formula-dark .formula-where dd { color: rgba(247, 245, 239, 0.85); }
.formula-dark .formula-where dd.muted { color: rgba(247, 245, 239, 0.45); }

/* Ghost button tuned for the dark hero */
.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--paper);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
  transition: background-color 0.15s ease;
}
.btn-ghost-dark:hover { background: rgba(255, 255, 255, 0.12); }
.btn-ghost-dark:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

/* ---------- Shared editorial type helpers ------------------------ */
.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-weight: 500;
}
.section-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  letter-spacing: 0.2em;
  color: var(--teal);
  font-weight: 600;
}
.section-title {
  font-family: "Spectral", serif;
  font-weight: 600;
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.5rem);
  line-height: 1.1;
  color: var(--navy);
  margin-top: 0.5rem;
  letter-spacing: -0.01em;
}
.lede {
  max-width: 42rem;
  color: rgba(31, 56, 100, 0.7);
  font-size: 1.0625rem;
  line-height: 1.7;
}

/* ---------- Buttons ---------------------------------------------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  border-radius: 0.5rem;
  padding: 0.75rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #2867a3; }
.btn-ghost {
  background: transparent;
  color: var(--navy);
  box-shadow: inset 0 0 0 1px rgba(31, 56, 100, 0.25);
}
.btn-ghost:hover { background: rgba(31, 56, 100, 0.05); }
.btn-primary:focus-visible,
.btn-ghost:focus-visible,
a:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
}

.link-btn {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--blue);
  padding: 0.25rem 0.4rem;
  border-radius: 0.35rem;
  transition: color 0.15s ease, background 0.15s ease;
}
.link-btn:hover { color: var(--navy); background: rgba(46, 117, 182, 0.08); }
.link-btn:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Formula block ---------------------------------------- */
.formula {
  background: #fff;
  border: 1px solid rgba(31, 56, 100, 0.1);
  border-left: 3px solid var(--amber);
  border-radius: 0.75rem;
  padding: 1.5rem 1.75rem;
  box-shadow: 0 10px 30px -18px rgba(31, 56, 100, 0.3);
}
.formula-eq {
  font-size: clamp(1.05rem, 0.8rem + 1.4vw, 1.6rem);
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.01em;
}
.formula-where { display: grid; gap: 0.5rem; }
.formula-where > div {
  display: grid;
  grid-template-columns: 2.5rem minmax(8rem, max-content) 1fr;
  gap: 0.75rem;
  align-items: baseline;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(31, 56, 100, 0.12);
}
.formula-where dt {
  color: var(--blue);
  font-weight: 600;
  font-style: italic;
}
.formula-where dd { margin: 0; color: rgba(31, 56, 100, 0.85); }
.formula-where dd.muted { color: rgba(31, 56, 100, 0.45); font-size: 0.78rem; }

/* ---------- Problem list ----------------------------------------- */
.problem-list { display: grid; gap: 2.5rem; counter-reset: prob; }
.problem-list > li {
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1.25rem;
  align-items: start;
}
.problem-num {
  font-family: "Spectral", serif;
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--amber);
  width: 3rem; height: 3rem;
  display: grid; place-items: center;
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: 999px;
}
.problem-list h3 {
  font-family: "Spectral", serif;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
}
.problem-list p {
  color: rgba(31, 56, 100, 0.65);
  margin-top: 0.4rem;
  line-height: 1.65;
  max-width: 44rem;
}

/* ---------- Panels ----------------------------------------------- */
.panel {
  background: #fff;
  border: 1px solid rgba(31, 56, 100, 0.08);
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(31, 56, 100, 0.05), 0 14px 32px -22px rgba(31, 56, 100, 0.28);
}
@media (min-width: 768px) { .panel { padding: 1.75rem; } }
.panel-h {
  font-family: "Spectral", serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--navy);
}
.panel-h-sm {
  font-family: "Spectral", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
}
.panel-quote {
  background: rgba(42, 157, 143, 0.06);
  border-color: rgba(42, 157, 143, 0.25);
}
.score-panel { background: linear-gradient(180deg, #fff, #fbfaf6); }

/* ---------- Sliders ---------------------------------------------- */
.slider-block { margin-top: 1.25rem; }
.slider-block:first-of-type { margin-top: 1.25rem; }
.slider-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.slider-row label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
}
.num-out {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue);
  font-variant-numeric: tabular-nums;
}
.num-out-sm {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--teal);
  font-variant-numeric: tabular-nums;
}
.hint {
  font-size: 0.75rem;
  color: rgba(31, 56, 100, 0.5);
  margin-top: 0.35rem;
  line-height: 1.5;
}
.hint em { font-style: italic; color: rgba(31, 56, 100, 0.6); }

/* Range input — cross-browser */
input[type="range"] {
  width: 100%;
  margin-top: 0.5rem;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(31, 56, 100, 0.15);
}
input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(31, 56, 100, 0.15);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  margin-top: -6px;
  height: 17px; width: 17px;
  border-radius: 999px;
  background: var(--blue);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(31, 56, 100, 0.35);
}
input[type="range"]::-moz-range-thumb {
  height: 15px; width: 15px;
  border-radius: 999px;
  background: var(--blue);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(31, 56, 100, 0.35);
}
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--amber); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--amber); }

.weights-block {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(31, 56, 100, 0.1);
}

/* Component colour dots */
.dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 999px;
  margin-right: 0.45rem;
}
.dot-sev  { background: var(--c-sev); }
.dot-exp  { background: var(--c-exp); }
.dot-crit { background: var(--c-crit); }
.dot-expo { background: var(--c-expo); }

/* ---------- Preset chips ----------------------------------------- */
.preset-chip {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--navy);
  background: #fff;
  border: 1px solid rgba(31, 56, 100, 0.18);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  transition: all 0.15s ease;
  cursor: pointer;
}
.preset-chip:hover { border-color: var(--blue); color: var(--blue); }
.preset-chip[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.preset-chip:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Risk band badge -------------------------------------- */
.risk-band {
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  letter-spacing: 0.1em;
  font-size: 1.35rem;
  padding: 0.25rem 0.85rem;
  border-radius: 0.5rem;
  display: inline-block;
}
.risk-low      { background: rgba(46, 125, 50, 0.12);  color: var(--green); }
.risk-medium   { background: rgba(201, 162, 39, 0.16); color: #9c7d12; }
.risk-high     { background: rgba(217, 119, 6, 0.14);  color: #b45309; }
.risk-critical { background: rgba(185, 28, 28, 0.12);  color: #b91c1c; }

/* ---------- Stacked contribution bar ----------------------------- */
.stack-bar {
  display: flex;
  width: 100%;
  height: 2.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
  background: rgba(31, 56, 100, 0.06);
  box-shadow: inset 0 0 0 1px rgba(31, 56, 100, 0.08);
}
.stack-seg {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 0;
}
.stack-seg span {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  opacity: 0.95;
}
.seg-sev  { background: var(--c-sev); }
.seg-exp  { background: var(--c-exp); }
.seg-crit { background: var(--c-crit); }
.seg-expo { background: var(--c-expo); }
.stack-rest { height: 100%; flex: 0 0 auto; transition: width 0.35s ease; }

.legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.4rem 1rem;
}
@media (min-width: 520px) { .legend { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.legend li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: rgba(31, 56, 100, 0.7);
}
.legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.legend .lv { font-family: "IBM Plex Mono", monospace; font-weight: 600; color: var(--navy); margin-left: auto; }

/* ---------- Calculation breakdown -------------------------------- */
.breakdown { display: grid; gap: 0; }
.bd-head, .bd-row, .bd-sum {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.9fr 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.5rem 0;
}
.bd-head {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(31, 56, 100, 0.45);
  border-bottom: 1px solid rgba(31, 56, 100, 0.1);
}
.bd-head span:not(:first-child),
.bd-row span:not(:first-child),
.bd-sum span:not(:first-child) { text-align: right; }
.bd-row {
  border-bottom: 1px dashed rgba(31, 56, 100, 0.08);
  transition: background 0.15s ease;
}
.bd-row:hover { background: rgba(31, 56, 100, 0.025); }
.bd-row span:first-child { color: var(--navy); display: inline-flex; align-items: center; }
.bd-row span:last-child { color: var(--navy); font-weight: 600; }
.bd-rule { height: 1px; background: rgba(31, 56, 100, 0.2); margin: 0.5rem 0; }
.bd-sum span:first-child { color: rgba(31, 56, 100, 0.6); }

/* dominant-driver highlight */
.bd-row.is-driver { background: rgba(46, 117, 182, 0.07); }
.bd-row.is-driver span:first-child::after {
  content: "driver";
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--blue);
  margin-left: 0.5rem;
  background: rgba(46, 117, 182, 0.12);
  padding: 0.05rem 0.3rem;
  border-radius: 0.25rem;
}

/* ---------- Tables ----------------------------------------------- */
.vuln-table, .matrix-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 0.875rem;
}
.vuln-table thead th, .matrix-table thead th {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 500;
  color: rgba(31, 56, 100, 0.5);
  padding: 0.85rem 0.9rem;
  text-align: right;
  border-bottom: 1px solid rgba(31, 56, 100, 0.1);
  white-space: nowrap;
}
.vuln-table thead th.text-left, .matrix-table thead th.text-left { text-align: left; }
.vuln-table tbody td {
  padding: 0.8rem 0.9rem;
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  color: rgba(31, 56, 100, 0.8);
  border-bottom: 1px dashed rgba(31, 56, 100, 0.08);
  font-variant-numeric: tabular-nums;
}
.vuln-table tbody td.name {
  text-align: left;
  font-family: "Inter", sans-serif;
  color: var(--navy);
  font-weight: 500;
}
.vuln-table tbody td.risk { font-weight: 600; color: var(--navy); }
.vuln-table tbody tr:hover { background: rgba(31, 56, 100, 0.02); }
.matrix-table th { text-align: center; }
.matrix-table tbody td {
  padding: 0.95rem 0.9rem;
  text-align: center;
  border-bottom: 1px dashed rgba(31, 56, 100, 0.08);
  font-size: 1.05rem;
}
.matrix-table tbody td.sys {
  text-align: left;
  font-family: "Spectral", serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--navy);
}
.matrix-table tbody tr.mine {
  background: var(--navy);
}
.matrix-table tbody tr.mine td { color: var(--paper); border-bottom-color: rgba(255,255,255,0.12); }
.matrix-table tbody tr.mine td.sys { color: var(--amber); font-weight: 600; }
.matrix-table .tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(247, 245, 239, 0.7);
  margin-left: 0.5rem;
}

/* ---------- Slope chart (SVG) ------------------------------------ */
#slope-chart svg { width: 100%; height: auto; display: block; }
.slope-line { stroke-width: 2; fill: none; transition: stroke-width 0.15s ease; }
.slope-dot { transition: r 0.15s ease; }
.slope-label { font-family: "Inter", sans-serif; font-size: 12px; fill: var(--navy); }
.slope-rank { font-family: "IBM Plex Mono", monospace; font-size: 11px; font-weight: 600; }
.slope-col-h {
  font-family: "IBM Plex Mono", monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  fill: rgba(31, 56, 100, 0.45);
}
.slope-row:hover .slope-line { stroke-width: 3.5; }
.slope-row:hover .slope-dot { r: 6; }

/* ---------- Contribution callout --------------------------------- */
.contrib-callout {
  background: linear-gradient(135deg, var(--navy), #15264a);
  border-radius: 1.5rem;
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
}
@media (min-width: 768px) { .contrib-callout { padding: 3.5rem; } }
.contrib-callout::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,1) 1px, transparent 0);
  background-size: 22px 22px;
  opacity: 0.05;
}
.contrib-callout > * { position: relative; }
.contrib-callout em { color: var(--amber); font-style: italic; }

/* ---------- Reduced motion --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* =================================================================
 *  ASSESSMENT PAGE (assessment.html)
 * ================================================================= */

/* back link in dark hero */
.back-link {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: rgba(247, 245, 239, 0.7);
  transition: color 0.15s ease;
}
.back-link:hover { color: var(--amber); }

/* ---------- Maturity scale reference cards ----------------------- */
.scale-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 640px) { .scale-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px) { .scale-grid { grid-template-columns: repeat(6, 1fr); } }
.scale-card {
  background: #fff;
  border: 1px solid rgba(31, 56, 100, 0.1);
  border-top: 3px solid var(--navy);
  border-radius: 0.6rem;
  padding: 0.9rem;
}
.scale-card[data-lvl="0"] { border-top-color: #b91c1c; }
.scale-card[data-lvl="1"] { border-top-color: #d97706; }
.scale-card[data-lvl="2"] { border-top-color: var(--amber); }
.scale-card[data-lvl="3"] { border-top-color: var(--blue); }
.scale-card[data-lvl="4"] { border-top-color: var(--teal); }
.scale-card[data-lvl="5"] { border-top-color: var(--green); }
.scale-n {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1;
}
.scale-label {
  font-family: "Spectral", serif;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
  margin-top: 0.35rem;
}
.scale-desc { font-size: 0.72rem; color: rgba(31, 56, 100, 0.6); margin-top: 0.35rem; line-height: 1.45; }

/* ---------- Dimension panels ------------------------------------- */
.dim-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.fn-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: rgba(42, 157, 143, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.dim-score {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.dim-score::after { content: " /5"; font-size: 0.8rem; color: rgba(31, 56, 100, 0.4); }

.indicators { display: grid; gap: 0.9rem; }
.indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.ind-label { font-size: 0.875rem; color: var(--navy); flex: 1 1 14rem; }

/* segmented 0–5 control built from radio inputs */
.seg {
  display: inline-flex;
  border: 1px solid rgba(31, 56, 100, 0.18);
  border-radius: 0.5rem;
  overflow: hidden;
  flex: 0 0 auto;
}
.seg-input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg-label {
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
  font-weight: 500;
  color: rgba(31, 56, 100, 0.55);
  cursor: pointer;
  border-right: 1px solid rgba(31, 56, 100, 0.12);
  transition: background 0.12s ease, color 0.12s ease;
}
.seg-label:last-of-type { border-right: none; }
.seg-label:hover { background: rgba(46, 117, 182, 0.08); }
/* checked → fill this segment and everything to its left (cumulative look) */
.seg-input:checked ~ .seg-label { /* placeholder, see sibling rules below */ }
.seg-input:checked + .seg-label {
  background: var(--navy);
  color: #fff;
}
.seg-input:focus-visible + .seg-label { outline: 2px solid var(--amber); outline-offset: -2px; }

/* ---------- By-dimension result bars ----------------------------- */
.mbar-row { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 0.6rem; align-items: center; }
.mbar-label { font-size: 0.78rem; color: rgba(31, 56, 100, 0.75); grid-column: 1 / -1; }
.mbar-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(31, 56, 100, 0.08);
  overflow: hidden;
}
.mbar-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease, background 0.3s ease; }
.mbar-val {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

/* ---------- Criticality / exposure meters ------------------------ */
.meter {
  height: 10px;
  border-radius: 999px;
  background: rgba(31, 56, 100, 0.08);
  overflow: hidden;
}
.meter-fill { height: 100%; border-radius: 999px; transition: width 0.3s ease; }
.meter-crit { background: var(--teal); }
.meter-expo { background: var(--amber); }

/* ---------- Question blocks -------------------------------------- */
.qblock { border: none; margin: 0; padding: 0; }
.qlabel { font-size: 0.875rem; font-weight: 500; color: var(--navy); margin-bottom: 0.5rem; }
.qoptions { display: grid; gap: 0.4rem; }
.qopt {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: rgba(31, 56, 100, 0.8);
  padding: 0.45rem 0.6rem;
  border: 1px solid rgba(31, 56, 100, 0.12);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease;
}
.qopt:hover { border-color: var(--blue); background: rgba(46, 117, 182, 0.04); }
.qopt input { margin-top: 0.15rem; accent-color: var(--blue); flex: 0 0 auto; }
.qopt:has(input:checked) {
  border-color: var(--navy);
  background: rgba(31, 56, 100, 0.05);
}
.qopt input:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }

/* ---------- Regulatory & standards basis cards ------------------- */
.reg-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) { .reg-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .reg-grid { grid-template-columns: repeat(4, 1fr); } }
.reg-card {
  background: #fff;
  border: 1px solid rgba(31, 56, 100, 0.1);
  border-left: 3px solid var(--navy);
  border-radius: 0.75rem;
  padding: 1.25rem;
}
.reg-card.reg-cyber  { border-left-color: var(--blue); }
.reg-card.reg-data   { border-left-color: var(--teal); }
.reg-card.reg-policy { border-left-color: var(--amber); }
.reg-card.reg-intl   { border-left-color: var(--navy); }
.reg-tag {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--teal);
  background: rgba(42, 157, 143, 0.1);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.reg-card h3 {
  font-family: "Spectral", serif;
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--navy);
  margin-top: 0.55rem;
  line-height: 1.25;
}
.reg-card p {
  font-size: 0.78rem;
  color: rgba(31, 56, 100, 0.65);
  margin-top: 0.5rem;
  line-height: 1.55;
}

/* ---------- Feed-through readout (dark callout) ------------------ */
.feed-readout { display: flex; flex-wrap: wrap; gap: 1rem; }
.feed-readout > div {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 0.75rem;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 9rem;
}
.feed-num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 2rem;
  font-weight: 600;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
