/* Dedicated check explorer and consumer question summaries. */
.sg-check-inspector {
  --sg-purple: #5a3fc0;
  --sg-ink: #1c1830;
  --sg-muted: #5e5873;
  --sg-line: #e3ddef;
  --sg-page: #f8f7fc;
  box-sizing: border-box;
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
  color: var(--sg-ink);
  background: var(--sg-page);
  font-family: Figtree, system-ui, sans-serif;
}

.sg-check-inspector *,
.sg-check-inspector *::before,
.sg-check-inspector *::after,
.sg-question-overview-list *,
.sg-question-overview-list *::before,
.sg-question-overview-list *::after { box-sizing: border-box; }

.sg-check-inspector a:focus-visible,
.sg-check-inspector input:focus-visible,
.sg-check-inspector select:focus-visible,
.sg-question-overview-list a:focus-visible { outline: 2px solid var(--sg-purple); outline-offset: 3px; }

.sg-inspector-heading { margin: 0 0 22px; }
.sg-inspector-kicker {
  display: block;
  margin: 0 0 7px;
  color: var(--sg-purple);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .09em;
  line-height: 1.4;
  text-transform: uppercase;
}
.sg-inspector-heading h1 { margin: 0; color: var(--sg-ink); font-size: clamp(25px, 3vw, 34px); font-weight: 700; letter-spacing: -.035em; line-height: 1.16; }
.sg-inspector-heading p { max-width: 760px; margin: 8px 0 0; color: var(--sg-muted); font-size: 14px; line-height: 1.55; }

