/* ============================================================
   WCAG Checker — redesigned to the design handoff.
   Poppins (headings/UI/numbers) + Mulish (body). Standalone
   stylesheet (Checker only); does not affect other apps.
   ============================================================ */

:root {
  --ink: #16273F;
  --ink-2: #33404F;
  --body: #43525F;
  --muted: #8791A0;
  --muted-2: #9AA4B2;
  --muted-3: #5B6675;
  --brand: #E8402A;
  --brand-busy: #EE8B7C;
  --blue: #3C7CE0;
  --teal: #28BFC0;
  --green: #1FA97A;
  --amber: #D19A1E;
  /* "needs a manual check" — deliberately darker than --amber so the text hits
     4.5:1 on the pale orange card/pill backgrounds. */
  --ck-check: #C4750F;
  --danger: #D14545;
  --line: #EAEDF3;
  --line-2: #E7EBF1;
  --card-shadow: 0 4px 16px rgba(18, 38, 63, 0.05);
  font-family: "Mulish", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Mulish", system-ui, -apple-system, sans-serif;
  color: var(--ink-2);
  background: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
::selection { background: #ffd9d0; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%);
}
body.auth-pending .app-shell { display: none; }

.ck-header-inner,
.ck-hero-inner,
.ck-tabs-inner,
.ck-main,
.ck-footer-inner { max-width: 90%; margin: 0 auto; width: 100%; }

/* ---------------- Header ---------------- */
.ck-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(18, 38, 63, 0.04);
}
.ck-header-inner {
  padding: 14px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.ck-header-left { display: flex; align-items: center; gap: 20px; }
.menu-wrap { position: relative; }
.ck-menu-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  background: #fff;
  border: 1px solid #E4E8EF;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(18, 38, 63, 0.05);
}
.ck-menu-button:hover { background: #F7F9FC; }
.ck-menu-bars { display: flex; flex-direction: column; gap: 4px; width: 22px; }
.ck-menu-bars span { height: 2.5px; border-radius: 2px; background: #3B4757; }
.ck-logo { height: 46px; width: auto; display: block; }
.ck-header-divider { width: 1px; height: 28px; background: #E2E6ED; }
.ck-header-title {
  font-family: "Poppins";
  font-weight: 600;
  font-size: 20px;
  color: var(--ink);
  letter-spacing: -0.3px;
  white-space: nowrap;
}
.ck-header-right { display: flex; align-items: center; gap: 16px; }
.ck-select { display: inline-flex; flex-direction: column; gap: 3px; }
.ck-select span {
  font-family: "Poppins";
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-left: 2px;
}
.ck-select select {
  min-width: 170px;
  min-height: 40px;
  border: 1px solid #E4E8EF;
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-family: "Poppins";
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
}
.ck-select select:focus-visible,
.ck-search input:focus-visible {
  outline: 3px solid rgba(60, 124, 224, 0.25);
  border-color: var(--blue);
}

/* ---------------- Hero ---------------- */
.ck-hero-inner { padding: 32px; }
.ck-hero-title {
  font-family: "Poppins";
  font-weight: 700;
  font-size: 38px;
  line-height: 1.05;
  letter-spacing: -0.5px;
  color: var(--ink);
  margin: 0;
}
.ck-hero-meta { margin: 8px 0 0; font-size: 14px; color: var(--muted); font-weight: 600; }
.ck-hero[hidden] { display: none; }

/* ---------------- Tabs ---------------- */
.ck-tabs {
  background: #fff;
  border-bottom: 1px solid var(--line-2);
  box-shadow: 0 1px 2px rgba(18, 38, 63, 0.03);
}
.ck-tabs[hidden] { display: none; }
.ck-tabs-inner { padding: 0 32px; display: flex; gap: 38px; }
.ck-tab {
  appearance: none; background: none; border: none;
  font-family: "Poppins"; font-weight: 600; font-size: 16px;
  color: var(--muted);
  padding: 18px 2px;
  border-bottom: 3px solid transparent;
}
.ck-tab.active { font-weight: 700; color: var(--ink); border-bottom-color: var(--brand); }
.ck-tab:hover { color: var(--ink); }

/* ---------------- Main ---------------- */
.ck-main { flex: 1; padding: 34px 32px 56px; }
.ck-view { animation: fadeUp 0.4s ease both; }
.ck-view[hidden], .ck-detail[hidden] { display: none; }
.ck-empty { color: var(--muted); padding: 40px 8px; text-align: center; }

.ck-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--card-shadow);
}
.ck-card-title { font-family: "Poppins"; font-weight: 700; font-size: 22px; color: var(--ink); margin: 0 0 4px; }
.ck-card-sub { font-size: 14.5px; color: var(--muted); margin: 0 0 26px; }

/* ---------------- Summary ---------------- */
.ck-banner {
  display: flex; align-items: center; gap: 22px;
  background: linear-gradient(90deg, #EAF7FB 0%, #F0FBF8 100%);
  border: 1px solid #CDE9F0;
  border-radius: 18px;
  padding: 24px 28px;
  margin-bottom: 26px;
}
.ck-banner-badge {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, #2FA8C9, #26C1A9);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 18px rgba(38, 175, 180, 0.35);
}
.ck-banner-title { font-family: "Poppins"; font-weight: 700; font-size: 21px; color: var(--ink); margin-bottom: 6px; }
.ck-banner-text { font-size: 15px; color: var(--body); line-height: 1.5; }
.ck-banner-text strong { color: var(--ink); }
.ck-intro { font-size: 16px; color: var(--body); line-height: 1.55; margin: 0 0 26px; max-width: 900px; }

/* Principle score cards — one row of four above the content grid. */
.ck-principle-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.ck-principle-cards:empty { display: none; }
.ck-pcard { background: #fff; border: 1px solid var(--pc-border, #eaedf3); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.ck-pcard-head { display: flex; align-items: flex-start; gap: 12px; }
.ck-pcard-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: var(--pc-tint, #f1f0fc); display: flex; align-items: center; justify-content: center; }
.ck-pcard-titles { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ck-pcard-eyebrow { font-family: "Poppins"; font-weight: 700; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: #98a2b0; }
.ck-pcard-name { font-family: "Poppins"; font-weight: 700; font-size: 17px; color: var(--ink); line-height: 1.2; }
.ck-pcard-blurb { font-size: 13px; color: #8791a0; line-height: 1.45; margin: 0; }
.ck-pcard-score { margin-top: auto; }
.ck-pcard-score-row { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.ck-pcard-pct { font-family: "Poppins"; font-weight: 800; font-size: 26px; color: var(--pc-accent, #5b4fd1); line-height: 1; }
.ck-pcard-ratio { font-size: 12.5px; color: #8791a0; }
.ck-pcard-bar { height: 8px; border-radius: 999px; background: #edf0f5; overflow: hidden; margin-bottom: 10px; }
.ck-pcard-bar > i { display: block; height: 100%; border-radius: 999px; background: var(--pc-accent, #5b4fd1); transition: width 0.5s ease; }
.ck-pcard-foot { font-family: "Poppins"; font-weight: 700; font-size: 12.5px; color: #8791a0; }
.ck-pcard-foot.clear { color: #1fa97a; }

.ck-summary-grid { display: grid; grid-template-columns: minmax(360px, 1fr) 1.7fr; gap: 22px; align-items: stretch; }
.ck-summary-side { display: flex; flex-direction: column; gap: 22px; }

.ck-journey-body { display: flex; align-items: center; gap: 28px; }
.ck-donut {
  position: relative; flex: 0 0 auto; width: 168px; height: 168px; border-radius: 50%;
  background: conic-gradient(from -90deg, #3C7CE0 0%, #28BFC0 calc(var(--score) * 1%), #EAEEF4 calc(var(--score) * 1%), #EAEEF4 100%);
  display: grid; place-items: center;
}
.ck-donut::before { content: ""; position: absolute; inset: 16px; background: #fff; border-radius: 50%; }
.ck-donut strong { position: relative; font-family: "Poppins"; font-weight: 800; font-size: 36px; color: var(--ink); }

.ck-level-bars { flex: 1; min-width: 0; }
.summary-level-row { margin-bottom: 22px; }
.summary-level-row > div:first-child { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.summary-level-row strong { font-family: "Poppins"; font-weight: 600; font-size: 16px; color: var(--ink); }
.summary-level-row span { font-family: "Poppins"; font-weight: 700; font-size: 16px; color: var(--ink); }
.summary-progress-bg { height: 10px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.summary-progress-bg span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #3C7CE0, #28BFC0); }
.ck-level-bars p { font-size: 13px; color: #98A2B0; font-style: italic; margin: 0; }

.ck-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.summary-status-card { border-radius: 18px; padding: 22px 20px; text-align: center; border: 1px solid transparent; }
.summary-status-card h3 { font-family: "Poppins"; font-weight: 700; font-size: 16px; color: var(--ink); margin: 0 0 12px; }
.summary-status-card strong { font-family: "Poppins"; font-weight: 800; font-size: 38px; line-height: 1; }
.summary-status-card.unique { background: #F1F0FC; border-color: #E4E1F7; }
.summary-status-card.unique strong { color: #5B4FD1; }
.summary-status-card.todo { background: #E7F7F1; border-color: #CDEDE1; }
.summary-status-card.todo strong { color: #1FA97A; }
.summary-status-card.progress { background: #FCF6E4; border-color: #F1E7C4; }
.summary-status-card.progress strong { color: #D19A1E; }
.summary-status-card.cant-fix { background: #FCECEC; border-color: #F5D5D5; }
.summary-status-card.cant-fix strong { color: #D14545; }

.ck-severity { flex: 1; display: flex; flex-direction: column; }
.ck-severity .ck-card-title { margin-bottom: 24px; }
.ck-severity-bars { display: flex; flex-direction: column; gap: 22px; justify-content: center; flex: 1; }
.summary-severity-row { display: flex; align-items: center; gap: 18px; }
.summary-severity-row strong { flex: 0 0 96px; font-family: "Poppins"; font-weight: 700; font-size: 16px; color: var(--ink); }
.summary-severity-row > span { flex: 0 0 34px; font-family: "Poppins"; font-weight: 700; font-size: 16px; color: var(--ink); }
.summary-severity-row > div { flex: 1; height: 14px; border-radius: 999px; background: #EDF0F5; overflow: hidden; }
.summary-severity-row > div i { display: block; height: 100%; border-radius: 999px; }
.summary-severity-row.critical > div i { background: linear-gradient(90deg, #8E1B12, #C0392B); }
.summary-severity-row.high > div i { background: linear-gradient(90deg, #C0392B, #E05343); }
.summary-severity-row.medium > div i { background: linear-gradient(90deg, #EAA92C, #F4C24E); }
.summary-severity-row.low > div i { background: linear-gradient(90deg, #6D7C8C, #9AA4B2); }

/* ---------------- Segmented control ---------------- */
.ck-segmented {
  display: inline-flex; background: #F1F4F9; border: 1px solid #E5E9F0;
  border-radius: 12px; padding: 4px; gap: 4px;
}
.ck-segmented button {
  appearance: none; border: none; background: transparent;
  font-family: "Poppins"; font-weight: 600; font-size: 13.5px;
  color: var(--muted-3); padding: 8px 16px; border-radius: 9px;
}
.ck-segmented button.active { background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(60, 124, 224, 0.35); }

/* ---- Full Report filter bar (level / severity / primary role) ---- */
/* margin-top wins the margin-collapse against .ck-report-head's 20px bottom margin
   (adjacent siblings collapse to the larger value, they don't add up), so this sets the
   real gap between the heading text and the filter bar. */
.ck-filters { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin: 34px 0 28px; }
.ck-filter { display: flex; flex-direction: column; gap: 6px; }
.ck-filter-label {
  font-family: "Poppins"; font-weight: 600; font-size: 11.5px; letter-spacing: 0.03em;
  text-transform: uppercase; color: var(--muted-2);
  line-height: 1.4; height: 16px; /* pin the label box so all three groups align exactly */
}
/* Three groups side by side is ~1180px at the default control size, which wraps on
   anything under a very wide window. Tighten the controls inside the filter bar only —
   the segmented controls elsewhere in the app keep their original size. */
.ck-filters .ck-segmented { padding: 3px; gap: 3px; }
.ck-filters .ck-segmented button { font-size: 12.5px; padding: 7px 10px; border-radius: 8px; }
/* Extra breathing room BETWEEN the filter categories (on top of the 14px base gap, so
   28px after Conformance level and after Severity) without also pushing the trailing
   "Clear filters" link away from the last group. */
.ck-filters .ck-filter + .ck-filter { margin-left: 14px; }
.ck-filter-reset {
  appearance: none; background: none; border: none; cursor: pointer; padding: 8px 4px;
  font-family: "Poppins"; font-weight: 600; font-size: 13px; color: var(--blue);
  text-decoration: underline; text-underline-offset: 2px;
}
.ck-filter-reset[hidden] { display: none; }
/* Criterion meta chips (severity + primary role) shown on each card. */
.ck-crit-meta { display: inline-flex; align-items: center; gap: 6px; margin-left: 8px; }
.ck-crit-chip {
  font-family: "Poppins"; font-weight: 600; font-size: 10.5px; letter-spacing: 0.02em;
  border-radius: 6px; padding: 2px 6px; white-space: nowrap;
  border: 1px solid transparent;
}
.ck-crit-chip.sev-Critical { background: #FBE9E9; border-color: #F3D2D2; color: #A32323; }
.ck-crit-chip.sev-High { background: #FDEEE4; border-color: #F6DAC7; color: #9C4A10; }
.ck-crit-chip.sev-Medium { background: #FBF3DC; border-color: #F0E3BD; color: #7A5E10; }
.ck-crit-chip.sev-Low { background: #EDF1F7; border-color: #DDE4EE; color: #4E5A6B; }
.ck-crit-chip.role { background: #EEF2FD; border-color: #DAE3F8; color: #2F5AA8; }

/* ---------------- Full Report ---------------- */
.ck-report-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.ck-report-title { font-family: "Poppins"; font-weight: 700; font-size: 24px; color: var(--ink); margin: 0 0 4px; }
.ck-report-sub { font-size: 14.5px; color: var(--muted); margin: 0; }
.ck-count-pills { display: flex; gap: 10px; align-items: center; }
.ck-count-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Poppins"; font-weight: 700; font-size: 13.5px;
  padding: 8px 14px; border-radius: 999px;
}
.ck-count-pill.pass { background: #E7F7F1; border: 1px solid #CDEDE1; color: var(--green); }
.ck-count-pill.fail { background: #FCECEC; border: 1px solid #F5D5D5; color: var(--danger); }
.ck-count-pill.check { background: #FFF4E4; border: 1px solid #F5DFBE; color: var(--ck-check, #D98216); }
/* The level control's old 28px bottom margin now lives on .ck-filters — as a flex item
   inside a filter group it made that one group 28px taller than its siblings, which
   (with the bar bottom-aligned) knocked it out of line with the other two. */

.ck-principle { margin-bottom: 32px; }
.ck-principle-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.ck-principle-head h3 { font-family: "Poppins"; font-weight: 700; font-size: 18px; color: var(--ink); margin: 0; }
.ck-principle-head span { font-family: "Poppins"; font-weight: 600; font-size: 13px; color: var(--muted-2); }
.ck-crit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.ck-crit-card {
  display: flex; align-items: flex-start; gap: 12px;
  border-radius: 12px; padding: 14px 16px; border: 1px solid transparent; text-align: left; width: 100%;
  background: #fff;
}
.ck-crit-card.passed { background: #F2FBF7; border-color: #CFEDE0; }
.ck-crit-card.failed { background: #FDF3F3; border-color: #F6D8D8; cursor: pointer; }
.ck-crit-card.failed:hover { box-shadow: 0 6px 16px rgba(209, 69, 69, 0.14); }
/* Third state: the automated pass could neither confirm nor deny — a human must look. */
.ck-crit-card.check { background: #FFF7EC; border-color: #F7E0BC; cursor: pointer; }
.ck-crit-card.check:hover { box-shadow: 0 6px 16px rgba(198, 124, 20, 0.16); }
.ck-crit-icon { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; margin-top: 1px; }
.ck-crit-card.passed .ck-crit-icon { background: var(--green); }
.ck-crit-card.failed .ck-crit-icon { background: var(--danger); }
.ck-crit-card.check .ck-crit-icon { background: var(--ck-check, #D98216); }
.ck-crit-body { min-width: 0; flex: 1; }
.ck-crit-row { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.ck-crit-id { font-family: "Poppins"; font-weight: 700; font-size: 14px; color: var(--ink); }
.ck-crit-level { font-family: "Poppins"; font-weight: 600; font-size: 11px; color: var(--muted-3); background: #EEF1F6; border: 1px solid #E0E5EE; border-radius: 6px; padding: 2px 7px; }
.ck-crit-status { margin-left: auto; font-family: "Poppins"; font-weight: 700; font-size: 12px; }
.ck-crit-card.passed .ck-crit-status { color: var(--green); }
.ck-crit-card.failed .ck-crit-status { color: var(--danger); }
.ck-crit-card.check .ck-crit-status { color: var(--ck-check, #D98216); }
.ck-crit-name { font-size: 13.5px; color: var(--body); line-height: 1.35; }
.ck-crit-note { display: block; margin-top: 6px; font-size: 12px; font-style: italic; color: var(--muted, #8791A0); }

/* ---- Manual-checks modal (orange card click-through) ---- */
.ck-checks-overlay { position: fixed; inset: 0; background: rgba(17, 24, 39, 0.45); z-index: 60; }
.ck-checks-wrap { position: fixed; inset: 0; display: grid; place-items: center; z-index: 61; padding: 24px; }
.ck-checks-wrap[hidden], .ck-checks-overlay[hidden] { display: none; }
.ck-checks-modal {
  background: #fff; border-radius: 16px; width: min(720px, 100%); max-height: min(80vh, 760px);
  display: flex; flex-direction: column; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24); overflow: hidden;
}
.ck-checks-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px; border-bottom: 1px solid #EDF0F5; }
.ck-checks-head-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; background: var(--ck-check, #D98216); display: grid; place-items: center; }
.ck-checks-head-titles { flex: 1; min-width: 0; }
.ck-checks-title { font-family: "Poppins"; font-weight: 700; font-size: 17px; color: var(--ink); margin: 0; }
.ck-checks-sub { font-size: 13px; color: var(--muted-2); margin-top: 2px; }
.ck-checks-close { flex: 0 0 auto; background: none; border: none; cursor: pointer; padding: 4px; border-radius: 8px; }
.ck-checks-close:hover { background: #F3F5F9; }
.ck-checks-body { padding: 16px 20px 20px; overflow-y: auto; }
.ck-check-card { border: 1px solid #F0E2CB; background: #FFFBF4; border-radius: 12px; padding: 13px 15px; margin-bottom: 10px; }
.ck-check-card:last-child { margin-bottom: 0; }
.ck-check-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.ck-check-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 12.5px; color: #92600F; background: #FBEED7; border: 1px solid #F1DFC0; border-radius: 6px; padding: 2px 7px; }
.ck-check-pages { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--muted-2); }
.ck-check-msg { font-size: 13.5px; color: var(--body); line-height: 1.45; margin: 0; }
.ck-check-fix { font-size: 13px; color: #7A5410; line-height: 1.45; margin: 7px 0 0; }
.ck-check-sel { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted-2); margin-top: 7px; word-break: break-all; }
.ck-checks-empty { font-size: 13.5px; color: var(--muted-2); padding: 8px 0; }

/* ---------------- Pages & Scan Groups ---------------- */
.ck-pages-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.ck-search { position: relative; display: inline-flex; align-items: center; }
.ck-search svg { position: absolute; left: 13px; pointer-events: none; }
.ck-search input {
  padding: 10px 14px 10px 38px; border: 1px solid #DCE1E9; border-radius: 12px;
  font-family: "Mulish"; font-size: 14px; color: var(--ink); min-width: 250px; background: #fff;
}
.ck-search[hidden] { display: none; }
.ck-count-line { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }

.ck-groups { display: flex; flex-direction: column; gap: 16px; }
.ck-group { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden; }
.ck-group-head { display: flex; align-items: center; gap: 16px; padding: 22px 24px; }
.ck-chevron {
  flex: 0 0 auto; display: grid; place-items: center; width: 34px; height: 34px;
  background: #F4F6FA; border: 1px solid var(--line-2); border-radius: 10px;
}
.ck-chevron svg { transition: transform .2s ease; }
.ck-group.expanded .ck-chevron svg { transform: rotate(90deg); }
.ck-group-title { flex: 1; min-width: 0; cursor: pointer; }
.ck-group-title .row { display: flex; align-items: center; gap: 10px; }
.ck-group-title strong { font-family: "Poppins"; font-weight: 700; font-size: 18px; color: var(--ink); }
.ck-count-tag { font-family: "Poppins"; font-weight: 600; font-size: 12px; color: var(--muted-3); background: #EEF1F6; border: 1px solid #E0E5EE; border-radius: 999px; padding: 3px 10px; }
.ck-group-desc { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.ck-last { flex: 0 0 auto; text-align: right; font-size: 12.5px; color: var(--muted-2); }
.ck-last b { color: var(--muted-3); font-weight: 600; }
.ck-group-body { border-top: 1px solid #EEF1F6; background: #FBFCFE; }
.ck-group-body[hidden] { display: none; }

.ck-pages-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden; }
.ck-page-row { display: flex; align-items: center; gap: 16px; padding: 16px 24px; border-bottom: 1px solid #F1F4F8; }
.ck-page-row:last-child { border-bottom: 0; }
.ck-group-body .ck-page-row { padding: 15px 24px 15px 40px; border-bottom: 1px solid #EFF2F7; }
.ck-page-main { flex: 1; min-width: 0; }
.ck-page-title { font-family: "Poppins"; font-weight: 600; font-size: 15px; color: var(--ink); }
.ck-group-body .ck-page-title { font-size: 14.5px; }
.ck-page-url { font-size: 13px; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.ck-crit-dot { display: inline-flex; align-items: center; gap: 6px; font-family: "Poppins"; font-weight: 600; font-size: 12.5px; color: var(--danger); }
.ck-crit-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }
.ck-status { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 12px; font-family: "Poppins"; font-weight: 700; font-size: 12.5px; white-space: nowrap; }
.ck-status.clear { background: #E7F7F1; border: 1px solid #CDEDE1; color: var(--green); }
.ck-status.warn { background: #FCF6E4; border: 1px solid #F1E7C4; color: var(--amber); }
.ck-status.issues { background: #FCECEC; border: 1px solid #F5D5D5; color: var(--danger); }

/* ---------------- Buttons ---------------- */
.ck-btn-primary {
  display: inline-flex; align-items: center; gap: 8px; border: none;
  font-family: "Poppins"; font-weight: 600; font-size: 14px; color: #fff;
  background: var(--brand); padding: 10px 18px; border-radius: 999px;
  box-shadow: 0 4px 12px rgba(232, 64, 42, 0.28); white-space: nowrap;
}
.ck-btn-primary:hover { background: #d5381f; }
.ck-btn-primary[disabled] { background: var(--brand-busy); box-shadow: none; cursor: default; }
.ck-btn-secondary {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: "Poppins"; font-weight: 600; font-size: 13px; color: var(--ink);
  background: #fff; border: 1px solid #DCE1E9; padding: 8px 14px; border-radius: 10px; white-space: nowrap;
}
.ck-btn-secondary:hover { background: #F7F9FC; }
.ck-btn-secondary[disabled] { color: var(--muted-2); cursor: default; }
.ck-spin { width: 13px; height: 13px; border-radius: 50%; display: inline-block; animation: spin 0.7s linear infinite; border: 2px solid rgba(255, 255, 255, 0.45); border-top-color: #fff; }
.ck-btn-secondary .ck-spin { border: 2px solid #C7CEDA; border-top-color: var(--ink); }

/* ---------------- Footer ---------------- */
.ck-footer-rule { height: 4px; background: linear-gradient(90deg, #E8402A, #F0862A, #F4C24E, #3FB27A, #2BA9C9); }
.ck-footer { background: #fff; border-top: 1px solid var(--line); }
.ck-footer-inner { padding: 22px 32px; font-size: 13.5px; color: #7A8798; }

/* ---------------- Issue page ---------------- */
/* Issue content shares the header's width (the shared 90% max-width rule); no override. */
.issue-view[hidden] { display: none; }
/* Guard: elements toggled via the `hidden` attribute that also set an explicit
   `display` (flex/inline-flex) below would otherwise ignore `hidden`. */
.issue-view [hidden] { display: none !important; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

/* hero */
.issue-back { display: inline-flex; align-items: center; gap: 7px; font-family: "Poppins"; font-weight: 600; font-size: 13.5px; color: var(--blue); background: none; border: 0; padding: 0; cursor: pointer; margin-bottom: 14px; }
.issue-back:hover { color: #1E56C0; }
.issue-hero-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 22px; }
.issue-hero-title { font-family: "Poppins"; font-weight: 700; font-size: 32px; line-height: 1.05; margin: 0; letter-spacing: -0.5px; color: var(--ink); }
.issue-hero-url { font-family: "Mulish"; font-weight: 600; font-size: 15px; color: var(--blue); overflow-wrap: anywhere; }
.issue-hero-right { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.issue-academy { display: flex; flex-direction: column; justify-content: center; gap: 8px; text-decoration: none; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 16px; box-shadow: 0 2px 8px rgba(18,38,63,0.04); transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.issue-academy:hover { border-color: #E8402A; box-shadow: 0 6px 16px rgba(232,64,42,0.14); transform: translateY(-1px); }
.issue-academy:focus-visible { outline: 2px solid #E8402A; outline-offset: 2px; }
.issue-academy-top { display: inline-flex; align-items: center; gap: 8px; color: #E8402A; }
.issue-academy-label { font-family: "Poppins"; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.issue-academy-status { align-self: flex-start; font-family: "Poppins"; font-weight: 700; font-size: 11.5px; border-radius: 999px; padding: 3px 11px; }
.issue-academy-status.done { color: #1F8A5B; background: #E7F7F1; }
.issue-academy-status.prog { color: #B5772E; background: #FCF6E4; }
.issue-academy-status.todo { color: #8791A0; background: #EEF1F6; }
.issue-sc-cluster { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line-2); border-radius: 14px; padding: 12px 18px; box-shadow: 0 2px 8px rgba(18,38,63,0.04); }
.issue-sc-id { font-family: "Poppins"; font-weight: 800; font-size: 22px; color: var(--ink); letter-spacing: -0.5px; }
.issue-sc-divider { width: 1px; height: 30px; background: var(--line-2); }
.issue-sc-name { font-family: "Poppins"; font-weight: 700; font-size: 15px; color: var(--ink); }
.issue-sc-meta { font-size: 12.5px; color: var(--muted); }

/* split */
.issue-split { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,2fr); gap: 24px; align-items: start; }
.issue-left { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 92px; }

/* nav */
.issue-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--card-shadow); padding: 10px 12px; }
.issue-nav-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid var(--btn-border, #E4E8EF); background: #fff; color: var(--ink); cursor: pointer; flex: 0 0 auto; }
.issue-nav-btn:disabled { background: #F8FAFC; color: #C6CDD8; cursor: not-allowed; }
.issue-nav-count { font-family: "Poppins"; font-weight: 700; font-size: 14.5px; color: var(--ink); text-align: center; }
.issue-nav-sub { font-size: 11.5px; color: var(--muted-2); text-align: center; }

/* detail card */
.issue-detail-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--card-shadow); padding: 24px; }
.issue-detail-top { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.issue-detail-sc { font-family: "Poppins"; font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: -0.4px; }
.issue-detail-intro { font-size: 14px; line-height: 1.6; color: var(--muted-3); margin: 0 0 6px; }
.issue-sev { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 13px; font-family: "Poppins"; font-weight: 700; font-size: 12.5px; }
/* "critical" is the top of the criterion severity scale — darker than high. */
.issue-sev-critical { color: #8E1B12; background: #FBE3E0; }
.issue-sev-high { color: #C0392B; background: #FCECEC; }
.issue-sev-medium { color: #B5772E; background: #FCF3E8; }
.issue-sev-low { color: #2F6FE0; background: #EAF1FC; }
.issue-group-head { font-family: "Poppins"; font-weight: 700; font-size: 14.5px; color: var(--ink); margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.issue-dot { width: 8px; height: 8px; border-radius: 50%; }
.issue-dot.red { background: #D14545; }
.issue-dot.green { background: #1FA97A; }
.issue-dot.blue { background: #2F6FE0; }
.issue-dot.amber { background: var(--ck-check, #C4750F); }
.issue-affected { margin-bottom: 4px; }
.issue-field-label { font-family: "Poppins"; font-weight: 700; font-size: 11px; letter-spacing: 0.4px; text-transform: uppercase; color: #8791A0; margin-bottom: 6px; }
.issue-selpath { font-size: 12.3px; line-height: 1.55; color: #16273F; background: #F6F8FC; border: 1px solid #E4E9F1; border-radius: 10px; padding: 11px 13px; word-break: break-word; margin-bottom: 14px; }
.issue-snippet { margin: 0; background: #0E1B2A; border-radius: 10px; padding: 13px 15px; font-size: 12.3px; line-height: 1.6; color: #B7D2EC; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.issue-fail-list { display: flex; flex-direction: column; gap: 12px; }
.issue-fail-card { border: 1px solid #F1DAD6; background: #FDF6F5; border-radius: 12px; padding: 15px 16px; }
.issue-fail-code { font-family: "Poppins"; font-weight: 700; font-size: 13.5px; color: #C0392B; margin-bottom: 6px; }
.issue-fail-detail { font-size: 13px; line-height: 1.55; color: var(--muted-3); margin: 0 0 8px; }
.issue-fail-fix { font-size: 13px; line-height: 1.55; color: #B5462F; font-weight: 600; margin: 0; }
.issue-opt-list { display: flex; flex-direction: column; gap: 10px; }
.issue-opt { display: flex; gap: 12px; align-items: flex-start; width: 100%; text-align: left; cursor: pointer; border: 1.5px solid var(--line-2); background: #fff; border-radius: 12px; padding: 13px 15px; }
.issue-opt.selected { border-color: #7A5AF0; background: #F7F4FE; }
.issue-opt-radio { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C7D0DE; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.issue-opt.selected .issue-opt-radio { border-color: #7A5AF0; }
.issue-opt-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.issue-opt.selected .issue-opt-dot { background: #7A5AF0; }
.issue-opt-body { flex: 1; min-width: 0; }
.issue-opt-code { display: block; font-family: "Poppins"; font-weight: 700; font-size: 13.5px; color: var(--ink); }
.issue-opt-detail { display: block; font-size: 13px; line-height: 1.5; color: var(--muted-3); margin-top: 3px; }
.issue-opt-how { display: flex; gap: 7px; align-items: flex-start; margin-top: 9px; padding-top: 9px; border-top: 1px dashed #E1DBF5; }
.issue-opt-how-icon { flex: 0 0 auto; color: #7A5AF0; margin-top: 1px; }
.issue-opt-how-text { display: block; font-size: 12.5px; line-height: 1.5; color: #5D3FD0; font-weight: 600; }
.issue-ai-btn { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; margin-top: 22px; font-family: "Poppins"; font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(120deg,#7A5AF0,#5D3FD0); border: none; border-radius: 13px; padding: 14px; cursor: pointer; box-shadow: 0 8px 20px rgba(93,63,208,0.32); }
.issue-ai-btn.loading { background: #8B74E8; cursor: wait; }
.issue-ai-caption { font-size: 11.5px; color: var(--muted-2); text-align: center; margin-top: 9px; }
.issue-cantfix-btn { width: 100%; margin-top: 14px; font-family: "Poppins"; font-weight: 700; font-size: 13.5px; color: #fff; background: #1FA97A; border: none; border-radius: 11px; padding: 11px; cursor: pointer; box-shadow: 0 5px 14px rgba(31,169,122,0.28); }
.issue-cantfix-btn:hover { background: #188C64; }

/* AI panel */
.issue-ai-card { background: #fff; border: 1px solid #E3DBF6; border-radius: 18px; box-shadow: 0 6px 20px rgba(93,63,208,0.10); overflow: hidden; }
.issue-ai-head { display: flex; align-items: center; gap: 10px; padding: 16px 20px; background: linear-gradient(120deg,#F3EEFF,#EEF3FF); border-bottom: 1px solid #E7E0F7; }
.issue-ai-badge { width: 30px; height: 30px; border-radius: 9px; background: #7A5AF0; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.issue-ai-title { font-family: "Poppins"; font-weight: 700; font-size: 14.5px; color: var(--ink); }
.issue-ai-sub { font-size: 11.5px; color: #7A5AF0; font-weight: 600; }
.issue-ai-body { padding: 20px; }
.issue-ai-summary { font-size: 13.5px; line-height: 1.6; color: var(--muted-3); margin: 0 0 16px; }
.issue-ai-lbl { font-family: "Poppins"; font-weight: 700; font-size: 12px; letter-spacing: 0.4px; text-transform: uppercase; color: var(--ink); margin-bottom: 8px; }
.issue-ai-lbl.fail { color: #C0392B; }
.issue-ai-lbl.pass { color: #1F8A5B; }
.issue-ai-lbl-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.issue-code { margin: 0 0 16px; background: #0E1B2A; border-radius: 11px; padding: 15px 16px; font-size: 12.3px; line-height: 1.6; white-space: pre-wrap; word-break: break-word; overflow-x: auto; }
.issue-code.fail { color: #FF9E90; }
.issue-code.pass { color: #8FE0B4; }
.issue-copy-btn { display: inline-flex; align-items: center; gap: 6px; font-family: "Poppins"; font-weight: 600; font-size: 11.5px; color: var(--muted-3); background: #fff; border: 1px solid var(--btn-border,#E4E8EF); border-radius: 8px; padding: 5px 10px; cursor: pointer; }
.issue-copy-btn:hover { border-color: #7A5AF0; color: #7A5AF0; }
.issue-steps { display: flex; flex-direction: column; gap: 9px; margin-bottom: 18px; }
.issue-step { display: flex; gap: 11px; align-items: flex-start; }
.issue-step-n { flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%; background: #EEF0FC; color: #5D3FD0; font-family: "Poppins"; font-weight: 700; font-size: 11px; display: flex; align-items: center; justify-content: center; }
.issue-step span:last-child { font-size: 13px; line-height: 1.5; color: var(--muted-3); }
.issue-ai-loading { display: flex; align-items: center; gap: 10px; padding: 24px; font-size: 13.5px; color: var(--muted-3); }
.issue-ai-spinner { width: 17px; height: 17px; border: 2.4px solid rgba(93,63,208,0.25); border-top-color: #5D3FD0; border-radius: 50%; display: inline-block; animation: issue-spin .7s linear infinite; }
.issue-ai-error { padding: 18px 20px; font-size: 13.5px; color: #C0392B; }
@keyframes issue-spin { to { transform: rotate(360deg); } }

/* right: screenshot */
.issue-shot-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--card-shadow); overflow: hidden; position: sticky; top: 92px; }
.issue-shot-toolbar { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid #EFF1F6; }
.issue-shot-dots { display: flex; gap: 6px; flex: 0 0 auto; }
.issue-shot-dots span { width: 11px; height: 11px; border-radius: 50%; }
.issue-shot-dots span:nth-child(1) { background: #F0655A; }
.issue-shot-dots span:nth-child(2) { background: #F4C24E; }
.issue-shot-dots span:nth-child(3) { background: #3FB27A; }
.issue-shot-url { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; }
.issue-shot-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.issue-shot-pill { display: inline-flex; align-items: center; gap: 6px; font-family: "Poppins"; font-weight: 700; font-size: 11.5px; color: #C0392B; background: #FCECEC; border: 1px solid #F3D3D3; border-radius: 999px; padding: 4px 11px; }
.issue-shot-open { font-family: "Poppins"; font-weight: 600; font-size: 12px; color: var(--ink); background: #fff; border: 1px solid var(--btn-border,#E4E8EF); border-radius: 9px; padding: 6px 11px; }
.issue-shot-open:hover { border-color: var(--blue); color: var(--blue); }
.issue-shot-area { position: relative; height: 760px; overflow: auto; background: #F6F8FC; }
.issue-shot-inner { position: relative; width: 100%; }
.issue-shot-inner[hidden] { display: none; }
.issue-shot-img { width: 100%; display: block; }
.issue-shot-empty { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-size: 13.5px; color: var(--muted); }
/* min-width/height keep a tiny element's marker visible without distorting its shape:
   a floor in rendered px stays constant, whereas the old percentage floor in JS grew
   with the page height and made short elements look several times taller than they are. */
.issue-marker { position: absolute; border: 2.5px solid #E8402A; border-radius: 6px; background: rgba(232,64,42,0.12); box-shadow: 0 0 0 3px rgba(232,64,42,0.15); pointer-events: none; min-width: 8px; min-height: 8px; }
.issue-marker-tag { position: absolute; top: -11px; left: -2px; font-family: "Poppins"; font-weight: 700; font-size: 11px; color: #fff; background: #E8402A; border-radius: 6px; padding: 2px 8px; white-space: nowrap; box-shadow: 0 3px 8px rgba(232,64,42,0.4); }

/* can't-fix modal */
.issue-modal-overlay { position: fixed; inset: 0; background: rgba(16,26,40,0.5); z-index: 75; }
.issue-modal-overlay[hidden] { display: none; }
.issue-modal { position: fixed; top: 80px; left: 50%; transform: translateX(-50%); width: calc(100% - 40px); max-width: 520px; background: #fff; border-radius: 22px; box-shadow: 0 30px 80px -18px rgba(16,26,40,0.5); z-index: 80; overflow: hidden; }
.issue-modal[hidden] { display: none; }
.issue-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 24px 28px; border-bottom: 1px solid #EEF1F6; }
.issue-modal-head-left { display: flex; gap: 13px; align-items: flex-start; }
.issue-modal-icon { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: #FCF6E4; display: flex; align-items: center; justify-content: center; }
.issue-modal-title { font-family: "Poppins"; font-weight: 700; font-size: 20px; color: var(--ink); margin: 0; }
.issue-modal-sub { font-size: 13.5px; color: var(--muted); margin-top: 3px; }
.issue-modal-close { width: 40px; height: 40px; border-radius: 12px; background: #F4F6FA; border: 1px solid var(--btn-border,#E4E8EF); cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.issue-modal-body { padding: 24px 28px; display: flex; flex-direction: column; gap: 18px; }
.issue-modal-label { display: block; font-family: "Poppins"; font-weight: 600; font-size: 13.5px; color: var(--ink); margin-bottom: 8px; }
.issue-reason-list { display: flex; flex-direction: column; gap: 9px; }
.issue-reason { display: flex; gap: 11px; align-items: center; width: 100%; text-align: left; cursor: pointer; font-family: "Mulish"; font-weight: 600; font-size: 14px; color: var(--ink); border: 1.5px solid var(--line-2); background: #fff; border-radius: 11px; padding: 12px 14px; }
.issue-reason.selected { border-color: #E0A21E; background: #FFFBF0; }
.issue-reason-radio { flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%; border: 2px solid #C7D0DE; display: flex; align-items: center; justify-content: center; }
.issue-reason.selected .issue-reason-radio { border-color: #E0A21E; }
.issue-reason-dot { width: 9px; height: 9px; border-radius: 50%; background: transparent; }
.issue-reason.selected .issue-reason-dot { background: #E0A21E; }
.issue-modal-textarea { width: 100%; min-height: 110px; resize: vertical; padding: 13px 15px; font-family: "Mulish"; font-size: 14px; color: var(--ink); background: #F6F8FC; border: 1.6px solid #E4E9F1; border-radius: 12px; outline: none; line-height: 1.5; }
.issue-modal-textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(47,111,224,0.12); background: #fff; }
.issue-modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; padding: 18px 28px; border-top: 1px solid #EEF1F6; background: #FBFCFE; }
.issue-modal-cancel { font-family: "Poppins"; font-weight: 600; font-size: 14.5px; color: var(--muted-3); background: #fff; border: 1px solid var(--btn-border,#E4E8EF); border-radius: 11px; padding: 11px 22px; cursor: pointer; }
.issue-modal-save { font-family: "Poppins"; font-weight: 700; font-size: 14.5px; color: #fff; background: #E0A21E; border: none; border-radius: 11px; padding: 11px 24px; cursor: pointer; box-shadow: 0 6px 16px rgba(224,162,30,0.28); }

/* ---------------- Responsive ---------------- */
@media (max-width: 1080px) {
  .ck-summary-grid { grid-template-columns: 1fr; }
  .ck-principle-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .ck-header-inner, .ck-hero-inner, .ck-tabs-inner, .ck-main, .ck-footer-inner { padding-left: 18px; padding-right: 18px; }
  .ck-header-right { display: none; }
  .ck-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .ck-principle-cards { grid-template-columns: 1fr; }
  .ck-journey-body { flex-direction: column; align-items: flex-start; }
  .ck-tabs-inner { gap: 22px; overflow-x: auto; }
  .issue-split { grid-template-columns: 1fr; }
  .issue-left, .issue-shot-card { position: static; }
}


/* ============ Shared app-switcher (9-dot) menu — preserved ============ */
/* Accessibility toolkit menu redesign */
.app-menu {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: min(370px, calc(100vw - 24px));
  max-height: calc(100vh - 78px);
  overflow-y: auto;
  padding: 19px 24px 22px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(145deg, rgba(245, 253, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 42%, rgba(252, 248, 255, 0.98) 100%);
  box-shadow: 0 18px 38px rgba(7, 51, 72, 0.24);
  backdrop-filter: blur(12px);
  z-index: 60;
}

.app-menu[hidden] {
  display: none;
}

.toolkit-header {
  display: block;
  margin-bottom: 14px;
}

.toolkit-header h2 {
  color: #073348;
  font-size: 17px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

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

.tool-item {
  min-height: 95px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 10px;
  background: var(--tool-bg, #edf8fb);
  color: #050505;
  text-align: center;
  font-size: 15px;
  line-height: 1.02;
  font-weight: 400;
  letter-spacing: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 6px 12px rgba(7, 51, 72, 0.04);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.tool-item.active,
.tool-item:hover,
.tool-item:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86), 0 9px 18px rgba(7, 51, 72, 0.13);
}

.tool-account,
.tool-toolbar,
.tool-landscape,
.tool-dashboard {
  --tool-bg: linear-gradient(135deg, #eff8fd 0%, #edf7f6 100%);
}

.tool-wcag,
.tool-reports,
.tool-developer {
  --tool-bg: linear-gradient(135deg, #f2f0ff 0%, #eeeefd 100%);
}

.tool-document,
.tool-evidence {
  --tool-bg: linear-gradient(135deg, #dcf6ec 0%, #ecfbf7 100%);
}

.tool-guardian,
.tool-extensions {
  --tool-bg: linear-gradient(135deg, #d6f4f2 0%, #e8f8ff 100%);
}

.tool-mobile,
.tool-media {
  --tool-bg: linear-gradient(135deg, #e5f4ff 0%, #dff2ff 100%);
}

.tool-audits {
  --tool-bg: linear-gradient(135deg, #fff1df 0%, #ffe8d2 100%);
}

.tool-integrations {
  --tool-bg: linear-gradient(135deg, #dff2ff 0%, #edf9ff 100%);
}

.tool-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #073348;
  font-size: 0;
  font-weight: 800;
  line-height: 1;
  text-shadow: none;
}

.tool-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.tool-icon.toolbar {
  width: 56px;
  height: 36px;
}

.tool-icon.developer {
  width: 41px;
  height: 41px;
  font-size: 0;
}

.toolkit-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #cfeaf2;
}

.menu-logout-button {
  min-height: 36px;
  min-width: 88px;
  border: 0;
  border-radius: 6px;
  background: #073b63;
  color: #ffffff;
  padding: 0 15px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: inset -5px -5px 0 rgba(255, 255, 255, 0.1), 0 6px 10px rgba(7, 51, 72, 0.14);
}

.menu-logout-button:hover,
.menu-logout-button:focus-visible {
  background: #0a4d7f;
}

.menu-logout-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

@media (max-width: 760px) {
  .app-menu {
    right: -20px;
    width: calc(100vw - 24px);
    padding: 18px 16px 20px;
    border-radius: 18px;
  }

  .toolkit-header h2 {
  font-size: 17px;
    white-space: normal;
  }

  .toolkit-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .tool-item {
    min-height: 95px;
    font-size: 15px;
  }

  .tool-icon {
    width: 39px;
    height: 39px;
  }

  .tool-icon.toolbar {
    width: 56px;
    height: 36px;
  }

  .toolkit-actions {
    margin-top: 16px;
    padding-top: 14px;
  }

  .menu-logout-button {
    min-height: 36px;
    min-width: 88px;
    font-size: 15px;
  }
}
/* Shared menu category headings */
.toolkit-category {
  margin-bottom: 16px;
}

.toolkit-category:last-of-type {
  margin-bottom: 0;
}

.toolkit-category-title {
  color: #4a6472;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 14px;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #cfeaf2;
}

/* App-switcher popover anchored to the left-positioned hamburger (redesigned header) */
.ck-header-left .app-menu { left: 0; right: auto; }
@media (max-width: 760px) { .ck-header-left .app-menu { left: 0; right: auto; width: min(370px, calc(100vw - 24px)); } }


/* Shared table paginator (RecitePager — shared/pagination.js) */
.rp-pager { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid #EAEDF3; }
.rp-pager-meta { font-size: 13px; color: #5B6675; }
.rp-pager-btns { display: flex; align-items: center; gap: 10px; }
.rp-pager-page { font-size: 12.5px; color: #8791A0; font-weight: 600; }
.rp-pager-btn { font-family: "Poppins", system-ui, sans-serif; font-weight: 600; font-size: 13px; color: #16273F; background: #fff; border: 1px solid #E4E8EF; border-radius: 9px; padding: 7px 15px; cursor: pointer; }
.rp-pager-btn:hover:not(:disabled) { border-color: #2F6FE0; color: #2F6FE0; }
.rp-pager-btn:disabled { color: #B7C0CE; cursor: not-allowed; }


/* ---- Waiver register (R30/R45) ---- */
.ck-waivers { margin: 0 0 18px; }
.ck-waiver-row { display: grid; grid-template-columns: 90px 1fr 140px 160px; gap: 10px; align-items: baseline; padding: 9px 0; border-top: 1px solid #EDF1F6; font-size: 13px; }
.ck-waiver-row:first-child { border-top: 0; }
.ck-waiver-crit { font-weight: 600; }
.ck-waiver-reason { color: #2A3744; }
.ck-waiver-owner { color: #6B7787; }
.ck-waiver-state { font-size: 12px; font-weight: 600; text-align: right; }
.ck-waiver-active { color: #1FA97A; }
.ck-waiver-expired { color: #E8402A; }

/* =============================== JOURNEYS TAB =============================== */

.ck-j-error {
  background: #FCECEC; border: 1px solid #F3B9AE; color: #C0392B;
  border-radius: 11px; padding: 11px 15px; font-size: 13.5px; margin-bottom: 16px;
}
.ck-j-grid {
  display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr);
  gap: 24px; align-items: start; animation: fadeUp 0.4s ease both;
}
@media (max-width: 960px) { .ck-j-grid { grid-template-columns: 1fr; } }

.ck-j-left { display: flex; flex-direction: column; gap: 16px; }
.ck-j-left-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-j-h2 { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 18px; color: #16273F; margin: 0; }
.ck-j-count { font-size: 13px; color: #8791A0; margin-top: 2px; }
.ck-j-new {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13px; color: #fff;
  background: #E8402A; border: none; border-radius: 11px; padding: 10px 15px; cursor: pointer;
  box-shadow: 0 5px 14px rgba(232, 64, 42, 0.28);
}
.ck-j-new:hover { background: #D5361F; }
.ck-j-empty-list {
  background: #F6F8FC; border: 1px solid #E7EBF1; border-radius: 14px;
  padding: 20px; font-size: 13px; color: #5B6675; line-height: 1.6;
}

.ck-j-card {
  display: block; width: 100%; cursor: pointer; text-align: left;
  background: #fff; border: 1.5px solid #EAEDF3; border-radius: 15px; padding: 15px 17px;
  box-shadow: 0 2px 8px rgba(18, 38, 63, 0.04); transition: all 0.14s ease;
  font-family: inherit;
}
.ck-j-card:hover { border-color: #D5DCE6; }
.ck-j-card.active { background: #FEF4F2; border-color: #F3B9AE; }
.ck-j-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ck-j-card-main { min-width: 0; }
.ck-j-card-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; color: #16273F; }
.ck-j-card-meta { font-size: 12.5px; color: #8791A0; margin-top: 2px; }
.ck-j-card-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.ck-j-author { font-size: 12px; color: #5B6675; }
.ck-j-when { font-size: 12px; color: #B7C0CE; margin-left: auto; }

.ck-j-avatar {
  width: 24px; height: 24px; border-radius: 50%; color: #fff; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 10px;
}
.ck-j-avatar.sm { width: 22px; height: 22px; font-size: 9.5px; }

.ck-j-pill {
  display: inline-block; flex: 0 0 auto; font-family: 'Poppins', sans-serif; font-weight: 700;
  font-size: 10.5px; border-radius: 999px; padding: 3px 10px;
}
.ck-j-pill.issues { color: #C0392B; background: #FCECEC; }
.ck-j-pill.clean { color: #1F8A5B; background: #E7F7F1; }
.ck-j-pill.idle { color: #5B6675; background: #EEF1F6; }

.ck-j-detail {
  background: #fff; border: 1px solid #EAEDF3; border-radius: 18px;
  box-shadow: 0 4px 16px rgba(18, 38, 63, 0.05); overflow: hidden;
}
.ck-j-detail-empty { padding: 40px; }
.ck-j-detail-head {
  padding: 22px 26px; border-bottom: 1px solid #EFF1F6;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.ck-j-detail-main { min-width: 0; }
.ck-j-detail-name { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 22px; color: #16273F; margin: 0; letter-spacing: -0.3px; }
.ck-j-detail-meta { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; font-size: 13px; color: #5B6675; }
.ck-j-metadot { width: 3px; height: 3px; border-radius: 50%; background: #C2CBD8; }
.ck-j-detail-actions { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.ck-j-delete {
  width: 40px; height: 40px; border-radius: 11px; background: #fff; border: 1px solid #E4E8EF;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.ck-j-delete:hover { border-color: #F3B9AE; background: #FEF4F2; }
.ck-j-scan {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 14px; color: #fff;
  background: #1FA97A; border: none; border-radius: 11px; padding: 11px 20px; cursor: pointer;
  box-shadow: 0 5px 14px rgba(31, 169, 122, 0.28);
}
.ck-j-scan:hover:not(:disabled) { background: #17936A; }
.ck-j-scan.is-scanning { background: #8FA0C4; cursor: default; box-shadow: none; }

.ck-j-scanning {
  padding: 15px 26px; background: #EAF1FC; border-bottom: 1px solid #D9E4F6;
  display: flex; align-items: center; gap: 12px; font-size: 13px; color: #1E4E86; line-height: 1.5;
}
.ck-j-scanning-icon {
  width: 26px; height: 26px; border-radius: 7px; background: #2F6FE0; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
}

.ck-j-summary { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid #EFF1F6; }
.ck-j-sum-cell { padding: 16px 22px; border-right: 1px solid #F1F4F8; }
.ck-j-sum-cell:last-child { border-right: none; }
.ck-j-sum-value { font-family: 'Poppins', sans-serif; font-weight: 800; font-size: 24px; line-height: 1; }
.ck-j-sum-label { font-size: 12px; color: #8791A0; font-weight: 600; margin-top: 5px; }

.ck-j-steps-wrap { padding: 22px 26px; }
.ck-j-steps-label {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12.5px;
  letter-spacing: 0.4px; text-transform: uppercase; color: #8791A0; margin-bottom: 16px;
}
.ck-j-step { display: flex; gap: 16px; }
.ck-j-rail { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.ck-j-dot {
  width: 26px; height: 26px; border-radius: 50%; background: #16273F; color: #fff; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12px;
}
.ck-j-dot.clean { background: #1FA97A; }
.ck-j-line { flex: 1; width: 2px; background: #E7EBF1; min-height: 28px; }
.ck-j-step-card {
  flex: 1; min-width: 0; background: #FBFCFE; border: 1px solid #EEF1F6;
  border-radius: 13px; padding: 15px 17px; margin-bottom: 14px;
}
.ck-j-step-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.ck-j-step-main { min-width: 0; }
.ck-j-step-title-row { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ck-j-action {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 10px;
  letter-spacing: 0.4px; text-transform: uppercase; border-radius: 6px; padding: 2px 8px;
}
.ck-j-step-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 14.5px; color: #16273F; }
.ck-j-step-detail { font-size: 11.5px; color: #8791A0; margin-top: 5px; word-break: break-all; }
.ck-j-step-error { font-size: 12px; color: #C0392B; margin-top: 6px; }
.ck-j-badge {
  flex: 0 0 auto; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 11px;
  border-radius: 999px; padding: 4px 11px;
}
.ck-j-badge.issues { color: #C0392B; background: #FCECEC; }
.ck-j-badge.clean { color: #1F8A5B; background: #E7F7F1; }
.ck-j-badge.idle { color: #5B6675; background: #EEF1F6; }
.ck-j-step-foot { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.ck-j-chip {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 11px;
  border-radius: 999px; padding: 3px 10px;
}
.ck-j-chip.critical { color: #C0392B; background: #FCECEC; }
.ck-j-chip.serious { color: #B5462F; background: #FCF3E8; }
.ck-j-chip.moderate { color: #2F6FE0; background: #EAF1FC; }
.ck-j-view-issues {
  margin-left: auto; display: inline-flex; align-items: center; gap: 4px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12.5px; color: #2F6FE0;
  background: none; border: none; cursor: pointer;
}
.ck-j-issues { margin-top: 12px; border-top: 1px solid #EEF1F6; padding-top: 12px; display: flex; flex-direction: column; gap: 7px; }
.ck-j-issue { display: flex; align-items: center; gap: 9px; font-size: 12px; min-width: 0; }
.ck-j-issue-sc {
  flex: 0 0 auto; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 11px;
  color: #16273F; background: #EEF1F6; border-radius: 6px; padding: 2px 8px;
}
.ck-j-issue-sev { flex: 0 0 auto; font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 10.5px; border-radius: 999px; padding: 2px 9px; }
.ck-j-issue-sev.high { color: #C0392B; background: #FCECEC; }
.ck-j-issue-sev.medium { color: #B5462F; background: #FCF3E8; }
.ck-j-issue-sev.low { color: #2F6FE0; background: #EAF1FC; }
.ck-j-issue-sel { color: #8791A0; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- New Journey modal ---- */

.ck-journey-overlay {
  position: fixed; inset: 0; background: rgba(16, 26, 40, 0.5); z-index: 75;
}
.ck-journey-modal-wrap {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: flex-start;
  justify-content: center; padding: 70px 20px; overflow-y: auto; pointer-events: none;
}
/* display:flex above would otherwise defeat the hidden attribute */
.ck-journey-modal-wrap[hidden], .ck-journey-overlay[hidden] { display: none; }
.ck-journey-modal {
  width: 100%; max-width: 560px; background: #fff; border-radius: 22px;
  box-shadow: 0 30px 80px -18px rgba(16, 26, 40, 0.5); pointer-events: auto;
  animation: fadeUp 0.26s ease both; overflow: hidden;
}
.ck-jm-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 24px 28px; border-bottom: 1px solid #EEF1F6;
}
.ck-jm-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 21px; color: #16273F; margin: 0; }
.ck-jm-sub { font-size: 13.5px; color: #8791A0; margin-top: 3px; }
.ck-jm-close {
  width: 40px; height: 40px; border-radius: 12px; background: #F4F6FA; border: 1px solid #E4E8EF;
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.ck-jm-close:hover { background: #EBEFF5; }
.ck-jm-body { padding: 22px 28px; }
.ck-jm-toggle { display: flex; gap: 9px; margin-bottom: 20px; }
.ck-jm-toggle button {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 13.5px; color: #8791A0;
  background: #fff; border: 1.5px solid #E4E8EF; border-radius: 11px; padding: 11px; cursor: pointer;
}
.ck-jm-toggle button.active { color: #16273F; background: #EEF2FA; border-color: #C3D3EC; }
.ck-jm-ext { background: #F6F8FC; border: 1px solid #E7EBF1; border-radius: 14px; padding: 22px; text-align: center; }
.ck-jm-ext-icon {
  width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; background: #FBE9E5;
  display: flex; align-items: center; justify-content: center;
}
.ck-jm-ext-title { font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 15px; color: #16273F; margin-top: 14px; }
.ck-jm-ext-text { font-size: 13px; color: #5B6675; line-height: 1.6; margin-top: 6px; max-width: 380px; margin-left: auto; margin-right: auto; }
.ck-jm-ext-wait {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 16px;
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 12.5px; color: #8791A0;
  background: #EEF1F6; border-radius: 999px; padding: 7px 14px;
}
.ck-jm-ext-wait .dot { width: 8px; height: 8px; border-radius: 50%; background: #C2CBD8; }
.ck-jm-label { display: block; font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13.5px; color: #16273F; margin-bottom: 8px; }
.ck-jm-textarea {
  width: 100%; box-sizing: border-box; min-height: 180px; resize: vertical;
  padding: 14px 16px; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 12.5px; line-height: 1.6;
  background: #0E1B2A; color: #B7D2EC; border: 1px solid #0B1622; border-radius: 12px; outline: none;
}
.ck-jm-hint { font-size: 12px; color: #8791A0; margin-top: 8px; line-height: 1.5; }
.ck-jm-hint .mono, .ck-j-step-detail.mono, .ck-j-issue-sel.mono { font-family: ui-monospace, 'SF Mono', Menlo, monospace; }
.ck-jm-error { color: #C0392B; font-size: 12.5px; margin: 10px 0 0; }
.ck-jm-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 18px 28px; border-top: 1px solid #EEF1F6; background: #FBFCFE;
}
.ck-jm-cancel {
  font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 14.5px; color: #5B6675;
  background: #fff; border: 1px solid #E4E8EF; border-radius: 11px; padding: 11px 22px; cursor: pointer;
}
.ck-jm-cancel:hover { border-color: #C7D0DE; }
.ck-jm-submit {
  font-family: 'Poppins', sans-serif; font-weight: 700; font-size: 14.5px; color: #fff;
  background: #E8402A; border: none; border-radius: 11px; padding: 11px 24px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(232, 64, 42, 0.28);
}
.ck-jm-submit:hover { background: #D5361F; }

/* ============================ Issue Notes ============================ */
.notes-trigger { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; background: #fff; border: 1px solid #EAEDF3; border-radius: 14px; box-shadow: 0 2px 8px rgba(18,38,63,0.05); padding: 12px 14px; cursor: pointer; }
.notes-trigger:hover { border-color: #3C7CE0; }
.notes-trigger-icon { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 9px; background: #EEF3FF; display: flex; align-items: center; justify-content: center; }
.notes-trigger-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.notes-trigger-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14px; color: #16273F; }
.notes-trigger-sub { font-size: 11.5px; color: #8791A0; }
.notes-trigger-count { flex: 0 0 auto; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 11.5px; color: #5B6675; background: #F1F4FA; border: 1px solid #E4E9F1; border-radius: 999px; padding: 3px 10px; }
.notes-trigger-chev { flex: 0 0 auto; display: inline-flex; }

.notes-backdrop { position: fixed; inset: 0; background: rgba(16,26,40,0.5); z-index: 85; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.notes-backdrop.open { opacity: 1; pointer-events: auto; }
.notes-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 92vw; background: #fff; z-index: 86; box-shadow: -16px 0 48px rgba(16,26,40,0.22); display: flex; flex-direction: column; transform: translateX(102%); transition: transform .3s cubic-bezier(.22,.61,.36,1); }
.notes-panel.open { transform: translateX(0); }
.notes-head { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 20px 22px; border-bottom: 1px solid #EFF1F6; }
.notes-head-icon { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: #EEF3FF; display: flex; align-items: center; justify-content: center; }
.notes-head-titles { flex: 1; min-width: 0; }
.notes-head-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 17px; color: #16273F; }
.notes-head-sub { font-size: 12px; color: #8791A0; margin-top: 2px; }
.notes-close { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 11px; background: #F4F6FA; border: 1px solid #E4E8EF; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.notes-close:hover { background: #EBEFF5; }
.notes-thread { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; }
.notes-empty { margin: auto; max-width: 280px; text-align: center; color: #7A8598; font-size: 13.5px; line-height: 1.55; padding: 24px 8px; }
.note-row { display: flex; gap: 12px; align-items: flex-start; }
.note-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-family: "Poppins", sans-serif; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.note-body { flex: 1; min-width: 0; }
.note-meta { display: flex; align-items: baseline; gap: 8px; }
.note-author { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 13.5px; color: #16273F; }
.note-when { font-size: 11.5px; color: #98A2B0; }
.note-text { font-size: 13.5px; color: #5B6675; line-height: 1.55; white-space: pre-wrap; margin-top: 3px; }
.notes-composer { flex: 0 0 auto; display: flex; gap: 12px; padding: 16px 22px; border-top: 1px solid #EFF1F6; background: #FBFCFE; }
.notes-me-avatar { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 50%; background: #16273F; color: #fff; font-family: "Poppins", sans-serif; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.notes-composer-col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.notes-textarea { min-height: 70px; resize: vertical; background: #fff; border: 1.6px solid #E4E9F1; border-radius: 12px; padding: 11px 13px; font-family: "Mulish", sans-serif; font-size: 13.5px; color: #33404F; outline: none; width: 100%; box-sizing: border-box; }
.notes-textarea:focus { border-color: #2F6FE0; box-shadow: 0 0 0 4px rgba(47,111,224,0.12); }
.notes-composer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notes-composer-hint { font-size: 11.5px; color: #98A2B0; }
.notes-post { display: inline-flex; align-items: center; gap: 7px; border: none; border-radius: 11px; padding: 9px 15px; font-family: "Poppins", sans-serif; font-weight: 700; font-size: 13px; color: #fff; background: #E8402A; box-shadow: 0 4px 12px rgba(232,64,42,0.28); cursor: pointer; }
.notes-post:hover { background: #D6371F; }
.notes-post:disabled { background: #F2A99D; box-shadow: none; cursor: not-allowed; }

/* ================= SCAN GROUPS (index cards + per-group detail) =================
   Severity scale is Critical / High / Medium / Low throughout — the same four values
   the engine now authors per criterion. Colours per the design handoff. */
:root {
  --sev-critical: #C0392B; --sev-critical-tint: #FCECEC; --sev-critical-bd: #F5D5D5;
  --sev-high: #B5462F;     --sev-high-tint: #FCF3E8;     --sev-high-bd: #F1E1CC;
  --sev-medium: #2F6FE0;   --sev-medium-tint: #EAF1FC;   --sev-medium-bd: #D6E4FB;
  --sev-low: #5B6675;      --sev-low-tint: #EEF1F6;      --sev-low-bd: #E0E5EE;
}

.ck-sg-head { margin-bottom: 20px; }
.ck-sg-head h2 { font-family: "Poppins"; font-weight: 700; font-size: 20px; color: var(--ink); margin: 0; }
.ck-sg-head p { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; }

/* --- index grid --- */
.ck-sg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); gap: 18px; }
.ck-sg-card {
  background: #fff; border: 1px solid #EAEDF3; border-radius: 18px; box-shadow: 0 4px 16px rgba(18,38,63,.05);
  padding: 24px; cursor: pointer; display: flex; flex-direction: column; gap: 20px; text-align: left; width: 100%;
}
.ck-sg-card:hover { border-color: #C9D3E0; box-shadow: 0 8px 24px rgba(18,38,63,.09); }
.ck-sg-card-top { display: flex; align-items: flex-start; gap: 18px; }
.ck-sg-donut-wrap { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
/* The score sits in an absolutely-positioned HTML layer over the ring, never in SVG
   <text> — interpolating into <text> collapses the box to zero size. */
.ck-sg-donut { position: relative; }
.ck-sg-donut > div {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: "Poppins"; font-weight: 800;
}
.ck-sg-verdict { font-family: "Poppins"; font-weight: 700; font-size: 12px; margin-top: 6px; }
.ck-sg-name { display: block; font-family: "Poppins"; font-weight: 700; font-size: 19px; color: var(--ink); line-height: 1.25; }
.ck-sg-desc { display: block; font-size: 13.5px; color: var(--muted); margin-top: 5px; line-height: 1.5; }
.ck-sg-figs { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 16px; }
.ck-sg-fig strong { display: block; font-family: "Poppins"; font-weight: 800; font-size: 20px; color: var(--ink); line-height: 1; }
.ck-sg-fig span { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 4px; display: block; }
.ck-sg-sevrow { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid #F1F4F8; }
.ck-sg-sev { display: inline-flex; align-items: center; gap: 7px; }
.ck-sg-sev i { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.ck-sg-sev b { font-family: "Poppins"; font-weight: 700; font-size: 13px; }
.ck-sg-sev b.zero { color: #B7C0CE; }
.ck-sg-sev span { font-size: 12px; color: var(--muted); }
.ck-sg-foot { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.ck-sg-open { display: inline-flex; align-items: center; gap: 7px; font-family: "Poppins"; font-weight: 600; font-size: 13.5px; color: var(--brand); }

/* --- detail --- */
.ck-sg-back {
  display: inline-flex; align-items: center; gap: 8px; background: none; border: none; cursor: pointer;
  font-family: "Poppins"; font-weight: 600; font-size: 14px; color: var(--muted-3); padding: 0; margin-bottom: 16px;
}
.ck-sg-back:hover { color: var(--brand); }
.ck-sg-hero {
  background: #fff; border: 1px solid #EAEDF3; border-radius: 20px; box-shadow: 0 4px 16px rgba(18,38,63,.05);
  padding: 24px; margin-bottom: 22px; display: flex; align-items: center; gap: 22px; flex-wrap: wrap;
}
.ck-sg-hero h2 { font-family: "Poppins"; font-weight: 700; font-size: 23px; color: var(--ink); margin: 0; }
.ck-sg-hero-main { flex: 1; min-width: 220px; }
.ck-sg-hero-last { font-size: 12.5px; color: var(--muted-2); text-align: right; }
.ck-sg-hero-last b { color: var(--muted-3); }
.ck-sg-hero-actions { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.ck-sg-views { display: inline-flex; background: #F1F4F9; border: 1px solid #E5E9F0; border-radius: 14px; padding: 5px; gap: 5px; margin-bottom: 22px; flex-wrap: wrap; }
.ck-sg-views button {
  appearance: none; border: none; background: transparent; cursor: pointer; border-radius: 10px; padding: 9px 16px;
  font-family: "Poppins"; font-weight: 600; font-size: 13.5px; color: var(--muted-3);
}
.ck-sg-views button.active { background: var(--blue); color: #fff; box-shadow: 0 2px 6px rgba(60,124,224,.35); }
.ck-sg-panel { background: #fff; border: 1px solid #EAEDF3; border-radius: 20px; box-shadow: 0 4px 16px rgba(18,38,63,.05); padding: 24px; margin-bottom: 22px; }
.ck-sg-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.ck-sg-panel-head h3 { font-family: "Poppins"; font-weight: 700; font-size: 20px; color: var(--ink); margin: 0; }
.ck-sg-panel-head p { font-size: 13.5px; color: var(--muted); margin: 3px 0 0; }
.ck-sg-reset { font-family: "Poppins"; font-weight: 600; font-size: 13px; color: var(--muted-3); background: #fff; border: 1px solid #DCE1E9; border-radius: 10px; padding: 8px 15px; cursor: pointer; white-space: nowrap; }
.ck-sg-reset:hover { border-color: var(--ink); color: var(--ink); }

/* queue filters */
.ck-sg-filters { display: flex; flex-direction: column; gap: 12px; padding: 18px; background: #FBFCFE; border: 1px solid #EFF2F7; border-radius: 14px; margin-bottom: 22px; }
.ck-sg-frow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ck-sg-flabel { flex: 0 0 104px; font-family: "Poppins"; font-weight: 700; font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; color: #98A2B0; }
.ck-sg-chip {
  border: 1.5px solid #E4E8EF; background: #fff; color: var(--muted-3); border-radius: 999px; padding: 7px 14px;
  cursor: pointer; font-family: "Poppins"; font-weight: 600; font-size: 13px; white-space: nowrap;
}
.ck-sg-chip.on { color: var(--ink); }

/* start-here card + queue rows */
.ck-sg-next { position: relative; background: #FBFCFE; border: 1px solid #E7EBF1; border-radius: 16px; padding: 22px 24px 22px 28px; overflow: hidden; }
.ck-sg-next-accent { position: absolute; left: 0; top: 0; bottom: 0; width: 6px; }
.ck-sg-pills { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ck-sg-kicker { font-family: "Poppins"; font-weight: 700; font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); }
.ck-sg-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 3px 10px; font-family: "Poppins"; font-weight: 700; font-size: 11.5px; border: 1px solid transparent; }
.ck-sg-pill i { width: 7px; height: 7px; border-radius: 50%; }
.ck-sg-sc { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.ck-sg-sc-num { font-family: "Poppins"; font-weight: 800; font-size: 15px; color: var(--muted); }
.ck-sg-sc-name { font-family: "Poppins"; font-weight: 700; font-size: 22px; color: var(--ink); }
.ck-sg-counts { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; color: var(--muted-3); font-weight: 600; margin-bottom: 18px; }
.ck-sg-two { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin-bottom: 16px; }
.ck-sg-two h4 { font-family: "Poppins"; font-weight: 700; font-size: 12.5px; color: var(--ink); margin: 0 0 5px; }
.ck-sg-two p { font-size: 13px; color: var(--muted-3); margin: 0; line-height: 1.5; }
.ck-sg-urls { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ck-sg-url { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11.5px; color: var(--muted-3); background: #fff; border: 1px solid #E4E8EF; border-radius: 6px; padding: 3px 8px; }
.ck-sg-rows { display: flex; flex-direction: column; gap: 10px; }
.ck-sg-row { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid #EEF1F6; border-radius: 12px; padding: 12px 14px; flex-wrap: wrap; }
.ck-sg-row-sc { font-family: "Poppins"; font-weight: 700; font-size: 13px; color: var(--ink); }
.ck-sg-row-name { font-size: 13px; color: var(--muted-3); flex: 1; min-width: 140px; }
.ck-sg-row-count { font-family: "Poppins"; font-weight: 700; font-size: 12.5px; color: var(--muted-3); }
.ck-sg-subhead { font-family: "Poppins"; font-weight: 700; font-size: 15px; color: var(--ink); margin: 26px 0 12px; }
.ck-sg-matchline { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }

/* criteria view */
.ck-sg-crit-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ck-sg-crit-counts { font-family: "Poppins"; font-weight: 700; font-size: 13px; color: var(--muted-3); }

@media (max-width: 900px) {
  .ck-sg-grid { grid-template-columns: 1fr; }
  .ck-sg-views { overflow-x: auto; flex-wrap: nowrap; }
}
