/*
 * Diagnostic tool styles, v2 (DESIGN-RULES-v2.md rules 1, 6, 7, 8). Used by every tool page with toolkit.js.
 * Adds only what the tools need on top of site.css: the tool card, answer buttons and chips, the pinned
 * "x of y answered" bar, the result and its five visuals, glossary buttons and the privacy notice gate.
 * Colours, radii, type scale, shadows, buttons, fields, breadcrumb and page hero come from site.css tokens.
 *
 * One engine, five looks: toolkit.js sets data-theme and these custom properties on the tool root.
 *   --t-accent   brand colour for marks, bars and the card's top rule
 *   --t-fill     selected answer fill          --t-on   text on that fill (AA)
 *   --t-ink      accent-coloured text on white (AA)
 *   --t-sel      border of a selected answer (the fill, or ink where the fill is too light to see)
 * Everything is scoped under .tool-page, .tool or .tool-gate so it cannot leak into the rest of the site.
 */

/* ---------- page shell ---------- */
.tool-page .tool-hero .lead { margin-bottom: 0; }
.tool-page .tool-hero .breadcrumb { margin-bottom: var(--s-3); }
.tool-page .tool-hero-facts { display: flex; flex-wrap: wrap; gap: 6px 0; margin: var(--s-5) 0 0; padding: 0; list-style: none; font-size: var(--fs-small); color: var(--body); }
.tool-page .tool-hero-facts li { margin: 0; padding: 0 16px; border-left: 1px solid var(--hairline-strong); line-height: 1.4; }
.tool-page .tool-hero-facts li:first-child { padding-left: 0; border-left: 0; }
@media (max-width: 600px) {
  .tool-page .tool-hero-facts { flex-direction: column; gap: 4px; }
  .tool-page .tool-hero-facts li { padding: 0; border: 0; }
}
.tool-page .tool-body { padding: var(--s-7) 0 var(--s-8); }

/* ---------- tool card and theme ---------- */
.tool {
  --t-accent: var(--orange); --t-fill: var(--orange-deep); --t-on: #fff; --t-ink: var(--orange-deep); --t-sel: var(--t-fill); --t-accent2: var(--amber);
  --pad-x: 44px; --pad-y: 36px;
  position: relative; max-width: 820px; margin: 0 auto; background: var(--paper); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: var(--pad-y) var(--pad-x); color: var(--ink); font-size: var(--fs-body); line-height: var(--lh-body);
}
.tool::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; border-radius: var(--radius) var(--radius) 0 0; background: var(--t-accent); }
.tool[data-theme="vendor"]::before { background: linear-gradient(90deg, var(--brown) 0 62%, var(--orange) 62% 100%); }
.tool[data-theme="blindspot"] { --t-sel: var(--ink); }
@media (max-width: 719px) { .tool { --pad-x: 24px; --pad-y: 28px; } }
@media (max-width: 480px) { .tool { --pad-x: 16px; --pad-y: 22px; } }
.tool h2 { font-size: var(--fs-h3); line-height: 1.3; margin: 0 0 var(--s-3); }
.tool h3 { font-size: var(--fs-h4); line-height: 1.35; margin: 0 0 var(--s-2); }
.tool p { margin: 0 0 14px; }
.tool a:not(.btn) { color: var(--orange-deep); }
.tool li { margin-top: 0; }
.tool .tool-flags li + li { margin-top: 6px; }
.tool [tabindex="-1"]:focus { outline: none; }
.tool .tool-sr, .tool-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.tool .tool-nowrap { white-space: nowrap; }
.tool .tool-cta-row .btn { white-space: normal; text-align: center; }

/* ---------- intro ---------- */
.tool .tool-disclaimer { font-size: var(--fs-small); line-height: 1.55; color: var(--body); background: var(--paper); border: 1px solid var(--hairline-strong);
  border-radius: 10px; padding: var(--s-4) var(--s-5); margin: var(--s-4) 0; }