.sg-inspector-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); align-items: start; gap: 18px; }
.sg-inspector-sidebar,
.sg-inspector-detail { min-width: 0; border: 1px solid var(--sg-line); border-radius: 9px; background: #fff; }
.sg-inspector-sidebar { padding: 17px; }
.sg-inspector-sidebar label { display: block; margin: 0 0 6px; color: var(--sg-ink); font-size: 12px; font-weight: 650; line-height: 1.4; }
.sg-inspector-sidebar input,
.sg-inspector-sidebar select {
  display: block;
  width: 100%;
  min-height: 42px;
  margin: 0 0 14px;
  padding: 9px 11px;
  border: 1px solid #d8d2e5;
  border-radius: 6px;
  background: #fff;
  color: var(--sg-ink);
  font: inherit;
  font-size: 13px;
}
.sg-inspector-sidebar input::placeholder { color: #817b91; }
.sg-inspector-sidebar input:focus,
.sg-inspector-sidebar select:focus { border-color: var(--sg-purple); }
.sg-inspector-list { max-height: 65vh; margin: 2px -5px -5px; padding: 0 5px 5px; overflow: auto; overscroll-behavior: contain; }
.sg-inspector-check {
  display: flex;
  min-height: 48px;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 10px;
  border-top: 1px solid #f0edf5;
  border-radius: 5px;
  color: var(--sg-ink);
  text-decoration: none;
}
.sg-inspector-check:first-child { border-top: 0; }
.sg-inspector-check:hover { background: #f8f6fd; }
.sg-inspector-check[aria-current="true"] { background: #f3f0fc; box-shadow: inset 3px 0 var(--sg-purple); color: var(--sg-purple); }
.sg-inspector-check-name { min-width: 0; font-size: 13px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.sg-inspector-check .sg-result-badge { flex: none; }

.sg-inspector-detail { min-height: 300px; padding: 32px; }
.sg-inspector-detail h2 { margin: 0 0 9px; color: var(--sg-ink); font-size: clamp(21px, 2.5vw, 28px); font-weight: 700; letter-spacing: -.025em; line-height: 1.25; }
.sg-inspector-detail > p { color: var(--sg-muted); font-size: 14px; line-height: 1.65; }
.sg-inspector-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 14px; margin: 0 0 20px; color: var(--sg-muted); font-size: 12px; line-height: 1.45; }
.sg-inspector-meta a { color: var(--sg-purple); text-underline-offset: 3px; }
.sg-inspector-empty { display: grid; min-height: 230px; align-content: center; justify-items: center; padding: 24px; color: var(--sg-muted); text-align: center; }
.sg-inspector-empty h2 { margin: 0 0 7px; font-size: 18px; }
.sg-inspector-empty p { max-width: 430px; margin: 0; font-size: 13px; line-height: 1.55; }

/* Evidence and technical detail use the shared sg-source-details,
   sg-evidence-list, and sg-result-badge styles from assessment.css. */
.sg-inspector-detail .sg-source-details,
.sg-inspector-detail .sg-evidence-list { min-width: 0; }
.sg-inspector-detail .sg-evidence-list a,
.sg-inspector-detail .sg-evidence-list p,
.sg-inspector-detail .sg-evidence-list strong,
.sg-inspector-detail .sg-evidence-list small { max-width: 100%; overflow-wrap: anywhere; }

.sg-question-overview-list { border-top: 1px solid var(--sg-line); }
.sg-question-overview { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 22px; padding: 20px 4px; border-bottom: 1px solid var(--sg-line); }
.sg-question-copy { min-width: 0; }
.sg-question-copy h3 { margin: 0 0 4px; color: var(--sg-ink); font-size: 16px; font-weight: 700; letter-spacing: -.01em; line-height: 1.35; }
.sg-question-copy p { margin: 0; color: var(--sg-muted); font-size: 13px; line-height: 1.5; }
.sg-question-summary-meta { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; color: var(--sg-muted); font-size: 12px; }
.sg-question-summary-meta .sg-result-badge { flex: none; }
.sg-inspect-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 14px;
  border: 1px solid var(--sg-purple);
  border-radius: 6px;
  background: var(--sg-purple);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
}
.sg-inspect-link:hover { border-color: #4930a8; background: #4930a8; }
.sg-inspect-link:focus-visible { outline: 3px solid #b9addf; outline-offset: 3px; }

.sg-report-tabs > a {
  position: relative;
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  padding: 0 15px 11px;
  border: 0;
  background: transparent;
  color: var(--sg-muted);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}
.sg-report-tabs > a:hover { color: var(--sg-ink); }
.sg-report-tabs > a[aria-current="page"],
.sg-report-tabs > a[aria-current="true"] { color: var(--sg-purple); }
.sg-report-tabs > a[aria-current="page"]::after,
.sg-report-tabs > a[aria-current="true"]::after { position: absolute; right: 10px; bottom: -1px; left: 10px; height: 2px; background: var(--sg-purple); content: ""; }

@media (max-width: 760px) {
  .sg-check-inspector { padding: 18px 16px 32px; }
  .sg-inspector-layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sg-inspector-sidebar { padding: 14px; }
  .sg-inspector-list { max-height: 260px; }
  .sg-inspector-detail { min-height: 240px; padding: 22px 18px; }
  .sg-question-overview { grid-template-columns: minmax(0, 1fr); align-items: stretch; gap: 13px; padding: 17px 2px; }
  .sg-question-summary-meta { justify-content: flex-start; }
  .sg-inspect-link { justify-self: start; }
  .sg-report-tabs { overflow-x: auto; }
  .sg-report-tabs > a { flex: none; padding-right: 11px; padding-left: 11px; }
}

@media (prefers-reduced-motion: no-preference) {
  .sg-inspector-check,
  .sg-inspect-link { transition: background-color .15s ease, border-color .15s ease, color .15s ease; }
}

/* Keep the summary readable and the investigative controls distinct. */
.sg-question-summary-meta { justify-content:flex-start; margin-top:10px; }
a.sg-attention-row { color:var(--sg-ink); text-decoration:none; }
.sg-inspector-check > span:first-child { min-width:0; }
.sg-inspector-check small { display:block; margin-bottom:4px; color:var(--sg-muted); font-size:11px; }
.sg-inspector-check strong { display:block; font-size:13px; line-height:1.45; }
.sg-result-badge { gap:4px; }
.sg-inspector-heading { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-top:16px; }
.sg-inspector-heading > label { color:var(--sg-muted); font-size:12px; }
.sg-inspector-heading select { display:block; min-height:44px; padding:8px 12px; margin-top:6px; border:1px solid var(--sg-line); border-radius:6px; background:#fff; color:var(--sg-ink); font:inherit; }
.sg-check-inspector > .sg-inspect-link { background:transparent; color:var(--sg-purple); border-color:var(--sg-line); }
.sg-check-inspector > .sg-score-disclosure { margin-bottom:20px; }
.sg-inspector-detail { scroll-margin-top:100px; }
.sg-inspector-rule { font-size:12px; line-height:1.6; white-space:pre-wrap; overflow-wrap:anywhere; }
@media(max-width:760px){.sg-inspector-heading{align-items:flex-start;flex-direction:column;gap:10px}.sg-inspector-sidebar label{font-size:13px}.sg-inspector-check strong{font-size:14px}}

/* Category overview and detailed check views on the assessment page. */
.sg-bucket-tabs{display:flex;gap:4px;border-bottom:1px solid var(--sg-line);overflow-x:auto;margin-bottom:24px}
.sg-bucket-tabs [role=tab]{flex:1;min-height:52px;padding:12px 14px;border:0;border-bottom:3px solid transparent;background:transparent;color:var(--sg-muted);font-size:14px;font-weight:650;white-space:nowrap;cursor:pointer}
.sg-bucket-tabs [aria-selected=true]{border-bottom-color:var(--sg-purple);color:var(--sg-purple);background:#f8f6fd}
.sg-category-view-heading{display:flex;align-items:center;justify-content:space-between;gap:20px}
.sg-category-view-heading h3{font-size:23px;letter-spacing:-.02em;margin:0 0 5px}
.sg-category-view-heading p{margin:0;color:var(--sg-muted);font-size:15px}
.sg-category-view-switch{display:flex;flex:none;border:1px solid var(--sg-line);border-radius:7px;padding:4px;gap:4px;background:#f8f7fc}
.sg-category-view-switch button{min-height:40px;padding:8px 14px;border:1px solid transparent;border-radius:5px;background:transparent;font-weight:600;font-size:13px;cursor:pointer;white-space:nowrap}
.sg-category-view-switch [aria-pressed=true]{background:white;border-color:var(--sg-line);color:var(--sg-purple)}
.sg-category-view-switch button span{margin-left:4px;color:var(--sg-muted)}
.sg-category-explanation{font-size:15px;line-height:1.65;max-width:850px;margin:20px 0 10px;color:var(--sg-ink)}
.sg-category-view-coverage{font-size:12px;color:var(--sg-muted);margin:0 0 24px}
.sg-question-copy h4{margin:0 0 5px;font-size:16px;line-height:1.4}
.sg-category-question-link{min-height:44px;background:transparent;border:0;padding:10px;color:var(--sg-purple)!important;font-size:13px;font-weight:650;cursor:pointer}
.sg-category-check-group{scroll-margin-top:120px;margin-top:24px}
.sg-category-check-group-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;background:#f8f7fc;padding:12px 14px;border-radius:6px}
.sg-category-check-group-heading h4{font-size:15px;margin:0;line-height:1.4}
.sg-category-check-group-heading>span{font-size:12px;color:var(--sg-muted);flex:none}
.sg-category-check-row{display:grid;grid-template-columns:120px minmax(0,1fr) auto;align-items:center;gap:20px;min-height:84px;padding:16px 14px;border-bottom:1px solid var(--sg-line);text-decoration:none;color:var(--sg-ink)}
.sg-category-check-row:hover{background:#faf9fe}
.sg-category-check-row>.sg-result-badge{justify-self:start}
.sg-category-check-copy{min-width:0;overflow-wrap:anywhere}
.sg-category-check-copy strong{display:block;font-size:14px;line-height:1.4}
.sg-category-check-copy>span{display:block;font-size:13px;line-height:1.6;margin-top:5px;color:var(--sg-muted)}
.sg-category-evidence-link{font-size:12px;color:var(--sg-purple);white-space:nowrap;font-weight:650}
.sg-attention-row .sg-attention-observation{display:block;margin-top:5px;font-size:15px;font-weight:650;line-height:1.55;color:var(--sg-ink);overflow-wrap:anywhere}
.sg-attention-row>span:nth-child(2){color:var(--sg-ink)}
@media(max-width:760px){.sg-bucket-tabs [role=tab]{flex:none}.sg-category-view-heading{align-items:flex-start;flex-direction:column;gap:16px}.sg-category-check-group-heading{align-items:flex-start;flex-direction:column;gap:6px}.sg-category-check-row{grid-template-columns:minmax(0,1fr) auto;gap:10px}.sg-category-check-row>.sg-result-badge{grid-column:1/-1}.sg-category-check-group-heading>span{flex:auto}.sg-attention-row .sg-attention-observation{font-size:14px}}

/* Compact result grid, matching the original assessment checklist. */
.sg-category-explorer>.sg-category-heading{align-items:flex-start}
.sg-category-explorer>.sg-category-heading>.sg-category-view-switch{margin-left:auto}
.sg-category-checklist{border-top:1px solid var(--sg-line);padding-top:20px}
.sg-checklist-heading{display:flex;align-items:center;gap:12px 18px;flex-wrap:wrap;margin-bottom:16px}
.sg-checklist-heading h4{font-size:17px;margin:0}
.sg-checklist-heading>.pp-link{margin-left:auto;min-height:44px}
.sg-category-grid-check{min-height:64px;text-decoration:none;color:var(--sg-ink);gap:12px;padding:10px 8px;border-radius:6px}
.sg-category-grid-check:hover{background:#f8f6fd}
.sg-grid-check-name{flex:1;min-width:0;font-size:14px;font-weight:500;line-height:1.5;overflow-wrap:anywhere}
.sg-grid-status{flex:none;width:20px;height:20px;display:grid;place-items:center;border:1px solid #d9d3e7;border-radius:4px;color:#777084;background:#faf9fc;font-size:13px;font-weight:700}
.sg-grid-status[data-state=pass]{background:#2f8a5c;border-color:#2f8a5c;color:white}
.sg-grid-status[data-state=concern]{background:#fff6e7;border-color:#e6c58a;color:#946014}
.sg-grid-status[data-state=inconclusive]{background:#f7f5fc;border:1px dashed #b9addf;color:#62519c}
.sg-grid-status[data-state=informational]{background:#eef5ff;border-color:#b5c8e3;color:#315e9b}
.sg-grid-status[data-state=not_applicable]{color:#777382;background:#f4f3f5}
#category-view-panel{scroll-margin-top:120px}
@media(max-width:760px){.sg-category-explorer>.sg-category-heading{align-items:flex-start;flex-direction:column;gap:12px}.sg-category-explorer>.sg-category-heading>.sg-category-view-switch{margin-left:0}.sg-checklist-heading>.pp-link{margin-left:0}.sg-category-grid-check{min-height:56px}}

/* Each consumer question discloses only its relevant checklist. */
.sg-question-check-legend{border-top:1px solid var(--sg-line);padding-top:12px;margin-bottom:4px}
.sg-question-dropdown{border-bottom:1px solid var(--sg-line)}
.sg-question-dropdown-toggle{display:flex;justify-content:space-between;align-items:center;gap:18px;width:100%;padding:20px 4px;border:0;background:transparent;text-align:left;cursor:pointer}
.sg-question-dropdown-toggle:hover{background:#faf9fe}
.sg-question-dropdown-toggle .sg-question-copy>strong{display:block;font-size:16px;line-height:1.45}
.sg-question-dropdown-toggle .sg-question-copy>small{display:block;font-size:13px;color:var(--sg-muted);line-height:1.6;margin-top:4px}
.sg-question-dropdown-chevron{flex:none;font-size:22px;color:var(--sg-muted);padding:0 8px}
.sg-question-check-panel{padding:0 4px 18px}
@media(max-width:600px){.sg-question-dropdown-toggle{padding:18px 0;gap:10px}.sg-question-dropdown-toggle .sg-question-copy>strong{font-size:15px}.sg-question-check-panel{padding:0 0 16px}}
