/* Pinebridge · the decision tools.
   Builds on site.css: its tokens, .phero, .card, .btn, .chip, .orb, .field, .input, .table, .notice, .empty.
   This sheet adds what a working instrument needs and nothing the shared sheet already has.

   Order: tokens and scales → index → page top → run bar → working area → figures →
   forms and controls → tables → the map → findings → charts → maturity → save panel →
   report → responsive → print. */

:root {
    /* Rating scale, low to severe. The same five colours as the heat map on the home page. */
    --sev-0: #8CC63F;
    --sev-1: #C7DD55;
    --sev-2: #F5B82E;
    --sev-3: #F08A3C;
    --sev-4: #E5533D;
    --bad: #D5432F;
    --bad-ink: #B5321F;
    --bad-wash: #FDE9E5;
    --warn-ink: #7A5407;
    --warn-wash: #FCF2D9;
    --tool-top: 86px;      /* where the run bar rests under the site header */
}

/* The scripts show and hide by the hidden attribute; a display rule must never undo that. */
[hidden] { display: none !important; }

.b0 { background: var(--sev-0); }
.b1 { background: var(--sev-1); }
.b2 { background: var(--sev-2); }
.b3 { background: var(--sev-3); }
.b4 { background: var(--sev-4); }
.b0, .b1, .b2, .b3, .b4, .hm__c, .tool-dot, .tool-ref, .tool-heat, .rating, .tool-meter__fill, .tool-bands__track span, .tool-score__ring, .tool-swatch, .tool-ramp i { -webkit-print-color-adjust: exact; print-color-adjust: exact; }

.chip--bad { background: none; color: var(--bad-ink); }
.chip--warn { background: none; color: var(--warn-ink); }
.chip--bad::before, .chip--warn::before, .tool-finding .chip::before, .tool-table .chip::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.tool-finding .chip, .tool-table .chip { align-self: start; padding: 2px 0; border-radius: 0; background: none; box-shadow: none; }
.btn:disabled, .btn[disabled] { opacity: .55; pointer-events: none; }

/* 1. The index -------------------------------------------------------------- */
.toolcards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.toolcard { position: relative; display: flex; flex-direction: column; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s; }
.toolcard:hover { transform: translateY(-6px); box-shadow: var(--shadow-2); }
.toolcard__media { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--navy-800); }
.toolcard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease); }
.toolcard__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4, 20, 36, .05) 40%, rgba(4, 20, 36, .55)); }
.toolcard:hover .toolcard__media img { transform: scale(1.07); }
.toolcard__no { position: absolute; left: 16px; top: 14px; z-index: 1; font-size: 40px; font-weight: 600; line-height: 1; letter-spacing: -.03em; color: rgba(255, 255, 255, .92); text-shadow: 0 2px 14px rgba(4, 20, 36, .5); }
.toolcard__time { position: absolute; right: 14px; top: 14px; z-index: 1; }
.toolcard__body { position: relative; display: flex; flex-direction: column; flex: 1; padding: 44px 26px 24px; }
.toolcard__body > .orb { position: absolute; left: 24px; top: -30px; box-shadow: 0 0 0 5px #fff; transition: transform .35s var(--ease); }
.toolcard:hover .toolcard__body > .orb { transform: rotate(-8deg) scale(1.06); }
.toolcard h3 { font-size: 22px; }
.toolcard h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.toolcard__tagline { margin: 8px 0 0; font-size: 15.5px; }
.toolcard__label { margin: 20px 0 10px; font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green-700); }
.toolcard .ticks { gap: 9px; font-size: 14.5px; flex: 1; align-content: start; }
.toolcard__foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.toolcard__foot .btn { position: relative; z-index: 2; }
.toolcard--wide { grid-column: span 2; flex-direction: row; }
.toolcard--wide .toolcard__media { flex: 0 0 44%; aspect-ratio: auto; min-height: 100%; }
.toolcard--wide .toolcard__body { padding: 32px 30px 26px 46px; }
.toolcard--wide .toolcard__body > .orb { left: -30px; top: 30px; }
.toolcard--wide .ticks { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 20px; }
.tools-note { margin-top: 28px; }

/* The worked example in the page opening: a risk map, drawn in markup. */
.specimen { margin: 0; padding: 26px 28px 22px; border-radius: var(--r-lg); background: #fff; color: var(--body); box-shadow: 0 40px 80px -30px rgba(2, 12, 24, .7); }
.specimen__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.specimen__head b { font-size: 17px; font-weight: 600; color: var(--ink); }
.specimen .hm { margin-inline: auto; }
.specimen figcaption { margin-top: 16px; font-size: 13.5px; line-height: 1.55; color: var(--muted); }

.keep { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 70px); align-items: center; }
.keep h2 { margin: 18px 0 14px; }
.keep .photo { margin-top: 28px; aspect-ratio: 16 / 10; }
.keep__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.keep__grid .card h3 { margin-top: 18px; font-size: 19px; }
.keep__grid .card .orb { transition: transform .35s var(--ease); }
.keep__grid .card:hover .orb { transform: rotate(-8deg) scale(1.08); }

/* 2. The top of a tool page --------------------------------------------------- */
.phero--tool { padding-bottom: 96px; }
.phero--tool h1 { font-size: clamp(34px, 4vw, 54px); }
.phero__art { position: absolute; inset: 0 0 0 auto; z-index: -1; width: 62%; height: 100%; max-width: none; object-fit: cover; opacity: .34; mix-blend-mode: luminosity; pointer-events: none; -webkit-mask-image: linear-gradient(90deg, transparent, #000 55%); mask-image: linear-gradient(90deg, transparent, #000 55%); }
.tool-brief { padding: 28px 30px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .06); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.tool-brief summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px; cursor: pointer; list-style: none; }
.tool-brief summary::-webkit-details-marker { display: none; }
.tool-brief summary .ico { color: var(--green); transition: transform .2s var(--ease); }
.tool-brief[open] summary { margin-bottom: 18px; }
.tool-brief[open] summary .ico { transform: rotate(180deg); }
.tool-brief h2 { font-size: 20px; color: #fff; }
.tool-brief ol { display: grid; gap: 14px; counter-reset: brief; }
.tool-brief li { counter-increment: brief; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; align-items: start; font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .86); }
.tool-brief li::before { content: counter(brief); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: var(--navy-900); font-size: 15px; font-weight: 700; }
.tool-brief dl { display: grid; gap: 10px; margin: 22px 0 0; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .14); font-size: 14.5px; line-height: 1.5; }
.tool-brief dt { font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--green); }
.tool-brief dd { margin: 2px 0 0; color: rgba(255, 255, 255, .82); }

