/* CYONIX Executive Security Agent.
   Sections: shell and header · grid and panels · briefing · business context ·
   dialogs · AI popup · responsive · reduced motion. Colours, timings, radii and
   elevation come from tokens.css / palette.css; font sizes from the DESIGN.md
   scale. The page scrolls naturally - no panel is locked to the viewport. */

/* The hidden attribute must win over every display rule on this page. */
.executive-page [hidden] {
  display: none !important;
}

/* ---- Shell and header ----------------------------------------------------- */
.executive-page main.executive-main {
  /* Specific enough to beat the shared 1500/1560px caps on workspace main. */
  max-width: 1760px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  /* Room for the AI launcher, so it never permanently covers the last row. */
  padding-bottom: 104px;
}

.exec-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
  padding-top: 8px;
}
.exec-header-copy {
  min-width: 0;
}
.exec-kicker {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.exec-kicker span {
  color: var(--ember);
}
.exec-header h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.exec-sources {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-subtle);
}
.exec-tagline {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
.exec-header-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  /* Solid backing: the globe behind the header is bright and busy, and transparent controls vanish into it. */
  padding: 10px 12px;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(14px);
}
.exec-header-actions .secondary {
  background: var(--surface);
}
.exec-header-actions .secondary:hover {
  background: var(--surface-raised);
}
/* Controls wrap as whole units; none of them squeezes its own label. */
.exec-header-actions > * {
  flex: none;
}
#export-executive-memo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
#export-executive-memo .icon {
  width: 16px;
  height: 16px;
}
.exec-perspective {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}
.exec-data-state {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--muted);
}
.exec-state-badge {
  padding: 4px 10px;
  border-radius: var(--r-pill);
  border: 1px solid var(--edge-strong);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.exec-data-state[data-state='live'] .exec-state-badge {
  color: var(--jade);
  border-color: color-mix(in srgb, var(--jade) 45%, transparent);
  background: color-mix(in srgb, var(--jade) 10%, transparent);
}
.exec-data-state[data-state='limited'] .exec-state-badge,
.exec-data-state[data-state='stale'] .exec-state-badge {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
  background: color-mix(in srgb, var(--warning) 10%, transparent);
}
.exec-data-state[data-state='unavailable'] .exec-state-badge {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 45%, transparent);
  background: color-mix(in srgb, var(--danger) 10%, transparent);
}

/* ---- Grid and panels ------------------------------------------------------ */
/* Two columns only when the content box can hold ~580px briefing + ~420px
   context + the gap - the main element is the `workspace` container, so this
   also stacks when an expanded sidebar eats the width. 1100px is the fallback. */
.exec-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  /* Each panel is as tall as its content: stretching the shorter one to match
     left an empty glass block rather than a common, filled row. */
  align-items: start;
}
@container workspace (min-width: 1024px) {
  .exec-grid {
    grid-template-columns: minmax(0, 57fr) minmax(0, 43fr);
  }
}
@supports not (container-type: inline-size) {
  @media (min-width: 1101px) {
    .exec-grid {
      grid-template-columns: minmax(0, 57fr) minmax(0, 43fr);
    }
  }
}

.exec-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
  border-radius: var(--r-2xl);
  border: 1px solid var(--glass-edge);
  background: var(--panel-gradient);
  box-shadow: var(--glass-light), var(--glass-ring), var(--glass-shade), var(--el-2);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .exec-panel {
    background: var(--surface);
  }
}
.exec-panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px 16px;
}
.exec-section-label {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
}
.exec-section-label.is-context {
  color: var(--ice);
}
.exec-panel h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.25;
  font-weight: 700;
  color: var(--text);
}
.exec-panel-sub {
  margin: 6px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

.exec-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exec-block-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.exec-block-head h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.exec-block-head h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}
.exec-period {
  font-size: 14px;
  color: var(--muted);
}
.exec-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 4px 0;
  border: 0;
  background: none;
  color: var(--ice);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.exec-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.exec-link .icon {
  width: 14px;
  height: 14px;
}
.exec-footnote {
  margin: 0;
  font-size: 13px;
  color: var(--ink-subtle);
}
.exec-review-alerts {
  align-self: flex-start;
  margin-top: -12px;
}

/* ---- Briefing ------------------------------------------------------------- */
.brief-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brief-timestamp {
  font-size: 14px;
  color: var(--muted);
}
#brief-refresh {
  width: 36px;
  height: 36px;
}
#brief-refresh .icon {
  width: 16px;
  height: 16px;
}
/* Spins only while a refresh is in flight - a loading indicator, the one loop
   DESIGN.md allows on a data surface. */
