:root {
  --bg: #f5efe6;
  --bg-accent: radial-gradient(circle at top left, rgba(183, 120, 52, 0.22), transparent 32%),
    radial-gradient(circle at bottom right, rgba(39, 80, 67, 0.22), transparent 28%),
    linear-gradient(180deg, #f8f3ec 0%, #efe4d2 100%);
  --surface: rgba(255, 250, 243, 0.88);
  --surface-strong: #fff9f1;
  --border: rgba(63, 43, 19, 0.12);
  --text: #1d1a14;
  --muted: #655b50;
  --brand: #9d4d24;
  --brand-deep: #65311d;
  --success: #275043;
  --critical: #6e1b1b;
  --high: #a72e2e;
  --medium: #a5631c;
  --low: #406e5f;
  --info: #556676;
  --shadow: 0 24px 80px rgba(85, 69, 44, 0.14);
  --radius: 22px;
  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  --font-body: "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg-accent);
  color: var(--text);
  font-family: var(--font-body);
}

a {
  color: var(--brand-deep);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 0.78rem 1.1rem;
  cursor: pointer;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

button:active:not(:disabled) {
  transform: translateY(0);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 0.78rem 1.1rem;
  text-decoration: none;
  transition: transform 120ms ease, filter 120ms ease;
}

.button-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.button-link.secondary {
  background: var(--success);
}

button.secondary {
  background: var(--success);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.8rem 0.9rem;
  background: rgba(255, 255, 255, 0.78);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(157, 77, 36, 0.4);
  box-shadow: 0 0 0 3px rgba(157, 77, 36, 0.08);
}

.shell {
  width: min(1180px, calc(100vw - 2rem));
  margin: 0 auto;
  padding: 0.5rem 0 2.5rem;
}

#section-register,
#section-assets,
#section-zap,
#section-auth,
#section-findings,
#section-detail,
#section-welcome {
  scroll-margin-top: 52px;
}

.hero {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.25rem;
  align-items: start;
  margin-bottom: 0.85rem;
}

.hero h1,
.section-head h2,
.finding h3,
.scan h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(1.4rem, 3.5vw, 2.1rem);
  line-height: 1.05;
}

.lede {
  max-width: 62ch;
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: 0.25rem;
}

.hero-panel,
.card {
  background: var(--surface);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 1rem 1.1rem;
  box-shadow: none;
  background: rgba(255, 250, 243, 0.72);
  border-color: rgba(63, 43, 19, 0.08);
}

.hero-panel-title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.hero-panel ul {
  margin: 0.5rem 0 0;
  padding-left: 1.1rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.55;
}

.hero-panel li + li {
  margin-top: 0.15rem;
}

.cards,
.grid {
  display: grid;
  gap: 1.25rem;
}

.cards {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 0.5rem;
}

.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 1.25rem;
}

.card {
  padding: 1.15rem;
}

.metric {
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.85rem 1rem;
}