/* 3. The run bar: what this run is called, what the tool is doing, what to do next ---- */
.tool { position: relative; background: var(--soft); }
.tool-bar { position: sticky; top: var(--tool-top); z-index: 30; margin-top: -38px; }
.tool-bar__in { display: flex; align-items: center; gap: 10px 18px; min-height: 64px; padding: 9px 14px; border: 1px solid var(--line-2); border-radius: 6px; background: #fff; }
.tool-bar__status { flex: none; display: inline-flex; align-items: center; gap: 7px; max-width: 250px; font-size: 13px; font-weight: 600; line-height: 1.3; color: var(--body); }
.tool-bar__status::before { content: ""; flex: none; width: 5px; height: 5px; border-radius: 50%; background: var(--muted); }
.tool-bar__status[data-state="working"]::before { background: var(--warn-ink); }
.tool-bar__status[data-state="saved"] { color: var(--green-700); }
.tool-bar__status[data-state="saved"]::before { background: var(--green-700); }
.tool-bar__status[data-state="error"] { color: var(--bad-ink); }
.tool-bar__status[data-state="error"]::before { background: var(--bad-ink); }
.tool-bar__name { flex: 1 1 200px; display: flex; align-items: center; gap: 12px; min-width: 0; padding-left: 22px; border-left: 1px solid var(--line); }
.tool-bar__name label { flex: none; font-size: 13px; font-weight: 500; color: var(--body); }
.tool-bar__name input { flex: 1; min-width: 0; height: 44px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; box-shadow: inset 0 0 0 1.5px transparent; font-size: 16px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); text-overflow: ellipsis; outline: none; transition: box-shadow .2s, background .2s; }
.tool-bar__name input::placeholder { color: var(--muted); font-weight: 500; opacity: 1; }
.tool-bar__name input:hover { background: var(--soft); }
.tool-bar__name input:focus { background: #fff; box-shadow: inset 0 0 0 2px var(--green-600), 0 0 0 4px rgba(140, 198, 63, .22); }
.tool-bar__actions { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tool .btn { border-radius: 6px; }
.tool .btn:hover { transform: none; box-shadow: none; }
.tool-bar__actions .btn { padding-inline: 12px; gap: 8px; }
.tool-reset, .tool-delete { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 12px; border-radius: 4px; font-size: 14px; font-weight: 600; color: var(--muted); transition: color .2s, background .2s; }
.tool-reset:hover, .tool-delete:hover { color: var(--bad-ink); background: var(--bad-wash); }
.tool-delete { color: var(--bad-ink); padding-left: 0; }
.tool-delete:hover { padding-left: 14px; }

/* 4. The working area ------------------------------------------------------------ */
.tool__work { padding: 12px 0 clamp(56px, 7vw, 88px); }
.tool-sec { padding-top: clamp(36px, 4.4vw, 54px); }
.tool [data-editor], .tool [data-step], .tool [data-result], .tool h2[tabindex="-1"] { scroll-margin-top: 74px; }
.tool-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px 40px; align-items: end; margin-bottom: 22px; }
.tool-head__title { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: start; }
.tool-head h2 { font-size: clamp(24px, 2.3vw, 31px); padding-top: 4px; }
.tool-head h2[data-editor-mode] { text-transform: capitalize; }
.tool-head p { margin: 7px 0 0; max-width: 72ch; font-size: 15px; line-height: 1.6; }
.tool-head p + p { margin-top: 4px; }
.tool .card { box-shadow: 0 1px 2px rgba(7, 32, 58, .04), inset 0 0 0 1px var(--line); }
.tool .card + .card, .tool .card + .table-wrap, .tool .table-wrap + .card { margin-top: 20px; }
.tool-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; margin-bottom: 22px; }
.tool-card__head h3 { font-size: 20px; }
.tool-note { margin: 0; max-width: 80ch; font-size: 14.5px; line-height: 1.6; color: var(--body); }
.tool-note + .tool-note { margin-top: 8px; }
.tool-note b { font-weight: 600; color: var(--ink); }
.tool-foot { margin: 14px 4px 0; font-size: 14px; line-height: 1.55; color: var(--muted); }
.tool-label { margin: 0 0 12px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tool .notice b { display: inline; font-weight: 700; }
.tool .notice > span { min-width: 0; }
.tool .empty { padding: 44px 24px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); border-radius: var(--r); }
.tool .empty p { max-width: 58ch; margin-inline: auto; }
.tool .empty .form__actions { justify-content: center; margin-top: 22px; }

