/* ==========================================================================
   Hausmark RCCS × Handshake
   Colours, spacing and type are sampled directly from the Handshake ID
   Directory onboarding page, so this matches that frontend rather than
   approximating it. Single light theme — no dark mode.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Hausmark brand red, #A40001, as the page accent throughout. */
  --brand-500:   #C8232A;   /* lighter red: hover borders, meters */
  --brand-600:   #A40001;   /* the brand hex: labels, buttons, fills */
  --brand-700:   #7C0001;   /* deep red: hover, gradient end */
  --brand-800:   #5E0001;
  --brand-50:    #FDF5F5;   /* panel and notice fill */
  --brand-100:   #FAE4E5;   /* tracks, pill grounds */
  --brand-line:  #F0D6D7;   /* hairline borders */

  --page:         #F9FBFC;
  --card:         #FFFFFF;
  --surface-2:    #FAFAFB;
  --surface-3:    #F3F4F6;
  --border:       #E5E7EB;
  --border-soft:  #F0F1F3;

  --text:         #1F2937;
  --text-2:       #4B5563;
  --text-3:       #9CA3AF;
  --req:          #E11D48;

  --good: #16A34A;  --good-bg: #ECFDF3;  --good-line: #A7E9BF;
  --warn: #D97706;  --warn-bg: #FFFBEB;  --warn-line: #F6D9A0;
  --bad:  #DC2626;  --bad-bg:  #FEF2F2;  --bad-line:  #F6BFBF;

  --shadow-sm:  0 1px 2px rgba(17, 24, 39, .05);
  --shadow-md:  0 4px 14px -4px rgba(17, 24, 39, .10), 0 1px 3px rgba(17, 24, 39, .05);
  --shadow-card: 0 1px 3px rgba(17, 24, 39, .06), 0 10px 32px -12px rgba(17, 24, 39, .14);

  --radius-sm: 6px;
  --radius:    8px;
  --radius-lg: 12px;

  --pad:  45px;   /* card gutter, as measured on the reference */
  --maxw: 1240px;

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --------------------------------------------------------------- base --- */

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

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }
[hidden] { display: none !important; }

h1, h2, h3, h4 { margin: 0; text-wrap: balance; line-height: 1.22; font-weight: 700; letter-spacing: -.018em; }

a { color: var(--brand-600); text-decoration-thickness: 1px; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; border-radius: 5px; }

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

/* Their section label: bold, uppercase, violet, lightly letterspaced. */
.eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--brand-600);
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.req { color: var(--req); font-weight: 700; }

/* ---------------------------------------------------- card + lockup ---- */

.shell { padding-block: 30px 44px; }

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card + .card { margin-top: 24px; }

/* The reference puts the logo on a white strip above the gradient band. */
.card-head {
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
  padding: 26px var(--pad);
}

.lockup { display: flex; align-items: center; gap: 20px; }
.brand-logo { display: block; width: auto; }
.brand-logo--handshake { height: 30px; }
.brand-logo--hausmark  { height: 38px; }
.lockup__rule { width: 1px; height: 30px; background: var(--border); flex: none; }

.card-body { padding: var(--pad); }

/* ------------------------------------------------------------- band ---- */

.band {
  background: linear-gradient(90deg, var(--brand-600) 0%, var(--brand-700) 100%);
  color: #fff;
  padding: 38px var(--pad) 36px;
}
.band .eyebrow { color: #fff; opacity: .92; }
.band h1 {
  margin-top: 14px;
  font-size: clamp(1.7rem, 1.15rem + 1.9vw, 2.15rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -.022em;
}
.band__lede {
  margin: 15px 0 0;
  font-size: 1.0625rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, .92);
  max-width: 72ch;
}

/* Their two-segment progress rail. Segment one is this assessment; segment
   two is the decision it feeds, so the shape carries the same meaning. */
.band__progress { margin-top: 30px; }
.band__track { display: flex; gap: 14px; }
.band__seg {
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .38);
  overflow: hidden;
}
.band__fill { height: 100%; width: 0%; background: #fff; border-radius: 99px; transition: width .3s cubic-bezier(.4, 0, .2, 1); }

.band__meta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 14px;
  font-size: 15px;
  color: rgba(255, 255, 255, .94);
}
.band__score {
  display: inline-flex; align-items: baseline; gap: 5px;
  padding: 3px 12px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .18);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.band__score small { font-weight: 500; opacity: .82; font-size: 12.5px; }