.metric span {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric strong {
  font-family: var(--font-display);
  font-size: 1.65rem;
}

.severity-card {
  background: linear-gradient(135deg, rgba(157, 77, 36, 0.1), rgba(39, 80, 67, 0.08)), var(--surface);
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  margin-bottom: 0.85rem;
}

.section-head h2 {
  margin: 0;
  font-size: 1.3rem;
}

.eyebrow {
  margin: 0 0 0.2rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  color: var(--brand-deep);
}

.stack {
  display: grid;
  gap: 0.95rem;
}

label span {
  display: block;
  margin-bottom: 0.38rem;
  font-weight: 600;
}

.checkbox-row {
  display: flex;
  gap: 0.7rem;
  align-items: start;
}

.checkbox-row input {
  width: auto;
  margin-top: 0.22rem;
}

.small-note,
.muted {
  color: var(--muted);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

tbody tr {
  transition: background 120ms ease, box-shadow 120ms ease;
}

th,
td {
  text-align: left;
  padding: 0.9rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.asset-row {
  cursor: pointer;
}

.asset-row:hover {
  background: rgba(157, 77, 36, 0.05);
}

.asset-row.is-active {
  background: rgba(157, 77, 36, 0.1);
  box-shadow: inset 3px 0 0 rgba(157, 77, 36, 0.45);
}

.filters {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.scanner-catalog {
  margin-top: 1rem;
}

.scanner-item {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  padding: 0.95rem 1rem;
}

.scanner-item p {
  margin: 0.2rem 0 0;
}

.test-target-panel {
  margin-top: 1.1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.finding,
.scan {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  padding: 1rem;
  transition: background 120ms ease, box-shadow 120ms ease, border-color 120ms ease;
}

.scan {
  cursor: pointer;
}

.scan:hover {
  background: rgba(255, 250, 243, 1);
  border-color: rgba(157, 77, 36, 0.25);
}

.finding-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.finding h3,
.scan h3 {
  margin: 0 0 0.15rem;
  font-size: 1.05rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-critical {
  background: var(--critical);
}

.badge-high {
  background: var(--high);
}

.badge-medium {
  background: var(--medium);
}

.badge-low {
  background: var(--low);
}

.badge-info {
  background: var(--info);
}

.badge-completed {
  background: var(--success);
}

.badge-running,
.badge-queued {
  background: var(--brand);
}

.badge-failed {
  background: var(--high);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

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

.scan-action-grid {
  display: grid;
  gap: 1rem;
}

.detail-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.summary-tile {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.62);
  padding: 0.95rem 1rem;
}

.summary-tile span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  margin-bottom: 0.35rem;
}

.summary-tile strong {
  font-family: var(--font-display);
  font-size: 1.6rem;
}

.asset-summary-grid .summary-tile strong {
  font-size: 1.25rem;
}

.asset-summary-grid + .asset-summary-grid {
  margin-top: 1rem;
}

.artifact {
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface-strong);
  padding: 1rem;
}

.artifact-error {
  border-color: rgba(167, 46, 46, 0.28);
  background: rgba(255, 243, 243, 0.92);
}

.artifact-new {
  border-color: rgba(167, 99, 28, 0.25);
}

.artifact-resolved {
  border-color: rgba(64, 110, 95, 0.25);
}

.verification-method p {
  margin: 0.35rem 0 0;
}

.artifact pre,
.artifact code {
  white-space: pre-wrap;
  word-break: break-word;
}

.artifact pre {
  max-height: 300px;
  overflow: auto;
  margin: 0.75rem 0 0;
  padding: 0.9rem;
  border-radius: 14px;
  background: rgba(29, 26, 20, 0.05);
}

.flash {
  position: sticky;
  bottom: 1rem;
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(39, 80, 67, 0.9);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
  z-index: 10;
}

.flash:not(:empty) {
  opacity: 1;
  transform: translateY(0);
}

.flash.error {
  background: rgba(167, 46, 46, 0.92);
}

.empty {
  color: var(--muted);
  font-style: italic;
  padding: 1.2rem 0;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

.empty-state-icon {
  font-size: 2rem;
  opacity: 0.4;
  font-style: normal;
}

.empty-state p {
  margin: 0;
  max-width: 36ch;
}

.timeline-list {
  display: grid;
  gap: 0.75rem;
}

.timeline-item {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--text);
  padding: 0.85rem 1rem;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.timeline-item.tl-completed { border-left-color: #10b981; }
.timeline-item.tl-failed    { border-left-color: #ef4444; }
.timeline-item.tl-running   { border-left-color: #f59e0b; }
.timeline-item.tl-queued    { border-left-color: #94a3b8; }
.tl-row-top, .tl-row-bottom {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.tl-row-bottom { font-size: 0.82rem; color: var(--muted); }
.tl-count {
  font-size: 0.78rem;
  padding: 0.15em 0.5em;
  border-radius: 6px;
  background: rgba(0,0,0,0.06);
}
.tl-delta {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.15em 0.45em;
  border-radius: 6px;
}
.tl-delta-up   { background: rgba(239,68,68,0.12); color: #dc2626; }
.tl-delta-down { background: rgba(16,185,129,0.12); color: #059669; }
.tl-delta-same { background: rgba(0,0,0,0.05); color: var(--muted); }
.tl-scheduled {
  font-size: 0.72rem;
  padding: 0.12em 0.45em;
  border-radius: 6px;
  background: rgba(139,92,246,0.12);
  color: #7c3aed;
  font-weight: 500;
}

.timeline-item:hover {
  border-color: rgba(157, 77, 36, 0.3);
}

.timeline-item.is-active {
  border-color: rgba(157, 77, 36, 0.4);
  box-shadow: inset 0 0 0 1px rgba(157, 77, 36, 0.18);
}

.detail-actions {
  margin: 0.9rem 0 1rem;
}

.status-stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: 0.5rem;
  flex-shrink: 0;
}

.badge-new {
  background: var(--high);
}

.badge-recurring {
  background: var(--medium);
}

.badge-legacy {
  background: #6b6560;
  color: #fff;
}

.badge-baseline {
  background: #8a6820;
  color: #fff;
}

.badge-warning {
  background: var(--medium);
}

.artifact-recurring {
  border-color: rgba(120, 85, 20, 0.25);
  background: rgba(255, 250, 240, 0.92);
}

.artifact-warning {
  border-color: rgba(130, 100, 30, 0.28);
  background: rgba(255, 252, 235, 0.92);
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.comparison-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.comparison-list li {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.88rem;
}

.empty-inline {
  color: var(--muted);
  font-style: italic;
}

.badge-stack {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.severity-group {
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}

.severity-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: rgba(29, 26, 20, 0.04);
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
  font-weight: 600;
}

.severity-group > .artifact {
  border: none;
  border-radius: 0;
  border-top: 1px solid var(--border);
}

.severity-group > .artifact:first-of-type {
  border-top: none;
}

.auth-profile-card {
  cursor: default;
}

.scan-summary-line {
  display: block;
  padding: 0.15rem 0;
  font-size: 0.88rem;
  line-height: 1.45;
}

.scan-summary-line .badge {
  font-size: 0.72rem;
  vertical-align: middle;
}

.scan-eligible {
  color: var(--success);
}

.scan-blocked {
  color: var(--high);
}

.scan-selected {
  outline: 2px solid var(--brand);
  outline-offset: -2px;
}

.scan-active {
  border-left: 3px solid var(--brand);
}

.scan-active.scan-status-running {
  border-left-color: #33883b;
}

.scan-active.scan-status-queued {
  border-left-color: var(--brand);
}

.live-queue-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
  padding: 0.4rem 0;
  margin-bottom: 0.6rem;
}

.live-queue-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  flex-shrink: 0;
  padding-right: 0.25rem;
}

.queue-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  padding: 0.26rem 0.6rem;
  border-radius: 999px;
  font-size: 0.78rem;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface-strong);
  color: var(--text);
  transition: background 100ms ease;
  white-space: nowrap;
  font-family: inherit;
}

.queue-chip:hover {
  background: rgba(63, 43, 19, 0.08);
}

.queue-chip.is-running {
  border-color: rgba(51, 112, 51, 0.45);
  background: rgba(51, 112, 51, 0.07);
}

.queue-chip.is-queued {
  border-color: rgba(157, 77, 36, 0.38);
  background: rgba(157, 77, 36, 0.06);
}

.queue-chip.is-failed {
  border-color: rgba(167, 46, 46, 0.38);
  background: rgba(167, 46, 46, 0.06);
}

.queue-chip.is-completed {
  border-color: var(--border);
  background: transparent;
  color: var(--muted);
}

.queue-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #33883b;
  animation: pulse-glow 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-glow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.65); }
}

.chip-id {
  font-weight: 700;
}

.chip-sep {
  color: var(--muted);
  opacity: 0.6;
}

.chip-asset {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chip-status-badge {
  font-size: 0.68rem;
  padding: 0.1em 0.45em;
}

.chip-time {
  font-size: 0.71rem;
  color: var(--muted);
}

.scan-progress-banner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.1rem;
  background: rgba(157, 77, 36, 0.09);
  border: 1px solid rgba(157, 77, 36, 0.22);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

.scan-progress-banner--running {
  background: rgba(51, 112, 51, 0.08);
  border-color: rgba(51, 112, 51, 0.28);
}

.scan-progress-content {
  flex: 1;
}

.scan-progress-detail {
  margin: 0.2rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.scan-progress-times {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.scan-card-pulse {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #33883b;
  animation: pulse-glow 1.2s ease-in-out infinite;
  flex-shrink: 0;
}

.scan-progress-pulse {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--brand);
  animation: pulse-glow 1.3s ease-in-out infinite;
  flex-shrink: 0;
  margin-top: 3px;
}

.scan-progress-banner--running .scan-progress-pulse {
  background: #33883b;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.7); }
}

.finding-state-new {
  border-left: 4px solid var(--high);
  background: rgba(220, 38, 38, 0.025);
}

.finding-state-recurring {
  border-left: 3px solid var(--medium);
  opacity: 0.92;
}

.finding-state-resolved {
  border-left: 3px solid var(--low);
  opacity: 0.65;
}

.finding-state-baseline {
  border-left: 3px solid #8a6820;
}

.finding-state-not-rechecked {
  border-left: 3px solid var(--info);
  opacity: 0.8;
}

.comparison-summary {
  margin: 0.75rem 0 0.25rem;
  padding: 0.6rem 0.9rem;
  border-radius: 14px;
  background: rgba(39, 80, 67, 0.06);
  border: 1px solid rgba(39, 80, 67, 0.14);
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

.comparison-summary strong {
  color: var(--high);
}

.comparison-resolved-text {
  color: var(--success);
}

.comparison-summary a {
  color: var(--brand-deep);
}

.comparison-summary-baseline {
  background: rgba(138, 104, 32, 0.08);
  border-color: rgba(138, 104, 32, 0.2);
  color: #6b5520;
}

.severity-group-hint {
  font-weight: 400;
  font-size: 0.78rem;
  margin-left: auto;
}

.finding-body {
  margin-top: 0.65rem;
}

.finding-body p {
  margin: 0.4rem 0;
  line-height: 1.55;
}

.finding-body p strong {
  color: var(--text);
}

.finding-evidence {
  color: var(--muted);
  font-size: 0.9rem;
  word-break: break-word;
  overflow-wrap: break-word;
}

.scan-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.scan-meta-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.scan-detail-header p {
  margin: 0.3rem 0;
  line-height: 1.5;
}

.workspace-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(245, 239, 230, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 0;
  padding: 0 max(1rem, calc(50vw - 590px));
}

.workspace-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.7rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: color 120ms ease, border-color 120ms ease;
  white-space: nowrap;
  position: relative;
}

.workspace-tab:hover {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.workspace-tab.is-active {
  color: var(--brand-deep);
  border-bottom-color: var(--brand-deep);
}

.workspace-tab.has-dot::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  flex-shrink: 0;
  margin-top: -6px;
  align-self: flex-start;
}

.filter-bar {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
  padding: 0.6rem 0.75rem;
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.filter-bar input,
.filter-bar select {
  flex: 1;
  min-width: 120px;
  padding: 0.42rem 0.65rem;
  font-size: 0.84rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}

.filter-checkbox {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-size: 0.84rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}

.filter-checkbox input {
  width: auto;
  flex: none;
}

.filter-result-hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0 0 0.5rem;
  min-height: 1em;
}

.btn-sm {
  font-size: 0.78rem;
  padding: 0.3rem 0.7rem;
  border-radius: 8px;
  white-space: nowrap;
}

.metric-clickable {
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.metric-clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 88px rgba(85, 69, 44, 0.2);
}

.scan-item-badges {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.scan-item-target {
  font-size: 0.82rem;
  word-break: break-all;
  margin: 0.2rem 0;
}

.scan-item-meta {
  display: flex;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.scan-item-error {
  font-size: 0.85rem;
  color: var(--high);
  margin: 0.35rem 0 0;
}

.scan-failed-banner {
  background: rgba(167, 46, 46, 0.1);
  border: 1px solid rgba(167, 46, 46, 0.28);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  color: var(--high);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.report-header-card {
  padding: 1.4rem 1.6rem;
}

.report-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.report-header-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.25rem;
}

.report-header-title {
  font-size: 1.25rem;
  font-family: var(--font-display);
  margin: 0 0 0.2rem;
  font-weight: 700;
  color: var(--text);
}

.report-header-target {
  margin: 0;
  font-size: 0.87rem;
  color: var(--muted);
  word-break: break-all;
}

.report-header-badges {
  display: flex;
  gap: 0.4rem;
  flex-shrink: 0;
  align-items: center;
  flex-wrap: wrap;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem 1.2rem;
  margin: 1rem 0 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.report-meta-cell {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.report-meta-label {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.report-meta-cell > span:last-child {
  font-size: 0.87rem;
  color: var(--text);
  word-break: break-word;
}

.report-assessment-note {
  margin: 0.75rem 0 0;
  font-size: 0.87rem;
  color: var(--muted);
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.export-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.export-panel-title {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.export-panel-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: stretch;
}

.export-btn {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.65rem 1rem;
  min-width: 180px;
  text-decoration: none;
  border-radius: 14px;
}

.export-btn-label {
  font-weight: 600;
  font-size: 0.87rem;
}

.export-btn-desc {
  font-size: 0.75rem;
  opacity: 0.78;
  font-weight: 400;
  line-height: 1.35;
}

.priority-block {
  margin: 0.85rem 0 0.25rem;
  padding: 0.75rem 1rem;
  border-radius: 14px;
  background: rgba(63, 43, 19, 0.05);
  border: 1px solid var(--border);
}

.priority-block-title {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.priority-block-body {
  display: flex;
  gap: 0.75rem 1.5rem;
  flex-wrap: wrap;
}

.priority-item {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.priority-item-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  font-weight: 600;
}

.priority-item-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.priority-sev-critical .priority-item-value { color: var(--critical); }
.priority-sev-high .priority-item-value { color: var(--high); }
.priority-sev-medium .priority-item-value { color: var(--medium); }
.priority-sev-low .priority-item-value { color: var(--low); }
.priority-sev-info .priority-item-value { color: var(--info); }

.finding-url {
  word-break: break-all;
  overflow-wrap: anywhere;
  font-size: 0.82rem;
}

.finding-description {
  margin: 0 0 0.65rem;
  line-height: 1.55;
}

.finding-field {
  margin-top: 0.5rem;
}

.finding-field-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.finding-field-evidence {
  margin: 0;
  font-size: 0.8rem;
  background: rgba(63, 43, 19, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.7rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  line-height: 1.45;
  max-height: 200px;
  overflow-y: auto;
}

.finding-field-text {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
}

.artifact-body {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  background: rgba(63, 43, 19, 0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.8rem;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  line-height: 1.5;
  max-height: 400px;
  overflow-y: auto;
}

.meta-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  margin-top: 0.6rem;
}

.meta-table-key {
  padding: 0.2rem 0.6rem 0.2rem 0;
  color: var(--muted);
  font-weight: 600;
  vertical-align: top;
  white-space: nowrap;
  width: 1%;
}

.meta-table-val {
  padding: 0.2rem 0;
  color: var(--text);
  word-break: break-word;
  overflow-wrap: anywhere;
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
}

.tool-error-code {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

.tool-error-code code {
  font-family: "SF Mono", "Fira Code", "Consolas", monospace;
  background: rgba(167, 46, 46, 0.09);
  border-radius: 4px;
  padding: 0.1em 0.35em;
  color: var(--high);
}

.section-subheading {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1rem 0 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge-muted {
  background: rgba(63, 43, 19, 0.1);
  color: var(--muted);
}

.system-status-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  margin-bottom: 0.6rem;
  border-radius: 12px;
  background: rgba(63, 43, 19, 0.04);
  border: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--muted);
}

.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-indicator.status-clear {
  background: var(--success);
}

.status-indicator.status-active {
  background: #33883b;
  animation: pulse-glow 1.2s ease-in-out infinite;
}

.status-indicator.status-warn {
  background: var(--high);
}

.status-text {
  font-weight: 500;
}

.attention-bar {
  padding: 0.55rem 0.85rem;
  margin-bottom: 0.75rem;
  border-radius: 12px;
  background: rgba(167, 46, 46, 0.04);
  border: 1px solid rgba(167, 46, 46, 0.15);
}

.attention-title {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--high);
  margin-bottom: 0.35rem;
}

.attention-items {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.attention-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: 8px;
  padding: 0.3rem 0.5rem;
  font-size: 0.82rem;
  color: var(--text);
  cursor: pointer;
  transition: background 100ms ease;
}

.attention-item:hover {
  background: rgba(167, 46, 46, 0.06);
  transform: none;
  filter: none;
}

.scan-priority-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.15em 0.5em;
  border-radius: 6px;
  white-space: nowrap;
}

.scan-priority-tag.priority-high {
  background: rgba(167, 46, 46, 0.1);
  color: var(--high);
  border: 1px solid rgba(167, 46, 46, 0.2);
}

.scan-priority-tag.priority-medium {
  background: rgba(165, 99, 28, 0.1);
  color: var(--medium);
  border: 1px solid rgba(165, 99, 28, 0.2);
}

.scan-priority-tag.priority-low {
  background: rgba(39, 80, 67, 0.08);
  color: var(--success);
  border: 1px solid rgba(39, 80, 67, 0.15);
}

.scan-priority-high {
  border-left: 3px solid var(--high);
}

.scan-priority-medium {
  border-left: 3px solid var(--medium);
}

.scan-priority-low {
  border-left: 3px solid var(--success);
}

.risk-summary {
  font-size: 0.84rem;
  margin-top: 0.4rem;
  padding: 0.3rem 0;
  font-weight: 500;
}

.risk-summary.risk-clear {
  color: var(--success);
}

.risk-summary.risk-new {
  color: var(--high);
}

.risk-summary.risk-recurring {
  color: var(--medium);
}

.risk-summary.risk-baseline {
  color: var(--muted);
}

.risk-summary.risk-failed {
  color: var(--high);
}

.security-summary-stmt {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.88rem;
  line-height: 1.5;
  font-weight: 500;
  border-left: 3px solid var(--border);
}
.security-summary-stmt.sss-critical {
  background: rgba(198,40,40,0.06);
  border-left-color: #b71c1c;
  color: #7f1d1d;
}
.security-summary-stmt.sss-high {
  background: rgba(239,108,0,0.06);
  border-left-color: #e65100;
  color: #7c2d12;
}
.security-summary-stmt.sss-medium {
  background: rgba(245,158,11,0.06);
  border-left-color: #f59e0b;
  color: #78350f;
}
.security-summary-stmt.sss-clear {
  background: rgba(16,185,129,0.06);
  border-left-color: #10b981;
  color: #065f46;
}
.sss-icon {
  flex-shrink: 0;
  font-size: 1rem;
  line-height: 1.5;
}
.sss-text {
  flex: 1;
}
.sss-scan {
  margin-bottom: 0.5rem;
}

.severity-group-body.is-collapsed {
  display: none;
}

.severity-collapsible {
  cursor: pointer;
  transition: background 100ms ease;
}

.severity-collapsible:hover {
  background: rgba(63, 43, 19, 0.06);
}

.collapse-arrow {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--muted);
  transition: transform 120ms ease;
}

/* ── Next Best Action ── */
#next-action-panel {
  margin-bottom: 0.75rem;
}

.next-action-panel {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(255, 250, 243, 0.9);
  border: 1px solid rgba(157, 77, 36, 0.18);
  border-left: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 0.75rem 1.1rem;
  backdrop-filter: blur(10px);
}

.next-action-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand);
  white-space: nowrap;
  flex-shrink: 0;
}

.next-action-body {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.next-action-label {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.next-action-cta {
  background: none;
  border: 1px solid var(--brand);
  color: var(--brand-deep);
  padding: 0.38rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}

.next-action-cta:hover:not(:disabled) {
  background: rgba(157, 77, 36, 0.06);
  transform: none;
  filter: none;
}

/* ── Attention Panel (updated) ── */
.attention-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.attention-verb {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: rgba(167, 46, 46, 0.1);
  color: var(--high);
  border: 1px solid rgba(167, 46, 46, 0.18);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  white-space: nowrap;
}

.attention-desc {
  font-size: 0.84rem;
  color: var(--text);
}

.attention-bar-clear {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0;
}

.attention-clear-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}

.attention-clear-text {
  font-size: 0.84rem;
  color: var(--success);
  font-weight: 500;
}

/* ── Asset Workflow Track ── */
.asset-workflow-track {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.3rem;
  flex-wrap: wrap;
}

.wf-step {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
}

.wf-done {
  background: rgba(39, 80, 67, 0.1);
  color: var(--success);
}

.wf-pending {
  background: rgba(63, 43, 19, 0.06);
  color: var(--muted);
}

.wf-sep {
  font-size: 0.65rem;
  color: var(--muted);
  opacity: 0.5;
}

/* ── Scan Card Story Line ── */
.scan-item-story {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
}

.story-clean {
  color: var(--success);
}

.story-findings {
  color: var(--medium);
}

.story-failed {
  color: var(--high);
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.scan-next-hint {
  display: inline-block;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--brand-deep);
  margin-left: 0.35rem;
  cursor: pointer;
}

/* ── Failed Scan Actions ── */
.failed-scan-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ── Activity Timeline ── */
#activity-timeline {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.activity-timeline {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
}

.activity-timeline-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  white-space: nowrap;
  padding-top: 0.1rem;
  flex-shrink: 0;
}

.activity-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
  flex: 1;
  min-width: 0;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.18rem 0;
  min-width: 0;
}

.activity-item[data-activity-scan] {
  cursor: pointer;
}

.activity-item[data-activity-scan]:hover .activity-label {
  text-decoration: underline;
}

.activity-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--muted);
  opacity: 0.5;
}

.activity-type-completed .activity-dot {
  background: var(--success);
  opacity: 1;
}

.activity-type-failed .activity-dot {
  background: var(--high);
  opacity: 1;
}

.activity-type-running .activity-dot {
  background: var(--brand);
  opacity: 1;
}

.activity-label {
  font-size: 0.8rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 38ch;
}

.activity-time {
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-panel {
    padding: 0.75rem 1rem;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid,
  .filters,
  .detail-grid,
  .verification-grid,
  .detail-columns,
  .summary-grid,
  .comparison-grid {
    grid-template-columns: 1fr;
  }

  .timeline-item {
    grid-template-columns: 1fr;
  }

  .workspace-nav {
    padding: 0 0.75rem;
    overflow-x: auto;
  }

  .workspace-tab {
    padding: 0.6rem 0.75rem;
    font-size: 0.78rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar input,
  .filter-bar select {
    width: 100%;
    min-width: unset;
  }

  .report-header-top {
    flex-direction: column;
    gap: 0.6rem;
  }

  .report-meta-grid {
    grid-template-columns: 1fr 1fr;
  }

  .priority-block-body {
    flex-direction: column;
    gap: 0.4rem;
  }

  .export-panel-actions {
    flex-direction: column;
  }

  .export-btn {
    min-width: unset;
    width: 100%;
  }
}

@media (max-width: 600px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 1.4rem;
  }

  .metric strong {
    font-size: 1.4rem;
  }
}

/* ── Report mode toggle ─────────────────────────────────────── */

.report-mode-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.report-mode-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1.5px solid var(--brand-deep);
  background: transparent;
  color: var(--brand-deep);
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: background 0.15s, color 0.15s;
}

.report-mode-btn:hover {
  background: var(--brand-deep);
  color: #fff;
}

.report-mode-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Trust indicators ───────────────────────────────────────── */

.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.trust-chip {
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(39, 80, 67, 0.07);
  border: 1px solid rgba(39, 80, 67, 0.18);
  color: #275043;
  letter-spacing: 0.01em;
}

/* ── Executive summary ──────────────────────────────────────── */

.exec-summary {
  margin: 1rem 0 0.75rem;
  padding: 1rem 1.1rem;
  background: rgba(39, 80, 67, 0.05);
  border-left: 3px solid var(--brand-deep);
  border-radius: 0 10px 10px 0;
}

.exec-summary-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brand-deep);
  margin-bottom: 0.35rem;
}

.exec-summary-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  margin: 0;
}

/* ── Recommended actions ────────────────────────────────────── */

.recommended-actions {
  margin: 0.75rem 0;
  padding: 0.85rem 1.1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.recommended-actions-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.recommended-action-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.recommended-action-item {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text);
}

/* ── Clean mode header card ─────────────────────────────────── */

.report-header-card-clean {
  border-top: 3px solid var(--brand-deep);
}

/* ── Severity impact labels ─────────────────────────────────── */

.severity-impact-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.18rem 0.55rem;
  border-radius: 10px;
  white-space: nowrap;
}

.severity-impact-critical {
  background: rgba(185, 28, 28, 0.1);
  color: #b91c1c;
  border: 1px solid rgba(185, 28, 28, 0.25);
}

.severity-impact-high {
  background: rgba(194, 65, 12, 0.1);
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.25);
}