#brief-refresh[aria-busy='true'] {
  cursor: progress;
}
#brief-refresh[aria-busy='true'] .icon {
  animation: spinner-rotate var(--dur-5) linear infinite;
}

/* The banner's colour follows the condition; it is never permanently orange
   or green. Colour is never the only signal - the headline says it. */
.posture-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--text) 3%, transparent);
}
.posture-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 8%, transparent);
}
.posture-icon .icon {
  width: 20px;
  height: 20px;
}
.posture-headline {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}
.posture-desc {
  margin: 4px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
.posture-banner[data-tone='warning'] {
  border-color: color-mix(in srgb, var(--warning) 55%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--warning) 14%, transparent), color-mix(in srgb, var(--warning) 4%, transparent));
}
.posture-banner[data-tone='warning'] .posture-icon {
  color: var(--canvas);
  background: var(--warning);
}
.posture-banner[data-tone='danger'] {
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: linear-gradient(90deg, color-mix(in srgb, var(--danger) 14%, transparent), color-mix(in srgb, var(--danger) 4%, transparent));
}
.posture-banner[data-tone='danger'] .posture-icon {
  color: var(--canvas);
  background: var(--danger);
}
.posture-banner[data-tone='clear'] {
  border-color: color-mix(in srgb, var(--jade) 40%, transparent);
  background: color-mix(in srgb, var(--jade) 6%, transparent);
}
.posture-banner[data-tone='clear'] .posture-icon {
  color: var(--jade);
  background: color-mix(in srgb, var(--jade) 16%, transparent);
}
.posture-retry {
  min-height: 36px;
  padding: 6px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--edge-strong);
  background: color-mix(in srgb, var(--text) 6%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.exec-metrics {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  margin: 0;
}
.exec-metric[hidden] {
  display: none;
}
/* Value above label visually; the definition list still reads label, value. */
.exec-metric {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  padding: 4px 20px;
  border-left: 1px solid var(--line);
}
.exec-metric:first-child {
  padding-left: 0;
  border-left: 0;
}
.exec-metric dt {
  font-size: 14px;
  color: var(--muted);
}
.exec-metric-sub {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--ink-subtle);
}
.exec-metric dd {
  margin: 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--text);
  font-feature-settings: var(--font-feature-tabular);
}
.exec-metric dd.is-alert {
  color: var(--danger);
}
.exec-metric dd.is-warn {
  color: var(--warning);
}
.exec-persona-note {
  margin: -12px 0 0;
  font-size: 14px;
  color: var(--ink-subtle);
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
/* Pillar columns follow the briefing panel's own width, not the viewport:
   five in a row while each tile keeps ~96px, then three, then two with the
   fifth spanning the last row. */
.exec-briefing {
  container: briefing / inline-size;
}
@container briefing (max-width: 527px) {
  .pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@container briefing (max-width: 380px) {
  .pillars-grid,
  .exec-metrics {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pillar-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .exec-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
}
.pillar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 16px 10px;
  border-radius: var(--r-lg);
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--surface-raised) 80%, transparent);
  color: var(--text);
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition:
    border-color var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}
.pillar-item:hover {
  border-color: var(--edge-strong);
  transform: translateY(-1px);
}
.pillar-icon .icon {
  width: 24px;
  height: 24px;
  color: var(--muted);
}
.pillar-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.pillar-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.pillar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
}
.pillar-item[data-status='current'] .pillar-status {
  color: var(--jade);
}
.pillar-item[data-status='attention'] .pillar-status {
  color: var(--warning);
}
.pillar-item[data-status='unavailable'] .pillar-status {
  color: var(--ink-subtle);
}
.pillar-summary {
  font-size: 13px;
  line-height: 1.4;
  color: var(--ink-subtle);
}