/* ------------------------------------------------------------ notice --- */

.notice {
  background: var(--brand-50);
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  padding: 18px 22px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text-2);
}
.notice b { color: var(--text); font-weight: 700; }

/* ------------------------------------------------------------ buttons -- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 14.5px; font-weight: 600;
  cursor: pointer; text-decoration: none;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
  white-space: nowrap;
}
.btn:hover { background: var(--brand-50); border-color: var(--brand-500); color: var(--brand-700); }

.btn--primary { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn--primary:hover { background: var(--brand-700); border-color: var(--brand-700); color: #fff; }

.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--surface-3); border-color: transparent; color: var(--text); }

.btn--sm { padding: 8px 14px; font-size: 13.5px; }

/* ------------------------------------------------------------ fields --- */

.field-label {
  display: block;
  font-size: 15px; font-weight: 700;
  color: var(--text);
  margin-bottom: 9px;
}

.input {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--text);
  font: inherit; font-size: 16px;
  transition: border-color .14s ease, box-shadow .14s ease;
}
.input::placeholder { color: var(--text-3); }
.input:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px var(--brand-100); }

/* --------------------------------------------------------- section ----- */

.section__head { max-width: 66ch; margin-bottom: 30px; }
.section__head h2 { margin-top: 13px; font-size: clamp(1.5rem, 1.1rem + 1.3vw, 1.95rem); font-weight: 700; }
.section__head p:not(.eyebrow) { color: var(--text-2); margin-block: 14px 0; font-size: 15.5px; }

/* ------------------------------------------------------ tool layout ---- */

.tool { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 34px; align-items: start; }

.firms { margin-bottom: 26px; }
.firm-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

.firm-tab {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 15px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  font-size: 13.5px; font-weight: 600; color: var(--text-2);
  max-width: 260px;
}
.firm-tab:hover { border-color: var(--brand-500); background: var(--brand-50); }
.firm-tab[aria-selected="true"] { background: var(--brand-50); border-color: var(--brand-600); color: var(--brand-700); }
.firm-tab__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.firm-tab__score {
  font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums;
  padding: 1px 8px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-3);
}
.firm-tab__score[data-band="strong"]  { background: var(--good-bg); color: var(--good); }
.firm-tab__score[data-band="caution"] { background: var(--warn-bg); color: var(--warn); }
.firm-tab__score[data-band="risk"]    { background: var(--bad-bg);  color: var(--bad);  }

.firm-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.firm-row > div { flex: 1 1 300px; min-width: 200px; }

.sample-note {
  display: flex; align-items: center; gap: 13px; flex-wrap: wrap;
  padding: 14px 20px; margin-bottom: 22px;
  border: 1px solid var(--brand-line);
  border-radius: var(--radius);
  background: var(--brand-50);
  font-size: 14px; color: var(--text-2);
}
.sample-note b { color: var(--brand-600); font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; }
.sample-note .btn { margin-left: auto; }

/* ------------------------------------------------------------- pillar -- */

.pillars { display: flex; flex-direction: column; gap: 14px; }

.pillar {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 24px 20px;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.pillar:hover { box-shadow: var(--shadow-sm); }
.pillar[data-critical="true"] { border-left: 3px solid var(--brand-600); }

.pillar__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 17px; }
.pillar__n { flex: none; min-width: 20px; padding-top: 2px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--brand-600); }
.pillar__titles { min-width: 0; flex: 1; }
.pillar__name {
  display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3);
}
.flag {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--brand-700); background: var(--brand-100);
  padding: 2px 8px; border-radius: 99px;
}
.pillar__q { margin: 8px 0 0; font-size: 16px; line-height: 1.4; color: var(--text); font-weight: 700; letter-spacing: -.012em; }

