@font-face {
  font-family: "BDO Grotesk";
  src: url("assets/fonts/BDOGrotesk-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BDO Grotesk";
  src: url("assets/fonts/BDOGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BDO Grotesk";
  src: url("assets/fonts/BDOGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BDO Grotesk";
  src: url("assets/fonts/BDOGrotesk-Black.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F7F6F5;
  --surface: #ffffff;
  --surface-soft: #f0efed;
  --ink: #000000;
  --muted: #6f747a;
  --line: #d9d9d9;
  --brand-yellow: #FFC965;
  --brand-magenta: #9C0069;
  --brand-gradient: linear-gradient(90deg, #FFC965 0%, #9C0069 100%);
  --brand-gradient-soft: linear-gradient(90deg, rgba(255, 201, 101, 0.2) 0%, rgba(156, 0, 105, 0.16) 100%);
  --high: #8a005d;
  --high-soft: #fde6f4;
  --medium: #8d5d00;
  --medium-soft: #fff2d3;
  --critical: #5b0019;
  --critical-soft: #ffe7ec;
  --low: #3c444a;
  --low-soft: #eceeef;
  --radius: 8px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.08);
  color: var(--ink);
  background: var(--bg);
  font-family: "BDO Grotesk", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
}

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

button,
.file-button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  padding: 8px 12px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

button:hover,
.file-button:hover {
  border-color: var(--ink);
  background: var(--surface-soft);
}

button:active {
  transform: translateY(1px);
}

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

.primary {
  border-color: var(--ink);
  background: var(--ink);
  color: #ffffff;
  font-weight: 700;
}

.primary:hover {
  border-color: var(--brand-magenta);
  background: var(--brand-gradient);
}

.ghost {
  background: transparent;
}

.danger {
  border-color: var(--high);
  color: var(--high);
}

.danger:hover {
  border-color: var(--high);
  background: var(--high-soft);
}

.small {
  min-height: 32px;
  padding: 6px 9px;
  font-size: 0.85rem;
}

.icon-button {
  display: inline-grid;
  width: 36px;
  min-height: 36px;
  place-items: center;
  padding: 0;
  font-weight: 700;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 18px;
  overflow-y: auto;
  background: #000000;
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 86px;
  height: 48px;
  object-fit: contain;
}

.brand strong,
.brand span {
  display: block;
}

.brand strong {
  font-size: 1.05rem;
  font-weight: 900;
}

.brand span,
.project-meta {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.82rem;
}

.project-panel {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
}

.project-panel label {
  display: grid;
  gap: 6px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.project-panel select {
  width: 100%;
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  background: #000000;
  color: #ffffff;
  padding: 6px 8px;
}

.nav-list {
  display: grid;
  gap: 7px;
}

.nav-list button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  text-align: left;
}

.nav-list button.active {
  border-color: #ffffff;
  background: #ffffff;
  color: #000000;
}

.nav-count {
  display: inline-grid;
  min-width: 26px;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  padding: 2px 8px;
  font-size: 0.74rem;
}

.nav-list button.active .nav-count {
  background: var(--brand-gradient-soft);
}

.nav-list button.locked {
  opacity: 0.44;
}

.sidebar-footer {
  display: grid;
  gap: 8px;
  margin-top: auto;
}

.sidebar-footer button,
.sidebar-footer .file-button {
  border-color: rgba(255, 255, 255, 0.32);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.sidebar-footer button:hover,
.sidebar-footer .file-button:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
}

.sidebar-footer .danger {
  border-color: #FFC965;
  color: #ffffff;
}

.sidebar-footer .danger:hover {
  border-color: #FFC965;
  background: rgba(255, 201, 101, 0.18);
}

.signed-in {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  padding: 9px;
}

.signed-in img {
  width: 34px;
  height: 34px;
  border-radius: 999px;
}

.signed-in span,
.signed-in strong {
  display: block;
}

.signed-in span {
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.signed-in strong {
  color: #ffffff;
  overflow-wrap: anywhere;
}

.file-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  text-align: center;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.workspace {
  min-width: 0;
  padding: 26px;
}

.empty-project-screen,
.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.empty-project-card,
.auth-card {
  width: min(720px, 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 48px);
}

.empty-project-logo,
.auth-logo {
  width: 118px;
  height: auto;
  margin-bottom: 24px;
}

.empty-project-card h1,
.auth-card h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 5rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.empty-project-card > p:not(.eyebrow),
.auth-card > p:not(.eyebrow) {
  max-width: 560px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.45;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.topbar h1 {
  margin: 0;
  max-width: 900px;
  font-size: clamp(2rem, 4vw, 4.8rem);
  line-height: 0.94;
  letter-spacing: 0;
}

.topbar-actions,
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
}

.space-between {
  justify-content: space-between;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.flow-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin: 0 0 18px;
}

.flow-stepper button {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 4px 8px;
  align-items: center;
  min-height: 64px;
  text-align: left;
}

.flow-stepper button span {
  display: inline-grid;
  grid-row: span 2;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  font-weight: 900;
}

.flow-stepper button strong,
.flow-stepper button em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.flow-stepper button em {
  color: var(--muted);
  font-size: 0.76rem;
  font-style: normal;
}

.flow-stepper button.active {
  border-color: var(--ink);
  background: #ffffff;
}

.flow-stepper button.active span,
.flow-stepper button.approved span {
  background: var(--brand-gradient);
  color: #ffffff;
}

.flow-stepper button.locked {
  opacity: 0.48;
}

.analysis-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.analysis-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-left: 5px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 13px;
}

.analysis-option.selected {
  border-left-color: var(--brand-magenta);
  background: var(--brand-gradient-soft);
}

.analysis-option input {
  width: auto;
  margin-top: 4px;
}

.analysis-option strong,
.analysis-option em {
  display: block;
}

.analysis-option em {
  margin-top: 4px;
  color: var(--muted);
  font-style: normal;
  line-height: 1.4;
}

.approval-gate {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-left: 6px solid var(--brand-yellow);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 15px;
}

.approval-gate.approved {
  border-left-color: #000000;
  background: var(--brand-gradient-soft);
}

.approval-gate span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.approval-gate h2 {
  margin: 3px 0;
}

.approval-gate p {
  margin: 0;
  color: var(--muted);
}

.notice {
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-magenta);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 12px 14px;
}

.notice.working {
  border-left-color: var(--brand-yellow);
}

.notice.warning,
.notice.report-warning {
  border-left-color: var(--brand-yellow);
  background: #fff7e6;
}

.notice.warning strong,
.notice.report-warning strong {
  display: block;
  margin-bottom: 5px;
  font-size: 1rem;
}

.notice.warning p,
.notice.report-warning p {
  margin: 0;
  line-height: 1.45;
}

.auto-run-warning {
  display: grid;
  gap: 10px;
}

.auto-run-warning button {
  justify-self: start;
}

.progress-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-yellow);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.activity-panel {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-magenta);
  border-radius: var(--radius);
  background: #ffffff;
  box-shadow: var(--shadow);
  padding: 12px 14px;
}

.activity-panel strong {
  display: block;
  margin-bottom: 3px;
}

.activity-panel p {
  margin: 0;
  color: var(--muted);
}

.spinner {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 3px solid var(--surface-soft);
  border-top-color: var(--brand-magenta);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.progress-panel strong {
  display: block;
  margin-bottom: 3px;
}

.progress-panel p {
  margin: 0;
  color: var(--muted);
}

.progress-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-soft);
}

.progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transition: width 0.25s ease;
}

.inline-status {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-yellow);
  border-radius: var(--radius);
  background: var(--brand-gradient-soft);
  padding: 10px 12px;
  color: var(--ink);
  font-weight: 700;
}

.inline-status.subtle {
  border-left-color: #000000;
  background: var(--surface-soft);
  color: var(--muted);
  font-weight: 500;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.section {
  margin-top: 18px;
}

.panel,
.metric {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
}

.panel h2,
.panel h3,
.card h3 {
  margin: 0;
  letter-spacing: 0;
}

.panel > h2 {
  margin-bottom: 12px;
}

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.small-header {
  margin-top: 14px;
  margin-bottom: 8px;
}

.section-header p,
.metric p,
.card p,
.muted,
.empty {
  color: var(--muted);
}

.section-header p,
.card p,
.metric p {
  margin: 5px 0 0;
  line-height: 1.45;
}

.metric {
  display: grid;
  gap: 5px;
  min-height: 126px;
}

.metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.metric strong {
  font-size: 2rem;
  line-height: 1;
}

.stack {
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 13px;
}

.model-section {
  position: relative;
  overflow: hidden;
  border-top: 5px solid var(--section-accent, var(--ink));
}

.model-section::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 78px;
  background: linear-gradient(90deg, var(--section-soft, var(--surface-soft)), transparent 72%);
  pointer-events: none;
}