.delta-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.delta-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}
.delta-item:first-child {
  padding-top: 0;
  border-top: 0;
}
.delta-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  background: color-mix(in srgb, var(--text) 6%, transparent);
}
.delta-icon .icon {
  width: 18px;
  height: 18px;
}
.delta-item[data-tone='positive'] .delta-icon {
  color: var(--jade);
  background: color-mix(in srgb, var(--jade) 14%, transparent);
}
.delta-item[data-tone='warning'] .delta-icon {
  color: var(--warning);
  background: color-mix(in srgb, var(--warning) 14%, transparent);
}
.delta-item[data-tone='negative'] .delta-icon {
  color: var(--danger);
  background: color-mix(in srgb, var(--danger) 14%, transparent);
}
.delta-content {
  min-width: 0;
}
.delta-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.delta-meta {
  margin: 2px 0 0;
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.trend {
  margin-top: 16px;
}
.trend-caption {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
}
.trend-bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 56px;
}
.trend-bar {
  flex: 1;
  min-height: 2px;
  height: calc(var(--h, 0) * 100%);
  border-radius: var(--r-xs) var(--r-xs) 0 0;
  background: var(--ember);
}
.trend-bar:last-child {
  outline: 1px solid var(--text);
  outline-offset: 1px;
}
.trend-bar.is-unknown {
  background: none;
  border: 1px dashed var(--edge);
}

/* The one prominent orange surface on the page: a real decision. */
.decision-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 24px;
  border-radius: var(--r-xl);
  border: 1px solid color-mix(in srgb, var(--ember) 55%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ember) 16%, transparent), color-mix(in srgb, var(--ember-deep) 5%, transparent) 60%, transparent);
  box-shadow: var(--el-2);
}
.decision-card[data-kind='recommendation'] {
  border-color: color-mix(in srgb, var(--ember) 36%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--ember) 9%, transparent), transparent 70%);
}
.decision-card:is([data-kind='none'], [data-kind='loading'], [data-kind='unavailable']) {
  border-color: var(--edge);
  background: color-mix(in srgb, var(--text) 3%, transparent);
  box-shadow: none;
}
.decision-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 12px;
}
.decision-label {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ember);
}
.decision-card:is([data-kind='none'], [data-kind='loading'], [data-kind='unavailable']) .decision-label {
  color: var(--muted);
}
.decision-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 700;
  color: var(--text);
}
.decision-card:is([data-kind='none'], [data-kind='loading'], [data-kind='unavailable']) .decision-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--muted);
}
.decision-text {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}
.decision-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin-top: 8px;
}
.decision-actions:not(:has(> :not([hidden]))) {
  display: none;
}
.decision-primary,
.decision-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 18px;
  border-radius: var(--r-md);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition:
    filter var(--dur-1) var(--ease-out),
    transform var(--dur-1) var(--ease-out);
}
.decision-primary {
  border: 0;
  background: var(--brand-gradient);
  color: var(--on-ember);
  box-shadow: var(--el-1);
}
.decision-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.decision-secondary {
  border: 1px solid var(--edge-strong);
  background: color-mix(in srgb, var(--text) 5%, transparent);
  color: var(--text);
}
.decision-primary:disabled,
.decision-secondary:disabled {
  cursor: progress;
  transform: none;
}
.decision-primary .icon {
  width: 16px;
  height: 16px;
}

/* ---- Business context ----------------------------------------------------- */
.exec-coverage-note {
  margin: -8px 0 0;
  padding: 10px 14px;
  border-radius: var(--r-md);
  border: 1px solid color-mix(in srgb, var(--ice) 22%, transparent);
  background: color-mix(in srgb, var(--ice) 6%, transparent);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.business-services-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  container: groups / inline-size;
}
/* A narrow list puts the risk badge under the name, so a long badge label
   ("No matched findings") never squeezes the group name to nothing. */
@container groups (max-width: 480px) {
  .business-service-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .business-service-card .service-icon {
    grid-row: span 2;
  }
  .business-service-card .risk-badge {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
  }
  .business-service-card .service-chevron {
    grid-column: 3;
    grid-row: 1 / span 2;
  }
}
/* A long list scrolls inside a bounded box (with the shared edge fade); the
   panel itself still scrolls with the page. */