/* A control that sits beside a heading: appetite, audit days, cohort size. */
.tool-ctl { display: block; width: 340px; max-width: 100%; padding: 14px 18px 10px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.tool-ctl > span:first-child { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 14px; font-weight: 600; color: var(--ink); }
.tool-ctl .tool-ctl__note { display: block; font-size: 13px; color: var(--muted); }
.tool output { font-weight: 700; font-variant-numeric: tabular-nums; color: var(--green-700); white-space: nowrap; }
.tool input[type="range"] { display: block; width: 100%; height: 30px; margin: 2px 0 0; padding: 0; background: none; accent-color: var(--green-700); cursor: pointer; }

/* 5. Figures: the four numbers above a register ------------------------------------ */
.tool-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.tool-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-stat { position: relative; padding: 22px 22px 20px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; transition: transform .3s var(--ease), box-shadow .3s; }
.tool-stat::before { content: ""; position: absolute; left: 22px; top: 0; width: 44px; height: 3px; border-radius: 0 0 3px 3px; background: var(--green); transition: width .4s var(--ease); }
.tool-stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-1), inset 0 0 0 1px transparent; }
.tool-stat:hover::before { width: 84px; }
.tool-stat__label { display: block; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.tool-stat b { display: block; margin-top: 10px; font-size: 36px; font-weight: 600; line-height: 1.05; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tool-stat b small { margin-left: 4px; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.tool-stat b.is-text { font-size: 24px; letter-spacing: -.015em; padding: 6px 0; }
.tool-stat > span:last-child { display: block; margin-top: 8px; font-size: 13.5px; line-height: 1.45; color: var(--body); }
.tool-stats--inset { margin: 0 0 22px; }
.tool-stats--inset .tool-stat { background: var(--soft); box-shadow: none; }
.tool-stats--last { margin: 24px 0 0; }

/* 6. Forms and controls ---------------------------------------------------------- */
.tool .label { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 2px 10px; }
.tool .label small, .tool-save .label small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tool-form { padding: clamp(22px, 3vw, 34px); }
.tool-grid { display: grid; gap: 18px; }
.tool-grid + .tool-grid, .tool-form > * + * { margin-top: 18px; }
.tool-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tool-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tool-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tool-grid--tier { grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); }
.tool-grid--3 > .field--wide { grid-column: span 2; }
.tool-grid--row { grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr) minmax(0, 1fr) auto; align-items: end; padding: 16px 18px; border-radius: 14px; background: var(--soft); }
.tool-grid--row + .tool-grid--row { margin-top: 10px; }
.tool-grid--row .btn { min-height: 52px; }
.tool-form hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0 22px; }
.tool-form-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 18px; margin: 0 0 16px; }
.tool-form-head h3 { font-size: 18px; }
.tool-form-head h3 small { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; line-height: 1.5; color: var(--muted); letter-spacing: 0; }
.tool-form details summary { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--ink); list-style: none; }
.tool-form details summary::-webkit-details-marker { display: none; }
.tool-form details summary::before { content: "+"; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-100); color: var(--navy-900); font-size: 18px; font-weight: 600; line-height: 1; }
.tool-form details[open] summary::before { content: "\2212"; background: var(--green); }
.tool-form details summary:hover { color: var(--green-700); }
.tool-form details[open] summary { margin-bottom: 12px; }
.tool-form details .tool-note { margin-top: 12px; }
.tool-form-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--line); }
.tool-form-foot .form__actions { margin-left: auto; }
.tool-need { font-size: 14.5px; color: var(--body); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool-need.is-high { font-weight: 700; color: var(--ink); }

/* A small set of choices: which positions the map shows, how strong the evidence is. */
.tool-seg { display: inline-flex; flex-wrap: wrap; gap: 3px; min-width: 0; margin: 0; padding: 3px; border: 0; border-radius: 6px; background: var(--navy-50); }
.tool-seg label { position: relative; display: block; }
.tool-seg input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tool-seg label > span { display: flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 4px; font-size: 14px; font-weight: 600; color: var(--body); white-space: nowrap; transition: background .2s, color .2s; }
.tool-seg label > span small { font-size: 12.5px; font-weight: 400; color: var(--muted); }
.tool-seg label:hover > span { color: var(--ink); }
.tool-seg input:checked + span { background: var(--navy-900); color: #fff; }
.tool-seg input:checked + span small { color: rgba(255, 255, 255, .72); }
.tool-seg input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 2px; }

/* 7. Tables: a register, a plan, a map of cells ------------------------------------- */
.tool-table th { background: var(--navy-50); color: var(--navy-800); }
.tool-table td { vertical-align: top; }
.tool-table td.num:not(.r) { text-align: left; }
.tool-table td.wide { min-width: 220px; }
.tool-table td b, .tool-table td .title { font-weight: 600; color: var(--ink); }
.tool-table td b a { color: inherit; text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tool-table td b a:hover { color: var(--green-700); }
.tool-table .sub { display: block; margin-top: 3px; font-size: 13.5px; font-weight: 400; line-height: 1.5; color: var(--muted); }
.tool-table .r { text-align: right; }
.tool-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.tool-table td.act { width: 1%; text-align: right; white-space: nowrap; }
.tool-table td.rank { width: 1%; font-weight: 700; color: var(--green-700); font-variant-numeric: tabular-nums; }
.tool-table td.rate, .tool-table td.closes { white-space: nowrap; }
.tool-table .btn--sm { min-height: 38px; padding: 0 16px; }
.tool-rk { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 14px; align-items: start; }
.tool-table td .tool-ref, .tool-ref { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--navy-900); color: #fff; font-size: 13px; font-weight: 700; }
.tool-li { margin-right: 8px; font-size: 13.5px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rating { display: inline-grid; place-items: center; min-width: 30px; min-height: 24px; padding: 2px 6px; border-radius: 4px; font-size: 13px; font-weight: 700; line-height: 1.4; color: var(--navy-900); font-variant-numeric: tabular-nums; white-space: nowrap; }
.rating.b4 { color: #fff; }
.rating.over { outline: 1px solid var(--bad-ink); outline-offset: 2px; }
.tool-over { display: block; margin-top: 7px; font-size: 12.5px; font-weight: 700; line-height: 1.3; color: var(--bad-ink); white-space: nowrap; }

/* Cells shaded on a scale: an assurance quality, or the levels a group is short. */
.tool-heat { display: block; min-width: 64px; padding: 6px 10px; border-radius: 4px; text-align: center; font-size: 13.5px; font-weight: 700; line-height: 1.4; color: var(--navy-900); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tool-heat.b4 { color: #fff; }
.tool-heat.is-none { background: none; box-shadow: inset 0 0 0 1.5px var(--line-2); color: var(--muted); font-weight: 500; }
.tool-heat.is-met { background: var(--green-50); box-shadow: inset 0 0 0 1px #D5E8B5; color: var(--green-700); font-weight: 600; }
.tool-table--quality .tool-heat.b1 { background: var(--green-100); color: var(--green-700); }
.tool-table--quality .tool-heat.b2 { background: var(--green); color: var(--navy-900); }
.tool-table--quality .tool-heat.b3 { background: var(--green-700); color: #fff; }
.tool-table--heat td { vertical-align: middle; }
.tool-table--heat td.cell, .tool-table--heat th.cell { padding-left: 5px; padding-right: 5px; text-align: center; }
.tool-table--groups thead th { white-space: normal; vertical-align: bottom; }
.tool-th { display: inline-block; max-width: 100%; padding: 4px 6px; border-radius: 8px; text-align: center; font-size: 13.5px; font-weight: 600; line-height: 1.3; letter-spacing: 0; text-transform: none; color: var(--ink); transition: background .2s, color .2s; }
.tool-th span { text-decoration: underline; text-decoration-color: var(--green); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tool-th:hover { background: var(--green-100); color: var(--green-700); }
.tool-th small { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.tool-ramp { display: inline-flex; align-items: center; gap: 3px; margin-right: 8px; vertical-align: middle; }
.tool-ramp i { width: 22px; height: 12px; border-radius: 4px; }
.tool-form .table-wrap { margin-top: 24px; }
.tool-table--form td { vertical-align: middle; padding-top: 10px; padding-bottom: 10px; }
.tool-table--form .select { min-height: 44px; padding-top: 9px; padding-bottom: 9px; min-width: 190px; }

/* 8. The map: likelihood against impact ------------------------------------------- */
.hm { display: grid; grid-template-columns: 20px auto; gap: 8px 10px; align-items: center; width: max-content; max-width: 100%; }
.hm__y, .hm__x { font-size: 12px; font-weight: 600; line-height: 1; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hm__y { writing-mode: vertical-rl; transform: rotate(180deg); text-align: center; }
.hm__x { grid-column: 2; text-align: center; padding-left: 22px; }
.hm__grid { display: grid; grid-template-columns: 18px repeat(5, 58px); grid-template-rows: repeat(5, 58px) 20px; gap: 5px; }
.hm__n { display: grid; place-items: center; font-size: 13px; line-height: 1.2; color: var(--muted); font-variant-numeric: tabular-nums; }
.hm__n small { display: block; font-size: 12px; color: var(--muted); }
.hm__n b { font-weight: 700; color: var(--ink); }
.hm__c { position: relative; display: flex; flex-wrap: wrap; align-content: center; align-items: center; justify-content: center; gap: 3px; padding: 14px 3px 3px; border-radius: 10px; }
.hm__c > i { position: absolute; top: 5px; left: 7px; font-style: normal; font-size: 11.5px; font-weight: 600; line-height: 1; color: rgba(7, 32, 58, .58); font-variant-numeric: tabular-nums; }
.hm__c.b4 > i { color: rgba(255, 255, 255, .88); }
.hm__c.al::before, .hm__c.ab::after { content: ""; position: absolute; z-index: 1; border-radius: 3px; background: var(--navy-900); }
.hm__c.al::before { left: -4px; top: -4px; bottom: -4px; width: 3px; }
.hm__c.t0::before { top: 0; }
.hm__c.ab::after { left: -4px; right: -4px; bottom: -4px; height: 3px; }
.hm__c > b, .tool-dot { flex: none; display: grid; place-items: center; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--navy-900); color: #fff; font-size: 12px; font-weight: 700; line-height: 1; box-shadow: 0 0 0 2px rgba(255, 255, 255, .9); }
.tool-dot { cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.tool-dot--inherent { background: #fff; color: var(--navy-900); box-shadow: inset 0 0 0 2px var(--navy-900); }
.tool-dot:hover { transform: scale(1.18); box-shadow: 0 0 0 2px #fff, 0 6px 14px rgba(4, 20, 36, .35); }
.tool-dot--inherent:hover { box-shadow: inset 0 0 0 2px var(--navy-900), 0 6px 14px rgba(4, 20, 36, .35); }
.tool-cell__dots { display: contents; }
.hm-key { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 16px; font-size: 13.5px; color: var(--body); }
.hm-key span { display: inline-flex; align-items: center; gap: 8px; }
.hm-key .k-dot { width: 15px; height: 15px; border-radius: 50%; background: var(--navy-900); }
.hm-key .k-ring { width: 15px; height: 15px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--navy-900); }
.hm-key .k-line { width: 22px; height: 3px; border-radius: 3px; background: var(--navy-900); }
.tool-map { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: clamp(28px, 4vw, 52px); align-items: start; }
.tool-map figure { margin: 0; min-width: 0; }
.tool-map .hm__grid { grid-template-columns: 104px repeat(5, 78px); grid-template-rows: repeat(5, minmax(68px, auto)) auto; }
.tool-map .hm__n--y { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding-right: 8px; text-align: right; }
.tool-map .hm__n--x { display: block; padding-top: 8px; text-align: center; }
.tool-map .hm__x { padding-left: 108px; }
.tool-map .hm__c { padding: 20px 4px 6px; transition: filter .2s; }
.tool-map .hm__c:hover { filter: brightness(1.06) saturate(1.1); }
.tool-map-side > * + * { margin-top: 16px; }
.tool-scale-words { display: none; }

/* 9. Findings: what the arithmetic turns up ------------------------------------------ */
.tool-findings { display: grid; gap: 0; border-top: 1px solid var(--line-2); }
.tool-finding { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 14px; align-items: start; padding: 16px 0; border-bottom: 1px solid var(--line-2); }
.tool-finding .chip { justify-self: start; }
.tool-finding h3 { font-size: 16.5px; line-height: 1.4; }
.tool-finding p { margin: 4px 0 0; max-width: 80ch; font-size: 14.5px; line-height: 1.6; }
.tool-findings--wide .tool-finding { grid-template-columns: 88px minmax(0, 1fr); }

/* 10. Charts: drawn at the size they are shown, so type stays type -------------------- */
.tool-chart, .tool-depmap { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.tool-chart__grid { stroke: var(--line); stroke-width: 1; shape-rendering: crispEdges; }
.tool-chart__grid.is-base { stroke: var(--line-2); stroke-width: 1.5; }
.tool-chart__tick { fill: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.tool-chart__title { fill: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }
.tool-chart__area { fill-opacity: .1; }
.tool-chart__line { fill: none; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
.tool-chart__point { stroke: #fff; stroke-width: 2; }
.tool-chart__marker { stroke: var(--sev-3); stroke-width: 2; stroke-dasharray: 6 5; }
.tool-chart__label { fill: #A8500F; font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.tool-key { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 16px 0 0; font-size: 14px; line-height: 1.4; color: var(--body); }
.tool-key > span, .tool-key > div { display: inline-flex; align-items: center; gap: 9px; }
.tool-swatch { flex: none; width: 22px; height: 0; border-top: 3px solid currentColor; border-radius: 3px; color: var(--navy-700); }
.tool-swatch.is-dashed { border-top-style: dashed; }
.tool-swatch--node { width: 14px; height: 14px; border: 0; border-radius: 50%; background: currentColor; }
.tool-swatch--ring { width: 14px; height: 14px; border: 2.5px solid var(--green-600); border-radius: 50%; background: #fff; }
.tool-key + .tool-note { margin-top: 16px; }
.tool-depmap__link { fill: none; stroke: #A9BDD2; stroke-width: 1.5; }
.tool-depmap__link.is-conflict { stroke: var(--sev-4); stroke-width: 2; stroke-dasharray: 6 5; }
.tool-depmap__node text { fill: var(--ink); font-size: 13.5px; }
.tool-depmap.is-narrow .tool-depmap__node text { font-size: 12px; }
.tool-depmap__node.is-process circle { fill: var(--navy-600); }
.tool-depmap__node.is-tier1 circle { fill: var(--navy-900); }
.tool-depmap__node.is-dep circle { fill: #fff; stroke: var(--green-600); stroke-width: 2.5; }
.tool-depmap__node.is-spof circle { fill: var(--sev-3); stroke: none; }
.tool-depmap__node.is-process text { font-weight: 600; }
.tool-depmap__node.is-spof text { fill: #A8500F; font-weight: 700; }
.tool-depmap__head { fill: var(--muted); font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; }

/* 11. The maturity benchmark ---------------------------------------------------------- */
/* Once there is a result it comes first; the answers follow, to be reviewed. */
.tool--maturity .tool__work:has(> [data-result]:not([hidden])) { display: flex; flex-direction: column; }
.tool--maturity .tool__work:has(> [data-result]:not([hidden])) > .tool-assess { order: 2; }

.tool-assess__grid { display: grid; grid-template-columns: 310px minmax(0, 1fr); gap: 24px; align-items: start; }
.tool-nav { position: sticky; top: calc(var(--tool-top) + 96px); padding: 22px 16px 14px; }
.tool-count { margin: 0 8px; font-size: 14px; font-weight: 600; line-height: 1.45; color: var(--ink); font-variant-numeric: tabular-nums; }
.tool-progress { height: 8px; margin: 12px 8px 14px; border-radius: 8px; background: var(--navy-50); overflow: hidden; }
.tool-progress span { display: block; height: 100%; border-radius: 8px; background: var(--green); transition: width .5s var(--ease); }
.tool-steps { counter-reset: dim; display: grid; gap: 2px; }
.tool-steps li { counter-increment: dim; }
.tool-steps button { display: grid; grid-template-columns: 28px minmax(0, 1fr) 20px; gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 0 10px 0 8px; border-radius: 999px; text-align: left; font-size: 14.5px; line-height: 1.2; color: var(--body); transition: background .2s, color .2s; }
.tool-steps button::before { content: counter(dim); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--navy-50); color: var(--navy-700); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; transition: background .2s, color .2s; }
.tool-steps button:hover { background: var(--green-50); color: var(--ink); }
.tool-steps strong { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-steps i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-2); }
.tool-steps .is-done i { box-shadow: none; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307203A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.500 10 16.500 18 8'/%3E%3C/svg%3E") center / 13px no-repeat; }
.tool-steps .is-done button::before { background: var(--green-100); color: var(--green-700); }
.tool-steps .is-active button { background: var(--navy-900); color: #fff; }
.tool-steps .is-active strong { font-weight: 600; }
.tool-steps .is-active button::before { background: var(--green); color: var(--navy-900); }
.tool-steps .is-active:not(.is-done) i { box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); }

.tool-q-card { padding: clamp(24px, 3vw, 38px); }
.tool-q-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 8px 24px; }
.tool-q-head h3 { margin-top: 12px; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.015em; }
.tool-q-head .muted { margin: 0; font-size: 14px; }
.tool-q { margin: 16px 0 0; max-width: 48em; font-size: 18px; line-height: 1.6; color: var(--ink); }
.tool-scale { min-width: 0; margin: 26px 0 0; padding: 0; border: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tool-scale legend, .tool-choice legend { padding: 0 0 12px; font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.tool-scale label { position: relative; display: block; }
.tool-scale input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.tool-scale label > span { display: block; height: 100%; min-height: 132px; padding: 16px 16px 18px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 1.5px var(--line-2); transition: background .25s, box-shadow .25s, transform .25s var(--ease), color .25s; }
.tool-scale b { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--green-100); color: var(--green-700); font-size: 17px; font-weight: 700; transition: background .25s, color .25s; }
.tool-scale strong { display: block; margin-top: 14px; font-size: 16px; font-weight: 600; line-height: 1.25; color: var(--ink); transition: color .25s; }
.tool-scale small { display: block; margin-top: 4px; font-size: 13.5px; line-height: 1.4; color: var(--muted); transition: color .25s; }
.tool-scale label:hover > span { box-shadow: inset 0 0 0 2px var(--green-600); transform: translateY(-3px); }
.tool-scale input:checked + span { background: var(--navy-900); box-shadow: 0 14px 30px -12px rgba(7, 32, 58, .55); transform: translateY(-3px); }
.tool-scale input:checked + span b { background: var(--green); color: var(--navy-900); }
.tool-scale input:checked + span strong { color: #fff; }
.tool-scale input:checked + span small { color: rgba(255, 255, 255, .74); }
.tool-scale input:focus-visible + span { outline: 3px solid var(--sky); outline-offset: 3px; }
.tool-evidence { display: grid; grid-template-columns: minmax(0, 1fr) max-content; gap: 16px 36px; align-items: center; margin-top: 22px; padding: 20px 24px; border-radius: 14px; background: var(--soft); }
.tool-evidence p { margin: 0; max-width: 56ch; font-size: 15px; line-height: 1.55; }
.tool-evidence p.tool-label { margin-bottom: 8px; font-size: 12.5px; }
.tool-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.tool-choice .tool-seg { background: #fff; box-shadow: inset 0 0 0 1px var(--line); border-radius: 18px; }
.tool-choice .tool-seg label > span { min-height: 52px; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; padding: 6px 18px; border-radius: 14px; line-height: 1.25; }
.tool-step-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }

/* The result: a figure, a band and where the figure sits among the bands. */
.tool-score { --score: 0; --peer: 0; display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 28px clamp(28px, 4vw, 56px); align-items: center; padding: clamp(26px, 3.4vw, 44px); border-radius: var(--r-lg); background: linear-gradient(120deg, var(--navy-950), var(--navy-700)); color: rgba(255, 255, 255, .82); position: relative; overflow: hidden; isolation: isolate; }
.tool-score::before { content: ""; position: absolute; right: -8%; top: -60%; z-index: -1; width: 56%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(140, 198, 63, .22), transparent); }
.tool-score__fig { display: grid; justify-items: center; gap: 14px; }
.tool-score__ring { position: relative; display: grid; place-items: center; align-content: center; width: 196px; aspect-ratio: 1; border-radius: 50%; background: conic-gradient(var(--green) calc(var(--score) * 1%), rgba(255, 255, 255, .13) 0); }
.tool-score__ring::before { content: ""; position: absolute; inset: 15px; border-radius: 50%; background: var(--navy-900); }
.tool-score__ring strong, .tool-score__ring span { position: relative; }
.tool-score__ring strong { font-size: 68px; font-weight: 600; line-height: .95; letter-spacing: -.04em; color: #fff; font-variant-numeric: tabular-nums; }
.tool-score__ring span { margin-top: 4px; font-size: 13.5px; color: rgba(255, 255, 255, .7); }
.tool-score h3 { color: #fff; font-size: clamp(22px, 2.3vw, 30px); letter-spacing: -.015em; }
.tool-score h3 + p { margin: 12px 0 0; max-width: 62ch; font-size: 16.5px; line-height: 1.65; color: rgba(255, 255, 255, .88); }
.tool-score .tool-note { margin-top: 12px; color: rgba(255, 255, 255, .66); }
.tool-bands { position: relative; grid-column: 1 / -1; padding-top: 30px; }
.tool-bands__track { position: relative; display: flex; gap: 4px; height: 14px; }
.tool-bands__track span { display: block; min-width: 0; border-radius: 4px; }
.tool-bands__track span:first-child { border-radius: 8px 4px 4px 8px; }
.tool-bands__track span:last-of-type { border-radius: 4px 8px 8px 4px; }
.tool-bands__track .m0 { background: var(--sev-4); }
.tool-bands__track .m1 { background: var(--sev-3); }
.tool-bands__track .m2 { background: var(--sev-2); }
.tool-bands__track .m3 { background: var(--sev-1); }
.tool-bands__track .m4 { background: var(--sev-0); }
.tool-bands__you, .tool-bands__peer { position: absolute; top: -8px; bottom: -8px; width: 0; font-style: normal; }
.tool-bands__you { left: calc(var(--score) * 1%); border-left: 3px solid #fff; margin-left: -1.5px; border-radius: 3px; transition: left .6s var(--ease); }
.tool-bands__you::after { content: attr(data-label); position: absolute; bottom: calc(100% + 6px); left: 0; transform: translateX(-50%); padding: 2px 6px; border-radius: 4px; background: #fff; color: var(--navy-900); font-size: 12.5px; font-weight: 700; line-height: 1.4; white-space: nowrap; }
.tool-bands__peer { display: none; left: calc(var(--peer) * 1%); border-left: 2px dashed var(--sky); margin-left: -1px; }
.tool-bands[data-peer] .tool-bands__peer, [data-peer] .tool-bands__peer { display: block; }
.tool-bands__names { display: flex; gap: 4px; margin-top: 12px; font-size: 12.5px; line-height: 1.35; color: rgba(255, 255, 255, .6); }
.tool-bands__names li { min-width: 0; padding: 0 6px 0 2px; font-variant-numeric: tabular-nums; }
.tool-bands__names b { display: block; font-weight: 600; color: rgba(255, 255, 255, .86); overflow: hidden; text-overflow: ellipsis; }
.tool-bands__names li.is-on b { color: var(--green); }

/* Scores by dimension. */
.tool-meters { display: grid; gap: 4px; padding: 16px 28px; }
.tool-meter { display: grid; grid-template-columns: 170px minmax(0, 1fr) 40px; gap: 18px; align-items: center; padding: 11px 0; font-size: 15px; line-height: 1.3; }
.tool-meter + .tool-meter { border-top: 1px solid var(--line); }
.tool-meter strong { font-weight: 600; color: var(--ink); }
.tool-meter__track { position: relative; display: block; height: 12px; border-radius: 12px; background: var(--navy-50); overflow: hidden; }
.tool-meter__fill { display: block; height: 100%; border-radius: 12px; background: var(--sev-0); transform-origin: 0 50%; animation: tool-grow .8s var(--ease) both; }
.tool-meter[data-tone="low"] .tool-meter__fill { background: var(--sev-4); }
.tool-meter[data-tone="mid"] .tool-meter__fill { background: var(--sev-2); }
@keyframes tool-grow { from { transform: scaleX(0); } }
.tool-meter__value { text-align: right; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tool-ranks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.tool-ranks > .card + .card { margin-top: 0; }
.tool-ranks h3 { display: flex; align-items: center; gap: 12px; font-size: 18px; }
.tool-ranks ol { margin-top: 14px; }
.tool-ranks li { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.35; }
.tool-ranks li b { font-weight: 500; color: var(--ink); }
.tool-ranks li em { font-style: normal; min-width: 32px; padding: 2px 0; text-align: right; font-weight: 700; color: var(--navy-800); font-variant-numeric: tabular-nums; }
.tool-ranks .is-high li em { color: var(--green-700); }
.tool-ranks .is-low li em { color: var(--bad-ink); }

/* The peer comparison. */
.tool-peer { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 18px 44px; align-items: center; }
.tool-peer h3 { font-size: clamp(20px, 2vw, 26px); }
.tool-peer p { margin: 10px 0 0; max-width: 64ch; font-size: 15.5px; line-height: 1.65; }
.tool-peer p:empty { display: none; }
.tool-dist svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.tool-distribution__curve { fill: var(--green-100); stroke: var(--green-600); stroke-width: 1.5; }
.tool-distribution__median { stroke: var(--sev-3); stroke-width: 2; stroke-dasharray: 5 4; }
.tool-distribution__you { stroke: var(--navy-900); stroke-width: 2.5; }
.tool-distribution__label { fill: var(--navy-900); font-size: 12.5px; font-weight: 700; paint-order: stroke; stroke: #fff; stroke-width: 4px; stroke-linejoin: round; }
.tool-distribution__label--muted { fill: #A8500F; }
.tool-peer + .notice { margin-top: 18px; }

/* The roadmap: what to do, by when. */
.tool-roadmap { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.tool-roadmap__col { padding: 26px 26px 22px; border-radius: var(--r); background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.tool-roadmap__col:hover { transform: translateY(-4px); box-shadow: var(--shadow-1), inset 0 0 0 1px transparent; }
.tool-roadmap__col header { display: flex; align-items: baseline; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); font-size: 15px; font-weight: 600; color: var(--body); }
.tool-roadmap__col header strong { font-size: 44px; font-weight: 600; line-height: 1; letter-spacing: -.03em; color: var(--green-600); font-variant-numeric: tabular-nums; }
.tool-roadmap__col li { position: relative; padding: 16px 0 0 34px; font-size: 14.5px; line-height: 1.6; }
.tool-roadmap__col li::before { content: ""; position: absolute; left: 0; top: 17px; width: 22px; height: 22px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2307203A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.500 10 16.500 18 8'/%3E%3C/svg%3E") center / 14px no-repeat; }
.tool-roadmap__col li b { display: block; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.tool-roadmap__col li span { display: block; margin-top: 2px; }

/* 12. The save panel ---------------------------------------------------------------- */
.tool-save { background: #fff; padding: clamp(56px, 7vw, 96px) 0; }
.tool-save__grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 4.4vw, 64px); align-items: start; }
.tool-save__intro { position: sticky; top: calc(var(--tool-top) + 100px); }
.tool-save__intro h2 { margin: 18px 0 14px; font-size: clamp(28px, 3vw, 40px); }
.tool-save__intro .photo { margin-top: 26px; aspect-ratio: 16 / 10; }
.tool-save__intro .ticks { margin-top: 22px; font-size: 15px; }
.tool-kept { display: grid; gap: 14px; margin: 0 0 24px; padding: 20px 22px; border-radius: var(--r); background: var(--green-50); box-shadow: inset 0 0 0 1px #D5E8B5; }
.tool-kept:not(:has(> :not([hidden]))) { display: none; }
.tool-kept p { margin: 0; }
.tool-share { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.tool-share .field { min-width: 0; }
.tool-share .btn { min-height: 52px; }
.tool-account { padding: 20px 22px; border-radius: var(--r); background: var(--soft); }
.tool-account .field__hint { margin: 10px 0 0; line-height: 1.55; }
.tool-account .field__hint a, .tool-save .notice a { color: var(--green-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.tool-save .notice > span { min-width: 0; }
.tool-save__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-top: 22px; border-top: 1px solid var(--line); }
.tool-save__foot .muted { margin: 0; font-size: 14px; }

/* 13. The printable report ------------------------------------------------------------ */
.phero--report { padding-bottom: 150px; }
.phero--report h1 { font-size: clamp(32px, 3.8vw, 50px); }
.rp-wrap { background: var(--soft); padding: 0 0 clamp(56px, 7vw, 96px); }
.rp { position: relative; z-index: 2; width: min(100% - 2 * var(--gutter), 1000px); margin: 0 auto; top: -84px; margin-bottom: -84px; padding: clamp(26px, 4.6vw, 60px); border-radius: var(--r-lg); background: #fff; box-shadow: var(--shadow-2); }
.rp-mast { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-bottom: 24px; border-bottom: 3px solid var(--green); }
.rp-mast img { width: 210px; height: auto; }
.rp-mast p { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--muted); text-align: right; }
.rp-mast p b { display: block; font-size: 14.5px; font-weight: 600; color: var(--ink); }
.rp-head { padding-top: 30px; }
.rp-head h2 { margin-top: 16px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.02em; overflow-wrap: anywhere; }
.rp-headline { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; font-size: 19px; font-weight: 500; line-height: 1.45; color: var(--ink); }
.rp-headline .orb { align-self: flex-start; }
.rp-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 28px 0 0; }
.rp-facts > div { padding: 16px 18px; border-radius: 14px; background: var(--soft); }
.rp-facts dt { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.rp-facts dt .ico { font-size: 16px; color: var(--green-600); }
.rp-facts dd { margin: 6px 0 0; font-size: 15.5px; font-weight: 600; line-height: 1.4; color: var(--ink); overflow-wrap: anywhere; }
.rp-section { margin-top: 42px; }
.rp-section h3 { display: flex; align-items: center; gap: 12px; font-size: 22px; letter-spacing: -.012em; padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
.rp-section h3::before { content: ""; flex: none; width: 10px; height: 26px; border-radius: 5px; background: var(--green); }
.rp-section > p { margin: 14px 0 0; max-width: 72ch; }
.rp-section > p a { color: var(--green-700); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.rp-list { margin: 0; }
.rp-list > div { display: grid; grid-template-columns: 270px minmax(0, 1fr); gap: 22px; padding: 13px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; line-height: 1.55; }
.rp-list dt { color: var(--body); }
.rp-list dd { margin: 0; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.rp-list dd.is-long { font-weight: 400; color: var(--body); }
.rp-scroll { overflow-x: auto; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 14.5px; line-height: 1.5; }
.rp-table thead th { padding: 14px 16px 10px 0; border-bottom: 1px solid var(--line-2); vertical-align: bottom; text-align: left; font-size: 12.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.rp-table tbody th, .rp-table td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; text-align: left; }
.rp-table tbody th { font-weight: 600; color: var(--ink); min-width: 170px; }
.rp-table th:last-child, .rp-table td:last-child { padding-right: 0; }
.rp-table td { font-variant-numeric: tabular-nums; }
.rp-table tbody tr { transition: background .15s; }
.rp-table tbody tr:hover { background: var(--green-50); }
.rp-table tr { break-inside: avoid; }
.rp-note { margin: 12px 0 0; max-width: 80ch; font-size: 14px; line-height: 1.55; color: var(--muted); }
.rp-foot { margin-top: 44px; padding: 20px 22px; border-radius: 14px; background: var(--soft); font-size: 14px; line-height: 1.6; color: var(--body); }
.rp-foot p { margin: 0; }
.rp-foot p + p { margin-top: 6px; font-weight: 600; color: var(--ink); }

/* 14. Responsive ---------------------------------------------------------------------- */
@media (max-width: 1180px) {
    .tool-map { grid-template-columns: minmax(0, 1fr); gap: 26px; }
    .tool-assess__grid { grid-template-columns: 270px minmax(0, 1fr); }
    .tool-scale label > span { padding-inline: 10px; }
    .tool-evidence { grid-template-columns: minmax(0, 1fr); }
    .tool-bar__status { max-width: 170px; }
    .tool-meter { grid-template-columns: 150px minmax(0, 1fr) 40px; }
}
@media (max-width: 1020px) {
    .toolcards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .keep, .tool-save__grid { grid-template-columns: minmax(0, 1fr); }
    .tool-save__intro { position: static; }
    .phero--tool { padding-bottom: 76px; }
    .phero__art { width: 100%; opacity: .2; -webkit-mask-image: linear-gradient(180deg, transparent, #000 60%); mask-image: linear-gradient(180deg, transparent, #000 60%); }

    /* The bar stops following: on a small screen the working area matters more. */
    .tool-bar { position: static; }
    .tool-bar__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 16px; padding: 12px 14px; }
    .tool-bar__name { grid-column: 1; grid-row: 1; padding-left: 0; border-left: 0; }
    .tool-bar__status { grid-column: 2; grid-row: 1; max-width: 190px; }
    .tool-bar__actions { grid-column: 1 / -1; grid-row: 2; }
    .tool [data-editor], .tool [data-step], .tool [data-result], .tool h2[tabindex="-1"] { scroll-margin-top: 0; }

    .tool-head { grid-template-columns: minmax(0, 1fr); align-items: start; }
    .tool-ctl { width: 100%; }
    .tool-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    /* The ten dimensions fold into two rows of five, all in reach. */
    .tool-assess__grid { grid-template-columns: minmax(0, 1fr); }
    .tool-nav { position: static; padding: 20px; }
    .tool-count, .tool-progress { margin-inline: 0; }
    .tool-steps { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
    .tool-steps button { display: block; min-height: 58px; padding: 8px 6px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line); text-align: center; font-size: 12.5px; }
    .tool-steps button::before { margin: 0 auto 4px; width: 24px; height: 24px; font-size: 12.5px; }
    .tool-steps i { display: none; }
    .tool-steps .is-done button { background: var(--green-50); box-shadow: inset 0 0 0 1px #D5E8B5; color: var(--green-700); }
    .tool-steps .is-active button { background: var(--navy-900); box-shadow: none; color: #fff; }
    .tool-peer { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 680px) {
    .toolcards { grid-template-columns: minmax(0, 1fr); }
    .toolcard--wide { grid-column: auto; flex-direction: column; }
    .toolcard--wide .toolcard__media { flex: none; aspect-ratio: 16 / 9; min-height: 0; }
    .toolcard--wide .toolcard__body { padding: 44px 22px 22px; }
    .toolcard--wide .toolcard__body > .orb { left: 22px; top: -30px; }
    .toolcard--wide .ticks { grid-template-columns: minmax(0, 1fr); }
    .toolcard__body { padding: 44px 22px 22px; }
    .keep__grid { grid-template-columns: minmax(0, 1fr); }
    .specimen { padding: 18px 16px 16px; }
    .hm { width: 100%; grid-template-columns: 16px minmax(0, 1fr); gap: 6px 8px; }
    .hm__grid { grid-template-columns: 14px repeat(5, minmax(0, 1fr)); grid-template-rows: none; grid-auto-rows: auto; gap: 4px; }
    .hm__c { aspect-ratio: 1; }
    .hm__c > b { width: 22px; height: 22px; font-size: 11px; }
    .hm__c.al::before { left: -3.5px; }
    .hm__c.ab::after { bottom: -3.5px; }

    .phero--tool { padding-bottom: 66px; }
    .tool-brief { padding: 22px 20px; }
    .tool-bar { margin-top: -30px; }
    .tool-bar__in { grid-template-columns: minmax(0, 1fr); padding: 16px; }
    .tool-bar__name { flex-wrap: wrap; gap: 4px 10px; }
    .tool-bar__name input { flex: 1 1 100%; padding: 0 14px; background: var(--soft); font-size: 16px; }
    .tool-bar__status { grid-column: 1; grid-row: 2; max-width: none; }
    .tool-bar__actions { grid-row: 3; }
    .tool-bar__actions .btn { flex: 1 1 auto; }
    .tool-head__title { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .tool-stats, .tool-stats--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tool-stat { padding: 18px 16px 16px; }
    .tool-stat::before { left: 16px; }
    .tool-stat b { font-size: 28px; }
    .tool-stat b.is-text { font-size: 19px; }
    .tool-grid--2, .tool-grid--3 { grid-template-columns: minmax(0, 1fr); }
    .tool-grid--4, .tool-grid--5, .tool-grid--row, .tool-grid--tier { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-grid--tier > :first-child, .tool-grid--row > :first-child { grid-column: 1 / -1; }
    .tool-grid--3 > .field--wide { grid-column: auto; }
    .tool-grid--row > .btn { grid-column: 1 / -1; width: 100%; min-height: 46px; }
    .tool-form-foot .btn, .tool-step-nav .btn { flex: 1 1 auto; }
    .tool-form-foot .form__actions { width: 100%; }
    .tool input[type="range"] { height: 44px; }
    .tool-seg label > span { min-height: 44px; padding: 0 14px; }
    .tool-card__head { margin-bottom: 18px; }

    /* A table becomes a list of records; data-l is each cell's label. */
    .tool-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .tool-table, .tool-table tbody { display: block; }
    .tool-table tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 14px; padding: 18px; }
    .tool-table tr + tr { border-top: 1px solid var(--line); }
    .tool-table td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; white-space: normal; }
    .tool-table .chip { padding: 2px 0; white-space: nowrap; }
    .tool-table td.wide, .tool-table td.act { grid-column: 1 / -1; min-width: 0; }
    .tool-table td.lead-cell { order: -1; }
    .tool-table td.r { text-align: left; }
    .tool-table td.rank, .tool-table td.act { width: auto; }
    .tool-table td.act .btn { width: 100%; min-height: 44px; }
    .tool-table td.rate, .tool-table td.closes { white-space: normal; }
    .tool-table td[data-l]::before { content: attr(data-l); display: block; margin-bottom: 4px; font-size: 12px; font-weight: 600; line-height: 1.3; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
    .tool-table--form tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); align-items: center; padding: 14px 0; }
    .tool-table--form .select { min-width: 0; }
    .tool-table--heat td.cell { padding: 0; text-align: left; }
    .tool-heat { text-align: left; }
    /* The groups become a row of names to open; the cells stack beneath. */
    .tool-table--groups thead { position: static; display: block; width: auto; height: auto; overflow: visible; clip: auto; }
    .tool-table--groups thead tr { display: flex; flex-wrap: wrap; gap: 8px; padding: 16px 18px 6px; }
    .tool-table--groups thead th { display: block; padding: 0; background: none; }
    .tool-table--groups thead th:first-child, .tool-table--groups thead th:last-child { display: none; }
    .tool-table--groups .tool-th { min-height: 44px; padding: 6px 14px; border-radius: 14px; box-shadow: inset 0 0 0 1px var(--line-2); text-align: left; }
    .tool-table--groups .tool-th span { text-decoration: none; }

    /* The map: digits on the axes, the words beneath. */
    .tool-map .hm__grid { grid-template-columns: 16px repeat(5, minmax(0, 1fr)); grid-template-rows: none; }
    .tool-map .hm__n small { display: none; }
    .tool-map .hm__n--y { display: grid; padding: 0; }
    .tool-map .hm__x { padding-left: 16px; }
    .tool-map .hm__c { aspect-ratio: auto; min-height: 58px; padding: 16px 1px 4px; gap: 2px; }
    .tool-dot { width: 24px; height: 24px; }
    .tool-scale-words { display: block; margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
    .tool-finding, .tool-findings--wide .tool-finding { grid-template-columns: minmax(0, 1fr); gap: 6px; }

    /* Maturity. */
    /* On a phone the ten are numbers; the name of the one in hand heads the card below. */
    .tool-steps { gap: 8px; }
    .tool-steps button { display: grid; place-items: center; min-height: 48px; padding: 0; }
    .tool-steps button::before { margin: 0; width: 30px; height: 30px; font-size: 14px; }
    .tool-steps strong { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .tool-q { font-size: 16.5px; }
    .tool-scale { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    .tool-scale label > span { display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 0 14px; align-items: center; min-height: 64px; padding: 12px 14px; }
    .tool-scale b { grid-row: span 2; }
    .tool-scale strong { margin-top: 0; }
    .tool-scale small { margin-top: 0; }
    .tool-scale label:hover > span, .tool-scale input:checked + span { transform: none; }
    .tool-evidence { grid-template-columns: minmax(0, 1fr); padding: 18px 16px; }
    .tool-choice .tool-seg { display: grid; grid-template-columns: minmax(0, 1fr); }
    .tool-choice .tool-seg label > span { flex-direction: row; align-items: baseline; justify-content: flex-start; gap: 10px; min-height: 46px; padding: 6px 16px; white-space: normal; }
    .tool-score { grid-template-columns: minmax(0, 1fr); }
    .tool-score__fig { justify-items: start; grid-template-columns: auto minmax(0, 1fr); align-items: center; }
    .tool-score__ring { width: 132px; }
    .tool-score__ring::before { inset: 11px; }
    .tool-score__ring strong { font-size: 44px; }
    .tool-bands__names b { display: none; }
    .tool-meters { padding: 10px 18px; }
    .tool-meter { grid-template-columns: 104px minmax(0, 1fr) 30px; gap: 12px; font-size: 14px; }
    .tool-ranks { grid-template-columns: minmax(0, 1fr); }

    .tool-share { grid-template-columns: minmax(0, 1fr); }
    .tool-share .btn, .tool-save__foot .btn { width: 100%; }

    .phero--report { padding-bottom: 120px; }
    .rp { top: -72px; margin-bottom: -72px; width: min(100% - 24px, 1000px); border-radius: var(--r); }
    .rp-mast img { width: 160px; }
    .rp-mast p { text-align: left; }
    .rp-headline { font-size: 17px; }
    .rp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-list > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    /* A table of the report becomes a list of records. */
    .rp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .rp-table, .rp-table tbody, .rp-table tr, .rp-table tbody th, .rp-table td { display: block; }
    .rp-table tr { padding: 14px 0; border-bottom: 1px solid var(--line); }
    .rp-table tbody th, .rp-table td { padding: 0; border: 0; min-width: 0; }
    .rp-table tbody th { font-size: 15.5px; margin-bottom: 8px; }
    .rp-table td { display: grid; grid-template-columns: 42% minmax(0, 1fr); gap: 10px; padding: 3px 0; }
    .rp-table td::before { content: attr(data-l); font-size: 12px; font-weight: 600; line-height: 1.7; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
    .rp-table td:empty { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .tool-meter__fill { animation: none; }
}

/* 15. Print: a tool prints its results, the report prints itself ---------------------------- */
@page { size: A4; margin: 14mm 13mm 15mm; }

@media print {
    html, body { background: #fff !important; }
    body { font-size: 10.5pt; color: #222; }
    .js .rv { opacity: 1 !important; transform: none !important; }
    .skip, .cta, .band, section:has(> .container > .cta) { display: none !important; }

    /* No navigation, no forms, no buttons. */
    .tool-bar__actions, .tool-bar__status, .tool-brief, .phero .crumbs, .phero__meta, .phero .tag, .phero__art,
    .tool [data-editor], .tool [data-tool-capture], .tool [data-register-empty], .tool [data-sim-empty],
    .tool .tool-ctl input, .tool .tool-seg, .tool-step-nav, .tool-assess, .tool-head .orb,
    .tool td.act, .tool th.act, .tool-noprint, .tool .btn { display: none !important; }

    .phero { padding: 0 0 8pt; background: none !important; color: #222; text-align: left; overflow: visible; }
    .phero::before, .phero::after { display: none; }
    .phero .container, .tool .container { width: 100%; }
    .phero--split .phero__grid { display: block; }
    .phero h1 { margin: 0 0 6pt; max-width: none; font-size: 22pt; color: #07203A; }
    .phero__lede { max-width: none; margin: 0; font-size: 11pt; color: #333; }

    .tool { background: none; }
    .tool__work { display: block !important; padding: 0; }
    .tool-bar { position: static; margin: 0 0 10pt; }
    .tool-bar__in { display: block; min-height: 0; padding: 6pt 0; border-radius: 0; box-shadow: none; border-top: 2pt solid #8CC63F; border-bottom: 1px solid #CFD8E1; }
    .tool-bar__name { padding: 0; border: 0; }
    .tool-bar__name input { height: auto; padding: 0; font-size: 14pt; }
    .tool-sec { padding-top: 14pt; }
    .tool-head { display: block; margin-bottom: 8pt; }
    .tool-head__title { display: block; }
    .tool-head h2 { font-size: 15pt; break-after: avoid; }
    .tool-head p { max-width: none; font-size: 9.5pt; }
    .tool-ctl { width: auto; margin-top: 6pt; padding: 0; box-shadow: none; }
    .tool-ctl .tool-ctl__note { display: none; }
    .tool .card, .tool-stat, .tool-roadmap__col, .tool .table-wrap { box-shadow: none; border: 1px solid #CFD8E1; break-inside: avoid; }
    .tool-finding { padding: 8pt 0; border-bottom: 1px solid #CFD8E1; }
    .tool .card { padding: 12pt; }
    .tool .table-wrap { overflow: visible; break-inside: auto; }
    .tool-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6pt; }
    .tool-stats--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tool-stat { padding: 8pt 10pt; }
    .tool-stat::before { display: none; }
    .tool-stat b { font-size: 16pt; }
    .tool-stats--inset .tool-stat { background: none; }
    .tool-finding, .tool-meter, .tool-roadmap__col li, .tool-table tr { break-inside: avoid; }
    .tool-map { grid-template-columns: minmax(0, 1fr); }
    .tool-chart, .tool-depmap { max-width: 100%; }
    .tool-meter__fill { animation: none; }
    .tool-score { background: none; color: #222; border: 1px solid #CFD8E1; }
    .tool-score::before { display: none; }
    .tool-score h3, .tool-score__ring strong { color: #07203A; }
    .tool-score h3 + p, .tool-score .tool-note, .tool-score__ring span, .tool-bands__names, .tool-bands__names b { color: #333; }
    .tool-score__ring::before { background: #fff; }
    .tool-score__ring { background: conic-gradient(#8CC63F calc(var(--score) * 1%), #E2E8EE 0); }
    .tool-bands__you { border-left-color: #07203A; }
    .tool-bands__you::after { box-shadow: inset 0 0 0 1px #07203A; }
    .tool-bands__names b { display: block; }
    .tool-bands__names li.is-on b { color: #4F7F16; }

    /* On paper a table is a table again, whatever the width of the page. */
    .tool-table { display: table; font-size: 9.5pt; }
    .tool-table thead, .tool-table--groups thead { position: static; display: table-header-group; width: auto; height: auto; overflow: visible; clip: auto; }
    .tool-table tbody { display: table-row-group; }
    .tool-table tr, .tool-table thead tr, .tool-table--groups thead tr { display: table-row; padding: 0; border: 0; }
    .tool-table th, .tool-table td, .tool-table td.wide, .tool-table--groups thead th, .tool-table--groups thead th:first-child, .tool-table--groups thead th:last-child { display: table-cell; padding: 5pt 8pt 5pt 6pt; border-top: 1px solid #CFD8E1; white-space: normal; }
    .tool-table th { background: none; border-top: 0; border-bottom: 1.5pt solid #07203A; }
    .tool-table td[data-l]::before { content: none; }
    .tool-table td.r, .tool-table th.r { text-align: right; }
    .tool-table td.wide { min-width: 0; }
    .tool-table--groups .tool-th { padding: 0; min-height: 0; box-shadow: none; }
    .tool-th span { text-decoration: none; }
    .tool-heat { min-width: 0; padding: 2.5pt 4pt; text-align: center; font-size: 8pt; }
    .rating { min-width: 0; min-height: 0; padding: 1pt 6pt; font-size: 9pt; }
    .chip { padding: 1.5pt 6pt; font-size: 8pt; }

    /* The report. */
    .rp-page .phero, .rp-page [data-report-actions] { display: none !important; }
    .rp-wrap { background: none; padding: 0; }
    .rp { top: 0; width: 100%; margin: 0; padding: 0; border-radius: 0; box-shadow: none; }
    .rp-mast img { width: 150px; }
    .rp-head { padding-top: 14pt; }
    .rp-head h2 { font-size: 21pt; }
    .rp-headline { font-size: 12.5pt; }
    .rp-facts { grid-template-columns: repeat(auto-fit, minmax(110pt, 1fr)); gap: 6pt; margin-top: 14pt; }
    .rp-facts > div { padding: 7pt 9pt; border: 1px solid #CFD8E1; background: none; }
    .rp-section { margin-top: 20pt; }
    .rp-section h3 { font-size: 14pt; break-after: avoid; }
    .rp-list > div { grid-template-columns: 170pt minmax(0, 1fr); break-inside: avoid; font-size: 10.5pt; padding: 6pt 0; }
    .rp-scroll { overflow: visible; }
    .rp-table { display: table; font-size: 9pt; }
    .rp-table thead { position: static; display: table-header-group; width: auto; height: auto; clip: auto; overflow: visible; }
    .rp-table tbody { display: table-row-group; }
    .rp-table tr { display: table-row; padding: 0; border: 0; }
    .rp-table thead th, .rp-table tbody th, .rp-table td { display: table-cell; padding: 4.5pt 8pt 4.5pt 0; border-bottom: 1px solid #CFD8E1; min-width: 0; }
    .rp-table thead th { font-size: 7.5pt; border-bottom: 1px solid #07203A; }
    .rp-table tbody th { font-size: inherit; margin: 0; }
    .rp-table td::before { content: none; }
    .rp-table td:empty { display: table-cell; }
    .rp-foot { margin-top: 22pt; padding: 8pt 0 0; border-top: 1px solid #CFD8E1; border-radius: 0; background: none; break-inside: avoid; }
}