.model-section > * {
  position: relative;
}

.section-protectedAssets {
  --section-accent: #9C0069;
  --section-soft: #fde6f4;
}

.section-threatActors {
  --section-accent: #5b0019;
  --section-soft: #ffe7ec;
}

.section-invariants {
  --section-accent: #8d5d00;
  --section-soft: #fff2d3;
}

.section-components {
  --section-accent: #0b6b75;
  --section-soft: #e2f5f7;
}

.section-trustBoundaries {
  --section-accent: #4d3f8f;
  --section-soft: #eeebff;
}

.section-valueFlows {
  --section-accent: #315f2d;
  --section-soft: #e8f4e4;
}

.section-privilegedRoles {
  --section-accent: #000000;
  --section-soft: #eceeef;
}

.section-kicker {
  display: inline-flex;
  margin-bottom: 5px;
  border-radius: 999px;
  background: var(--section-accent, var(--ink));
  padding: 3px 8px;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.model-card {
  display: grid;
  gap: 12px;
  border-left: 6px solid var(--card-accent, var(--ink));
  background: linear-gradient(90deg, var(--card-soft, #ffffff), #ffffff 42%);
}

.model-card-title {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 9px;
}

.model-card-title > span {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--card-accent, var(--ink));
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
}

.model-card-title strong {
  overflow-wrap: anywhere;
}

.model-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.model-pill {
  display: grid;
  gap: 3px;
  min-width: min(230px, 100%);
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
  padding: 8px 10px;
}

.model-pill span {
  color: var(--card-accent, var(--muted));
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.model-pill strong {
  max-width: min(520px, 100%);
  overflow-wrap: anywhere;
  font-weight: 500;
}

.collusion-section {
  border-top: 5px solid #4d3f8f;
}

.collusion-card {
  background: linear-gradient(90deg, var(--card-soft, #ffffff), #ffffff 45%);
}

.card.soft {
  background: var(--surface-soft);
}

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

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field.wide {
  grid-column: 1 / -1;
}

.field span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.field-help {
  grid-column: 1 / -1;
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--ink);
  padding: 9px 10px;
}

.input-attention {
  border-color: var(--brand-magenta);
  box-shadow: 0 0 0 4px rgba(156, 0, 105, 0.16);
}

textarea {
  resize: vertical;
  line-height: 1.42;
}

.report-preview {
  display: grid;
  gap: 12px;
  max-width: 980px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  padding: clamp(16px, 3vw, 28px);
  line-height: 1.55;
}

.report-preview h1,
.report-preview h2,
.report-preview h3,
.report-preview p,
.report-preview ul {
  margin: 0;
}

.report-preview h1 {
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 0.98;
}

.report-preview h2 {
  margin-top: 18px;
  border-bottom: 2px solid var(--brand-yellow);
  padding-bottom: 6px;
  font-size: 1.55rem;
}

.report-preview h3 {
  margin-top: 8px;
  font-size: 1.16rem;
}

.report-preview p,
.report-preview li,
.report-preview td {
  color: #222222;
}

.report-preview ul {
  display: grid;
  gap: 5px;
  padding-left: 22px;
}

.report-preview a {
  color: var(--brand-magenta);
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.92rem;
}

.report-table th,
.report-table td {
  border: 1px solid var(--line);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.report-table th {
  background: var(--surface-soft);
  font-weight: 900;
}

.report-diagram,
.report-code {
  border: 1px solid var(--line);
  border-left: 5px solid var(--brand-yellow);
  border-radius: var(--radius);
  background: #ffffff;
  padding: 12px;
}

.report-diagram {
  display: grid;
  gap: 5px;
}

.diagram-line {
  position: relative;
  padding-left: calc(14px + var(--depth) * 18px);
  color: #222222;
}

.diagram-line::before {
  content: "";
  position: absolute;
  left: calc(var(--depth) * 18px);
  top: 0.68em;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand-magenta);
}

.report-code {
  overflow-x: auto;
  background: var(--surface-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-wrap;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
}

.toggle input {
  width: auto;
}

.check-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.check {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  background: var(--surface-soft);
}

.check.ok {
  border-color: #000000;
  background: var(--brand-gradient-soft);
}

.check strong {
  font-size: 0.75rem;
  text-transform: uppercase;
}

.threat-list {
  display: grid;
  gap: 12px;
}

.threat {
  border-left-width: 5px;
}

.selected-threats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selected-threats span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 8px 10px;
  color: var(--muted);
}

.selected-threats strong {
  color: var(--ink);
}

.attack-tree-list {
  display: grid;
  gap: 16px;
}

.attack-tree-card {
  overflow: hidden;
}

.attack-tree-outline {
  display: grid;
  gap: 8px;
}

.attack-node {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  margin-left: calc(var(--tree-depth) * 24px);
}

.node-rule {
  border-left: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
  min-height: 24px;
  transform: translateY(-8px);
}

.attack-node:first-child .node-rule {
  border-left-color: transparent;
}

.node-body {
  border: 1px solid var(--line);
  border-left: 5px solid #000000;
  border-radius: var(--radius);
  background: #ffffff;
  padding: 10px 12px;
}

.node-body strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
}

.node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.node-meta span {
  border-radius: 999px;
  background: var(--surface-soft);
  padding: 2px 7px;
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 800;
}

.tree-editor {
  display: grid;
  gap: 10px;
}

.tree-edit-row {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.7fr) minmax(0, 0.8fr);
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
  padding: 10px;
}

.risk-critical {
  border-left-color: var(--critical);
  background: var(--critical-soft);
}

.risk-high {
  border-left-color: var(--high);
  background: var(--high-soft);
}

.risk-medium {
  border-left-color: var(--medium);
  background: var(--medium-soft);
}

.risk-low,
.risk-informational,
.risk-na {
  border-left-color: var(--low);
  background: #ffffff;
}

.tree {
  display: grid;
  gap: 7px;
}

.tree-node {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 8px;
}

.warn {
  color: var(--high);
}

.empty {
  margin: 0;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface-soft);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.42);
  padding: 20px;
}

.modal {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: var(--radius);
  background: var(--surface);
  padding: 16px;
}

.modal header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 1050px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .grid.two,
  .grid.three,
  .grid.four,
  .analysis-options,
  .check-list {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }

  .approval-gate {
    display: grid;
  }
}

@media (max-width: 620px) {
  .workspace,
  .sidebar {
    padding: 14px;
  }

  .form-grid,
  .tree-node,
  .tree-edit-row {
    grid-template-columns: 1fr;
  }

  .attack-node {
    margin-left: calc(var(--tree-depth) * 12px);
  }

  .topbar h1 {
    font-size: 2.25rem;
  }
}