.business-services-list.is-long {
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}
.business-service-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--surface-raised) 70%, transparent);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--dur-1) var(--ease-out);
}
.business-service-card:hover {
  border-color: var(--edge-strong);
}
.business-service-card[aria-pressed='true'] {
  border-color: color-mix(in srgb, var(--ice) 70%, transparent);
  background: color-mix(in srgb, var(--ice) 7%, var(--surface-raised));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--ice) 25%, transparent), 0 0 24px color-mix(in srgb, var(--ice) 12%, transparent);
}
.service-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  color: var(--ice);
  background: color-mix(in srgb, var(--ice) 10%, transparent);
}
.service-icon .icon {
  width: 20px;
  height: 20px;
}
.service-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.service-name {
  font-size: 16px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.service-meta {
  font-size: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.service-chevron .icon {
  width: 16px;
  height: 16px;
  color: var(--muted);
}

/* Incident severity uses the status colours; a tenant-assigned criticality
   rating is not an incident and uses the secondary accent instead. */
.risk-badge {
  padding: 4px 10px;
  border-radius: var(--r-sm);
  border: 1px solid var(--edge-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.risk-badge[data-level='high'] {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.risk-badge[data-level='medium'] {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 55%, transparent);
  background: color-mix(in srgb, var(--warning) 12%, transparent);
}
.risk-badge[data-level='low'] {
  color: var(--ice);
  border-color: color-mix(in srgb, var(--ice) 45%, transparent);
}
.risk-badge[data-level='unrated'] {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 45%, transparent);
  border-style: dashed;
}
.risk-badge[data-level='rated'] {
  /* Violet alone is 3.5:1 on these surfaces; lifted toward text it is ~6.9:1. */
  color: color-mix(in srgb, var(--violet) 55%, var(--text));
  border-color: color-mix(in srgb, var(--violet) 55%, transparent);
  background: color-mix(in srgb, var(--violet) 10%, transparent);
}

.service-detail {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.service-detail h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}
.drawer-group {
  font-weight: 500;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.drawer-reason {
  margin: -8px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.exposure-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.exposure-grid > div {
  min-width: 0;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.exposure-grid > div:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.exposure-grid > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.exposure-grid dt {
  font-size: 14px;
  color: var(--muted);
}
.exposure-grid dd {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 4px 0 0;
}
.dd-main {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  overflow-wrap: anywhere;
}
.dd-sub {
  font-size: 13px;
  color: var(--ink-subtle);
}
.asset-list,
.finding-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--edge);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.asset-row,
.finding-row,
.finding-empty {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}
:is(.asset-row, .finding-row, .finding-empty):first-child {
  border-top: 0;
}
.asset-icon .icon {
  width: 18px;
  height: 18px;
  color: var(--muted);
}
.asset-name {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.asset-tag {
  flex: none;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--edge-strong);
  color: var(--muted);
  font-size: 12px;
  text-transform: capitalize;
}
.sev-badge {
  flex: none;
  min-width: 72px;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  border: 1px solid var(--edge-strong);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-align: center;
}
.sev-badge:is([data-severity='CRITICAL'], [data-severity='HIGH']) {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 55%, transparent);
  background: color-mix(in srgb, var(--danger) 12%, transparent);
}
.sev-badge[data-severity='MEDIUM'] {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 55%, transparent);
}
.sev-badge:is([data-severity='LOW'], [data-severity='INFO']) {
  color: var(--ice);
  border-color: color-mix(in srgb, var(--ice) 45%, transparent);
}
.finding-title {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  overflow-wrap: anywhere;
}
.finding-open {
  flex: none;
}
.finding-empty {
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.implication {
  display: flex;
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--ice) 35%, transparent);
  background: color-mix(in srgb, var(--ice) 7%, transparent);
}
.implication-icon .icon {
  width: 22px;
  height: 22px;
  color: var(--ice);
}
.implication h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ice);
}
.implication p {
  margin: 4px 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

/* ---- Dialogs -------------------------------------------------------------- */
.evidence-dialog {
  width: min(720px, calc(100% - 32px));
}
#detail {
  width: min(760px, calc(100% - 32px));
}
.dialog-sub {
  margin: 4px 0 16px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.evidence-dialog-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: min(440px, 55dvh);
  overflow-y: auto;
  padding-right: 4px;
}
.evidence-entry,
.incident-stage {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--edge);
  background: color-mix(in srgb, var(--surface-raised) 60%, transparent);
}
.evidence-entry-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
}
.evidence-connector-tag {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.evidence-entry-time {
  font-size: 13px;
  color: var(--muted);
}
.evidence-entry pre {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.dialog-summary-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
}
.dialog-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.evidence-coverage {
  font-size: 13px;
  color: var(--ink-subtle);
}
.incident-picker-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.incident-picker-row label {
  font-size: 14px;
  color: var(--muted);
}
.incident-picker-row .select-control {
  flex: 1;
  min-width: 0;
}
.incident-stages {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.incident-stage h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.code-snippet-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.code-snippet-box code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--ink-secondary);
  overflow-wrap: anywhere;
}
.context-attributes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-secondary);
}
.context-attributes strong {
  color: var(--text);
}
.executive-memo-preview p {
  margin: 0 0 8px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}
