.intro-band a {
  color: #fff;
  font-weight: 800;
  text-decoration-color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
}

[hidden] { display: none !important; }

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid #f5d547;
  outline-offset: 3px;
}

.metrics-context {
  margin: 14px 0 -4px;
  padding: 11px 14px;
  border: 1px solid rgba(245, 213, 71, 0.2);
  background: rgba(245, 213, 71, 0.08);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.4;
}

.metrics small {
  position: relative;
  z-index: 1;
  display: block;
  max-width: calc(100% - 46px);
  margin-top: 8px;
  color: rgba(245, 243, 239, 0.66);
  font: 700 10px/1.25 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.metrics-shell[hidden] {
  display: none;
}

.start-panel {
  display: grid;
  gap: 18px;
  margin: 0 0 16px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(54, 54, 64, 0.9) 0%, rgba(36, 36, 40, 0.95) 52%, rgba(20, 20, 24, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

.start-head {
  display: grid;
  gap: 4px;
}

.start-head h3 {
  color: var(--ink);
  font-size: clamp(22px, 2.2vw, 34px);
}

.start-reference {
  margin: 2px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.start-reference a {
  color: #fff;
  font-weight: 800;
  text-decoration-color: rgba(255, 255, 255, 0.35);
  text-underline-offset: 3px;
}

.start-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.start-card {
  --path-accent: #f5d547;
  --path-label: var(--path-accent);
  min-height: 220px;
  padding: 18px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-left: 5px solid var(--path-accent);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 10px;
  align-content: start;
}

.start-card:nth-child(1) {
  --path-accent: #ff6a1a;
  --path-label: #ff8a3d;
}

.start-card:nth-child(2) {
  --path-accent: #f5d547;
  --path-label: #f5d547;
}

.start-card:nth-child(3) {
  --path-accent: #d99535;
  --path-label: #f2b84b;
}

.start-card:nth-child(4) {
  --path-accent: #e1063a;
  --path-label: #ff5c7a;
}

.start-card::after {
  content: "";
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(245, 213, 71, 0.22);
  background: rgba(255, 255, 255, 0.035);
  clip-path: polygon(9px 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%, 0 9px);
}

.start-card > span,
.scenario-advanced-settings summary span {
  color: var(--path-label, #f5d547);
  font: 800 10px/1.2 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.start-card strong {
  color: var(--ink);
  font: 800 20px/1.2 'Sora', sans-serif;
}

.start-card p {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.42;
}

.start-card .btn {
  align-self: end;
  justify-self: start;
  margin-top: 8px;
}

.scenario-advanced-settings {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.035);
  padding: 0;
}

.scenario-advanced-settings summary {
  cursor: pointer;
  display: grid;
  gap: 5px;
  padding: 13px;
}

.scenario-advanced-settings summary small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.scenario-advanced-settings .scenario-custom-grid {
  padding: 0 13px 13px;
}

.scenario-input-panel {
  position: static;
}

.scenario-custom-grid > .strategy-field {
  align-self: start;
}

.scenario-explained-field {
  grid-column: 1 / -1;
}

#policyViewControl {
  grid-template-columns: 1fr;
  align-items: stretch;
}

#policyViewControl button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 48px;
  padding: 10px 16px;
  border-right: 0;
  border-bottom: 1px solid rgba(255,255,255,.16);
  text-align: left;
  font: 800 13px/1.35 'Sora', sans-serif;
  white-space: normal;
  overflow: hidden;
}

#policyViewControl button:last-child {
  border-bottom: 0;
}

#policyViewControl button span {
  display: block;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}


.workflow-overview {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin: 0 0 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(54, 54, 64, 0.9) 0%, rgba(36, 36, 40, 0.95) 52%, rgba(20, 20, 24, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

.workflow-overview h3 {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.25;
  max-width: 360px;
}

.workflow-paths {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workflow-path {
  min-height: 112px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  display: grid;
  gap: 7px;
  align-content: start;
}

.workflow-path span,
.tab-group,
.tab-context span {
  color: #f5d547;
  font: 800 10px/1.2 'JetBrains Mono', monospace;
  text-transform: uppercase;
}

.workflow-path strong {
  color: var(--ink);
  line-height: 1.25;
}

.workflow-path small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.35;
}

.workspace-tabs {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 7px;
  margin: 0 0 12px;
  padding: 0;
}

.workspace-tabs[hidden] {
  display: none;
}

.path-change-bar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 10px;
}

.path-change-bar[hidden] {
  display: none;
}

.path-change-bar .btn {
  min-height: 28px;
  padding: 6px 10px;
  font-size: 10px;
  letter-spacing: 0;
}

.tab-button {
  --tab-accent: #f5d547;
  --tab-label: var(--tab-accent);
  position: relative;
  overflow: hidden;
  gap: 2px;
  align-content: center;
  min-height: 52px;
  padding: 8px 12px;
  border-top: 3px solid var(--tab-accent);
  background: #242428;
}

.tab-button[data-tab="strategy-builder"],
.workflow-panel[data-tab-panel="strategy-builder"] {
  --tab-accent: #ff6a1a;
  --tab-label: #ff8a3d;
}

.tab-button[data-tab="scenario-planner"],
.workflow-panel[data-tab-panel="scenario-planner"] {
  --tab-accent: #f5d547;
  --tab-label: #f5d547;
}

.tab-button[data-tab="policy-recommendations"],
.workflow-panel[data-tab-panel="policy-recommendations"] {
  --tab-accent: #f2b84b;
  --tab-label: #f2b84b;
}

.tab-button[data-tab="import-compare"],
.workflow-panel[data-tab-panel="import-compare"] {
  --tab-accent: #d99535;
  --tab-label: #f2b84b;
}

.tab-button[data-tab="log-analysis"],
.workflow-panel[data-tab-panel="log-analysis"] {
  --tab-accent: #e1063a;
  --tab-label: #ff5c7a;
}

.tab-button:hover {
  border-color: var(--tab-accent);
  background: #2e2e34;
}

.tab-button[data-tab].active {
  background: #242428 !important;
  border-color: var(--tab-accent) !important;
  color: var(--ink);
  box-shadow: inset 0 3px 0 var(--tab-accent), 3px 3px 0 rgba(0, 0, 0, 0.35);
}

.tab-button[data-tab] span {
  color: #fff;
  font-size: 13px;
  line-height: 1.15;
}

.tab-button[data-tab].active span {
  color: #fff;
}

.tab-button[data-tab].active small {
  color: rgba(245, 243, 239, 0.68);
}

.tab-button small {
  font-size: 10px;
  line-height: 1.2;
}

.workflow-panel[data-tab-panel].active > .panel,
.workflow-panel[data-tab-panel].active > section.panel {
  border-top: 4px solid var(--tab-accent);
}

.tab-button.active .tab-group {
  color: rgba(14, 14, 16, 0.72);
}

.tab-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0 0 16px;
  padding: 15px 16px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: linear-gradient(155deg, rgba(54, 54, 64, 0.9) 0%, rgba(36, 36, 40, 0.95) 52%, rgba(20, 20, 24, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

.tab-context div {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.tab-context p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.4;
}

html[data-theme="light"] .intro-band a {
  color: #7a330f;
  text-decoration-color: rgba(122, 51, 15, 0.45);
}

html[data-theme="light"] .metrics-context {
  background: rgba(255, 255, 255, 0.72);
  border-color: rgba(38, 34, 30, 0.16);
  color: var(--ink);
}

html[data-theme="light"] .metrics small {
  color: rgba(23, 23, 26, 0.62);
}

html[data-theme="light"] .workflow-overview,
html[data-theme="light"] .tab-context,
html[data-theme="light"] .start-panel {
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 248, 238, 0.94) 52%, rgba(246, 232, 215, 0.98) 100%);
  border-color: rgba(38, 34, 30, 0.16);
  box-shadow: var(--shadow-soft);
}

html[data-theme="light"] .workflow-path,
html[data-theme="light"] .start-card,
html[data-theme="light"] .scenario-advanced-settings {
  background: rgba(255, 255, 255, 0.78);
  border-color: rgba(38, 34, 30, 0.12);
  border-left-color: var(--path-accent, #f5d547);
}

html[data-theme="light"] .workflow-path span,
html[data-theme="light"] .start-card > span,
html[data-theme="light"] .tab-group,
html[data-theme="light"] .tab-context span,
html[data-theme="light"] .scenario-advanced-settings summary span {
  color: #8a5b00;
}

html[data-theme="light"] .start-card:nth-child(1) > span {
  color: #a14312;
}

html[data-theme="light"] .start-card:nth-child(2) > span {
  color: #8a6a00;
}

html[data-theme="light"] .start-card:nth-child(3) > span {
  color: #875315;
}

html[data-theme="light"] .start-card:nth-child(4) > span {
  color: #9d1730;
}

html[data-theme="light"] .workflow-path strong,
html[data-theme="light"] .start-card strong {
  color: var(--ink);
}

html[data-theme="light"] .workflow-path small,
html[data-theme="light"] .start-card p,
html[data-theme="light"] .start-reference,
html[data-theme="light"] .tab-context p,
html[data-theme="light"] .scenario-advanced-settings summary small {
  color: var(--ink-soft);
}

html[data-theme="light"] .start-reference a {
  color: #7a330f;
  text-decoration-color: rgba(122, 51, 15, 0.35);
}

html[data-theme="light"] .tab-button.active .tab-group {
  color: rgba(14, 14, 16, 0.72);
}

html[data-theme="light"] .tab-button {
  background: rgba(255, 255, 255, 0.78);
  border-top-color: var(--tab-accent);
}

html[data-theme="light"] .tab-button:hover {
  border-color: var(--tab-accent);
  background: rgba(255, 255, 255, 0.92);
}

html[data-theme="light"] .tab-button[data-tab].active {
  background: #ffffff !important;
  border-color: var(--tab-accent) !important;
  color: var(--ink);
  box-shadow: inset 0 4px 0 var(--tab-accent), 4px 4px 0 rgba(41, 35, 29, 0.16);
}

html[data-theme="light"] .tab-button[data-tab] span {
  color: #7a330f;
}

html[data-theme="light"] .tab-button[data-tab="scenario-planner"] span {
  color: #8a6a00;
}

html[data-theme="light"] .tab-button[data-tab="policy-recommendations"] span,
html[data-theme="light"] .tab-button[data-tab="import-compare"] span {
  color: #875315;
}

@media (max-width: 1380px) {
  .workflow-overview {
    grid-template-columns: 1fr;
  }

  .workflow-overview h3 {
    max-width: 720px;
  }

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

  .workspace-tabs {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .start-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .workspace-tabs {
    display: flex;
    overflow-x: auto;
    grid-template-columns: none;
    gap: 8px;
    padding-bottom: 6px;
    scrollbar-width: thin;
  }

  .tab-button {
    flex: 0 0 140px;
  }

  .tab-context {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .workflow-overview,
  .tab-context,
  .metrics-context,
  .start-panel {
    padding: 14px;
  }

  .workflow-paths,
  .start-actions {
    grid-template-columns: 1fr;
  }
}

/* Guided workflow simplification */
html[data-expert="off"] .expert-only {
  display: none !important;
}

.expert-toggle[aria-pressed="true"] {
  color: #17171a;
  border-color: #f5d547;
  background: linear-gradient(135deg, #fff2a6 0%, #f5d547 48%, #e9b91d 100%);
}

.guided-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.guided-progress button {
  min-width: 0;
  min-height: 68px;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 12px;
  text-align: left;
  border: 1px solid rgba(255,255,255,.12);
  background: #202024;
  color: var(--ink-soft);
  cursor: pointer;
}

.guided-progress button:disabled { cursor: default; opacity: .66; }
.guided-progress button > span {
  grid-row: 1 / 3;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.18);
  font: 800 12px/1 'Sora', sans-serif;
}
.guided-progress button strong { color: var(--ink); line-height: 1.2; }
.guided-progress button small { font-size: 11px; line-height: 1.2; }
.guided-progress button.active {
  border-color: #f5d547;
  background: linear-gradient(135deg, #fff2a6 0%, #f5d547 48%, #e9b91d 100%);
  color: #17171a;
  box-shadow: 4px 4px 0 rgba(0,0,0,.35);
}
.guided-progress button.active strong,
.guided-progress button.active small { color: #17171a; }
.guided-progress button.active > span { border-color: rgba(23,23,26,.44); }
.guided-progress button.complete { border-color: rgba(24,210,125,.42); }
.guided-progress button.complete > span { color: var(--green); border-color: rgba(24,210,125,.42); }

.guided-stage {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: rgba(17,17,20,.82);
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 6px 6px 0 rgba(0,0,0,.35);
}
.guided-stage[hidden] { display: none; }
.guided-form-panel { max-width: 1220px; width: 100%; margin: 0 auto; }
.guided-intro { max-width: 780px; margin: 7px 0 0; color: var(--ink-soft); line-height: 1.45; }
.strategy-requirements-form { gap: 16px; }
.strategy-requirement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.strategy-requirement-grid .strategy-toggle { min-height: 82px; }
.strategy-field.rollout-field { max-width: 420px; }
.authentication-posture-field { max-width: 720px; }
.authentication-retirement-toggle {
  max-width: 720px;
  border-color: rgba(245,213,71,.32);
  background: rgba(245,213,71,.055);
}
.authentication-retirement-toggle:has(input:checked) {
  border-color: #f5d547;
  background: linear-gradient(135deg, rgba(245,213,71,.2), rgba(255,106,26,.08));
}
.authentication-retirement-toggle:has(input:disabled) { opacity: .48; }

.guided-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 66px;
  padding: 12px 14px;
  border: 1px solid rgba(255,255,255,.14);
  background: #1b1b1f;
  box-shadow: 0 -10px 24px rgba(0,0,0,.22);
}
.guided-actions > span { color: var(--ink-soft); text-align: center; font-size: 12px; }

.strategy-score-grid.primary-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.strategy-context-line {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding: 10px 12px;
  border-left: 3px solid var(--orange);
  background: rgba(255,106,26,.09);
}
.strategy-context-line strong { color: var(--ink); }
.strategy-context-line span { color: var(--ink-soft); font-size: 12px; }

.compact-mitre-panel { overflow: hidden; }
.compact-mitre-panel > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 15px 18px;
  background: rgba(255,255,255,.035);
}
.compact-mitre-panel > summary::-webkit-details-marker { display: none; }
.compact-mitre-panel > summary > span {
  color: #f5d547;
  font: 700 11px/1.3 'JetBrains Mono', monospace;
  text-align: right;
}
.compact-mitre-panel .attack-vector-band { padding: 14px; }

.strategy-build-order { background: rgba(255,255,255,.025); }
.strategy-build-order .strategy-policy-card { background: #252529; }
.strategy-build-order .strategy-policy-card dl { grid-template-columns: 120px minmax(0, 1fr); }
.strategy-policy-trace { padding-top: 10px; border-top: 1px solid rgba(255,255,255,.1); }

.scenario-template-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.scenario-template-grid .scenario-template-card { min-height: 112px; }
.scenario-settings-stage { max-width: 1100px; margin: 0 auto; }
.scenario-settings-stage > .strategy-field { max-width: 540px; }
.scenario-custom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scenario-object-fields { max-width: 820px; margin: 0 auto; }
.prepare-summary-head { display: flex; justify-content: space-between; gap: 12px; color: var(--ink-soft); }
.prepare-summary-head strong { color: var(--ink); }

.visual-policy-designer {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 18px;
  background: #18181c;
  border-top: 1px solid rgba(255,255,255,.12);
}
.visual-designer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.visual-designer-head h3 { margin: 3px 0 5px; color: var(--ink); font-size: 22px; }
.visual-designer-head p:last-child { max-width: 760px; margin: 0; color: var(--ink-soft); line-height: 1.45; }
.visual-designer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.visual-outcome-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.visual-outcome-strip article {
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.12);
  border-top: 3px solid #f5d547;
  background: #252529;
  display: grid;
  align-content: start;
  gap: 3px;
}
.visual-outcome-strip span,
.visual-outcome-strip small {
  color: var(--ink-muted);
  font: 700 9px/1.3 'JetBrains Mono', monospace;
  text-transform: uppercase;
}
.visual-outcome-strip strong { color: #fff; font: 800 20px/1.2 'Sora', sans-serif; overflow-wrap: anywhere; }
.visual-outcome-strip small { text-transform: none; font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600; }

.visual-map-shell {
  position: relative;
  overflow-x: auto;
  padding: 14px;
  border: 1px solid rgba(245,213,71,.22);
  background: #202024;
  scrollbar-color: #f5d547 #171719;
}
.visual-map-legend { display: flex; gap: 16px; margin-bottom: 13px; min-width: max-content; }
.visual-map-legend span { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-muted); font-size: 10px; font-weight: 700; }
.visual-dot { width: 8px; height: 8px; border: 1px solid currentColor; background: #2f2f34; }
.visual-dot.recommended { color: #d99535; }
.visual-dot.selected { color: #19d27f; background: #19d27f; }
.visual-dot.modified { color: #f5d547; background: #f5d547; }
.visual-dot.split { color: #ff6a1a; background: #ff6a1a; }
.visual-policy-map {
  display: grid;
  grid-template-columns: max-content 60px max-content;
  align-items: end;
  gap: 0;
  min-width: max-content;
}
.visual-map-lane { display: grid; gap: 10px; }
.visual-lane-label { display: flex; align-items: baseline; gap: 10px; padding: 0 2px; }
.visual-lane-label span { color: #f5d547; font: 800 10px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.visual-lane-label strong { color: var(--ink-soft); font-size: 11px; }
.visual-node-track { position: relative; display: flex; align-items: stretch; gap: 22px; padding: 2px 0 8px; }
.visual-node-track::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 50%;
  height: 3px;
  background: linear-gradient(90deg, #d99535, #f5d547, #ff6a1a);
  box-shadow: 0 0 12px rgba(245,213,71,.28);
  animation: visualSignal 3.6s linear infinite;
}
@keyframes visualSignal {
  0%, 100% { filter: brightness(.85); }
  50% { filter: brightness(1.35); }
}
.visual-policy-node {
  position: relative;
  z-index: 1;
  width: 218px;
  min-height: 128px;
  padding: 13px 13px 12px;
  border: 1px solid rgba(255,255,255,.16);
  border-left: 4px solid #d99535;
  background: #29292e;
  color: var(--ink);
  text-align: left;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 12px;
  gap: 9px;
  align-items: start;
  cursor: pointer;
  box-shadow: 5px 5px 0 rgba(0,0,0,.22);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.visual-policy-node:hover { transform: translateY(-3px); border-color: rgba(245,213,71,.65); }
.visual-policy-node.active {
  color: #171719;
  border-color: #f5d547;
  border-left-color: #171719;
  background: linear-gradient(135deg, #fff3ab 0%, #f5d547 46%, #e9b91d 100%);
  box-shadow: 6px 6px 0 rgba(0,0,0,.4), 0 0 20px rgba(245,213,71,.18);
}
.visual-policy-node.status-selected { border-left-color: #19d27f; }
.visual-policy-node.status-modified { border-left-color: #f5d547; }
.visual-policy-node.status-split { border-left-color: #ff6a1a; }
.visual-policy-node.status-needs-input { border-left-color: #ef4058; }
.visual-node-step { color: #f5d547; font: 800 10px/1.2 'JetBrains Mono', monospace; }
.visual-policy-node.active .visual-node-step,
.visual-policy-node.active .visual-node-copy small,
.visual-policy-node.active .visual-node-copy strong,
.visual-policy-node.active .visual-node-copy em { color: #171719; }
.visual-node-copy { display: grid; gap: 5px; min-width: 0; }
.visual-node-copy small { color: #d99535; font: 800 8px/1.25 'JetBrains Mono', monospace; text-transform: uppercase; }
.visual-node-copy strong { color: #fff; font: 800 14px/1.25 'Sora', sans-serif; }
.visual-node-copy em { color: var(--ink-soft); font-size: 10px; line-height: 1.35; font-style: normal; overflow-wrap: anywhere; }
.visual-node-arrow { align-self: center; color: #f5d547; font-size: 24px; line-height: 1; }
.visual-policy-node.active .visual-node-arrow { color: #171719; }
.visual-if-then-bridge { align-self: end; height: 128px; display: grid; place-items: center; position: relative; }
.visual-if-then-bridge::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 3px; background: #ff6a1a; }
.visual-if-then-bridge span { position: relative; z-index: 1; padding: 6px 8px; color: #171719; background: #ff6a1a; font: 900 9px/1 'JetBrains Mono', monospace; }

.visual-map-navigation {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.1);
  background: #202024;
}
.visual-map-navigation > div { display: grid; gap: 2px; text-align: center; }
.visual-map-navigation strong { color: #fff; font: 800 12px/1.25 'Sora', sans-serif; }
.visual-map-navigation span { color: var(--ink-soft); font-size: 11px; }
.visual-policy-blueprint { border: 1px solid rgba(255,255,255,.12); background: #202024; }
.visual-blueprint-list { padding: 14px; display: grid; gap: 12px; }
.visual-blueprint-cards .scenario-policy-pack { padding: 0; }
.visual-blueprint-cards .strategy-policy-card { border-color: #f5d547; background: #29292e; }
.visual-split-explanation,
.visual-merge-explanation { display: grid; gap: 4px; padding: 11px 13px; border-left: 4px solid #ff6a1a; background: rgba(255,106,26,.1); }
.visual-merge-explanation { border-left-color: #19d27f; background: rgba(25,210,127,.08); }
.visual-split-explanation strong,
.visual-merge-explanation strong { color: #fff; font: 800 12px/1.3 'Sora', sans-serif; }
.visual-split-explanation span,
.visual-merge-explanation span { color: var(--ink-soft); font-size: 11px; line-height: 1.4; }

.visual-flyout-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(9,9,11,.58); backdrop-filter: blur(2px); }
.visual-flyout {
  position: fixed;
  z-index: 100;
  top: 18px;
  right: 18px;
  bottom: 18px;
  width: min(520px, calc(100vw - 36px));
  overflow-y: auto;
  border: 1px solid rgba(245,213,71,.55);
  border-top: 5px solid #f5d547;
  background: #1d1d21;
  box-shadow: -18px 0 50px rgba(0,0,0,.45);
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: start;
}
.visual-threat-flyout { z-index: 110; right: min(556px, calc(100vw - 460px)); width: min(440px, calc(100vw - 36px)); border-top-color: #ff6a1a; }
.visual-flyout-head { position: sticky; top: 0; z-index: 2; display: flex; justify-content: space-between; gap: 14px; padding: 16px; border-bottom: 1px solid rgba(255,255,255,.12); background: #1d1d21; }
.visual-flyout-head h3 { margin: 3px 0 0; color: #fff; font-size: 20px; }
.visual-flyout-close { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.18); background: #29292e; color: #fff; font-size: 24px; cursor: pointer; }
.visual-flyout-content { padding: 16px; display: grid; gap: 14px; align-content: start; }
.visual-flyout-footer { position: sticky; bottom: 0; display: flex; justify-content: space-between; gap: 10px; padding: 13px 16px; border-top: 1px solid rgba(255,255,255,.12); background: #1d1d21; }
.visual-recommendation-banner { display: grid; gap: 5px; padding: 12px; border-left: 4px solid #f5d547; background: rgba(245,213,71,.1); }
.visual-recommendation-banner span { color: #f5d547; font: 800 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.visual-recommendation-banner strong { color: #fff; font: 800 13px/1.35 'Sora', sans-serif; }
.visual-recommendation-banner p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.visual-option-groups { display: grid; gap: 13px; }
.visual-option-group { margin: 0; padding: 0; border: 0; display: grid; gap: 7px; }
.visual-option-group legend,
.visual-text-option > span { margin-bottom: 7px; color: var(--ink-muted); font: 800 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.visual-choice { width: 100%; padding: 11px; border: 1px solid rgba(255,255,255,.13); background: #29292e; color: var(--ink); text-align: left; display: grid; gap: 5px; cursor: pointer; }
.visual-choice:hover { border-color: rgba(245,213,71,.55); }
.visual-choice.selected { border-color: #f5d547; background: linear-gradient(135deg, rgba(245,213,71,.2), rgba(255,106,26,.08)); box-shadow: inset 4px 0 0 #f5d547; }
.visual-choice > span { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.visual-choice strong { color: #fff; font: 800 12px/1.25 'Sora', sans-serif; }
.visual-choice em { color: #171719; background: #f5d547; padding: 3px 5px; font: 800 8px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; font-style: normal; }
.visual-choice small { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.visual-text-option { display: grid; }
.visual-text-option input { min-height: 42px; padding: 9px 10px; border: 1px solid rgba(255,255,255,.16); background: #111114; color: #fff; }
.visual-text-option small { margin-top: 6px; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.visual-decision-impact { padding: 12px; border: 1px solid rgba(255,255,255,.12); background: #252529; }
.visual-decision-impact h4,
.visual-threat-section h4 { margin: 0 0 10px; color: #fff; font-size: 13px; }
.visual-decision-impact dl { margin: 0; display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 8px; }
.visual-decision-impact dt { color: var(--ink-muted); font: 800 8px/1.3 'JetBrains Mono', monospace; text-transform: uppercase; }
.visual-decision-impact dd { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.visual-threat-summary { display: flex; justify-content: space-between; gap: 12px; padding: 11px; border-left: 4px solid #ff6a1a; background: rgba(255,106,26,.1); }
.visual-threat-summary strong { color: #fff; }
.visual-threat-summary span { color: var(--ink-soft); font-size: 11px; text-align: right; }
.visual-threat-section { display: grid; gap: 8px; }
.visual-threat-card { padding: 11px; border: 1px solid rgba(255,255,255,.12); border-left: 4px solid #d99535; background: #29292e; display: grid; gap: 6px; }
.visual-threat-card.status-strongly-mitigated { border-left-color: #19d27f; }
.visual-threat-card.status-partially-mitigated { border-left-color: #f5d547; }
.visual-threat-card.status-requires-another-control,
.visual-threat-card.status-not-addressed-by-conditional-access { border-left-color: #ef4058; }
.visual-threat-card > div { display: flex; gap: 8px; align-items: center; }
.visual-threat-card > div span { color: #f5d547; font: 800 9px/1.2 'JetBrains Mono', monospace; }
.visual-threat-card > div strong { color: #fff; font: 800 12px/1.25 'Sora', sans-serif; }
.visual-threat-card em { color: var(--ink-soft); font-size: 10px; font-style: normal; }
.visual-threat-card p { margin: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.visual-threat-card small { color: var(--ink-muted); font-size: 9px; line-height: 1.35; }
[data-scenario-stage-panel="settings"] > .guided-actions { position: static; }

html[data-theme="light"] .visual-policy-designer,
html[data-theme="light"] .visual-map-shell,
html[data-theme="light"] .visual-map-navigation,
html[data-theme="light"] .visual-policy-blueprint,
html[data-theme="light"] .visual-flyout,
html[data-theme="light"] .visual-flyout-head,
html[data-theme="light"] .visual-flyout-footer { background: #f7f6f3; border-color: rgba(38,34,30,.18); }
html[data-theme="light"] .visual-outcome-strip article,
html[data-theme="light"] .visual-policy-node,
html[data-theme="light"] .visual-choice,
html[data-theme="light"] .visual-decision-impact,
html[data-theme="light"] .visual-threat-card,
html[data-theme="light"] .visual-blueprint-cards .strategy-policy-card { background: #fff; border-color: rgba(38,34,30,.18); }
html[data-theme="light"] .visual-outcome-strip strong,
html[data-theme="light"] .visual-node-copy strong,
html[data-theme="light"] .visual-choice strong,
html[data-theme="light"] .visual-decision-impact h4,
html[data-theme="light"] .visual-threat-section h4,
html[data-theme="light"] .visual-threat-card > div strong,
html[data-theme="light"] .visual-split-explanation strong,
html[data-theme="light"] .visual-merge-explanation strong,
html[data-theme="light"] .visual-map-navigation strong,
html[data-theme="light"] .visual-flyout-head h3,
html[data-theme="light"] .visual-recommendation-banner strong { color: #242126; }
html[data-theme="light"] .visual-text-option input { background: #fff; color: #242126; border-color: rgba(38,34,30,.2); }
html[data-theme="light"] .visual-flyout-close { background: #fff; color: #242126; border-color: rgba(38,34,30,.2); }
html[data-theme="light"] .visual-policy-node.active { background: linear-gradient(135deg, #fff2a6 0%, #f5d547 48%, #e9b91d 100%); }

.applied-source-banner {
  margin: 0 0 12px;
  padding: 10px 14px;
  border-left: 4px solid #f5d547;
  background: #202024;
  color: var(--ink-soft);
  font-weight: 700;
}
.guided-review-grid { grid-template-columns: 310px minmax(0, 1fr); }
.guided-review-grid.export-mode { grid-template-columns: 1fr; }
.review-export-panel {
  position: static;
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.review-export-panel[hidden] { display: none !important; }
.review-export-panel > section:last-child { grid-column: 1 / -1; }
.policy-detail-tabs {
  display: flex;
  gap: 0;
  padding: 0 18px 14px;
  overflow-x: auto;
}
.policy-detail-tabs button {
  flex: 1 1 140px;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid rgba(255,255,255,.14);
  background: #202024;
  color: var(--ink-soft);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.policy-detail-tabs button.active {
  color: #17171a;
  border-color: #f5d547;
  background: linear-gradient(135deg, #fff2a6 0%, #f5d547 48%, #e9b91d 100%);
}
.policy-detail-view[hidden] { display: none; }
.policy-detail-view[data-detail-view-panel="overview"] { padding-bottom: 16px; }
.policy-review-footer {
  position: sticky;
  bottom: 0;
  z-index: 12;
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.16);
  background: #18181c;
  box-shadow: 0 -12px 30px rgba(0,0,0,.3);
}
.reviewed-state { display: flex; justify-content: center; align-items: center; gap: 12px; color: var(--ink-soft); }
.reviewed-state .reviewed { border-color: rgba(24,210,125,.45); color: var(--green); }
.status-chip.reviewed { color: var(--green); border-color: rgba(24,210,125,.4); }
.policy-review-footer.export-mode { grid-template-columns: 1fr; justify-items: end; }
.policy-review-footer.export-mode #previousPolicyBtn,
.policy-review-footer.export-mode #nextPolicyBtn,
.policy-review-footer.export-mode .reviewed-state { display: none; }

html[data-expert="off"] .policy-card .policy-answer,
html[data-expert="off"] .policy-card .status-chip.generated,
html[data-expert="off"] .policy-card .status-chip.import-missing,
html[data-expert="off"] .policy-card .status-chip.import-exact,
html[data-expert="off"] .policy-card .status-chip.import-likely,
html[data-expert="off"] .policy-card .status-chip.import-different { display: none; }
html[data-expert="off"] .manual-section-grid { grid-template-columns: 1fr; }
html[data-expert="off"] .manual-section { max-width: 980px; }
.manual-section > summary { list-style: none; cursor: pointer; grid-template-columns: 34px minmax(0, 1fr) auto; }
.manual-section > summary::-webkit-details-marker { display: none; }
.manual-section > summary::after {
  content: "+";
  align-self: center;
  justify-self: end;
  color: #f5d547;
  font: 800 18px/1 'Sora', sans-serif;
}
.manual-section[open] > summary::after { content: "-"; }
.manual-section:not([open]) .manual-rows { display: none; }

.authentication-hardening-panel { overflow: hidden; }
.authentication-hardening-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 17px 18px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  background: #202024;
}
.authentication-hardening-head h3 { margin: 3px 0 6px; color: #fff; font-size: 20px; }
.authentication-hardening-head p:last-child { max-width: 820px; margin: 0; color: var(--ink-soft); line-height: 1.45; }
.readiness-status { padding: 7px 10px; border: 1px solid rgba(255,255,255,.16); color: var(--ink-soft); font: 800 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; white-space: nowrap; }
.readiness-status.incomplete { color: #f5d547; border-color: rgba(245,213,71,.45); background: rgba(245,213,71,.08); }
.readiness-status.complete { color: var(--green); border-color: rgba(24,210,125,.42); background: rgba(24,210,125,.08); }
.authentication-hardening-body { display: grid; grid-template-columns: minmax(300px, .8fr) minmax(420px, 1.2fr); gap: 16px; padding: 16px; }
.authentication-hardening-body h4 { margin: 0 0 10px; color: #fff; }
.authentication-readiness-list { display: grid; gap: 8px; }
.authentication-readiness-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; padding: 11px; border: 1px solid rgba(255,255,255,.12); background: #252529; cursor: pointer; }
.authentication-readiness-item input { margin-top: 2px; accent-color: #f5d547; }
.authentication-readiness-item span { display: grid; gap: 4px; }
.authentication-readiness-item strong { color: #fff; font-size: 12px; }
.authentication-readiness-item small { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.authentication-readiness-item.complete { border-color: rgba(24,210,125,.42); box-shadow: inset 3px 0 0 var(--green); }
.authentication-method-plan, .authentication-boundary-note { padding: 14px; border-left: 4px solid #f5d547; background: rgba(245,213,71,.07); }
.authentication-plan-heading { display: grid; gap: 5px; }
.authentication-plan-heading > span { color: #f5d547; font: 800 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.authentication-plan-heading > strong, .authentication-boundary-note strong { color: #fff; font-size: 14px; }
.authentication-plan-heading p, .authentication-boundary-note span { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.authentication-method-plan ol { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; }
.authentication-method-plan li { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 9px; border: 1px solid rgba(255,255,255,.1); background: #252529; }
.authentication-method-plan li > span { color: #f5d547; font: 800 10px/1.2 'JetBrains Mono', monospace; }
.authentication-method-plan li div { display: grid; gap: 3px; }
.authentication-method-plan li strong { color: #fff; font-size: 11px; }
.authentication-method-plan li small { color: var(--ink-soft); font-size: 10px; line-height: 1.4; }
.authentication-guidance-links { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: center; padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.1); background: #18181c; }
.authentication-guidance-links span { color: var(--ink-muted); font: 700 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.authentication-guidance-links a { color: #f5d547; font-size: 11px; font-weight: 800; }

.manual-policy-snapshot { position: sticky; top: 0; z-index: 4; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 1px solid rgba(245,213,71,.3); border-top: 3px solid #f5d547; background: #18181c; box-shadow: 0 10px 22px rgba(0,0,0,.22); }
.manual-policy-snapshot article { min-width: 0; padding: 10px 11px; border-right: 1px solid rgba(255,255,255,.1); }
.manual-policy-snapshot article:last-child { border-right: 0; }
.manual-policy-snapshot span, .manual-portal-path span, .manual-step-guidance span, .manual-action-label { display: block; color: var(--ink-muted); font: 800 8px/1.25 'JetBrains Mono', monospace; text-transform: uppercase; }
.manual-policy-snapshot strong { display: block; margin-top: 5px; color: #fff; font-size: 10px; line-height: 1.35; overflow-wrap: anywhere; }
.manual-authentication-strength { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(240px, 1fr) minmax(240px, .8fr); gap: 14px; padding: 14px; border: 1px solid rgba(245,213,71,.32); background: linear-gradient(135deg, rgba(245,213,71,.09), rgba(255,106,26,.04)); }
.manual-authentication-strength h5 { margin: 3px 0 5px; color: #fff; font-size: 15px; }
.manual-authentication-strength p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.45; }
.manual-authentication-strength > div > span { color: #f5d547; font: 800 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.manual-authentication-strength ul { margin: 8px 0 0; padding-left: 17px; display: grid; gap: 4px; }
.manual-authentication-strength li { color: var(--ink-soft); font-size: 10px; }
.authentication-strength-check { align-content: start; display: grid; gap: 6px; padding: 11px; border-left: 4px solid #ff6a1a; background: rgba(255,106,26,.1); }
.authentication-strength-check strong { color: #fff; }
.authentication-strength-check span { color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.manual-path-layout { display: grid; grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); gap: 14px; align-items: start; }
.manual-path-nav { display: grid; gap: 7px; position: sticky; top: 88px; }
.manual-path-step { width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 9px; align-items: center; padding: 10px; border: 1px solid rgba(255,255,255,.12); background: #202024; color: var(--ink); text-align: left; cursor: pointer; }
.manual-path-step > span { width: 28px; height: 28px; display: grid; place-items: center; color: #f5d547; border: 1px solid rgba(245,213,71,.4); font: 800 9px/1 'JetBrains Mono', monospace; }
.manual-path-step div { display: grid; gap: 3px; min-width: 0; }
.manual-path-step strong { color: #fff; font-size: 11px; line-height: 1.25; }
.manual-path-step small { color: var(--ink-muted); font-size: 9px; line-height: 1.3; }
.manual-path-step em { color: var(--ink-muted); font: 800 8px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; font-style: normal; }
.manual-path-step.active { color: #17171a; border-color: #f5d547; background: linear-gradient(135deg, #fff2a6, #f5d547 52%, #e9b91d); box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
.manual-path-step.active strong, .manual-path-step.active small, .manual-path-step.active em { color: #17171a; }
.manual-path-step.active > span { color: #17171a; border-color: rgba(23,23,26,.42); }
.manual-path-step.complete:not(.active) { border-color: rgba(24,210,125,.4); box-shadow: inset 3px 0 0 var(--green); }
.manual-path-step.complete:not(.active) em { color: var(--green); }
.manual-active-section { max-width: none !important; }
.manual-active-section .manual-rows { display: grid; }
.manual-active-section .manual-section-head { grid-template-columns: 34px minmax(0, 1fr) auto; }
.manual-active-section .manual-section-head b { align-self: center; color: #f5d547; font: 800 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.manual-portal-path { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.1); background: rgba(245,213,71,.07); }
.manual-portal-path strong { color: #f5d547; font-size: 11px; line-height: 1.4; }
.manual-action-label { margin-bottom: 2px; color: #f5d547; }
.manual-step-guidance { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.manual-step-guidance article { display: grid; align-content: start; gap: 6px; padding: 10px; border: 1px solid rgba(255,255,255,.1); background: #202024; }
.manual-step-guidance article.warning { border-left: 3px solid #ff6a1a; }
.manual-step-guidance strong { color: var(--ink-soft); font-size: 10px; line-height: 1.45; }
.manual-step-actions { display: flex; justify-content: space-between; gap: 10px; padding: 12px; border-top: 1px solid rgba(255,255,255,.1); }

.audit-target-field { display: grid; gap: 5px; min-width: 220px; }
.audit-target-field span { color: var(--ink-muted); font: 700 9px/1.2 'JetBrains Mono', monospace; text-transform: uppercase; }
.audit-target-field select { min-height: 38px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.14); background: #171719; color: var(--ink); }

html[data-theme="light"] .guided-stage,
html[data-theme="light"] .guided-actions,
html[data-theme="light"] .guided-progress button,
html[data-theme="light"] .applied-source-banner,
html[data-theme="light"] .policy-detail-tabs button,
html[data-theme="light"] .policy-review-footer {
  background: rgba(255,255,255,.94);
  border-color: rgba(38,34,30,.16);
}

@media (max-width: 960px) {
  .strategy-requirement-grid,
  .scenario-template-grid,
  .scenario-custom-grid,
  .review-export-panel { grid-template-columns: 1fr; }
  .guided-review-grid { grid-template-columns: 1fr; }
  .policy-nav { position: static; }
  .policy-review-footer { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reviewed-state { order: -1; grid-column: 1 / -1; }
  .visual-outcome-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .visual-outcome-strip article:last-child { grid-column: 1 / -1; }
  .visual-threat-flyout { right: 18px; }
  .authentication-hardening-body, .manual-authentication-strength { grid-template-columns: 1fr; }
  .manual-policy-snapshot { grid-template-columns: repeat(3, minmax(0, 1fr)); position: static; }
  .manual-policy-snapshot article:nth-child(3n) { border-right: 0; }
}

@media (max-width: 680px) {
  .app-topbar { gap: 8px; padding: 9px 12px; }
  .brand-mark { width: 48px; height: 48px; }
  .app-topbar h1 { font-size: 17px; }
  .app-topbar .eyebrow { font-size: 8px; }
  .topbar-meta { width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .topbar-meta > span { display: none; }
  .topbar-meta a,
  .topbar-meta .theme-toggle { min-width: 0; padding: 8px 5px; font-size: 8px; text-align: center; }
  .guided-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .guided-progress button { min-height: 60px; padding: 8px; }
  .guided-stage { padding: 8px; }
  .guided-actions { grid-template-columns: 1fr; position: static; }
  .guided-actions > span { order: -1; }
  .strategy-score-grid.primary-metrics { grid-template-columns: 1fr; }
  .strategy-context-line, .compact-mitre-panel > summary, .prepare-summary-head { align-items: flex-start; flex-direction: column; }
  .compact-mitre-panel > summary > span { text-align: left; }
  .policy-review-footer {
    position: sticky;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
  .policy-review-footer .btn { min-width: 0; min-height: 32px; padding: 6px 8px; font-size: 10px; }
  #reviewExportBtn { grid-column: 1 / -1; }
  .topbar-meta .expert-toggle { order: 4; }
  .visual-policy-designer { padding: 10px; }
  .visual-designer-head { display: grid; }
  .visual-designer-actions { justify-content: stretch; }
  .visual-designer-actions .btn { flex: 1; }
  .visual-outcome-strip { grid-template-columns: 1fr; }
  .visual-outcome-strip article:last-child { grid-column: auto; }
  .visual-map-shell { overflow: visible; padding: 11px; }
  .visual-map-legend { display: grid; grid-template-columns: repeat(2, max-content); gap: 7px 12px; min-width: 0; }
  .visual-policy-map { display: grid; grid-template-columns: 1fr; gap: 12px; min-width: 0; }
  .visual-node-track { display: grid; gap: 13px; padding-left: 18px; }
  .visual-node-track::before { left: 5px; right: auto; top: 8px; bottom: 8px; width: 3px; height: auto; background: linear-gradient(180deg, #d99535, #f5d547, #ff6a1a); }
  .visual-policy-node { width: 100%; min-height: 110px; }
  .visual-if-then-bridge { width: 100%; height: 38px; align-self: auto; }
  .visual-if-then-bridge::before { left: 5px; right: auto; top: 0; bottom: 0; width: 3px; height: auto; }
  .visual-map-navigation { grid-template-columns: 1fr 1fr; }
  .visual-map-navigation > div { grid-column: 1 / -1; grid-row: 1; }
  .visual-flyout { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 88vh; border-left: 0; border-right: 0; border-bottom: 0; box-shadow: 0 -18px 45px rgba(0,0,0,.5); }
  .visual-threat-flyout { left: 0; right: 0; max-height: 82vh; }
  .visual-flyout-footer { padding-bottom: max(13px, env(safe-area-inset-bottom)); }
  .visual-decision-impact dl { grid-template-columns: 1fr; gap: 4px; }
  .visual-threat-summary { display: grid; }
  .visual-threat-summary span { text-align: left; }
  .authentication-hardening-head { display: grid; }
  .readiness-status { justify-self: start; }
  .authentication-hardening-body { grid-template-columns: 1fr; padding: 10px; }
  .manual-policy-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .manual-policy-snapshot article:nth-child(3n) { border-right: 1px solid rgba(255,255,255,.1); }
  .manual-policy-snapshot article:nth-child(2n) { border-right: 0; }
  .manual-path-layout { grid-template-columns: 1fr; }
  .manual-path-nav { position: static; display: flex; overflow-x: auto; padding-bottom: 4px; }
  .manual-path-step { min-width: 210px; }
  .manual-active-section .manual-section-head { grid-template-columns: 34px minmax(0, 1fr); }
  .manual-active-section .manual-section-head b { grid-column: 2; justify-self: start; }
  .manual-portal-path, .manual-step-guidance { grid-template-columns: 1fr; }
  .manual-step-actions { display: grid; grid-template-columns: 1fr; }
}

/* Strategy architecture: expandable per-policy configuration + MITRE detail */
.strategy-build-order .strategy-policy-card[data-strategy-detail] { cursor: pointer; transition: border-color var(--transition); }
.strategy-build-order .strategy-policy-card[data-strategy-detail]:hover,
.strategy-build-order .strategy-policy-card[data-strategy-detail]:focus-visible { border-color: rgba(255,106,26,.55); }
.strategy-card-caret {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.04);
  color: var(--ink-soft);
  font: 800 16px/1 'JetBrains Mono', monospace;
}
.strategy-policy-card[data-strategy-detail]:hover .strategy-card-caret { color: var(--orange); border-color: rgba(255,106,26,.45); }
.strategy-policy-card .strategy-policy-top { display: flex; align-items: flex-start; gap: 12px; }
.strategy-policy-card .strategy-policy-top > div:first-child { flex: 1; min-width: 0; }
.strategy-policy-card.expanded { border-color: rgba(255,106,26,.5); box-shadow: inset 4px 0 0 var(--orange), var(--shadow-soft); cursor: default; }
.strategy-policy-card.expanded .strategy-policy-top { cursor: pointer; }
.strategy-detail-section .manual-section-head { cursor: default; padding: 9px 11px; }
.strategy-detail-sections .manual-section .manual-rows { display: grid; }
.strategy-detail-actions { display: flex; justify-content: flex-end; }
/* Packed columns: sections flow to fill space instead of aligning to grid rows */
.strategy-detail-sections.manual-section-grid,
html[data-expert="off"] .strategy-detail-sections.manual-section-grid { display: block; columns: 2; column-gap: 12px; max-width: none; }
.strategy-detail-sections .manual-section { break-inside: avoid; margin: 0 0 12px; max-width: none; }
.strategy-detail-sections .manual-row { padding: 7px 11px; grid-template-columns: minmax(112px, .3fr) minmax(0, 1fr); gap: 8px; }
.strategy-detail-sections .manual-section-head p { margin-top: 2px; }
.strategy-mitre-list { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.strategy-policy-detail {
  display: grid;
  gap: 14px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}
.strategy-detail-block { display: grid; gap: 8px; min-width: 0; }
.strategy-detail-block > h5 {
  margin: 0;
  font: 700 11px/1.2 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--orange);
}
.strategy-detail-note { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.strategy-detail-sections.manual-section-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.strategy-build-order .strategy-policy-card .strategy-policy-detail dl.manual-rows { grid-template-columns: 1fr; }
.strategy-mitre-list { display: grid; gap: 6px; }
.strategy-mitre-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  background: rgba(255,255,255,.03);
}
.strategy-mitre-id { font: 800 11px/1.2 'JetBrains Mono', monospace; color: var(--ink); }
.strategy-mitre-row strong { display: block; font-size: 12.5px; line-height: 1.3; color: var(--ink); }
.strategy-mitre-row small { display: block; color: var(--ink-muted); font-size: 11px; line-height: 1.35; overflow-wrap: anywhere; }
.strategy-mitre-status {
  font: 700 10px/1.2 'JetBrains Mono', monospace;
  text-transform: uppercase;
  padding: 4px 8px;
  white-space: nowrap;
}
.strategy-mitre-status.strong { color: var(--green); border: 1px solid rgba(24,210,125,.4); background: rgba(24,210,125,.1); }
.strategy-mitre-status.partial { color: #f5d547; border: 1px solid rgba(245,213,71,.4); background: rgba(245,213,71,.1); }
html[data-theme="light"] .strategy-toggle-hint { background: rgba(0,0,0,.03); }
html[data-theme="light"] .strategy-mitre-row { background: rgba(0,0,0,.025); }
html[data-theme="light"] .strategy-mitre-status.partial { color: #7a6410; background: rgba(245,213,71,.22); }
@media (max-width: 1100px) {
  .strategy-detail-sections.manual-section-grid,
  html[data-expert="off"] .strategy-detail-sections.manual-section-grid { columns: 1; }
  .strategy-mitre-list { grid-template-columns: 1fr; }
  .strategy-mitre-row { grid-template-columns: 56px minmax(0, 1fr); }
  .strategy-mitre-row .strategy-mitre-status { grid-column: 2; justify-self: start; }
}