.severity-impact-medium {
  background: rgba(138, 104, 32, 0.1);
  color: #8a6820;
  border: 1px solid rgba(138, 104, 32, 0.25);
}

.severity-impact-low {
  background: rgba(100, 116, 139, 0.1);
  color: #475569;
  border: 1px solid rgba(100, 116, 139, 0.2);
}

.severity-impact-info {
  background: rgba(100, 116, 139, 0.07);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.15);
}

/* ── Clean-mode finding cards ───────────────────────────────── */

.finding-card-clean {
  border-left-width: 3px;
}

.finding-impact-text {
  color: var(--muted);
  font-style: italic;
}

/* ── Report share button + status badge ─────────────────────── */

.report-share-btn {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1.5px solid var(--brand-deep);
  background: var(--brand-deep);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.01em;
  transition: opacity 0.15s;
}

.report-share-btn:hover {
  opacity: 0.85;
}

.report-status-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
}

.report-status-draft {
  background: rgba(100, 116, 139, 0.12);
  color: #64748b;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

.report-status-sent {
  background: rgba(138, 104, 32, 0.1);
  color: #8a6820;
  border: 1px solid rgba(138, 104, 32, 0.25);
}

.report-status-viewed {
  background: rgba(39, 80, 67, 0.1);
  color: #275043;
  border: 1px solid rgba(39, 80, 67, 0.22);
}

/* ── Branding bar ───────────────────────────────────────────── */

.report-branding-bar {
  margin-bottom: 0.9rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.report-branding-input {
  width: 100%;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--brand-deep);
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed rgba(39, 80, 67, 0.25);
  padding: 0.2rem 0;
  outline: none;
}

.report-branding-input:focus {
  border-bottom-color: var(--brand-deep);
}

/* ── Editable title + client inputs ─────────────────────────── */

.report-title-input {
  width: 100%;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed rgba(0, 0, 0, 0.15);
  padding: 0.15rem 0;
  margin-bottom: 0.15rem;
  outline: none;
}

.report-title-input:focus {
  border-bottom-color: var(--brand-deep);
}

.report-client-for {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0.2rem 0 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.report-client-input {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed rgba(0, 0, 0, 0.15);
  padding: 0.1rem 0;
  outline: none;
  min-width: 120px;
}

.report-client-input:focus {
  border-bottom-color: var(--brand-deep);
}

.report-generated-info {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

/* ── Confidence score ───────────────────────────────────────── */

.report-confidence-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 0.85rem 0 0.25rem;
  flex-wrap: wrap;
}

.confidence-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.55rem 1rem;
  border-radius: 12px;
  min-width: 90px;
}

.confidence-score-high {
  background: rgba(39, 80, 67, 0.08);
  border: 1px solid rgba(39, 80, 67, 0.2);
  color: #275043;
}

.confidence-score-mid {
  background: rgba(138, 104, 32, 0.08);
  border: 1px solid rgba(138, 104, 32, 0.2);
  color: #8a6820;
}

.confidence-score-low {
  background: rgba(194, 65, 12, 0.08);
  border: 1px solid rgba(194, 65, 12, 0.2);
  color: #c2410c;
}

.confidence-score-critical {
  background: rgba(185, 28, 28, 0.08);
  border: 1px solid rgba(185, 28, 28, 0.2);
  color: #b91c1c;
}

.confidence-score-number {
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
}

.confidence-score-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 0.2rem;
  text-align: center;
}

/* ── Before / After indicator ───────────────────────────────── */

.before-after-indicator {
  font-size: 0.88rem;
  font-weight: 600;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
}

.before-after-clear {
  background: rgba(39, 80, 67, 0.07);
  color: #275043;
  border: 1px solid rgba(39, 80, 67, 0.18);
}

.before-after-warn {
  background: rgba(194, 65, 12, 0.08);
  color: #c2410c;
  border: 1px solid rgba(194, 65, 12, 0.2);
}

/* ── Next Steps ─────────────────────────────────────────────── */

.next-steps-section h3 {
  margin-bottom: 0.5rem;
}

.next-steps-card {
  background: rgba(39, 80, 67, 0.04);
  border-color: rgba(39, 80, 67, 0.15);
}

.next-steps-list {
  margin: 0;
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.next-steps-item {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text);
}

/* ── Print / download styles ────────────────────────────────── */

.no-print {
  /* marker class — used by @media print */
}

@media print {
  .no-print,
  .workspace-nav,
  #system-status,
  #next-action-panel,
  #summary-cards,
  #live-queue,
  #attention-panel,
  #activity-timeline,
  #section-register,
  #section-assets,
  #section-zap,
  #section-auth,
  #section-findings .card > header,
  #section-findings .scan-list-col,
  #flash {
    display: none !important;
  }

  body {
    background: #fff;
    color: #111;
    font-size: 11pt;
  }

  .shell {
    padding: 1.5cm 2cm;
    max-width: 100%;
  }

  /* Cover page: break after so exec summary starts on page 2 */
  .report-header-card-clean {
    break-after: page;
    page-break-after: always;
    box-shadow: none;
    border: none;
    padding: 0;
  }

  /* Key findings: start on its own page and break after */
  .kf-section {
    break-before: page;
    page-break-before: always;
    break-after: page;
    page-break-after: always;
  }

  /* Full findings section starts on its own page */
  .rc-findings-section {
    break-before: page;
    page-break-before: always;
  }

  .report-header-card,
  .artifact,
  .exec-summary,
  .recommended-actions,
  .next-steps-card {
    box-shadow: none;
    border: 1px solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 0.75rem;
  }

  .kf-card {
    break-inside: avoid;
    page-break-inside: avoid;
    border: 1px solid #ccc;
    box-shadow: none;
  }

  .rbc-chart {
    border: 1px solid #ccc;
    break-inside: avoid;
    page-break-inside: avoid;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .rbc-seg,
  .rbc-tile,
  .rc-risk-pill,
  .kf-sev {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .stack {
    gap: 0.75rem;
  }

  .report-branding-input,
  .report-title-input,
  .report-client-input,
  .rc-company-input,
  .rc-title-input,
  .rc-client-input {
    border: none !important;
    border-bottom: none !important;
    outline: none !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  .rc-branding-bar {
    border-bottom-color: #111;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  h3, h4 {
    margin-bottom: 0.4rem;
    page-break-after: avoid;
    break-after: avoid;
  }

  section {
    page-break-before: auto;
    break-before: auto;
  }

  .rc-cover-hero {
    padding: 2cm 0 1.5cm;
  }

  .rc-title-input {
    font-size: 2rem !important;
  }

  .rc-score-num {
    font-size: 1.75rem;
  }

  .sss-block,
  .ct-block,
  .exec-risk-block,
  .as-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .next-steps-section {
    break-before: page;
    page-break-before: always;
  }

  #onboarding-strip,
  #first-run-path,
  #first-run-card,
  #workspace-summary {
    display: none !important;
  }
}

/* ── Onboarding strip ───────────────────────────────────────── */

#onboarding-strip {
  position: sticky;
  top: 41px;
  z-index: 190;
  background: rgba(245, 239, 230, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 0 max(1rem, calc(50vw - 590px));
}

.onboarding-strip {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.52rem 0;
  flex-wrap: wrap;
}

.onboarding-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.25rem;
  white-space: nowrap;
}

.onboarding-all-done .onboarding-label {
  color: var(--success);
}

.onboarding-steps {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.onboarding-step {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.72rem;
  border-radius: 20px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  white-space: nowrap;
}

.onboarding-step:hover {
  border-color: var(--brand);
  color: var(--brand-deep);
  background: rgba(157, 77, 36, 0.05);
  transform: none;
  filter: none;
}

.onboarding-step.is-done {
  border-color: rgba(39, 80, 67, 0.35);
  background: rgba(39, 80, 67, 0.06);
  color: var(--success);
}

.onboarding-step-num {
  font-size: 0.72rem;
  font-weight: 800;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.06);
  flex-shrink: 0;
}

.onboarding-step.is-done .onboarding-step-num {
  background: rgba(39, 80, 67, 0.15);
  color: var(--success);
}

.onboarding-sep {
  font-size: 0.85rem;
  color: var(--border);
  user-select: none;
}

/* ── Capability row (hero) ──────────────────────────────────── */

.capability-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.85rem;
}

.cap-chip {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
  background: rgba(157, 77, 36, 0.07);
  border: 1px solid rgba(157, 77, 36, 0.18);
  color: var(--brand-deep);
}

/* ── Section "why this matters" line ────────────────────────── */

.section-why {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.2rem 0 0;
  line-height: 1.5;
  font-style: italic;
}

/* ── Workspace summary bar ──────────────────────────────────── */

#workspace-summary {
  padding: 0.5rem max(1rem, calc(50vw - 590px));
  background: rgba(245, 239, 230, 0.6);
  border-bottom: 1px solid var(--border);
}

.workspace-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  font-size: 0.8rem;
}

.ws-sep {
  color: var(--border);
  font-size: 0.9rem;
}

.ws-item {
  color: var(--text);
}

.ws-item strong {
  font-weight: 700;
}

.ws-dim {
  color: var(--muted);
}

.ws-ok {
  color: var(--success);
}

.ws-warn {
  color: var(--medium);
}

.ws-err {
  color: var(--high);
}

/* ── Tool readiness ─────────────────────────────────────────── */

.tool-readiness {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.tool-readiness-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-right: 0.15rem;
  white-space: nowrap;
}

.tool-readiness-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tool-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 20px;
}

.tool-chip-ready {
  background: rgba(39, 80, 67, 0.07);
  border: 1px solid rgba(39, 80, 67, 0.2);
  color: var(--success);
}

.tool-chip-unavailable {
  background: rgba(100, 116, 139, 0.06);
  border: 1px solid rgba(100, 116, 139, 0.18);
  color: var(--muted);
}

.tool-chip-import {
  background: rgba(157, 77, 36, 0.06);
  border: 1px solid rgba(157, 77, 36, 0.15);
  color: var(--brand-deep);
}

.tool-chip-status {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.75;
}

/* ── Asset table capability pills ───────────────────────────── */

.asset-cap-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.4rem;
}

.cap-pill {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.12rem 0.5rem;
  border-radius: 20px;
}

.cap-pill-ok {
  background: rgba(39, 80, 67, 0.08);
  border: 1px solid rgba(39, 80, 67, 0.18);
  color: var(--success);
}

.cap-pill-dim {
  background: rgba(100, 116, 139, 0.06);
  border: 1px solid rgba(100, 116, 139, 0.14);
  color: var(--muted);
}

/* ── Scan card next action line ─────────────────────────────── */