.pillar__weight { flex: none; text-align: right; padding-top: 1px; }
.pillar__weight i { display: block; font-size: 10px; font-style: normal; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); }
.pillar__weight b { display: block; margin-top: 2px; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); }
/* Meter length is the pillar's share of the 100 points. */
.weight-meter { width: 58px; height: 4px; border-radius: 99px; background: var(--border); margin: 7px 0 0 auto; overflow: hidden; }
.weight-meter i { display: block; height: 100%; background: var(--brand-500); border-radius: 99px; }

.opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.opt {
  display: flex; flex-direction: column; gap: 6px; text-align: left;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  cursor: pointer;
  transition: border-color .14s ease, background .14s ease, box-shadow .14s ease;
}
.opt:hover { border-color: var(--brand-500); background: var(--brand-50); }
.opt__label { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--text); }
.opt__pts { font-size: 11.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-3); }
.opt__desc { font-size: 12.5px; line-height: 1.42; color: var(--text-3); }

.opt[aria-pressed="true"] { box-shadow: inset 0 0 0 1.5px currentColor; }
.opt[aria-pressed="true"][data-v="10"] { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.opt[aria-pressed="true"][data-v="5"]  { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.opt[aria-pressed="true"][data-v="0"]  { background: var(--bad-bg);  border-color: var(--bad-line);  color: var(--bad);  }
.opt[aria-pressed="true"] .opt__label { color: inherit; }
.opt[aria-pressed="true"] .opt__desc,
.opt[aria-pressed="true"] .opt__pts { color: inherit; opacity: .85; }

/* ------------------------------------------------------------ verdict -- */

.verdict-col { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 14px; }

.verdict { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--card); box-shadow: var(--shadow-md); overflow: hidden; }
.verdict__top { padding: 22px 22px 19px; border-bottom: 1px solid var(--border-soft); }
.verdict__firm { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.score-row { display: flex; align-items: flex-end; gap: 9px; margin-top: 10px; }
.score-num { font-size: 3.35rem; font-weight: 800; line-height: .9; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--text); }
.score-den { font-size: 13px; font-weight: 600; color: var(--text-3); padding-bottom: 7px; }

.band-pill {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 15px; padding: 6px 13px;
  border-radius: 99px; font-size: 13px; font-weight: 700;
  border: 1px solid var(--border); background: var(--surface-3); color: var(--text-2);
}
.band-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.band-pill[data-band="strong"]  { background: var(--good-bg); border-color: var(--good-line); color: var(--good); }
.band-pill[data-band="caution"] { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.band-pill[data-band="risk"]    { background: var(--bad-bg);  border-color: var(--bad-line);  color: var(--bad);  }

.band-detail { margin: 10px 0 0; font-size: 13.5px; color: var(--text-2); }

.progress { padding: 16px 22px; border-bottom: 1px solid var(--border-soft); }
.progress__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; font-weight: 600; color: var(--text-3); margin-bottom: 8px; }
.progress__row b { font-variant-numeric: tabular-nums; color: var(--text-2); font-weight: 700; }
.progress__track { height: 5px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progress__fill { height: 100%; background: var(--brand-600); border-radius: 99px; transition: width .3s cubic-bezier(.4, 0, .2, 1); }

.flagcheck { padding: 16px 22px; display: flex; gap: 11px; align-items: flex-start; font-size: 13px; line-height: 1.45; }
.flagcheck__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; background: var(--text-3); }
.flagcheck[data-state="clear"]   { color: var(--good); } .flagcheck[data-state="clear"]   .flagcheck__dot { background: var(--good); }
.flagcheck[data-state="caution"] { color: var(--warn); } .flagcheck[data-state="caution"] .flagcheck__dot { background: var(--warn); }
.flagcheck[data-state="flag"]    { color: var(--bad); background: var(--bad-bg); } .flagcheck[data-state="flag"] .flagcheck__dot { background: var(--bad); }
.flagcheck strong { display: block; font-weight: 700; }
.flagcheck span { color: var(--text-2); }

.verdict__foot { padding: 14px 22px; display: flex; gap: 8px; flex-wrap: wrap; }

.nudge { border: 1px solid var(--brand-line); border-radius: var(--radius-lg); background: var(--brand-50); padding: 16px 18px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.nudge b { display: block; margin-bottom: 4px; color: var(--brand-600); font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

/* ---------------------------------------------------------- breakdown -- */

.subsection { margin-top: 38px; border-top: 1px solid var(--border); padding-top: 32px; }
.subsection h3 { margin-top: 12px; font-size: 1.3rem; font-weight: 700; }
.subsection > p:not(.eyebrow) { margin: 11px 0 0; color: var(--text-2); font-size: 14px; max-width: 66ch; }

.bd-rows { display: flex; flex-direction: column; gap: 3px; margin-top: 20px; }
.bd-row { display: grid; grid-template-columns: 24px minmax(120px, 1.5fr) minmax(0, 3fr) 70px; align-items: center; gap: 14px; padding: 9px 10px; border-radius: var(--radius-sm); font-size: 13.5px; }
.bd-row:nth-child(odd) { background: var(--surface-2); }
.bd-row__n { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.bd-row__name { color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Track width = the pillar's weight; fill = points earned, so the empty part
   is literally the points left on the table. */
.bd-track { height: 10px; background: var(--border); border-radius: 99px; overflow: hidden; }
.bd-fill { height: 100%; border-radius: 99px; background: var(--text-3); transition: width .3s cubic-bezier(.4, 0, .2, 1); }
.bd-fill[data-v="10"] { background: var(--good); }
.bd-fill[data-v="5"]  { background: var(--warn); }
.bd-fill[data-v="0"]  { background: var(--bad); }
.bd-row__pts { font-size: 12.5px; font-weight: 600; text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; }
.bd-scroll { overflow-x: auto; }
.bd-total { margin-top: 18px; padding-top: 16px; border-top: 2px solid var(--border); display: flex; justify-content: space-between; align-items: baseline; }
.bd-total span { font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.bd-total b { font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text); }

/* ----------------------------------------------------------- compare --- */

.compare-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.compare-table th, .compare-table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border-soft); }
.compare-table thead th { font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: var(--text-3); font-weight: 700; }
.compare-table tbody th { font-weight: 600; color: var(--text); }
.compare-table td { text-align: center; font-variant-numeric: tabular-nums; }
.compare-table .is-best { background: var(--good-bg); color: var(--good); font-weight: 700; }
.compare-table tfoot td, .compare-table tfoot th { border-top: 2px solid var(--border); font-weight: 800; font-size: 15px; }

.pip { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.pip[data-v="10"] { background: var(--good); }
.pip[data-v="5"]  { background: var(--warn); }
.pip[data-v="0"]  { background: var(--bad); }
.pip[data-v=""]   { background: var(--border); }

/* ------------------------------------------------------------ footer --- */

.site-footer { padding-block: 34px 8px; }
.site-footer .inner { display: flex; flex-wrap: wrap; gap: 28px; justify-content: space-between; padding: 0 4px; }
.site-footer p { margin: 0; font-size: 13.5px; color: var(--text-3); line-height: 1.6; max-width: 62ch; }
.site-footer a:not(.btn) { color: var(--text-2); font-weight: 600; }

.disclaimer { font-size: 13px; color: var(--text-3); line-height: 1.6; max-width: 72ch; }
.disclaimer strong { color: var(--text-2); font-weight: 700; }

/* --------------------------------------------------------- responsive -- */

@media (max-width: 1020px) {
  .tool { grid-template-columns: minmax(0, 1fr); }
  .verdict-col { position: static; }
}

@media (max-width: 680px) {
  :root { --pad: 20px; }
  .opts { grid-template-columns: minmax(0, 1fr); }
  .opt { flex-direction: row; align-items: baseline; gap: 12px; }
  .opt__label { flex: none; width: 96px; }
  .opt__desc { flex: 1; }
  .pillar__head { flex-wrap: wrap; }
  .pillar__weight { text-align: left; }
  .weight-meter { margin-left: 0; }
  .bd-row { grid-template-columns: 20px minmax(90px, 1.2fr) minmax(0, 2fr) 56px; gap: 9px; font-size: 12.5px; }
  .shell { padding-block: 16px 30px; }
  .band { padding: 28px var(--pad) 26px; }
  .card-head { padding: 20px var(--pad); gap: 14px; }
  .lockup { gap: 13px; }
  .brand-logo--handshake { height: 22px; }
  .brand-logo--hausmark  { height: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ------------------------------------------------------------- print --- */

@media print {
  .verdict__foot, .sample-note, .firm-tabs { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
  .band { background: #A40001 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .tool { grid-template-columns: minmax(0, 1fr) 280px; }
  .pillar { break-inside: avoid; }
}

/* Per-firm remove control on the tab. */
.firm-tab__x {
  display: inline-grid; place-items: center;
  width: 18px; height: 18px; margin-right: -4px;
  border-radius: 50%;
  font-size: 15px; line-height: 1;
  color: var(--text-3);
  cursor: pointer;
  transition: background .14s ease, color .14s ease;
}
.firm-tab__x:hover { background: var(--bad-bg); color: var(--bad); }
.firm-tab__x:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 1px; }

/* Inline remove confirmation — sandboxed artifacts ignore window.confirm(). */
.firm-tab--confirm {
  border-color: var(--bad-line);
  background: var(--bad-bg);
  color: var(--bad);
  cursor: default;
  max-width: none;
}
.firm-tab__yes, .firm-tab__no {
  border: 0; border-radius: 99px; cursor: pointer;
  padding: 3px 11px; font-size: 12.5px; font-weight: 700;
}
.firm-tab__yes { background: var(--bad); color: #fff; }
.firm-tab__yes:hover { background: #B91C1C; }
.firm-tab__no { background: transparent; color: var(--text-2); }
.firm-tab__no:hover { background: #fff; color: var(--text); }

.btn--danger { background: var(--bad-bg); border-color: var(--bad-line); color: var(--bad); }
.btn--danger:hover { background: var(--bad); border-color: var(--bad); color: #fff; }


/* Score guide, sitting under the breakdown total. */
.score-guide { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--border); }
.score-guide__rows { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.score-guide__row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  padding: 11px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-size: 13.5px;
  color: var(--text-2);
}
.score-guide__row b { font-weight: 800; font-variant-numeric: tabular-nums; }
.score-guide__row strong { color: var(--text); font-weight: 700; }
.score-guide__row[data-band="strong"]  { background: var(--good-bg); border-color: var(--good-line); }
.score-guide__row[data-band="strong"] b { color: var(--good); }
.score-guide__row[data-band="caution"] { background: var(--warn-bg); border-color: var(--warn-line); }
.score-guide__row[data-band="caution"] b { color: var(--warn); }
.score-guide__row[data-band="risk"]    { background: var(--bad-bg);  border-color: var(--bad-line);  }
.score-guide__row[data-band="risk"] b { color: var(--bad); }
.score-guide__note { margin: 16px 0 0; font-size: 13px; line-height: 1.6; color: var(--text-3); max-width: 70ch; }

/* Framework introduction, ahead of the assessment. */
.rccs-intro { max-width: 70ch; padding-bottom: 32px; margin-bottom: 34px; border-bottom: 1px solid var(--border); }
.rccs-intro h2 { margin-top: 13px; font-size: clamp(1.5rem, 1.1rem + 1.3vw, 1.95rem); font-weight: 700; }
.rccs-intro p:not(.eyebrow) { color: var(--text-2); font-size: 15.5px; line-height: 1.68; margin: 16px 0 0; }

@media (max-width: 680px) {
  .score-guide__row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}


/* ============================================================== escrow ===
   Pillar 9 panel. Layout and type follow the supplied design, but the colours
   are the page's own violet scale rather than the design's deeper violet, and
   the type is the page face throughout, so the panel matches the rest of the
   page.
   ======================================================================== */

.escrow {
  /* The page's own violet scale, so this panel matches the rest of the page. */
  --esc-violet: var(--brand-600);
  --esc-deep:   var(--brand-700);
  --esc-tint:   var(--brand-50);
  --esc-track:  var(--brand-100);
  --esc-dash:   #E7CFD0;            /* red-tinted, dark enough to read dashed */
  --esc-ink:    var(--text);
  --esc-grey:   var(--text-2);
  --esc-grey-2: #6B7280;            /* carries white text on the muted bar */
  --esc-bar:    #16202D;            /* dark ground for the closing bar */
  --font-display: var(--font);

  display: flex;
  flex-direction: column;
  gap: 28px;
}

.escrow .eyebrow { color: var(--esc-violet); letter-spacing: .14em; }

.escrow__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.escrow__h2 {
  margin: 16px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 1.05rem + 2.3vw, 3.05rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--esc-ink);
  /* Wide enough that the second line holds on one row even before the webfont
     loads and a wider fallback face is in use. */
  max-width: 900px;
}
.escrow__aside { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; flex-shrink: 0; }

.free-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 20px;
  background: var(--brand-100);
  border-radius: 999px;
  font-size: 15px; font-weight: 700;
  color: var(--esc-deep);
  white-space: nowrap;
}
.free-pill svg { width: 18px; height: 18px; color: var(--esc-violet); flex: none; }

.escrow__lede { margin: 0; font-size: 17px; line-height: 1.6; color: var(--esc-grey); max-width: 780px; }
.escrow__lede strong { color: var(--esc-ink); font-weight: 600; }

/* --- coverage comparison --------------------------------------------- */

.cover {
  background: var(--esc-tint);
  border-radius: 24px;
  padding: 36px 40px 32px;
  display: flex; flex-direction: column; gap: 26px;
}
.cover__title { font-family: var(--font-display); font-size: 19px; font-weight: 700; color: var(--esc-ink); }

.cover__scroll { overflow-x: auto; }
.cover__inner { display: flex; flex-direction: column; gap: 26px; min-width: 560px; }

.cover__row { display: flex; flex-direction: column; gap: 10px; }
.cover__rowhead { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cover__label { font-size: 15px; font-weight: 600; color: var(--esc-grey); }
.cover__label--strong { font-weight: 700; color: var(--esc-ink); }
.cover__figs { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.cover__amt {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  color: var(--esc-deep);
  font-variant-numeric: tabular-nums;
}
.cover__amt--muted { font-weight: 700; color: var(--esc-grey-2); }
.cover__pct { font-size: 14px; font-weight: 500; color: var(--esc-grey); }
.cover__badge {
  padding: 5px 12px; border-radius: 999px;
  background: var(--esc-deep); color: #fff;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}

/* Bar width = that stage's share of the contract; fill = the share of it held
   in escrow, so the picture is the coverage itself, not a rating. */
.cover__bars { display: flex; gap: 6px; height: 66px; }
.cover__bar { flex-basis: 0; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.cover__bar span { font-size: 13px; font-weight: 700; color: #fff; }

.cover__bar--solid { background: var(--esc-grey-2); }
.cover__bar--none { border: 1.5px dashed var(--esc-dash); }
.cover__bar--none span { color: var(--text-3); font-weight: 600; }

.cover__bar--track { background: var(--esc-track); flex-direction: column; justify-content: flex-end; overflow: hidden; }
.cover__bar--track i {
  display: flex; align-items: center; justify-content: center;
  background: var(--esc-violet);
  font-style: normal;
  width: 100%;
  height: var(--fill);
}

.cover__stages { display: flex; gap: 6px; }
.cover__stages span { flex-basis: 0; font-size: 12px; font-weight: 600; color: var(--esc-grey); text-align: center; }

.cover__legend {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0; padding-top: 18px;
  border-top: 1px solid var(--brand-line);
  font-size: 13px; line-height: 1.5; color: var(--text-2);
}
.cover__key { flex: none; width: 13px; height: 13px; background: var(--esc-violet); border-radius: 4px; margin-top: 3px; }

/* --- closing bar ------------------------------------------------------ */

.escrow__cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 24px 28px;
  background: var(--esc-bar);
  border-radius: 20px;
}
.escrow__cta strong {
  display: block;
  font-family: var(--font-display);
  font-size: 21px; font-weight: 700; color: #fff;
  margin-bottom: 6px;
}
.escrow__cta span { font-size: 15px; color: #B7C2D1; }
.escrow__btn {
  flex-shrink: 0;
  padding: 14px 26px;
  background: #fff; color: var(--esc-bar);
  border-radius: 999px;
  font-size: 15px; font-weight: 700; text-decoration: none;
  transition: background .14s ease;
}
.escrow__btn:hover { background: var(--brand-100); color: var(--esc-deep); }

.escrow .subsection .eyebrow { color: var(--esc-violet); }

/* Narrow screens: the five stages stop being columns and become stacked rows,
   each labelled in place, so the chart fits the width instead of scrolling. */
@media (max-width: 760px) {
  .cover { padding: 24px 20px; border-radius: 18px; }
  .escrow__aside { align-items: flex-start; }
  .escrow__cta { padding: 20px; }

  .cover__scroll { overflow-x: visible; }
  .cover__inner { min-width: 0; }

  /* Room above the first bar for its label, which sits over the bar. */
  .cover__row { gap: 28px; }
  .cover__bars { flex-direction: column; height: auto; gap: 26px; }

  .cover__bar {
    flex: none;
    height: 34px;
    position: relative;
    border-radius: 8px;
    justify-content: flex-start;
  }
  /* The stage name sits above its own bar. */
  .cover__bar::before {
    content: attr(data-stage);
    position: absolute;
    left: 0; bottom: calc(100% + 5px);
    white-space: nowrap;
    font-size: 12.5px; font-weight: 600;
    color: var(--esc-grey);
  }
  .cover__bar > span { padding-left: 14px; }
  .cover__bar--none { justify-content: flex-start; }

  /* The track clips its fill on desktop; on mobile that clipping would also
     swallow the label sitting above the bar. */
  .cover__bar--track { flex-direction: row; justify-content: flex-start; overflow: visible; }
  .cover__bar--track i {
    width: var(--fill);
    height: 100%;
    min-width: 46px;
    justify-content: flex-start;
    padding-left: 14px;
    border-radius: 8px;
  }

  /* The labels moved onto the bars, so the shared axis row is redundant. */
  .cover__stages { display: none; }
}

/* Milestone flow. The step numbers come from a CSS counter, so these rules are
   what makes 1-5 appear at all. */
.flow { display: flex; flex-direction: column; counter-reset: step; }
.flow__step {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 15px;
  padding-bottom: 22px;
  position: relative;
}
.flow__step:last-child { padding-bottom: 0; }
.flow__step::before {
  counter-increment: step;
  content: counter(step);
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-size: 12px; font-weight: 700;
  z-index: 1;
}
.flow__step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 14px; top: 30px; bottom: -2px;
  width: 2px;
  background: var(--brand-100);
}
.flow__step h4 { font-size: 14.5px; font-weight: 700; color: var(--text); }
.flow__step p { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.55; }

/* Footer call to action, in the Hausmark brand red. */
.footer-cta { display: flex; flex-direction: column; align-items: flex-end; gap: 16px; text-align: right; }
.btn--hausmark {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}
.btn--hausmark:hover {
  background: var(--brand-700);
  border-color: var(--brand-700);
  color: #fff;
}
@media (max-width: 680px) {
  .footer-cta { align-items: flex-start; text-align: left; }
}

/* ============================================================ hausmark ===
   Closing section: who Hausmark is and how firms are assessed.
   ======================================================================== */

.hausmark .card-body { display: flex; flex-direction: column; gap: 30px; }

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

.hm-hero { display: block; }

.hm-kicker { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
.hm-kicker span {
  font-size: 11.5px; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase; color: var(--text-3);
}
.hm-kicker span + span { padding-left: 22px; border-left: 1px solid var(--border); }

.hm-hero__h2 {
  margin: 0;
  font-size: clamp(2rem, 1.15rem + 3.4vw, 4rem);
  font-weight: 800; line-height: 1.05; letter-spacing: -.028em;
  color: var(--text);
}
.hm-hero__h2 em { font-style: normal; color: var(--brand-600); }

.hm-hero__lede { margin: 24px 0 0; font-size: 17px; line-height: 1.62; color: var(--text-2); max-width: 78ch; }
.hm-hero__lede strong { color: var(--text); font-weight: 700; }

/* --- process ---------------------------------------------------------- */

.hm-process { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; background: var(--surface-2); }
.hm-process__head { margin-bottom: 30px; }
.hm-process__head h3 { margin-top: 11px; font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); font-weight: 800; letter-spacing: -.022em; }
.hm-process__head h3 em { font-style: normal; color: var(--brand-600); }
.hm-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; }
.hm-step { position: relative; }
/* The rule between steps reads as one continuous process. */
.hm-step:not(:last-child)::after {
  content: ""; position: absolute; left: 62px; top: 27px; right: -22px;
  height: 1px; background: var(--border);
}
.hm-step__icon {
  display: grid; place-items: center;
  width: 54px; height: 54px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-600);
  position: relative; z-index: 1;
}
.hm-step__icon svg { width: 25px; height: 25px; }
/* Number and title sit on one centred row; the number shares its left edge
   with the body text beneath, so the column reads as one aligned block. */
.hm-step__head { display: flex; align-items: center; gap: 10px; margin-top: 16px; }
.hm-step__n {
  flex: none;
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%; background: var(--brand-50); color: var(--brand-700);
  font-size: 12px; font-weight: 700; line-height: 1;
}
.hm-step h4 { font-size: 15.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.hm-step p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.55; color: var(--text-2); }

.hm-features {
  list-style: none; margin: 30px 0 0; padding: 26px 0 0;
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px;
}
.hm-features li {
  position: relative;
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; align-items: center;
  font-size: 13px; line-height: 1.45; color: var(--text-2);
}
/* The divider is drawn in the gap rather than padded inside the cell, so these
   columns line up with the step columns above instead of sitting 22px right. */
.hm-features li + li::before {
  content: "";
  position: absolute; left: -11px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.hm-features svg { width: 25px; height: 25px; color: var(--text); }

/* --- closing bar ------------------------------------------------------ */

.hm-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap;
  padding: 28px 32px; border-radius: var(--radius-lg);
  background: #16202D;
}
.hm-cta strong { display: block; font-size: clamp(1.3rem, 1rem + 1vw, 1.75rem); font-weight: 800; letter-spacing: -.02em; color: #fff; margin-bottom: 8px; }
.hm-cta span { font-size: 15.5px; color: #B7C2D1; }
.hm-cta__btn {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 30px; border-radius: 999px;
  background: var(--brand-600);
  color: #fff;                 /* label stays white on the red */
  font-size: 16px; font-weight: 700; text-decoration: none;
  transition: background .14s ease;
}
.hm-cta__btn:hover { background: var(--brand-700); color: #fff; }

@media (max-width: 1020px) {
  .hm-steps, .hm-features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hm-step:not(:last-child)::after { display: none; }
  .hm-features li + li::before { display: none; }
}

@media (max-width: 680px) {
  .hm-steps, .hm-features { grid-template-columns: minmax(0, 1fr); }
  .hm-process { padding: 22px 18px; }
  .hm-cta { padding: 22px; }
  .hm-kicker span + span { padding-left: 0; border-left: 0; }
}

/* Optional note under a pillar question, e.g. where to check accreditation. */
.pillar__note { margin: 8px 0 0; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.pillar__note a { color: var(--brand-600); font-weight: 600; }