.tool .tool-disclaimer p { margin: 0; }

/* ---------- pinned progress: "x of y answered", under the sticky site header ---------- */
.tool .tool-progress {
  position: sticky; top: calc(var(--header-h) + 1px); z-index: 30;
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px 16px;
  margin: calc(-1 * var(--pad-y)) calc(-1 * var(--pad-x)) var(--s-5); padding: 16px var(--pad-x) 14px;
  background: var(--paper); border-bottom: 1px solid var(--hairline); border-radius: var(--radius) var(--radius) 0 0;
  font-size: var(--fs-small);
}
.tool .tool-progress-count { font-weight: 500; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.tool .tool-progress-section { color: var(--body); white-space: nowrap; }
.tool .tool-progress-track { height: 6px; border-radius: 99px; background: #F1E9E2; overflow: hidden; }
.tool .tool-progress-track span { display: block; height: 100%; width: 0; background: var(--t-accent); border-radius: 99px; transition: width .3s var(--ease-out); }
.tool[data-theme="blindspot"] .tool-progress-track span { box-shadow: inset 0 0 0 1px rgba(46, 42, 39, .18); }
@media (max-width: 600px) {
  .tool .tool-progress { grid-template-columns: 1fr auto; padding-top: 12px; padding-bottom: 10px; }
  .tool .tool-progress-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- step and questions ---------- */
.tool .tool-step-head { margin-bottom: var(--s-4); }
.tool .tool-step-title { font-size: 23px; letter-spacing: -0.3px; margin-bottom: 6px; }
.tool .tool-step-intro { font-size: var(--fs-small); color: var(--body); margin: 0; max-width: 68ch; }
.tool .tool-q { border: 0; margin: 0; padding: 0; min-width: 0; }
.tool .tool-q-list { display: grid; gap: 0; }
.tool .tool-q-list > .tool-q + .tool-q { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--hairline); }
.tool .tool-q-title { display: flex; gap: 10px; align-items: baseline; font-family: var(--font-head); font-size: 18px; font-weight: 600; line-height: 1.4; color: var(--ink); letter-spacing: -0.1px; margin-bottom: 6px; }
.tool .tool-q-num { flex: 0 0 auto; font-family: var(--font-body); font-size: 14px; font-weight: 500; color: var(--t-ink); font-variant-numeric: tabular-nums; min-width: 22px; }
.tool .tool-q-num::after { content: "."; }
.tool .tool-q-text { min-width: 0; }
.tool .tool-q-tag { font-size: var(--fs-caption); color: var(--body); margin: 0 0 4px; font-weight: 500; }
.tool .tool-q-help, .tool .tool-q-hint { font-size: var(--fs-small); color: var(--body); margin: 0 0 12px 32px; }
.tool .tool-q-help + .tool-q-hint { margin-top: -6px; }
.tool .tool-options { margin-top: 12px; }
.tool .tool-terms { font-size: var(--fs-small); color: var(--body); margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0 12px; }
.tool .tool-error { color: #B3261E; font-size: var(--fs-small); font-weight: 500; margin: 10px 0 0; }
@media (max-width: 480px) {
  .tool .tool-q-help, .tool .tool-q-hint { margin-left: 0; }
  .tool .tool-q-title { font-size: 17px; }
}

/* Question cards: Applicability (short yes/no cards) and Blind-Spot (channel cards) */
.tool[data-theme="applicability"] .tool-q-list, .tool[data-theme="blindspot"] .tool-q-list { gap: 12px; }
.tool[data-theme="applicability"] .tool-q-list > .tool-q, .tool[data-theme="blindspot"] .tool-q-list > .tool-q {
  margin: 0; padding: 18px 20px 20px; border: 1px solid var(--hairline-strong); border-radius: 12px; transition: border-color .15s ease;
}
.tool[data-theme="applicability"] .tool-q-list > .tool-q + .tool-q, .tool[data-theme="blindspot"] .tool-q-list > .tool-q + .tool-q { border-top: 1px solid var(--hairline-strong); }
.tool[data-theme="blindspot"] .tool-q-list > .tool-q { border-left: 4px solid var(--yellow); }
.tool[data-theme="blindspot"] .tool-q-tag { display: inline-block; color: var(--ink); background: #FFF6CC; border-radius: 999px; padding: 2px 10px; margin-bottom: 8px; }
@media (max-width: 480px) {
  .tool[data-theme="applicability"] .tool-q-list > .tool-q, .tool[data-theme="blindspot"] .tool-q-list > .tool-q { padding: 14px 14px 16px; }
}

/* ---------- answers: one base, five layouts ---------- */
.tool .tool-option {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 11px 16px;
  border: 1.5px solid var(--hairline-strong); border-radius: 10px; background: var(--paper); color: var(--ink);
  cursor: pointer; font-size: 16px; line-height: 1.35;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease, transform .2s var(--ease-out), box-shadow .2s var(--ease-out);
}
@media (hover: hover) { .tool .tool-option:hover { border-color: var(--t-ink); } }
.tool .tool-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.tool .tool-option:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.tool .tool-option:has(input:checked) { background: var(--t-fill); border-color: var(--t-sel); color: var(--t-on); font-weight: 500; }
.tool .tool-option-unsure { border-style: dashed; }
.tool .tool-option-unsure:has(input:checked) { border-style: solid; }
.tool .tool-option-text { display: flex; flex-direction: column; min-width: 0; }
.tool .tool-option-help { font-size: var(--fs-caption); color: inherit; opacity: .85; font-weight: 400; }
.tool .tool-option-mark { display: none; flex: 0 0 auto; }
.tool .tool-tick { width: 16px; height: 16px; }
.tool .tool-q-invalid .tool-option { border-color: #B3261E; }
.tool[data-theme="applicability"] .tool-q-invalid, .tool[data-theme="blindspot"] .tool-q-invalid { border-color: #B3261E !important; }
.tool .tool-q-invalid .tool-q-title { color: #8A1C15; }

/* segmented: one row of equal buttons (Yes / No / Not sure), wraps on a phone */
.tool .tool-options-segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.tool .tool-options-segmented .tool-option { flex: 1 1 112px; justify-content: center; text-align: center; }
.tool .tool-options-segmented .tool-option-text { align-items: center; }

/* rows: wide button rows, two columns when the list is long */
.tool .tool-options-rows, .tool .tool-options-checklist { display: grid; gap: 8px; }
@media (min-width: 640px) { .tool .tool-options-2col { grid-template-columns: 1fr 1fr; } }
.tool .tool-options-rows .tool-option { padding-right: 40px; }
.tool .tool-options-rows .tool-option-mark { position: absolute; right: 14px; top: 50%; margin-top: -8px; }
.tool .tool-options-rows .tool-option:has(input:checked) .tool-option-mark { display: block; }

/* chips: toggle chips for multi-select, tick appears when on */
.tool .tool-options-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tool .tool-options-chips .tool-option { border-radius: 999px; min-height: 44px; padding: 9px 16px; font-size: 15px; gap: 6px; }
.tool .tool-options-chips .tool-option:has(input:checked) .tool-option-mark { display: block; margin-left: -4px; }

/* checklist: square ticks in a list (Vendor snapshot's third-party types) */
.tool .tool-options-checklist .tool-option { gap: 12px; }
.tool .tool-options-checklist .tool-option-mark { display: grid; place-items: center; width: 22px; height: 22px; border: 2px solid var(--muted); border-radius: 5px; color: transparent; background: var(--paper); }
.tool .tool-options-checklist .tool-option:has(input:checked) { background: var(--paper); color: var(--ink); border-color: var(--t-sel); box-shadow: inset 0 0 0 1px var(--t-sel); }
.tool .tool-options-checklist .tool-option:has(input:checked) .tool-option-mark { background: var(--t-fill); border-color: var(--t-fill); color: var(--t-on); }

/* scale: maturity 0 to 4 as five equal buttons (Discovery diagnostic's domain cards) */
.tool .tool-options-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.tool .tool-options-scale .tool-option { flex-direction: column; justify-content: flex-start; gap: 6px; text-align: center; min-height: 84px; padding: 12px 8px; font-size: 14.5px; }
.tool .tool-options-scale .tool-option-text { align-items: center; }
.tool .tool-options-scale .tool-option-extra { grid-column: 1 / -1; flex-direction: row; min-height: 48px; justify-content: center; }
.tool .tool-scale-num { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1.5px solid var(--hairline-strong); font-weight: 500; font-size: 14px; color: var(--ink); background: var(--paper); flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.tool .tool-option:has(input:checked) .tool-scale-num { border-color: var(--ink); background: rgba(255, 255, 255, .55); }
@media (max-width: 639px) {
  .tool .tool-options-scale { grid-template-columns: 1fr; }
  .tool .tool-options-scale .tool-option { flex-direction: row; min-height: 48px; text-align: left; padding: 8px 14px; font-size: 15.5px; gap: 12px; }
  .tool .tool-options-scale .tool-option-text { align-items: flex-start; }
  .tool .tool-options-scale .tool-option-extra { justify-content: flex-start; }
}
.tool .tool-scale-key { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 var(--s-5); padding: 14px 16px; border-radius: 10px; border: 1px solid var(--hairline); font-size: 13.5px; line-height: 1.4; }
.tool .tool-scale-key dt { display: flex; align-items: center; gap: 8px; font-weight: 500; color: var(--ink); }
.tool .tool-scale-key dt .tool-scale-num { width: 24px; height: 24px; font-size: 13px; background: var(--amber); border-color: var(--amber); }
.tool .tool-scale-key dd { margin: 4px 0 0; color: var(--body); }
@media (max-width: 639px) {
  .tool .tool-scale-key { grid-template-columns: 1fr 1fr; }
  .tool .tool-scale-key dd { display: none; }
}

/* ---------- glossary term buttons and tooltips (same look as site.css .term and .tip) ---------- */
.tool-term-wrap { position: relative; display: inline; }
.tool-term { font: inherit; color: inherit; background: none; border: 0; padding: 0; margin: 0; cursor: help; text-align: left;
  text-decoration: underline dotted var(--amber); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.tool-terms .tool-term { color: var(--brown); min-height: 44px; min-width: 44px; }  /* short terms such as "Gap" (VERIFY-v2 V4) */
.tool-tip { position: absolute; z-index: 40; left: 0; top: calc(100% + 8px); width: max-content; max-width: min(300px, calc(100vw - 32px));
  background: var(--brown); color: #fff; border-radius: var(--radius-sm); padding: 10px 12px; font: 400 14px/1.45 var(--font-body); white-space: normal; letter-spacing: 0; }
.tool-tip strong { color: #fff; font-weight: 500; }
.tool-tip[hidden] { display: none; }

/* ---------- navigation buttons ---------- */
.tool .tool-nav { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: space-between; margin-top: var(--s-6); padding-top: var(--s-5); border-top: 1px solid var(--hairline); }
.tool .tool-nav .btn-primary { margin-left: auto; min-width: 140px; }
.tool .tool-nav-start { justify-content: flex-start; border-top: 0; padding-top: 0; margin-top: var(--s-5); }
.tool .tool-nav-start .btn-primary { margin-left: 0; }
.tool .tool-lead .tool-nav { justify-content: flex-start; }
.tool .tool-lead .tool-nav .btn-primary { margin-left: 0; }
@media (max-width: 480px) { .tool .tool-nav .btn { flex: 1 1 auto; } }
.tool .tool-link-btn { font: inherit; font-size: 16px; background: none; border: 0; padding: 10px 0; min-height: 44px; color: var(--orange-deep);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* ---------- result ---------- */
.tool .tool-result-kicker { font-size: var(--fs-small); color: var(--body); margin-bottom: 6px; font-weight: 500; }
.tool .tool-band { margin-bottom: var(--s-5); }
.tool .tool-band h2 { font-size: clamp(24px, 1.2vw + 16px, 30px); line-height: 1.2; letter-spacing: -0.5px; margin-bottom: 10px; }
.tool .tool-band-headline { font-size: 18px; font-weight: 500; color: var(--ink); margin: 0; }
.tool .tool-band-body { margin-bottom: var(--s-5); }
.tool .tool-band-body p { color: var(--body); }
.tool .tool-band-body p:last-child { margin-bottom: 0; }
.tool .tool-score { font-size: var(--fs-small); color: var(--ink) !important; font-weight: 500; }
.tool .tool-visual { margin: 0 0 var(--s-6); }
.tool .tool-panel, .tool .tool-flags { border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 18px 20px; margin-bottom: var(--s-5); }
.tool .tool-flags ul, .tool .tool-panel ul { margin: 0 0 12px; padding-left: 20px; }
.tool .tool-panel ul:last-child { margin-bottom: 0; }
.tool .tool-flags li::marker, .tool .tool-panel li::marker { color: var(--t-accent); }
.tool[data-theme="blindspot"] .tool-flags li::marker, .tool[data-theme="blindspot"] .tool-panel li::marker { color: var(--amber); }
.tool .tool-small { font-size: var(--fs-caption); color: var(--body); line-height: 1.55; }
.tool .tool-flags .tool-small:last-child { margin-bottom: 0; }
.tool .tool-next { margin: var(--s-6) 0 18px; }
.tool .tool-next h3 { display: flex; align-items: center; gap: 10px; }
.tool .tool-dots { display: inline-flex; gap: 4px; }
.tool .tool-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.tool .tool-dots i:nth-child(2) { background: var(--amber); }
.tool .tool-dots i:nth-child(3) { background: var(--yellow); }
.tool .tool-cta-row { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-top: 4px; }
@media (max-width: 480px) { .tool .tool-cta-row .btn { width: 100%; } }
.tool .tool-result-actions { display: flex; flex-wrap: wrap; gap: 4px 24px; }

/* ---------- result visuals (rv-*), one per tool, inline SVG and CSS only ---------- */
/* Risk ramp inside NPV's palette, light to dark: yellow, amber, deep orange, brown. Text colour chosen per step for AA. */
.tool { --lv1: #FFD41C; --lv1-on: #2E2A27; --lv1-tint: rgba(255, 212, 28, .20);
        --lv2: #FAA61A; --lv2-on: #2E2A27; --lv2-tint: rgba(250, 166, 26, .20);
        --lv3: #BF3C16; --lv3-on: #FFFFFF; --lv3-tint: rgba(241, 90, 49, .14);
        --lv4: #82331A; --lv4-on: #FFFFFF; --lv4-tint: rgba(130, 51, 26, .12); }
.rv-lv1 { --c: var(--lv1); --c-on: var(--lv1-on); --c-tint: var(--lv1-tint); }
.rv-lv2 { --c: var(--lv2); --c-on: var(--lv2-on); --c-tint: var(--lv2-tint); }
.rv-lv3 { --c: var(--lv3); --c-on: var(--lv3-on); --c-tint: var(--lv3-tint); }
.rv-lv4 { --c: var(--lv4); --c-on: var(--lv4-on); --c-tint: var(--lv4-tint); }
.tool .rv-title { font-family: var(--font-head); font-size: 17px; font-weight: 600; color: var(--brown); margin: 0 0 12px; }
.tool .rv-note { font-size: var(--fs-caption); color: var(--body); margin: 10px 0 0; }
.tool .rv-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; list-style: none; margin: 0 0 12px; padding: 0; font-size: var(--fs-caption); color: var(--body); }
.tool .rv-legend li { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.tool .rv-legend li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--c); }

/* Tool 1: four-step scale, the result band lit */
.tool .rv-scale { list-style: none; margin: 0; padding: 22px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; counter-reset: rvs; }
.tool .rv-scale li { position: relative; margin: 0; padding: 16px 14px 14px; border: 1px solid var(--hairline-strong); border-radius: 10px; background: var(--paper); font-size: 14px; line-height: 1.4; color: var(--body); }
.tool .rv-scale li::before { content: ""; position: absolute; left: -1px; right: -1px; top: -1px; height: 6px; border-radius: 10px 10px 0 0; background: var(--c); }
.tool .rv-scale .rv-range { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.tool .rv-scale .rv-name { display: block; font-weight: 500; color: var(--ink); }
.tool .rv-scale li.is-lit { background: var(--c); border-color: var(--c); color: var(--c-on); box-shadow: var(--shadow-md); transform: translateY(-6px); }
.tool .rv-scale li.is-lit .rv-range, .tool .rv-scale li.is-lit .rv-name { color: var(--c-on); }
.tool .rv-scale .rv-here { position: absolute; left: 14px; top: -26px; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; }
@media (max-width: 639px) {
  .tool .rv-scale { grid-template-columns: 1fr; padding-top: 0; gap: 6px; }
  .tool .rv-scale li { padding: 12px 14px 12px 20px; }
  .tool .rv-scale li::before { left: -1px; top: -1px; bottom: -1px; right: auto; width: 6px; height: auto; border-radius: 10px 0 0 10px; }
  .tool .rv-scale li.is-lit { transform: none; }
  .tool .rv-scale .rv-here { position: static; display: block; margin-bottom: 2px; color: inherit; }
}

/* Tool 2: seven horizontal meters, 0 to 4 in four segments */
.tool .rv-meters { list-style: none; margin: 0; padding: 0; }
.tool .rv-meter-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 190px; gap: 6px 18px; align-items: center; margin: 0; padding: 11px 0; border-top: 1px solid var(--hairline); }
.tool .rv-meter-head { border-top: 0; padding: 0 0 6px; font-size: 13px; color: var(--muted); }
.tool .rv-meter-label { font-weight: 500; color: var(--ink); font-size: 15px; }
.tool .rv-meter-value { font-size: 14px; color: var(--body); font-variant-numeric: tabular-nums; }
.tool .rv-meter-value strong { color: var(--ink); }
.tool .rv-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 12px; }
.tool .rv-bar > span { position: relative; background: #F1E9E2; overflow: hidden; }
.tool .rv-bar > span:first-child { border-radius: 4px 0 0 4px; }
.tool .rv-bar > span:last-child { border-radius: 0 4px 4px 0; }
.tool .rv-bar > span > i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--amber); }
.tool .rv-bar.is-na > span { background: repeating-linear-gradient(135deg, #F1E9E2 0 4px, #fff 4px 8px); }
.tool .rv-ticks { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
@media (max-width: 639px) {
  .tool .rv-meter-row { grid-template-columns: minmax(0, 1fr) auto; }
  .tool .rv-meter-row .rv-bar { grid-column: 1 / -1; grid-row: 2; }
  .tool .rv-meter-head { grid-template-columns: 1fr; }
  .tool .rv-meter-head > :not(.rv-ticks) { display: none; }
  .tool .rv-meter-value { text-align: right; font-size: 13.5px; }
}

/* Tool 3: data types and sections coloured by risk level */
.tool .rv-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 var(--s-5); padding: 0; }
.tool .rv-chips li { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 7px 14px 7px 10px; border-radius: 999px; background: var(--c-tint); color: var(--ink); font-size: 14.5px; line-height: 1.3; }
.tool .rv-chips li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: 0 0 auto; }
.tool .rv-tiles { list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; }
.tool .rv-tiles li { position: relative; margin: 0; padding: 14px 14px 12px; border-radius: 10px; background: var(--c-tint); border-left: 6px solid var(--c); min-height: 112px; display: flex; flex-direction: column; }
.tool .rv-tiles .rv-t-name { font-size: 14px; line-height: 1.35; color: var(--ink); font-weight: 500; }
.tool .rv-tiles .rv-t-meta { margin-top: auto; padding-top: 8px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 13px; color: var(--body); }
.tool .rv-tiles .rv-t-pts { font-family: var(--font-head); font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.tool .rv-tiles .rv-t-pts small { font-family: var(--font-body); font-size: 12.5px; font-weight: 400; color: var(--body); }
@media (max-width: 780px) { .tool .rv-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tool 4: one card per channel, status shown */
.tool .rv-channels { list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; }
.tool .rv-channels li { margin: 0; padding: 14px 16px; border: 1px solid var(--hairline-strong); border-left: 5px solid var(--c); border-radius: 10px; background: var(--paper); }
.tool .rv-ch-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.tool .rv-ch-name { font-family: var(--font-head); font-weight: 600; font-size: 16px; line-height: 1.3; color: var(--ink); }
.tool .rv-status { flex: 0 0 auto; font-size: 13px; font-weight: 500; line-height: 1; padding: 6px 10px; border-radius: 999px; background: var(--c); color: var(--c-on); white-space: nowrap; }
.tool .rv-top { display: inline-block; margin-top: 6px; font-size: 13px; font-weight: 500; color: var(--brown); border-bottom: 2px solid var(--yellow); }
.tool .rv-channels ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; color: var(--body); line-height: 1.45; }
.tool .rv-channels ul li { border: 0; padding: 0; margin: 0; background: none; }
.tool .rv-channels ul li + li { margin-top: 4px; }
.tool .rv-channels ul li::marker { color: var(--amber); }
.tool .rv-channels li.rv-lv1 { border-left-color: var(--lv1); }
@media (max-width: 639px) { .tool .rv-channels { grid-template-columns: 1fr; } }

/* Tool 5: half-circle gauge plus the flags */
.tool .rv-gauge { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 16px 32px; align-items: center; }
.tool .rv-gauge svg { width: 100%; height: auto; overflow: visible; }
.tool .rv-gauge .rv-g-seg { transition: opacity .2s ease; }
.tool .rv-gauge-key { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.tool .rv-gauge-key li { display: grid; grid-template-columns: 14px 64px minmax(0, 1fr); gap: 10px; align-items: baseline; margin: 0; padding: 6px 10px; border-radius: 8px; font-size: 14px; color: var(--body); line-height: 1.4; }
.tool .rv-gauge-key li::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: var(--c); align-self: center; }
.tool .rv-gauge-key .rv-k-range { font-variant-numeric: tabular-nums; color: var(--muted); }
.tool .rv-gauge-key li.is-lit { background: var(--c-tint); color: var(--ink); font-weight: 500; }
.tool .rv-gauge-key li.is-lit .rv-k-range { color: var(--ink); }
.tool .rv-flags-list { margin-top: var(--s-5); }
@media (max-width: 639px) { .tool .rv-gauge { grid-template-columns: 1fr; } .tool .rv-gauge svg { max-width: 320px; margin: 0 auto; } }

/* ---------- lead form (fields use site.css .field) ---------- */
.tool .tool-lead { margin-top: var(--s-6); padding-top: var(--s-6); border-top: 1px solid var(--hairline-strong); }
.tool .tool-autofill { border: 1px solid var(--hairline); border-radius: 10px; padding: 10px 14px; font-size: var(--fs-small); }
.tool .tool-fields { display: grid; gap: var(--s-4) var(--s-5); margin: 18px 0 20px; }
@media (min-width: 640px) { .tool .tool-fields { grid-template-columns: 1fr 1fr; } .tool .tool-field-wide { grid-column: 1 / -1; } }
.tool .tool-field { margin: 0; }
.tool .tool-req { color: var(--orange-deep); font-weight: 400; }
.tool .tool-opt { font-weight: 400; color: var(--body); font-size: var(--fs-caption); }
.tool .tool-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tool .tool-consents { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; min-width: 0; }
.tool .tool-consents legend { font-family: var(--font-head); color: var(--brown); font-size: var(--fs-h4); font-weight: 600; margin-bottom: 8px; padding: 0; }
.tool-check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding: 6px 0; cursor: pointer; font-size: var(--fs-small); line-height: 1.5; }
.tool-check input { flex: 0 0 auto; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--orange-deep); cursor: pointer; }
.tool .tool-form-msg { border-radius: var(--radius-sm); padding: var(--s-4); margin: 12px 0; font-size: var(--fs-small); }
.tool .tool-form-error { background: #FBEDEC; color: #8A1C15; border: 1px solid #F1CFCB; }
.tool .tool-form-msg a { color: #8A1C15; }
.tool .tool-done { position: relative; border: 1px solid var(--hairline-strong); border-radius: 12px; padding: 22px 22px 22px 26px; overflow: hidden; }
.tool .tool-done::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--t-accent); }
.tool .tool-ref { font-size: var(--fs-small); margin-bottom: 0; }

/* ---------- privacy notice gate (modal) ---------- */
html.tool-gate-open { overflow: hidden; }
.tool-gate { position: fixed; inset: 0; z-index: 1000; background: rgba(46, 42, 39, .55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.tool-gate-panel { background: var(--paper); color: var(--ink); width: 100%; max-width: 520px; border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow-lg);
  font: 400 16px/1.6 var(--font-body); max-height: calc(100vh - 32px); overflow-y: auto; }
.tool-gate-panel h2 { font-size: var(--fs-h3); line-height: 1.3; margin: 0 0 12px; }
.tool-gate-panel p { margin: 0 0 12px; }
.tool-gate-panel a:not(.btn) { color: var(--orange-deep); }
/* Inline padding grows the tap area to 44px tall without changing how the sentence wraps. */
.tool-gate-link { display: inline; padding: 13px 0; }
.tool-gate-kicker { font-size: var(--fs-small); color: var(--body); margin-bottom: 4px !important; }
.tool-gate-check { margin: 8px 0 4px; font-size: 16px; }
.tool-gate-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 16px; }
.tool-gate-leave { min-height: 44px; display: inline-flex; align-items: center; }
.tool-gate-version { font-size: 13px; color: var(--muted); margin: 14px 0 0 !important; }

/* ---------- motion (rule 8) ---------- */
@media (hover: hover) {
  .tool .tool-options-scale .tool-option:hover, .tool .tool-options-segmented .tool-option:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(46, 42, 39, .08); }
}
.tool .tool-screen > * { animation: tool-in .45s var(--ease-out) both; }
@keyframes tool-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tool .tool-screen > .tool-progress { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .tool *, .tool-gate * { transition: none !important; animation: none !important; }
  .tool .tool-option:hover, .tool .rv-scale li.is-lit { transform: none !important; }
}

/* Vendor snapshot: brown answers, orange progress and question numbers (brown + orange) */
.tool[data-theme="vendor"] .tool-progress-track span { background: var(--orange); }
.tool[data-theme="vendor"] .tool-q-num { color: var(--orange-deep); }

/* Discovery diagnostic: each screen reads as a domain card, the domain name set on an amber rule */
.tool[data-theme="discovery"] .tool-step-head { padding-left: 14px; border-left: 4px solid var(--amber); }
.tool .tool-scale-key dt { align-items: flex-start; }
.tool .tool-scale-key dt .tool-scale-num { margin-top: -2px; }