.scan-next-action {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.scan-next-action .scan-next-hint {
  color: var(--muted);
}

/* ── Scan card visual hierarchy ─────────────────────────────── */

.scan-priority-low article,
article.scan.scan-priority-low {
  opacity: 0.8;
}

article.scan.scan-priority-high {
  border-left-width: 3px;
}

/* ── Mobile improvements ────────────────────────────────────── */

@media (max-width: 640px) {
  .onboarding-strip {
    gap: 0.5rem;
    padding: 0.45rem 0;
  }

  .onboarding-step {
    font-size: 0.72rem;
    padding: 0.22rem 0.55rem;
  }

  .onboarding-label {
    width: 100%;
    margin-bottom: 0.1rem;
  }

  .capability-row {
    gap: 0.3rem;
  }

  .cap-chip {
    font-size: 0.7rem;
    padding: 0.18rem 0.5rem;
  }

  .workspace-summary {
    font-size: 0.76rem;
  }

  .tool-readiness {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }

  .tool-readiness-chips {
    gap: 0.3rem;
  }

  .section-why {
    font-size: 0.79rem;
  }

  .asset-cap-row {
    gap: 0.25rem;
  }

  .cap-pill {
    font-size: 0.63rem;
  }

  .report-confidence-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }

  .first-run-card {
    flex-direction: column;
  }

  .first-run-preview {
    border-left: none;
    border-top: 1px solid var(--border);
    padding: 1rem 0 0;
    margin-top: 1rem;
  }

  .report-cols {
    flex-direction: column;
    gap: 1rem;
  }

  .report-col {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding-bottom: 1rem;
  }

  .report-col:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .first-run-path {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .frp-steps {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }
}

/* ── Trust cues ─────────────────────────────────────────────── */

.trust-cues {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

.trust-chip {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  background: rgba(39, 80, 67, 0.07);
  border: 1px solid rgba(39, 80, 67, 0.15);
  color: var(--success);
}

/* ── First-run path ribbon ──────────────────────────────────── */

#first-run-path {
  background: rgba(245, 239, 230, 0.85);
  border-bottom: 1px solid var(--border);
  padding: 0 max(1rem, calc(50vw - 590px));
}

.first-run-path {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0;
  flex-wrap: wrap;
}

.frp-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.frp-steps {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
  font-size: 0.76rem;
}

.frp-step {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

.frp-step.frp-done {
  color: var(--success);
  font-weight: 600;
  text-decoration: line-through;
  text-decoration-color: rgba(39, 80, 67, 0.35);
}

.frp-arrow {
  color: var(--border);
  font-size: 0.8rem;
}

/* ── First-run card ─────────────────────────────────────────── */

#first-run-card {
  padding: 0 max(1rem, calc(50vw - 590px));
  margin: 0.75rem 0;
}

.first-run-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(85, 69, 44, 0.06);
}

.first-run-hero {
  flex: 1;
  min-width: 0;
}

.first-run-hero h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.first-run-hero p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 1rem;
}

.first-run-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.first-run-actions button {
  font-size: 0.82rem;
  padding: 0.5rem 1rem;
}

.first-run-preview {
  flex: 1;
  min-width: 260px;
  border-left: 1px solid var(--border);
  padding-left: 1.5rem;
}

.preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.preview-label::before {
  content: "Example";
  background: rgba(100, 116, 139, 0.1);
  border: 1px solid rgba(100, 116, 139, 0.2);
  color: var(--muted);
  font-size: 0.66rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.preview-card {
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
  user-select: none;
}

.preview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.preview-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.preview-comparison-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.preview-comp-chip {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
}

.prev-new {
  background: rgba(167, 46, 46, 0.1);
  border: 1px solid rgba(167, 46, 46, 0.2);
  color: #a72e2e;
}

.prev-recurring {
  background: rgba(165, 99, 28, 0.1);
  border: 1px solid rgba(165, 99, 28, 0.2);
  color: #8a6820;
}

.prev-resolved {
  background: rgba(39, 80, 67, 0.1);
  border: 1px solid rgba(39, 80, 67, 0.2);
  color: var(--success);
}

.preview-severity-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.preview-sev {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 6px;
}

.ps-critical { background: rgba(110, 27, 27, 0.08); color: var(--critical); }
.ps-high { background: rgba(167, 46, 46, 0.08); color: var(--high); }
.ps-medium { background: rgba(165, 99, 28, 0.08); color: var(--medium); }
.ps-low { background: rgba(64, 110, 95, 0.08); color: var(--low); }

.preview-findings {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.preview-finding {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
  color: var(--text);
}

.preview-finding-more {
  font-size: 0.74rem;
  color: var(--muted);
  font-style: italic;
  padding-left: 0.25rem;
}

.preview-footer-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  padding-top: 0.35rem;
  border-top: 1px solid var(--border);
}

.preview-foot-chip {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.55rem;
  border-radius: 20px;
  background: rgba(39, 80, 67, 0.08);
  border: 1px solid rgba(39, 80, 67, 0.18);
  color: var(--success);
}

/* ── First Scan Discovery Card ──────────────────────────────── */

.fsd-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(85, 69, 44, 0.06);
}

.fsd-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem 1rem;
  background: linear-gradient(135deg, rgba(63, 43, 19, 0.035) 0%, transparent 100%);
  border-bottom: 1px solid var(--border);
}

.fsd-headline {
  flex: 1;
  min-width: 0;
}

.fsd-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.fsd-headline h2 {
  margin: 0 0 0.3rem;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.fsd-asset-line {
  font-size: 0.82rem;
  color: var(--muted);
}

.fsd-dismiss {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  flex-shrink: 0;
  white-space: nowrap;
}
.fsd-dismiss:hover {
  background: var(--border);
}

.fsd-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

@media (max-width: 700px) {
  .fsd-body { grid-template-columns: 1fr; }
}

.fsd-panel {
  padding: 1.1rem 1.5rem;
}

.fsd-panel + .fsd-panel {
  border-left: 1px solid var(--border);
}

@media (max-width: 700px) {
  .fsd-panel + .fsd-panel { border-left: none; border-top: 1px solid var(--border); }
}

.fsd-panel-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
}

.fsd-stat-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.fsd-stat-num {
  font-size: 1.5rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
  color: var(--text);
}

.fsd-stat-label {
  font-size: 0.82rem;
  color: var(--muted);
}

.fsd-surface-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.fsd-chip {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: rgba(63, 43, 19, 0.06);
  border: 1px solid var(--border);
  color: var(--text);
}

.fsd-chip.chip-framework {
  background: rgba(107, 74, 29, 0.08);
  border-color: rgba(107, 74, 29, 0.18);
  color: #5a3e1b;
}

.fsd-chip.chip-risk {
  background: rgba(167, 46, 46, 0.07);
  border-color: rgba(167, 46, 46, 0.18);
  color: var(--high);
}

.fsd-sev-row {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.fsd-sev {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
}

.fsd-sev.sev-critical { background: rgba(110, 27, 27, 0.09); color: var(--critical); }
.fsd-sev.sev-high     { background: rgba(167, 46, 46, 0.09); color: var(--high); }
.fsd-sev.sev-medium   { background: rgba(165, 99, 28, 0.09); color: var(--medium); }
.fsd-sev.sev-low      { background: rgba(64, 110, 95, 0.09); color: var(--low); }

.fsd-top-findings {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-top: 0.1rem;
}

.fsd-finding {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.4;
}

.fsd-finding-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
  text-transform: uppercase;
  margin-top: 0.05rem;
}

.fsd-finding-badge.fb-critical { background: rgba(110,27,27,0.1); color: var(--critical); }
.fsd-finding-badge.fb-high     { background: rgba(167,46,46,0.1); color: var(--high); }

.fsd-finding-title {
  flex: 1;
  min-width: 0;
}

.fsd-no-findings {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.83rem;
  color: var(--success);
  font-weight: 600;
}

.fsd-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(63, 43, 19, 0.025);
  flex-wrap: wrap;
}

.fsd-next-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  margin-right: 0.25rem;
}

.fsd-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.fsd-actions button {
  font-size: 0.82rem;
  padding: 0.45rem 1rem;
}