.executive-memo-preview .memo-highlight {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}
.stage-awaiting {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
}


/* ---- Responsive ----------------------------------------------------------- */
/* Narrow panel content (stacked on a tablet, or a very narrow column): the
   exposure definitions go to one column and the decision actions stack. */
@container workspace (max-width: 560px) {
  .exposure-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .exposure-grid > div:nth-child(odd) {
    border-right: 0;
  }
  .exposure-grid > div:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }
  .decision-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 700px) {
  .executive-main {
    gap: 16px;
  }
  .exec-header h1 {
    font-size: 28px;
  }
  .exec-panel {
    padding: 16px;
    gap: 20px;
  }
  .exec-panel h2 {
    font-size: 22px;
  }
  .posture-banner {
    grid-template-columns: auto minmax(0, 1fr);
    padding: 14px 16px;
  }
  .posture-retry {
    grid-column: 1 / -1;
    justify-self: start;
  }
  .exec-metrics {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 16px;
  }
  .exec-metric:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }
  .exec-metric dd {
    font-size: 28px;
  }
  /* Two columns, the fifth pillar spanning the last row. */
  .pillars-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pillar-item:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .service-chevron {
    display: none;
  }
  .decision-card {
    padding: 16px;
  }
}

/* ---- Reduced motion ------------------------------------------------------- */
/* base.css removes transitions for both switches and every animation for
   body.motion-off; these stop this page's own keyframes under the OS setting. */
@media (prefers-reduced-motion: reduce) {
  #brief-refresh[aria-busy='true'] .icon {
    animation: none;
  }
  .pillar-item:hover,
  .decision-primary:hover {
    transform: none;
  }
}

/* At a glance: three small charts. Widths and angles come from custom
   properties set by executive.js, so the page needs no inline style. */
.glance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.glance-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  border: 1px solid var(--edge);
  background: var(--surface-raised);
}
.glance-card[hidden] {
  display: none;
}
.glance-label {
  margin: 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.glance-big {
  margin: 0;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}
.glance-note,
.glance-foot {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}
.glance-legend {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
}
.glance-key {
  display: flex;
  align-items: center;
  gap: 8px;
}
.glance-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: var(--ember);
}
.split-seg[data-tone='ember'],
.glance-dot[data-tone='ember'] {
  background: var(--ember);
}
.split-seg[data-tone='ice'],
.glance-dot[data-tone='ice'] {
  background: var(--ice);
}
.split-seg[data-tone='violet'],
.glance-dot[data-tone='violet'] {
  background: var(--violet);
}
.split-seg[data-tone='jade'],
.glance-dot[data-tone='jade'] {
  background: var(--jade);
}
.glance-dot[data-tone='warn'] {
  background: var(--warning);
}
.glance-dot[data-tone='danger'] {
  background: var(--danger);
}
.split-bar {
  display: flex;
  height: 14px;
  gap: 2px;
  border-radius: 7px;
  overflow: hidden;
}
.split-seg {
  flex: calc(var(--w, 0) * 1000) 1 0;
  min-width: 4px;
}
.glance-ring-row {
  display: flex;
  align-items: center;
  gap: 16px;
}
.ring {
  --ring-color: var(--jade);
  position: relative;
  display: grid;
  place-items: center;
  width: 88px;
  height: 88px;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--ring-color) calc(var(--p, 0) * 1%), var(--edge) 0);
}
.ring[data-tone='warn'] {
  --ring-color: var(--warning);
}
.ring::before {
  content: '';
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: var(--surface-raised);
}
.ring-figure {
  position: relative;
  font-size: 20px;
  font-weight: 700;
}

/* Role lens: the few figures this reader opens the briefing for. */
.role-lens {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  border: 1px solid color-mix(in srgb, var(--ember) 30%, transparent);
  background: color-mix(in srgb, var(--ember) 6%, transparent);
}
.role-lens[hidden] {
  display: none;
}
.role-lens-head h3 {
  margin: 0;
  font-size: 18px;
}
.role-lens-ask {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--muted);
}
.role-lens-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
  margin: 0;
}
.role-tile {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
}
.role-tile dt {
  font-size: 14px;
  color: var(--muted);
}
.role-tile dd {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  font-weight: 700;
  font-feature-settings: var(--font-feature-tabular);
}
.role-tile dd.is-alert {
  color: var(--danger);
}
.role-tile dd.is-warn {
  color: var(--warning);
}