.fsd-coverage-line {
  font-size: 0.78rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── Report section empty state ─────────────────────────────── */

.report-empty-state {
  padding: 0.5rem 0;
}

.report-cols {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
}

.report-col {
  flex: 1;
  padding: 1rem 1.25rem;
  background: rgba(63, 43, 19, 0.02);
  border: 1px solid var(--border);
}

.report-col:first-child {
  border-radius: 14px 0 0 14px;
  border-right: none;
}

.report-col:last-child {
  border-radius: 0 14px 14px 0;
  background: rgba(39, 80, 67, 0.025);
}

.report-col h3 {
  margin: 0 0 0.6rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.report-col ul {
  margin: 0 0 0.65rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.report-col li {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

.report-empty-cta {
  font-size: 0.88rem;
  color: var(--muted);
  text-align: center;
  padding: 0.75rem;
  background: rgba(63, 43, 19, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
}

/* ── Verification explainer (asset detail empty) ────────────── */

.verification-explainer {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.ve-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}

.ve-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 0.3em;
  flex-shrink: 0;
}

.ve-passive {
  background: var(--success);
}

.ve-locked {
  background: var(--muted);
  opacity: 0.45;
}

/* ── Scan history guide ─────────────────────────────────────── */

.scan-history-guide {
  margin-top: 0.85rem;
  padding: 0.75rem 1rem;
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.shg-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.shg-tip {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.5;
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
}

/* ── Auth profiles empty guide ──────────────────────────────── */

.auth-empty-guide {
  margin-top: 0.8rem;
  padding: 0.75rem 1rem;
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.aeg-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 0.4rem;
}

.auth-empty-guide ul {
  margin: 0 0 0.6rem;
  padding-left: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.auth-empty-guide li {
  font-size: 0.82rem;
  color: var(--text);
  line-height: 1.4;
}

.aeg-note {
  font-size: 0.78rem;
  margin: 0;
}

/* ── Tool chip icon ─────────────────────────────────────────── */

.tool-chip-icon {
  font-size: 0.72rem;
  font-weight: 800;
}

/* ── Coverage block ─────────────────────────────────────────── */

.coverage-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.25rem;
  margin-bottom: 0.5rem;
}

.coverage-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.65rem;
}

.coverage-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2rem;
}

.coverage-stat {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.coverage-stat-value {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text);
  line-height: 1.1;
}

.coverage-stat-key {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

/* ── Limitations block ──────────────────────────────────────── */

.limitations-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.5rem;
}

.limitations-summary {
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.limitations-summary::before {
  content: "›";
  font-size: 1rem;
  transition: transform 0.15s;
  display: inline-block;
  color: var(--muted);
}

.limitations-block[open] .limitations-summary::before {
  transform: rotate(90deg);
}

.limitations-list {
  margin: 0;
  padding: 0.5rem 1.1rem 0.85rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  border-top: 1px solid var(--border);
}

.limitations-list li {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
}

/* ── Raw data toggle ────────────────────────────────────────── */

.raw-data-block {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin-bottom: 0.5rem;
}

.raw-data-summary {
  padding: 0.65rem 1.1rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.raw-data-summary::before {
  content: "›";
  font-size: 1rem;
  transition: transform 0.15s;
  display: inline-block;
  color: var(--muted);
}

.raw-data-block[open] .raw-data-summary::before {
  transform: rotate(90deg);
}

.raw-data-inner {
  border-top: 1px solid var(--border);
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.raw-data-section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.raw-data-pre {
  font-size: 0.74rem;
  font-family: var(--font-mono);
  background: rgba(63, 43, 19, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
  overflow-x: auto;
  white-space: pre;
  color: var(--muted);
  max-height: 400px;
  overflow-y: auto;
  line-height: 1.5;
}

/* ── Finding pages chip ─────────────────────────────────────── */

.finding-pages-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  background: rgba(63, 43, 19, 0.07);
  border: 1px solid rgba(63, 43, 19, 0.15);
  color: var(--muted);
  margin-left: 0.45rem;
  vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════
   Executive Risk Block
   ═══════════════════════════════════════════════════════════════════ */

.exec-risk-block {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 60%, #0f3460 100%);
  border-radius: calc(var(--radius) + 2px);
  padding: 1.75rem 2rem;
  margin-bottom: 1.25rem;
  color: #e8eaf6;
  position: relative;
  overflow: hidden;
}

.exec-risk-block::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #e53935, #f57c00, #fdd835);
  opacity: 0.85;
}

.exec-risk-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.exec-risk-header-left {
  flex: 1 1 280px;
  min-width: 0;
}

.exec-risk-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #90caf9;
  margin-bottom: 0.85rem;
}

.exec-risk-level-row {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.exec-risk-level {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 1rem;
  border-radius: 8px;
  min-width: 100px;
}

.exec-risk-level-risk-critical { background: rgba(229,57,53,0.22); border: 1.5px solid rgba(229,57,53,0.5); }
.exec-risk-level-risk-high     { background: rgba(245,124,0,0.22);  border: 1.5px solid rgba(245,124,0,0.5); }
.exec-risk-level-risk-moderate { background: rgba(253,216,53,0.18); border: 1.5px solid rgba(253,216,53,0.45); }
.exec-risk-level-risk-low      { background: rgba(104,159,56,0.18); border: 1.5px solid rgba(104,159,56,0.4); }
.exec-risk-level-risk-clear    { background: rgba(38,166,154,0.18); border: 1.5px solid rgba(38,166,154,0.4); }

.exec-risk-level-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232,234,246,0.65);
  line-height: 1;
}

.exec-risk-level-value {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #ffffff;
  line-height: 1.2;
  font-family: var(--font-display);
}

.exec-risk-level-risk-critical .exec-risk-level-value { color: #ff8a80; }
.exec-risk-level-risk-high     .exec-risk-level-value { color: #ffcc80; }
.exec-risk-level-risk-moderate .exec-risk-level-value { color: #fff59d; }
.exec-risk-level-risk-low      .exec-risk-level-value { color: #c5e1a5; }
.exec-risk-level-risk-clear    .exec-risk-level-value { color: #80cbc4; }

.exec-risk-confidence {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.exec-risk-confidence-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(232,234,246,0.55);
}

.exec-risk-confidence-score {
  font-size: 1.35rem;
  font-weight: 800;
  color: #e3f2fd;
  font-family: var(--font-display);
  line-height: 1.1;
}

.exec-risk-confidence-note {
  font-size: 0.72rem;
  color: rgba(232,234,246,0.65);
  font-weight: 500;
}

.exec-risk-delta {
  display: inline-flex;
  align-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  letter-spacing: 0.01em;
}

.exec-risk-delta-warn  { background: rgba(229,57,53,0.18); color: #ff8a80; border: 1px solid rgba(229,57,53,0.35); }
.exec-risk-delta-clear { background: rgba(38,166,154,0.18); color: #80cbc4; border: 1px solid rgba(38,166,154,0.35); }

.exec-risk-exposure-col {
  flex: 0 1 200px;
}

.exec-risk-section-label {
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: rgba(232,234,246,0.55);
  margin-bottom: 0.55rem;
}

.exec-risk-exposure-chips {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.exposure-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  white-space: nowrap;
}

.exposure-chip-active   { background: rgba(229,57,53,0.18); color: #ff8a80;  border: 1px solid rgba(229,57,53,0.32); }
.exposure-chip-inactive { background: rgba(38,166,154,0.12); color: #80cbc4; border: 1px solid rgba(38,166,154,0.25); }

.exec-risk-top3 {
  border-top: 1px solid rgba(232,234,246,0.1);
  padding-top: 1.1rem;
}

.exec-risk-top3-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.exec-risk-top3-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: rgba(232,234,246,0.88);
  line-height: 1.4;
}

.exec-risk-top3-sev {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.sev-dot-critical { background: #e53935; box-shadow: 0 0 0 2px rgba(229,57,53,0.25); }
.sev-dot-high     { background: #f57c00; box-shadow: 0 0 0 2px rgba(245,124,0,0.22); }
.sev-dot-medium   { background: #fdd835; box-shadow: 0 0 0 2px rgba(253,216,53,0.2); }
.sev-dot-low      { background: #66bb6a; box-shadow: 0 0 0 2px rgba(102,187,106,0.2); }
.sev-dot-info     { background: #90a4ae; }

.exec-risk-top3-text {
  flex: 1;
}

.exec-risk-clear-note {
  color: #80cbc4;
  font-size: 0.875rem;
  font-style: italic;
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(232,234,246,0.1);
}

/* ═══════════════════════════════════════════════════════════════════
   Business Insight — finding-level chips and impact text
   ═══════════════════════════════════════════════════════════════════ */

.finding-biz-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
}

.biz-chip {
  display: inline-flex;
  align-items: center;
  gap: 0;
  border-radius: 6px;
  overflow: hidden;
  font-size: 0.72rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.biz-chip-label {
  padding: 0.25rem 0.5rem;
  background: rgba(63,43,19,0.06);
  color: var(--muted);
  border-right: 1px solid rgba(63,43,19,0.1);
  font-weight: 500;
  font-size: 0.69rem;
  letter-spacing: 0.03em;
}

.biz-chip-value {
  padding: 0.25rem 0.55rem;
  font-weight: 700;
}

/* Exploit Likelihood & Fix Priority variants */
.biz-chip-critical .biz-chip-value { background: rgba(229,57,53,0.12); color: #b71c1c; border: 1px solid rgba(229,57,53,0.25); }
.biz-chip-high     .biz-chip-value { background: rgba(245,124,0,0.12);  color: #e65100; border: 1px solid rgba(245,124,0,0.25); }
.biz-chip-medium   .biz-chip-value { background: rgba(253,216,53,0.14); color: #f57f17; border: 1px solid rgba(253,216,53,0.3); }
.biz-chip-low      .biz-chip-value { background: rgba(102,187,106,0.12); color: #2e7d32; border: 1px solid rgba(102,187,106,0.25); }

/* Fix Effort variants */
.biz-chip-quick    .biz-chip-value { background: rgba(38,166,154,0.1);  color: #00695c; border: 1px solid rgba(38,166,154,0.25); }
.biz-chip-moderate .biz-chip-value { background: rgba(100,181,246,0.12); color: #1565c0; border: 1px solid rgba(100,181,246,0.25); }
.biz-chip-complex  .biz-chip-value { background: rgba(171,71,188,0.1);  color: #6a1b9a; border: 1px solid rgba(171,71,188,0.22); }

/* Business impact text in finding cards */
.finding-biz-impact-text {
  color: var(--text);
  line-height: 1.55;
}

/* Business insight wrapper in technical mode */
.finding-biz-insight {
  margin: 0.5rem 0 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(100,181,246,0.05);
  border-left: 3px solid rgba(100,181,246,0.35);
  border-radius: 0 6px 6px 0;
}

.finding-biz-insight .finding-biz-impact-text {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0.4rem 0 0;
}

/* ── Print: ensure exec risk block renders ──────────────────── */

@media print {
  .exec-risk-block {
    background: #1a1a2e !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
    page-break-inside: avoid;
    margin-bottom: 1rem;
  }

  .exec-risk-block::before {
    display: none;
  }

  .exec-risk-level-row,
  .exec-risk-header {
    flex-wrap: wrap;
  }

  .finding-biz-insight {
    border-left-color: #90caf9;
    background: #f0f7ff;
  }

  .finding-biz-meta {
    margin-bottom: 0.5rem;
  }

  .biz-chip {
    border: 1px solid #ccc;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Change Tracking Section (ct-*)
   Visible in both client and technical mode.
   ═══════════════════════════════════════════════════════════════════ */

.ct-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.5rem 1rem;
  margin-bottom: 1rem;
}

.ct-block-baseline {
  border-style: dashed;
  opacity: 0.9;
}

/* ── Header ── */
.ct-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.ct-header-left {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ct-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
}

.ct-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.ct-ref {
  font-size: 0.74rem;
  color: var(--muted);
  font-style: italic;
}

.ct-header-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
}

/* ── Summary chips ── */
.ct-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  white-space: nowrap;
}

.ct-chip-new       { background: rgba(198,40,40,0.1);   color: #b71c1c; border: 1px solid rgba(198,40,40,0.25); }
.ct-chip-recurring { background: rgba(239,108,0,0.08);  color: #e65100; border: 1px solid rgba(239,108,0,0.2); }
.ct-chip-resolved  { background: rgba(38,166,154,0.1);  color: #00695c; border: 1px solid rgba(38,166,154,0.25); }
.ct-chip-sevchange { background: rgba(139,92,246,0.1);  color: #6d28d9; border: 1px solid rgba(139,92,246,0.25); }
.ct-chip-notchecked{ background: rgba(63,43,19,0.06);   color: var(--muted); border: 1px solid var(--border); }

.ct-risk-trend {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
}
.ct-trend-up      { background: rgba(198,40,40,0.08); color: #b71c1c; }
.ct-trend-down    { background: rgba(38,166,154,0.08); color: #00695c; }
.ct-trend-mixed   { background: rgba(239,108,0,0.08); color: #e65100; }
.ct-trend-stable  { background: rgba(63,43,19,0.05);  color: var(--muted); }

.ct-insight-bullets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}
.ct-insight-bullet {
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  background: rgba(63,43,19,0.04);
  border: 1px solid var(--border);
  color: var(--text);
}

.ct-group-sevchange .ct-group-header { border-left-color: #7c3aed; }
.ct-group-count-sevchange { background: rgba(139,92,246,0.12); color: #6d28d9; }

.ct-sev-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 600;
}
.ct-sev-prev { opacity: 0.6; text-decoration: line-through; }
.ct-sev-direction { color: var(--muted); }
.ct-sev-curr { }
.ct-sev-arrow-escalated .ct-sev-curr { color: #b71c1c; }
.ct-sev-arrow-downgraded .ct-sev-curr { color: #00695c; }

.ct-sevchange-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.ct-sevchange-badge-escalated  { background: rgba(198,40,40,0.1); color: #b71c1c; }
.ct-sevchange-badge-downgraded { background: rgba(38,166,154,0.1); color: #00695c; }

.ct-finding-row-sevchange {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Score delta chip ── */
.ct-score-delta {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 20px;
  white-space: nowrap;
}

.ct-score-delta-up   { background: rgba(38,166,154,0.1);  color: #00695c; border: 1px solid rgba(38,166,154,0.2); }
.ct-score-delta-down { background: rgba(198,40,40,0.08);   color: #b71c1c; border: 1px solid rgba(198,40,40,0.15); }
.ct-score-delta-flat { background: rgba(63,43,19,0.05);   color: var(--muted); border: 1px solid var(--border); }

/* ── Status banners ── */
.ct-no-change-banner,
.ct-change-banner {
  font-size: 0.83rem;
  font-weight: 600;
  padding: 0.55rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.75rem;
  border: 1px solid;
}

.ct-no-change-banner {
  background: rgba(38,166,154,0.07);
  color: #00695c;
  border-color: rgba(38,166,154,0.2);
}

.ct-change-banner-worse {
  background: rgba(198,40,40,0.05);
  color: #b71c1c;
  border-color: rgba(198,40,40,0.15);
}

.ct-change-banner-mixed {
  background: rgba(239,108,0,0.06);
  color: #bf360c;
  border-color: rgba(239,108,0,0.2);
}

.ct-change-banner-better {
  background: rgba(38,166,154,0.07);
  color: #00695c;
  border-color: rgba(38,166,154,0.2);
}

/* ── Finding groups ── */
.ct-group {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.ct-group-new {
  border-color: rgba(198,40,40,0.25);
}

.ct-group-resolved {
  border-color: rgba(38,166,154,0.25);
}

.ct-group-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.ct-group-new    .ct-group-header { background: rgba(198,40,40,0.05);  color: #b71c1c; }
.ct-group-resolved .ct-group-header { background: rgba(38,166,154,0.05); color: #00695c; }

.ct-group-icon { font-size: 0.85rem; flex-shrink: 0; }
.ct-group-label { font-weight: 800; }

.ct-group-subtext {
  font-size: 0.72rem;
  font-weight: 500;
  color: inherit;
  opacity: 0.7;
  flex: 1;
  font-style: italic;
}

.ct-group-count {
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.1rem 0.45rem;
  border-radius: 20px;
  margin-left: auto;
  flex-shrink: 0;
}

.ct-group-count-new      { background: rgba(198,40,40,0.12); color: #b71c1c; }
.ct-group-count-resolved { background: rgba(38,166,154,0.12); color: #00695c; }

/* ── Finding rows ── */
.ct-finding-list {
  padding: 0.4rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.ct-finding-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.35rem;
  border-radius: 5px;
  font-size: 0.79rem;
  flex-wrap: wrap;
}

.ct-finding-row:hover { background: rgba(63,43,19,0.04); }

.ct-finding-row-new      { border-left: 3px solid rgba(198,40,40,0.4); }
.ct-finding-row-resolved { border-left: 3px solid rgba(38,166,154,0.4); opacity: 0.8; }

.ct-sev-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ct-finding-sev {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
  min-width: 50px;
}

.ct-finding-sev-critical { color: #b71c1c; }
.ct-finding-sev-high     { color: #c62828; }
.ct-finding-sev-medium   { color: #ef6c00; }
.ct-finding-sev-low      { color: #f57f17; }
.ct-finding-sev-info     { color: #78909c; }

.ct-finding-title {
  flex: 1;
  color: var(--text);
  font-weight: 500;
  min-width: 0;
}

.ct-finding-row-resolved .ct-finding-title {
  text-decoration: line-through;
  text-decoration-color: rgba(38,166,154,0.5);
  color: var(--muted);
}

.ct-finding-url {
  font-size: 0.68rem;
  color: var(--muted);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}

.ct-pages-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.08rem 0.35rem;
  border-radius: 4px;
  background: rgba(63,43,19,0.07);
  color: var(--muted);
  white-space: nowrap;
}

.ct-truncate {
  font-size: 0.72rem;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  margin: 0.25rem 0 0;
  padding: 0.25rem 0;
  border-top: 1px solid rgba(63,43,19,0.06);
}

/* ── Persistent and not-rechecked notes ── */
.ct-persistent-note,
.ct-notchecked-note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  margin-top: 0.4rem;
}

.ct-persistent-note {
  background: rgba(239,108,0,0.05);
  border: 1px solid rgba(239,108,0,0.12);
  color: #e65100;
}

.ct-notchecked-note {
  background: rgba(63,43,19,0.04);
  border: 1px solid var(--border);
}

.ct-persistent-icon,
.ct-notchecked-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Baseline note ── */
.ct-baseline-note {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: rgba(63,43,19,0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.ct-baseline-icon { font-size: 1.1rem; flex-shrink: 0; }

.ct-baseline-text {
  font-size: 0.82rem;
  color: var(--text);
  margin: 0 0 0.3rem;
  line-height: 1.5;
}

.ct-baseline-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

/* Print */
@media print {
  .ct-block { page-break-inside: avoid; }
  .ct-finding-list { max-height: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   Security Score Block (sss-*)
   ═══════════════════════════════════════════════════════════════════ */

.sss-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem 1rem;
  margin-bottom: 1rem;
}

.sss-header {
  margin-bottom: 1.1rem;
}

.sss-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.sss-headline {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
}

/* ── Overall ring ── */
.sss-body {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.sss-overall-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  min-width: 110px;
}

.sss-overall-ring {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 5px solid;
  position: relative;
}

.sss-overall-green  { border-color: #26a69a; background: rgba(38,166,154,0.06); }
.sss-overall-amber  { border-color: #ffa726; background: rgba(255,167,38,0.06); }
.sss-overall-orange { border-color: #ef6c00; background: rgba(239,108,0,0.07); }
.sss-overall-red    { border-color: #e53935; background: rgba(229,57,53,0.07); }

.sss-overall-score {
  font-size: 2.1rem;
  font-weight: 900;
  font-family: var(--font-display);
  line-height: 1;
}

.sss-overall-green  .sss-overall-score { color: #00695c; }
.sss-overall-amber  .sss-overall-score { color: #e65100; }
.sss-overall-orange .sss-overall-score { color: #bf360c; }
.sss-overall-red    .sss-overall-score { color: #b71c1c; }

.sss-overall-max {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--muted);
  margin-top: -2px;
}

.sss-overall-label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  line-height: 1.2;
}

/* ── Category bars ── */
.sss-cats-col {
  flex: 1;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.sss-cat-row {
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.15s;
}

.sss-cat-top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.35rem 0.5rem;
}

.sss-cat-name-col {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 170px;
  flex-shrink: 0;
}

.sss-cat-icon {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.sss-cat-name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}

.sss-cat-bar-col {
  flex: 1;
  min-width: 60px;
}

.sss-bar-track {
  height: 8px;
  background: rgba(63,43,19,0.08);
  border-radius: 20px;
  overflow: hidden;
}

.sss-bar-fill {
  height: 100%;
  border-radius: 20px;
  transition: width 0.4s ease;
}

.sss-bar-green  { background: #26a69a; }
.sss-bar-amber  { background: #ffa726; }
.sss-bar-orange { background: #ef6c00; }
.sss-bar-red    { background: #e53935; }

.sss-cat-score-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 60px;
  flex-shrink: 0;
}

.sss-cat-score {
  font-size: 1rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1;
}

.sss-bar-green-text  { color: #00695c; }
.sss-bar-amber-text  { color: #e65100; }
.sss-bar-orange-text { color: #bf360c; }
.sss-bar-red-text    { color: #b71c1c; }

.sss-cat-label {
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

/* ── Category details (neg/pos rows) ── */
.sss-cat-details {
  padding: 0.3rem 0.5rem 0.5rem 2.1rem;
  border-top: 1px solid rgba(63,43,19,0.06);
}

.sss-neg-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  font-size: 0.76rem;
}

.sss-neg-sev {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.sss-neg-sev-critical { background: #b71c1c; }
.sss-neg-sev-high     { background: #e53935; }
.sss-neg-sev-medium   { background: #ef6c00; }
.sss-neg-sev-low      { background: #ffa726; }
.sss-neg-sev-info     { background: #90a4ae; }

.sss-neg-text {
  flex: 1;
  color: var(--text);
}

.sss-neg-pts {
  font-size: 0.68rem;
  font-weight: 700;
  color: #e53935;
  white-space: nowrap;
}

.sss-pos-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.sss-pos-check {
  color: #26a69a;
  font-weight: 800;
  flex-shrink: 0;
}

.sss-pos-text { flex: 1; }

.sss-detail-empty {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

/* ── What's hurting section ── */
.sss-hurting-section {
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.sss-hurting-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.55rem;
}

.sss-hurting-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sss-hurting-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: rgba(63,43,19,0.025);
  border: 1px solid rgba(63,43,19,0.06);
  font-size: 0.78rem;
  flex-wrap: wrap;
}

.sss-hurting-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  flex-shrink: 0;
}

.sss-hurting-cat-tls         { background: rgba(100,181,246,0.15); color: #1565c0; }
.sss-hurting-cat-headers     { background: rgba(171,71,188,0.12);  color: #6a1b9a; }
.sss-hurting-cat-auth        { background: rgba(255,193,7,0.15);   color: #8a6820; }
.sss-hurting-cat-application { background: rgba(239,108,0,0.12);   color: #bf360c; }
.sss-hurting-cat-scanHealth  { background: rgba(63,43,19,0.08);    color: var(--muted); }

.sss-hurting-impact {
  flex: 1;
  color: var(--text);
  min-width: 0;
}

.sss-hurting-deduct {
  font-size: 0.72rem;
  font-weight: 700;
  color: #e53935;
  white-space: nowrap;
  flex-shrink: 0;
}

.sss-hurting-clear {
  font-size: 0.82rem;
  color: #00695c;
  font-weight: 600;
  padding: 0.4rem 0;
}

/* ── Weight note ── */
.sss-weight-note {
  font-size: 0.65rem;
  color: var(--muted);
  margin-top: 0.75rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(63,43,19,0.06);
  font-style: italic;
  text-align: right;
}

/* Print */
@media print {
  .sss-block {
    page-break-inside: avoid;
  }
  .sss-cat-details {
    display: block !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════
   Attack Surface — scan report section
   ═══════════════════════════════════════════════════════════════════ */

.as-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.as-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.as-section-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.as-section-sub {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
  font-style: italic;
}

.as-risk-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.7rem;
  border-radius: 20px;
  white-space: nowrap;
}

.as-risk-chip-warn  { background: rgba(245,124,0,0.1);  color: #e65100; border: 1px solid rgba(245,124,0,0.3); }
.as-risk-chip-clear { background: rgba(38,166,154,0.1); color: #00695c; border: 1px solid rgba(38,166,154,0.3); }

/* Stats row */
.as-stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.as-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  min-width: 70px;
}

.as-stat-neutral { background: rgba(63,43,19,0.05); border: 1px solid var(--border); }
.as-stat-warn    { background: rgba(245,124,0,0.08); border: 1px solid rgba(245,124,0,0.25); }

.as-stat-value {
  font-size: 1.4rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--text);
}

.as-stat-warn .as-stat-value { color: #e65100; }

.as-stat-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Domains */
.as-domains-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.as-row-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-right: 0.25rem;
}

.as-domain-chip {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(100,181,246,0.1);
  border: 1px solid rgba(100,181,246,0.3);
  color: #1565c0;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

/* Open ports */
.as-ports {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.as-port-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: rgba(171,71,188,0.08);
  border: 1px solid rgba(171,71,188,0.25);
  color: #6a1b9a;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  font-weight: 700;
}

.as-port-svc {
  font-weight: 500;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #9c27b0;
}

/* Details (collapsible) */
.as-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: 0.65rem;
}

.as-details-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  background: rgba(63,43,19,0.03);
  user-select: none;
}

.as-details-summary::-webkit-details-marker { display: none; }

.as-details[open] .as-details-summary {
  border-bottom: 1px solid var(--border);
}

.as-detail-count {
  background: var(--accent-muted, rgba(63,43,19,0.1));
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 20px;
}

.as-details-body {
  padding: 0.75rem 1rem;
}

/* Service rows */
.as-service-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(63,43,19,0.06);
  font-size: 0.82rem;
}

.as-service-row:last-child { border-bottom: none; }

.as-service-icon {
  color: var(--muted);
  font-size: 0.7rem;
  flex-shrink: 0;
}

.as-service-name {
  flex: 1;
  font-weight: 600;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.as-service-cat {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(63,43,19,0.06);
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

/* Endpoint rows */
.as-ep-list {
  padding: 0.5rem;
  max-height: 360px;
  overflow-y: auto;
}

.as-ep-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.4rem;
  border-radius: 4px;
  font-size: 0.76rem;
  font-family: var(--font-mono);
  flex-wrap: wrap;
}

.as-ep-row:hover { background: rgba(63,43,19,0.04); }
.as-ep-risky { background: rgba(245,124,0,0.04); }

.as-ep-url {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}

.as-ep-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.as-ep-status-ok  { background: rgba(38,166,154,0.1); color: #00695c; }
.as-ep-status-err { background: rgba(229,57,53,0.1);  color: #b71c1c; }

.as-ep-flag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-sans, sans-serif);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: rgba(245,124,0,0.12);
  color: #e65100;
  border: 1px solid rgba(245,124,0,0.25);
  white-space: nowrap;
}

.as-empty {
  font-size: 0.8rem;
  color: var(--muted);
  font-style: italic;
  margin: 0;
}

.as-truncate-note {
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.5rem 0;
  font-style: italic;
  margin: 0;
}

/* ═══════════════════════════════════════════════════════════════════
   Attack Surface — dashboard card
   ═══════════════════════════════════════════════════════════════════ */

#attack-surface-card {
  margin-bottom: 0.75rem;
}

.as-dashboard-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 4px solid var(--accent, #3f2b13);
  border-radius: var(--radius);
  padding: 1.1rem 1.5rem;
}

.as-dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  flex-wrap: wrap;
}

.as-dash-eyebrow {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.2rem;
}

.as-dash-headline {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
}

.as-dash-source {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  background: rgba(63,43,19,0.06);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  align-self: flex-start;
}

.as-dash-stats {
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.as-dash-stat {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.as-dash-stat-val {
  font-size: 1.55rem;
  font-weight: 800;
  font-family: var(--font-display);
  line-height: 1.1;
  color: var(--text);
}

.as-dash-stat-key {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.as-dash-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.as-dash-risk {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}

.as-dash-risk-warn  { background: rgba(245,124,0,0.1);  color: #e65100; border: 1px solid rgba(245,124,0,0.3); }
.as-dash-risk-clear { background: rgba(38,166,154,0.1); color: #00695c; border: 1px solid rgba(38,166,154,0.3); }

.as-dash-port-note {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 500;
}

.as-dash-svc-chip {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 20px;
  background: rgba(63,43,19,0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  font-family: var(--font-mono);
}

/* ══════════════════════════════════════════════════════════════════════════
   Client Report Cover Page  (rc-*)
   ══════════════════════════════════════════════════════════════════════════ */

.rc-branding-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--brand-deep);
  margin-bottom: 1.5rem;
}

.rc-company-input {
  font-size: 0.9rem !important;
  font-weight: 700 !important;
  color: var(--fg) !important;
  letter-spacing: 0.02em;
  min-width: 220px;
}

.rc-branding-tag {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.18rem 0.55rem;
  text-transform: uppercase;
  flex-shrink: 0;
}

.rc-cover-hero {
  padding: 1.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.25rem;
}

.rc-cover-eyebrow {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.rc-title-input {
  font-size: 1.75rem !important;
  font-weight: 800 !important;
  color: var(--fg) !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: none !important;
}

.rc-cover-asset {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--fg);
  margin: 0.6rem 0 0.2rem;
}

.rc-cover-target {
  font-size: 0.85rem;
  color: var(--muted);
  margin: 0;
}

.rc-cover-target a {
  color: var(--muted);
  text-decoration: none;
}

.rc-cover-risk-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.rc-risk-pill {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  flex-shrink: 0;
}

.rc-risk-pill-risk-critical { background: #dc2626; color: #fff; }
.rc-risk-pill-risk-high     { background: #d97706; color: #fff; }
.rc-risk-pill-risk-moderate { background: #ca8a04; color: #fff; }
.rc-risk-pill-risk-low      { background: #3b82f6; color: #fff; }
.rc-risk-pill-risk-clear    { background: #16a34a; color: #fff; }

.rc-score-block {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
}

.rc-score-num {
  font-size: 2rem;
  font-weight: 800;
  color: var(--fg);
  line-height: 1;
}

.rc-score-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 500;
}

.rc-prepared-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.75rem 0 0.5rem;
}

.rc-prepared-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.03em;
  white-space: nowrap;
  text-transform: uppercase;
}

.rc-client-input {
  font-size: 0.95rem !important;
  font-weight: 600 !important;
  flex: 1;
}

.rc-cover-meta-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem 0.4rem;
  align-items: center;
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0.5rem 0 0.75rem;
}

.rc-sep {
  color: var(--border);
}

.rc-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.25rem 0;
}

.rc-meta-grid {
  margin-top: 0.5rem;
}

/* ══════════════════════════════════════════════════════════════════════════
   Risk Breakdown Chart  (rbc-*)
   ══════════════════════════════════════════════════════════════════════════ */

.rbc-chart {
  margin: 1rem 0 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem 0.9rem;
}

.rbc-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.rbc-chart-title {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.rbc-chart-total {
  font-size: 0.74rem;
  color: var(--muted);
}

.rbc-bar-track {
  height: 14px;
  border-radius: 7px;
  overflow: hidden;
  background: var(--border);
  margin-bottom: 0.85rem;
}

.rbc-bar {
  display: flex;
  height: 100%;
  width: 100%;
}

.rbc-seg {
  height: 100%;
  transition: opacity 0.15s;
  min-width: 2px;
}

.rbc-seg:first-child { border-radius: 7px 0 0 7px; }
.rbc-seg:last-child  { border-radius: 0 7px 7px 0; }
.rbc-seg:only-child  { border-radius: 7px; }

.rbc-tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.rbc-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.5rem 0.4rem 0.4rem;
  border-radius: 7px;
  border: 1.5px solid;
  gap: 0.1rem;
}

.rbc-tile-count {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1;
}

.rbc-tile-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.rbc-info-note {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: right;
  margin: 0.5rem 0 0;
}

.rbc-empty {
  font-size: 0.82rem;
  color: var(--muted);
  padding: 0.5rem 0;
}

/* ══════════════════════════════════════════════════════════════════════════
   Key Findings Section  (kf-*)
   ══════════════════════════════════════════════════════════════════════════ */

.kf-section {
  margin-bottom: 1rem;
}

.kf-section-header {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
}

.kf-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.kf-count-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.18rem 0.6rem;
  border-radius: 20px;
  background: rgba(220,38,38,0.1);
  color: #991b1b;
  border: 1px solid rgba(220,38,38,0.2);
  white-space: nowrap;
}

.kf-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 0.75rem;
}

.kf-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.15rem;
  break-inside: avoid;
  page-break-inside: avoid;
}

.kf-head {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.55rem;
}

.kf-sev {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.kf-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  line-height: 1.35;
}

.kf-desc {
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0 0 0.4rem;
  line-height: 1.5;
}

.kf-impact {
  font-size: 0.8rem;
  color: var(--fg);
  margin: 0 0 0.4rem;
  line-height: 1.5;
}

.kf-fix-hint {
  font-size: 0.78rem;
  color: var(--fg);
  margin: 0;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}

.kf-fix-hint strong {
  color: var(--brand-deep);
}

/* ── How to Fix collapsible ─────────────────────────────────────────────── */

.htf-details {
  margin-top: 0.85rem;
  border-top: 1px solid var(--border);
  padding-top: 0.1rem;
}

.htf-toggle {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--brand-deep);
  cursor: pointer;
  padding: 0.45rem 0 0.3rem;
  list-style: none;
  user-select: none;
}

.htf-toggle::-webkit-details-marker { display: none; }

.htf-toggle::before {
  content: "▶";
  font-size: 0.55rem;
  transition: transform 0.15s ease;
  color: var(--brand-mid);
}

.htf-details[open] .htf-toggle::before {
  transform: rotate(90deg);
}

.htf-body {
  padding: 0.4rem 0 0.5rem;
}

.htf-summary-text {
  font-size: 0.83rem;
  color: var(--fg);
  line-height: 1.55;
  margin: 0 0 0.75rem;
}

.htf-code-block {
  background: #1e1e1e;
  color: #d4d4d4;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.85rem 1rem;
  font-size: 0.73rem;
  font-family: 'Courier New', Courier, monospace;
  line-height: 1.65;
  overflow-x: auto;
  white-space: pre;
  margin: 0;
}

.htf-code-block code {
  background: none;
  color: inherit;
  font-size: inherit;
  padding: 0;
}

/* Comments in code blocks */
.htf-code-block .comment {
  color: #6a9955;
}

/* Print */
@media print {
  .htf-details { display: none; }

  .as-section {
    page-break-inside: avoid;
  }

  .as-dashboard-card {
    display: none;
  }

  .as-details[open] .as-details-body {
    max-height: none;
  }

  .as-ep-list {
    max-height: none;
    overflow: visible;
  }
}

.evidence-captures {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}

.evidence-capture-item {
  background: var(--bg-secondary, #f8f9fa);
  border: 1px solid var(--border-color, #e2e5e9);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.82rem;
}

.evidence-capture-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.evidence-capture-url {
  font-family: var(--font-mono, monospace);
  font-size: 0.78rem;
  color: var(--text-secondary, #555);
  word-break: break-all;
}

.evidence-capture-source {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.evidence-capture-source-static {
  background: #e8ecf1;
  color: #4a5568;
}

.evidence-capture-source-js {
  background: #ebf5ff;
  color: #2563eb;
}

.evidence-capture-status {
  font-family: var(--font-mono, monospace);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
  background: #f0f0f0;
  color: #333;
}

.evidence-capture-headers {
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--text-secondary, #555);
  background: transparent;
  border: none;
  padding: 2px 0 0 0;
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 120px;
  overflow-y: auto;
}

.as-js-status {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  margin-top: 8px;
  background: #ebf5ff;
  border-radius: 6px;
  font-size: 0.82rem;
}

.as-js-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #2563eb;
  color: #fff;
}

.nav-alert-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

#section-schedules .grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
}
@media (max-width: 900px) {
  #section-schedules .grid {
    grid-template-columns: 1fr;
  }
}

#schedule-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
#schedule-form label span {
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--fg2);
}
#schedule-form select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg2);
  color: var(--fg);
  font-size: 0.88rem;
}

.btn-sm {
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--bg2);
  color: var(--fg);
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
}
.btn-sm:hover {
  background: var(--bg3, var(--border));
}
.btn-sm.btn-danger {
  color: var(--red);
  border-color: var(--red);
}
.btn-sm.btn-danger:hover {
  background: var(--red);
  color: #fff;
}

.alert-unread {
  border-left: 3px solid var(--blue, #2563eb);
}

.badge-scan-active {
  background: #7c3aed;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge-scan-passive {
  background: #0891b2;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.compliance-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin: 0.35rem 0 0.2rem;
}

.compliance-chip {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  white-space: nowrap;
  cursor: default;
}

.compliance-owasp {
  background: rgba(220, 38, 38, 0.10);
  color: #991b1b;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.compliance-soc2 {
  background: rgba(37, 99, 235, 0.10);
  color: #1e3a8a;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.compliance-hipaa {
  background: rgba(22, 163, 74, 0.10);
  color: #14532d;
  border: 1px solid rgba(22, 163, 74, 0.25);
}

.risk-priority-badge {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 3px;
  white-space: nowrap;
}

.risk-priority-critical {
  background: #dc2626;
  color: #fff;
}

.risk-priority-high {
  background: #d97706;
  color: #fff;
}

.risk-priority-medium {
  background: #ca8a04;
  color: #fff;
}

.risk-priority-low {
  background: #3b82f6;
  color: #fff;
}

.risk-priority-info {
  background: #e5e7eb;
  color: #6b7280;
}

#section-alerts .empty-state,
#section-schedules .empty-state {
  text-align: center;
  padding: 2rem;
}

/* ── Remediation Status Badges ─────────────────────────────── */

.badge-remediation {
  font-size: 0.66rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-rs-open { background: rgba(239,68,68,0.1); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }
.badge-rs-in_progress { background: rgba(59,130,246,0.1); color: #2563eb; border: 1px solid rgba(59,130,246,0.2); }
.badge-rs-fixed { background: rgba(34,197,94,0.1); color: #16a34a; border: 1px solid rgba(34,197,94,0.2); }
.badge-rs-verified { background: rgba(16,185,129,0.1); color: #059669; border: 1px solid rgba(16,185,129,0.2); }
.badge-rs-false_positive { background: rgba(107,114,128,0.1); color: #6b7280; border: 1px solid rgba(107,114,128,0.2); }

/* ── Remediation Controls ──────────────────────────────────── */

.remediation-controls {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.remediation-row {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.remediation-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 120px;
}

.remediation-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.remediation-select,
.remediation-input {
  font-size: 0.8rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
}

.remediation-select:focus,
.remediation-input:focus {
  outline: 2px solid rgba(139, 92, 42, 0.3);
  border-color: rgba(139, 92, 42, 0.4);
}

.remediation-actions {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-left: auto;
}

.btn-sm {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}
.btn-sm:hover {
  background: var(--border);
}

.btn-verify {
  background: rgba(34,197,94,0.08);
  border-color: rgba(34,197,94,0.25);
  color: #16a34a;
}
.btn-verify:hover {
  background: rgba(34,197,94,0.15);
}

.btn-ticket {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.25);
  color: #2563eb;
}
.btn-ticket:hover {
  background: rgba(59,130,246,0.15);
}

.btn-ticket-link {
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.35rem 0.7rem;
  border-radius: 8px;
  background: rgba(107,74,29,0.08);
  border: 1px solid rgba(107,74,29,0.18);
  color: #5a3e1b;
  text-decoration: none;
  white-space: nowrap;
}

.btn-history {
  background: rgba(107,114,128,0.08);
  border-color: rgba(107,114,128,0.2);
  color: #6b7280;
}

/* ── History Drawer ────────────────────────────────────────── */

.history-drawer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  justify-content: flex-end;
}

.history-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.3);
}

.history-drawer-panel {
  position: relative;
  width: min(420px, 90vw);
  background: var(--bg);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0,0,0,0.1);
}

.history-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.history-drawer-header h3 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: var(--font-display);
}

.history-drawer-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--muted);
  padding: 0.2rem 0.4rem;
  line-height: 1;
}

.history-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem;
}

.history-drawer-footer {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.history-comment-input {
  flex: 1;
  font-size: 0.82rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
}

.history-item {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.history-item:last-child {
  border-bottom: none;
}

.history-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.history-item-type {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.history-item-time {
  font-size: 0.72rem;
  color: var(--muted);
}

.history-item-detail {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
}

.history-item-note {
  font-size: 0.82rem;
  color: var(--text);
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

/* ── Remediation Summary Bar ───────────────────────────────── */

.remediation-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.5rem 0;
}

.rs-chip {
  font-size: 0.73rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
}

.rs-open { background: rgba(239,68,68,0.08); color: #dc2626; }
.rs-inprogress { background: rgba(59,130,246,0.08); color: #2563eb; }
.rs-fixed { background: rgba(34,197,94,0.08); color: #16a34a; }
.rs-verified { background: rgba(16,185,129,0.08); color: #059669; }
.rs-fp { background: rgba(107,114,128,0.08); color: #6b7280; }

/* ── Integration Cards ─────────────────────────────────────── */

.integration-card .finding-head {
  padding: 1rem;
}

.integration-not-configured {
  opacity: 0.7;
}

#section-integrations .empty-state,
#notification-channels-list .empty-state {
  text-align: center;
  padding: 2rem;
}

.channel-card .finding-head {
  padding: 1rem;
}

.btn-danger {
  color: #dc2626;
  border-color: rgba(239,68,68,0.2);
  background: rgba(239,68,68,0.04);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.1);
}

.delivery-chips {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.delivery-chip {
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
}

.delivery-sent { background: rgba(34,197,94,0.1); color: #16a34a; }
.delivery-failed { background: rgba(239,68,68,0.1); color: #dc2626; }
.delivery-retrying { background: rgba(245,158,11,0.1); color: #d97706; }
.delivery-pending { background: rgba(107,114,128,0.1); color: #6b7280; }

.rs-stale { background: rgba(245,158,11,0.1); color: #d97706; }

.aging-risk-warning {
  background: rgba(239,68,68,0.06);
  border-left: 3px solid #dc2626;
  color: #dc2626;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  margin-bottom: 0.4rem;
  border-radius: 4px;
}

.remediation-queues {
  display: flex;
  gap: 0.4rem;
  padding: 0.2rem 0;
}

.rs-queue-btn {
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 0.2rem 0.6rem;
  border-radius: 12px;
  color: var(--text);
}
.rs-queue-btn:hover {
  background: rgba(59,130,246,0.08);
  border-color: #2563eb;
  color: #2563eb;
}

.badge-stale {
  background: rgba(245,158,11,0.12);
  color: #b45309;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.12rem 0.5rem;
  border-radius: 12px;
}
.badge-stale.stale-urgent {
  background: rgba(239,68,68,0.12);
  color: #dc2626;
}

.badge-owner {
  background: rgba(59,130,246,0.08);
  color: #2563eb;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 12px;
}

.badge-ticket {
  background: rgba(107,114,128,0.08);
  color: #4b5563;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 12px;
  text-decoration: none;
}
a.badge-ticket:hover {
  background: rgba(59,130,246,0.12);
  color: #2563eb;
}

.filter-check {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.filter-check input[type="checkbox"] {
  margin: 0;
}

.auth-container {
  max-width: 380px;
  margin: 12vh auto 0;
  padding: 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.auth-title {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand);
  margin: 0 0 0.2rem;
  text-align: center;
}
.auth-subtitle {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.auth-form input {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.88rem;
  background: var(--bg);
  color: var(--text);
}
.auth-btn {
  padding: 0.6rem;
  font-weight: 700;
}
.auth-error {
  background: rgba(239,68,68,0.08);
  color: #dc2626;
  font-size: 0.8rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  margin-bottom: 0.75rem;
}
.auth-toggle {
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 0.75rem;
}
.auth-toggle a {
  color: var(--brand);
  text-decoration: underline;
  cursor: pointer;
}

.user-nav-info {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.user-nav-info .user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  background: rgba(59,130,246,0.1);
  color: #2563eb;
  text-transform: uppercase;
}
.user-nav-info .btn-logout {
  font-size: 0.72rem;
  cursor: pointer;
  background: none;
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  color: var(--muted);
}
.user-nav-info .btn-logout:hover {
  color: #dc2626;
  border-color: rgba(239,68,68,0.3);
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
  margin-bottom: 1rem;
}
.team-stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  text-align: center;
}
.team-stat-card .stat-value {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
}
.team-stat-card .stat-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
}

.audit-entry {
  display: flex;
  gap: 0.6rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
}
.audit-entry .audit-time {
  color: var(--muted);
  white-space: nowrap;
  min-width: 130px;
}
.audit-entry .audit-actor {
  font-weight: 600;
  min-width: 100px;
}
.audit-entry .audit-action {
  flex: 1;
}

.user-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.user-card .user-name {
  font-weight: 600;
  font-size: 0.85rem;
}
.user-card .user-email {
  font-size: 0.75rem;
  color: var(--muted);
}
.user-card .user-role-badge {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
  background: rgba(59,130,246,0.1);
  color: #2563eb;
  text-transform: uppercase;
}
.user-card .user-actions {
  margin-left: auto;
  display: flex;
  gap: 0.3rem;
}

.role-restricted {
  display: none !important;
}

/* AI remediation suggestion block */
.finding-ai-block {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #c8d3e3;
  border-left: 3px solid #6c5ce7;
  border-radius: 6px;
  background: linear-gradient(180deg, #f7f5ff 0%, #fbfbff 100%);
}
.finding-ai-block .ai-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}
.finding-ai-block .ai-meta {
  font-size: 11px;
  color: #6b7488;
}
.finding-ai-block .ai-actions {
  margin-left: auto;
  display: flex;
  gap: 6px;
}
.btn-ai-generate {
  background: #6c5ce7;
  color: #fff;
  border: 1px solid #5a4cd4;
}
.btn-ai-generate:hover { background: #5a4cd4; }
.btn-ai-generate:disabled { opacity: 0.6; cursor: wait; }
.badge-ai-edited {
  background: #fff4d2;
  color: #8a6d00;
  border: 1px solid #e9d27a;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
}
.ai-subfield { margin-top: 8px; }
.ai-sublabel {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b3fa3;
  margin-bottom: 3px;
}
.ai-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.45;
  color: #2a2f3a;
}
.ai-text-pre { white-space: pre-wrap; }
.ai-example {
  margin: 0;
  padding: 8px 10px;
  background: #1f2330;
  color: #e7eaf3;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  white-space: pre-wrap;
  overflow-x: auto;
}
.ai-edit-form { display: flex; flex-direction: column; gap: 6px; }
.ai-textarea {
  width: 100%;
  border: 1px solid #c8d3e3;
  border-radius: 4px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}
.ai-textarea-mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.ai-edit-actions { display: flex; gap: 8px; margin-top: 4px; }
.ai-empty { font-style: italic; }

/* ===== Share modal ===== */
.share-modal-overlay { position: fixed; inset: 0; background: rgba(20, 14, 6, 0.45); display: flex; align-items: center; justify-content: center; z-index: 9000; padding: 1rem; }
.share-modal-card { background: var(--surface-strong); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); max-width: 720px; width: 100%; max-height: 88vh; overflow-y: auto; padding: 1.6rem 1.8rem; }
.share-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.4rem; }
.share-modal-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.4rem; }
.modal-close { background: transparent; color: var(--text); font-size: 1.6rem; padding: 0.1rem 0.6rem; border-radius: 999px; }
.share-modal-intro { color: var(--muted); margin: 0.2rem 0 1rem; line-height: 1.5; }
.share-create-form { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1rem 1.1rem; margin-bottom: 1.2rem; }
.share-form-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 0.9rem; margin-bottom: 0.7rem; }
.share-form-row label { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.88rem; color: var(--muted); }
.share-form-row select, .share-form-row input { padding: 0.55rem 0.7rem; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-size: 0.95rem; color: var(--text); }
.share-create-btn { background: var(--brand); color: #fff; }
.share-form-error { margin-top: 0.5rem; min-height: 1.2em; color: var(--high); font-size: 0.88rem; }
.share-list-wrap h3 { margin: 0 0 0.6rem; font-family: var(--font-display); font-size: 1.1rem; }
.share-list { display: flex; flex-direction: column; gap: 0.6rem; }
.share-list-empty { color: var(--muted); font-size: 0.92rem; margin: 0.4rem 0; }
.share-row { display: flex; gap: 0.8rem; align-items: flex-start; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.share-row-revoked, .share-row-expired { opacity: 0.55; }
.share-row-main { flex: 1; min-width: 0; }
.share-row-status { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.3rem; }
.share-status-pill { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; padding: 0.15rem 0.55rem; border-radius: 999px; color: #fff; }
.share-status-active { background: var(--success); }
.share-status-revoked { background: var(--muted); }
.share-status-expired { background: var(--info); }
.share-lock { font-size: 0.95rem; }
.share-row-url { font-family: monospace; font-size: 0.82rem; color: var(--brand-deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-row-meta { font-size: 0.78rem; color: var(--muted); margin-top: 0.25rem; }
.share-row-actions { display: flex; flex-direction: column; gap: 0.35rem; flex-shrink: 0; }
.share-row-btn { background: var(--brand); color: #fff; padding: 0.4rem 0.8rem; font-size: 0.82rem; border-radius: 999px; }
.share-row-btn-danger { background: var(--high); }

/* Onboarding strip — added by onboarding flow */
.onboarding-strip { flex-direction: column; align-items: stretch; padding: 0.75rem 0 0.85rem; gap: 0.55rem; }
.onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.onboarding-title { font-size: 0.92rem; color: var(--text); margin-right: 0.6rem; }
.onboarding-progress-text { font-size: 0.76rem; color: var(--muted); }
.onboarding-actions { display: inline-flex; gap: 0.4rem; align-items: center; }
.onboarding-actions .btn-sm.primary { background: var(--brand); color: #fff; border: none; padding: 0.35rem 0.85rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; cursor: pointer; }
.onboarding-actions .btn-sm.primary:hover { background: var(--brand-deep); }
.onboarding-actions .btn-sm.primary:disabled { opacity: 0.6; cursor: not-allowed; }
.onboarding-dismiss { background: transparent; border: 1px solid var(--border); color: var(--muted); width: 26px; height: 26px; border-radius: 50%; cursor: pointer; font-size: 1rem; line-height: 1; }
.onboarding-dismiss:hover { color: var(--text); border-color: var(--brand); }
.onboarding-progress-bar { height: 4px; background: rgba(0,0,0,0.06); border-radius: 4px; overflow: hidden; }
.onboarding-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--success)); transition: width 200ms ease; }
.onboarding-step { align-items: flex-start; padding: 0.45rem 0.75rem; }
.onboarding-step-body { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.onboarding-step-help { font-size: 0.7rem; font-weight: 400; color: var(--muted); white-space: normal; }
.onboarding-step.is-done .onboarding-step-help { color: rgba(39, 80, 67, 0.75); }

/* ===== Connect-a-site CTA + wizard ===== */
.connect-site-card { background: linear-gradient(135deg, var(--surface-strong), var(--surface)); }
.connect-site-cta-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 0.5rem; }
.primary-cta { background: var(--accent, #b25c2c); color: #fff; border: none; border-radius: 999px; padding: 0.85rem 1.6rem; font-size: 1rem; font-weight: 600; cursor: pointer; transition: transform 120ms ease, filter 120ms ease; }
.primary-cta:hover { filter: brightness(1.05); transform: translateY(-1px); }
.primary-cta:disabled { background: var(--muted); cursor: not-allowed; transform: none; filter: none; }
.link-button { background: none; border: none; color: var(--accent, #b25c2c); cursor: pointer; font-size: 0.9rem; padding: 0.4rem 0.6rem; }
.link-button:hover { text-decoration: underline; }
.connect-site-mini-steps { list-style: none; margin: 1.2rem 0 0; padding: 0; display: grid; gap: 0.6rem; }
.connect-site-mini-steps li { display: flex; align-items: center; gap: 0.7rem; color: var(--muted); font-size: 0.95rem; }
.connect-site-mini-steps li span { display: inline-flex; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--surface-strong); border: 1px solid var(--border); align-items: center; justify-content: center; font-weight: 700; color: var(--accent, #b25c2c); }

.connect-wizard-overlay { position: fixed; inset: 0; background: rgba(20, 14, 6, 0.5); display: flex; align-items: center; justify-content: center; z-index: 9100; padding: 1rem; }
.connect-wizard-card { background: var(--surface-strong); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); max-width: 720px; width: 100%; max-height: 92vh; overflow-y: auto; padding: 1.6rem 1.8rem; }
.connect-wizard-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 0.8rem; }
.connect-wizard-head h2 { margin: 0; font-family: var(--font-display); font-size: 1.4rem; }
.connect-wizard-steps { list-style: none; margin: 0 0 1.4rem; padding: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.connect-wizard-steps li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.85rem; color: var(--muted); padding: 0.3rem 0.6rem; border-radius: 999px; }
.connect-wizard-steps li span { display: inline-flex; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); align-items: center; justify-content: center; font-weight: 700; }
.connect-wizard-steps li.active { color: var(--text); background: var(--surface); }
.connect-wizard-steps li.active span { background: var(--accent, #b25c2c); color: #fff; border-color: var(--accent, #b25c2c); }
.connect-wizard-steps li.done span { background: #2c8b5e; color: #fff; border-color: #2c8b5e; }
.connect-wizard-steps li.done span::before { content: "✓"; }
.connect-wizard-steps li.done span > * { display: none; }
.connect-wizard-body label { display: flex; flex-direction: column; gap: 0.3rem; font-weight: 600; font-size: 0.9rem; }
.connect-wizard-body label small.muted { font-weight: 400; }
.connect-wizard-body input[type="url"], .connect-wizard-body input[type="text"], .connect-wizard-body select { padding: 0.7rem 0.9rem; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 1rem; }
.connect-wizard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8rem; }
.connect-wizard-intro { color: var(--muted); margin: 0 0 1rem; line-height: 1.55; }
.connect-wizard-callout { background: var(--surface); border-left: 3px solid var(--accent, #b25c2c); padding: 0.8rem 1rem; border-radius: 6px; margin: 0.8rem 0; }
.connect-wizard-callout h3 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.connect-wizard-callout p { margin: 0; color: var(--muted); font-size: 0.88rem; line-height: 1.5; }
.connect-wizard-confirm { display: flex; gap: 0.7rem; align-items: flex-start; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; margin: 1rem 0 0.5rem; cursor: pointer; font-weight: 400; }
.connect-wizard-confirm input { margin-top: 0.2rem; transform: scale(1.2); }
.connect-wizard-error { color: #b13a3a; font-size: 0.88rem; margin-top: 0.5rem; min-height: 1em; }
.connect-wizard-actions { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: 1.4rem; }
.connect-wizard-method { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 0.8rem 1rem; margin-bottom: 0.8rem; }
.connect-wizard-method[open] { border-color: var(--accent, #b25c2c); }
.connect-wizard-method summary { cursor: pointer; font-size: 0.95rem; padding: 0.2rem 0; }
.connect-wizard-howto { margin: 0.8rem 0 0; padding-left: 1.2rem; display: grid; gap: 0.7rem; font-size: 0.9rem; line-height: 1.55; }
.copy-row { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.4rem; }
.copy-row code { flex: 1; background: var(--surface-strong); padding: 0.5rem 0.7rem; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.85rem; word-break: break-all; border: 1px solid var(--border); }
.copy-btn { padding: 0.4rem 0.8rem; border: 1px solid var(--border); background: var(--surface-strong); border-radius: 6px; cursor: pointer; font-size: 0.82rem; }
.copy-btn:hover { background: var(--accent, #b25c2c); color: #fff; border-color: var(--accent, #b25c2c); }
.connect-wizard-result { padding: 0.8rem 1rem; border-radius: 8px; margin-top: 1rem; font-size: 0.92rem; }
.connect-wizard-result.pending { background: var(--surface); color: var(--muted); }
.connect-wizard-result.success { background: #e7f5ec; color: #1f5e3d; border: 1px solid #2c8b5e; }
.connect-wizard-result.fail { background: #fbecec; color: #842525; border: 1px solid #d18a8a; }
.connect-wizard-failreasons { margin: 0.5rem 0 0; padding-left: 1.2rem; }
.connect-wizard-done { text-align: center; padding: 1.2rem 0.5rem; }
.connect-wizard-done-icon { display: inline-flex; width: 56px; height: 56px; border-radius: 50%; background: var(--surface); align-items: center; justify-content: center; font-size: 1.8rem; font-weight: 700; margin-bottom: 0.6rem; }
.connect-wizard-done.ok .connect-wizard-done-icon { background: #e7f5ec; color: #1f5e3d; }
.connect-wizard-done.pending .connect-wizard-done-icon { background: var(--surface); color: var(--muted); }
.connect-wizard-done h3 { margin: 0 0 0.5rem; font-family: var(--font-display); }
.connect-wizard-done p { color: var(--muted); margin: 0 auto; max-width: 420px; line-height: 1.5; }
@media (max-width: 600px) {
  .connect-wizard-row { grid-template-columns: 1fr; }
  .connect-wizard-card { padding: 1.2rem 1rem; max-height: 96vh; }
}
