@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/tessa/inter-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/tessa/inter-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/tessa/inter-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/tessa/inter-latin-700-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/tessa/jetbrains-mono-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/tessa/jetbrains-mono-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/fonts/tessa/jetbrains-mono-latin-600-normal.woff2") format("woff2");
}

:root {
  --sidebar-width: 220px;
  --sidebar-drawer-width: 280px;
  --topbar-height: 48px;
  --footer-height: 28px;
  --font-ui: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --text-xxs: 10px;
  --text-xs: 11px;
  --text-sm: 12px;
  --text-base: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 28px;
  --bg-base: #fff;
  --bg-primary: #fff;
  --bg-secondary: #fafafa;
  --bg-tertiary: #f5f5f5;
  --bg-card: #fff;
  --bg-input: #fff;
  --bg-sidebar: #fafafa;
  --bg-hover: rgba(0, 0, 0, 0.04);
  --bg-selected: rgba(0, 0, 0, 0.06);
  --text-primary: #171717;
  --text-secondary: #555;
  --text-muted: #666;
  --text-ghost: #bbb;
  --accent: #171717;
  --accent-hover: #000;
  --accent-highlight: #0070f3;
  --accent-highlight-hover: #3291ff;
  --accent-highlight-muted: rgba(0, 112, 243, 0.12);
  --border: #e5e5e5;
  --border-subtle: #f0f0f0;
  --border-strong: #ccc;
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.08);
  --error: #dc2626;
  --error-bg: rgba(220, 38, 38, 0.08);
  --warning: #9a5800;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --info: #0070f3;
  --info-bg: rgba(0, 112, 243, 0.08);
  --cached: #7c3aed;
  --cached-bg: rgba(124, 58, 237, 0.1);
  --android-bg: #dcfce7;
  --android-text: #166534;
  --ios-bg: #e0e7ff;
  --ios-text: #3730a3;
  --web-bg: #fff3e0;
  --web-text: #e65100;
  --radius-sm: 3px;
  --radius-md: 4px;
  --radius-lg: 6px;
  --radius-full: 9999px;
  --shadow-overlay: 0 16px 48px rgba(17, 17, 17, 0.14);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-apple: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="dark"] {
  --bg-base: #000;
  --bg-primary: #000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #0f0f0f;
  --bg-card: #0f0f0f;
  --bg-input: #0a0a0a;
  --bg-sidebar: #000;
  --bg-hover: rgba(255, 255, 255, 0.04);
  --bg-selected: rgba(255, 255, 255, 0.06);
  --text-primary: #fff;
  --text-secondary: #aaa;
  --text-muted: #777;
  --text-ghost: #333;
  --accent: #ededed;
  --accent-hover: #fff;
  --border: #1e1e1e;
  --border-subtle: #141414;
  --border-strong: #3d3d3d;
  --warning: #d99a32;
  --success-bg: rgba(22, 163, 74, 0.12);
  --error-bg: rgba(220, 38, 38, 0.12);
  --warning-bg: rgba(217, 119, 6, 0.12);
  --info-bg: rgba(0, 112, 243, 0.12);
  --cached: #a78bfa;
  --cached-bg: rgba(167, 139, 250, 0.16);
  --android-bg: rgba(22, 163, 74, 0.15);
  --android-text: #4ade80;
  --ios-bg: rgba(99, 102, 241, 0.15);
  --ios-text: #a5b4fc;
  --web-bg: rgba(234, 88, 12, 0.15);
  --web-text: #fb923c;
  --shadow-overlay: 0 16px 48px rgba(0, 0, 0, 0.95);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

#demo-root:focus {
  outline: none;
}

button,
input,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent-highlight);
  outline-offset: 1px;
}

::selection {
  background: rgba(0, 112, 243, 0.22);
  color: var(--text-primary);
}

[data-theme="dark"] ::selection {
  background: rgba(0, 112, 243, 0.42);
  color: #fff;
}

svg.lucide {
  display: block;
  flex: none;
}

.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-icon,
.segmented button,
.tab-row button {
  min-height: 28px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background-color 120ms ease;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--bg-primary);
  color: var(--text-primary);
}

.btn-secondary:hover,
.btn-ghost:hover,
.btn-icon:hover {
  background: var(--bg-hover);
}

.btn-ghost {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
}

.btn-icon {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: var(--bg-primary);
}

.btn-icon.is-active {
  background: var(--accent-highlight-muted);
  color: var(--accent-highlight);
  border-color: var(--accent-highlight);
}

.btn-icon:disabled {
  opacity: 0.4;
  cursor: default;
}

.screen-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.screen-pager-count {
  min-width: 40px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-align: center;
}

.btn-danger {
  color: var(--error);
}

.form-input {
  height: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0 8px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.form-input::placeholder,
.composer textarea::placeholder {
  color: var(--text-ghost);
}

.badge,
.platform-badge,
.status-badge,
.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  font-size: var(--text-xxs);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge-info,
.source-ai {
  color: var(--accent-highlight);
  background: var(--accent-highlight-muted);
}

.source-cached {
  color: var(--cached);
  background: var(--cached-bg);
}

.status-passed {
  color: var(--success);
  background: var(--success-bg);
}

.status-failed {
  color: var(--error);
  background: var(--error-bg);
}

.platform-android {
  color: var(--android-text);
  background: var(--android-bg);
}

.platform-ios {
  color: var(--ios-text);
  background: var(--ios-bg);
}

.platform-web {
  color: var(--web-text);
  background: var(--web-bg);
}

.app-shell {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.mobile-topbar {
  display: none;
}

.app-body {
  min-height: 0;
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}

.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  contain: layout style paint;
  transition: width 340ms var(--ease-apple), flex-basis 340ms var(--ease-apple);
}

.app-shell.is-sidebar-collapsed .sidebar {
  width: 56px;
  flex-basis: 56px;
}

.app-shell.is-sidebar-collapsed .app-picker-row {
  padding-left: 8px;
  padding-right: 8px;
  flex-direction: column;
  gap: 4px;
}

.app-shell.is-sidebar-collapsed .app-picker {
  width: 38px;
  flex: 0 0 34px;
  justify-content: center;
  padding: 0;
}

.app-shell.is-sidebar-collapsed .app-picker-label,
.app-shell.is-sidebar-collapsed .app-picker .lucide-chevron-down,
.app-shell.is-sidebar-collapsed .nav-label,
.app-shell.is-sidebar-collapsed .nav-item-count,
.app-shell.is-sidebar-collapsed .sidebar-section-label,
.app-shell.is-sidebar-collapsed .device-copy,
.app-shell.is-sidebar-collapsed .sidebar-brand span {
  display: none;
}

.app-shell.is-sidebar-collapsed .sidebar-nav {
  padding-left: 8px;
  padding-right: 8px;
}

.app-shell.is-sidebar-collapsed .nav-item {
  width: 40px;
  justify-content: center;
  padding: 0;
}

.app-shell.is-sidebar-collapsed .sidebar-device,
.app-shell.is-sidebar-collapsed .sidebar-brand {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

.app-picker-row {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}

.app-picker {
  min-width: 0;
  flex: 1;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  cursor: pointer;
  text-align: left;
}

.app-monogram {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border-radius: var(--radius-sm);
  color: #9f1239;
  background: #fce7f3;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 600;
}

.app-picker-label {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-sm);
  font-weight: 500;
}

.sidebar-collapse {
  width: 24px;
  height: 24px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.sidebar-collapse:hover {
  background: var(--bg-hover);
}

.sidebar-nav {
	min-height: 0;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	overflow-y: auto;
}

.sidebar-section-label {
  margin: 10px 8px 4px;
  color: var(--text-muted);
  font-size: var(--text-xxs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font-size: var(--text-sm);
  transition: background-color 120ms ease;
}

.nav-item:hover {
  background: var(--bg-hover);
}

.nav-item.is-active {
  background: var(--accent-highlight-muted);
  color: var(--accent-highlight);
}

.nav-item.is-disabled,
.nav-item.is-disabled:hover {
  background: transparent;
  color: var(--text-muted);
  cursor: default;
  opacity: 0.42;
}

.nav-item-count {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
}

.sidebar-spacer {
  flex: 1;
}

.sidebar-device,
.sidebar-brand {
  min-height: 52px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.sidebar-device {
  width: 100%;
  border: 0;
  background: transparent;
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
}

.sidebar-device:hover {
  background: var(--bg-hover);
}

.device-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.device-copy small {
  color: var(--text-muted);
  font-size: var(--text-xxs);
}

.sidebar-brand {
  min-height: 46px;
  opacity: 0.65;
}

.sidebar-brand img {
  width: 20px;
  height: 20px;
  object-fit: contain;
}

.sidebar-brand span {
  font-size: var(--text-xs);
}

.main-column {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-primary);
}

.view {
  min-width: 0;
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.view-header {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 32px;
  flex: none;
  border-bottom: 1px solid var(--border);
  background: var(--bg-primary);
}

.view-title {
	margin: 0;
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--text-lg);
  font-weight: 600;
}

.view-subtitle {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 400;
}

.view-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toolbar {
  min-height: 42px;
  padding: 8px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: none;
  border-bottom: 1px solid var(--border);
}

.toolbar-spacer {
  flex: 1;
}

.toolbar-count {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
}

.segmented,
.tab-row {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.segmented button,
.tab-row button {
  min-height: 24px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
}

.segmented button:hover,
.tab-row button:hover {
  background: var(--bg-hover);
}

.segmented button.is-active,
.tab-row button.is-active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border);
}

.map-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 32px 0;
  flex: none;
}

.map-update-note,
.coverage-note {
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--accent-highlight) 28%, var(--border));
  border-radius: var(--radius-md);
  background: var(--accent-highlight-muted);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.map-update-note {
  margin: 10px 32px 0;
  flex: none;
}

.coverage-note {
  margin-bottom: 10px;
}

.map-stat {
  min-width: 0;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.map-stat-label,
.section-kicker,
.facet-title,
.report-kicker,
.editor-label {
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.map-stat-value {
  margin-top: 3px;
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.map-stat-value span {
  color: var(--text-muted);
}

.map-toolbar {
  border-bottom: 0;
  padding-bottom: 6px;
}

.map-body {
  min-height: 0;
  flex: 1;
  padding: 0 32px 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.flow-canvas {
  min-height: 390px;
  flex: 1;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background-color: var(--bg-card);
  background-image: radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 20px 20px;
  cursor: grab;
  touch-action: none;
  contain: layout style paint;
}

.flow-canvas.is-panning {
  cursor: grabbing;
}

.flow-world {
  width: 1280px;
  height: 650px;
  position: absolute;
  left: 0;
  top: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.flow-edges {
  width: 1280px;
  height: 650px;
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
}

.flow-edge {
  fill: none;
  stroke: var(--text-muted);
  stroke-width: 1.4;
}

.flow-edge.is-return {
  stroke: var(--warning);
  stroke-dasharray: 4 4;
}

.flow-edge-label {
  fill: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  paint-order: stroke;
  stroke: var(--bg-card);
  stroke-width: 5px;
  stroke-linejoin: round;
}

.flow-edge-label.is-return {
  fill: var(--warning);
}

.flow-node {
  width: 148px;
  position: absolute;
  z-index: 2;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: grab;
  user-select: none;
  transition: background-color 120ms ease, border-color 120ms ease;
}

.flow-node:hover,
.flow-node:focus-within {
  background: var(--bg-secondary);
}

.flow-node.is-dragging {
  z-index: 4;
  cursor: grabbing;
  box-shadow: var(--shadow-overlay);
}

.flow-node.coverage-high {
  border-color: var(--success);
}

.flow-node.coverage-none {
  border-style: dashed;
}

.flow-node.has-attention {
  border-color: var(--warning);
}

.flow-node.is-external {
  opacity: 0.65;
  border-style: dotted;
}

.flow-node.has-attention::after {
  content: "gap";
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  padding: 2px 5px;
  border: 1px solid var(--warning);
  border-radius: var(--radius-sm);
  background: var(--bg-card);
  color: var(--warning);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.node-shot {
  width: 100%;
  height: 200px;
  padding: 0;
  display: block;
  position: relative;
  overflow: hidden;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-tertiary);
  cursor: pointer;
}

.node-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top;
}

.node-enlarge {
  width: 24px;
  height: 24px;
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 3;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--bg-card) 92%, transparent);
  color: var(--text-secondary);
  cursor: pointer;
  opacity: 0;
  transition: background-color 120ms ease;
}

.flow-node:hover .node-enlarge,
.flow-node:focus-within .node-enlarge {
  opacity: 1;
}

.node-enlarge:hover {
  background: var(--bg-card);
}

.node-body {
  width: 100%;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.node-title {
  overflow: hidden;
  color: var(--text-primary);
  font-size: var(--text-xs);
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-body:hover .node-title {
  color: var(--accent-highlight);
}

.node-meta {
  overflow: hidden;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-gap {
  margin-top: 3px;
  overflow: hidden;
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-result {
  margin-top: 3px;
  color: var(--error);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.flow-controls {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 10;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
}

.flow-controls button {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.flow-controls button:last-child {
  border-bottom: 0;
}

.flow-controls button:hover {
  background: var(--bg-hover);
}

.map-footnote {
  margin: 8px 0 0;
  flex: none;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.mobile-scenario-list,
.mobile-run-list {
  display: none;
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  grid-auto-rows: max-content;
  align-content: start;
  gap: 12px;
  overflow: auto;
  padding-bottom: 16px;
}

.screen-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  cursor: pointer;
  transition: border-color 120ms ease;
}

.screen-card:hover {
  border-color: var(--border-strong);
}

.screen-card-thumb {
  position: relative;
  height: 190px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.screen-card-thumb img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14);
}

.screen-card-flag {
  position: absolute;
  left: 10px;
  top: 10px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
  text-transform: uppercase;
}

.screen-card-enlarge {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
}

.screen-card-enlarge:hover {
  background: var(--bg-hover);
}

.screen-card-body {
  padding: 10px;
}

.screen-card-title {
  font-size: var(--text-sm);
  font-weight: 600;
}

.screen-card-badges {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.scen-badge,
.unexplored-badge {
  padding: 2px 8px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
  font-weight: 600;
  text-transform: uppercase;
}

.scen-badge {
  color: var(--text-muted);
  background: var(--bg-tertiary);
}

.scen-badge.is-high {
  color: var(--success);
  background: var(--success-bg);
}

.unexplored-badge {
  border: 1px dashed var(--warning);
  color: var(--warning);
}

.screen-card-meta {
  margin-top: 7px;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.demo-intro-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 4px 32px 32px;
}

.demo-intro-lead {
  max-width: 720px;
  margin: 8px 0 20px;
  color: var(--text-secondary);
  font-size: var(--text-md);
  line-height: 1.6;
}

.demo-intro-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  max-width: 980px;
}

.demo-intro-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.demo-intro-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-hover);
}

.demo-intro-card-head {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

.demo-intro-card-head strong {
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.demo-intro-card-copy {
  color: var(--text-muted);
  font-size: var(--text-xs);
  line-height: 1.55;
}

.demo-intro-try {
  max-width: 720px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.demo-intro-try p {
  margin: 8px 0 10px;
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.demo-intro-try ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.demo-intro-try li {
  margin: 6px 0;
  font-size: var(--text-sm);
  line-height: 1.55;
}

.scenario-layout,
.runs-layout {
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  overflow: hidden;
}

.facet-rail {
  overflow-y: auto;
  padding: 16px 12px;
  border-right: 1px solid var(--border);
  background: var(--bg-secondary);
}

.facet-group {
  margin-bottom: 24px;
}

.facet-title {
  margin: 0 0 8px;
}

.facet-option {
  min-height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: var(--text-sm);
}

.facet-option input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent-highlight);
}

.facet-count {
  margin-left: auto;
  color: var(--text-ghost);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
}

.facet-dot,
.status-dot {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: var(--radius-full);
  background: var(--text-ghost);
}

.facet-dot.passed,
.status-dot.passed {
  background: var(--success);
}

.facet-dot.failed,
.status-dot.failed {
  background: var(--error);
}

.table-wrap {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: var(--text-sm);
}

.data-table th {
  height: 34px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  height: 46px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-table tbody tr {
  cursor: pointer;
  transition: background-color 120ms ease;
}

.data-table tbody tr:hover,
.data-table tbody tr.is-featured {
  background: var(--bg-hover);
}

.data-table tbody tr.is-new {
  background: var(--accent-highlight-muted);
}

.name-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.name-cell strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-list {
  color: var(--text-secondary);
}

.mono-cell {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.heatmap {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.heat-cell {
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: var(--border);
}

.heat-cell.passed {
  background: color-mix(in srgb, var(--success) 72%, transparent);
}

.heat-cell.failed {
  background: color-mix(in srgb, var(--error) 72%, transparent);
}

.row-actions {
  display: flex;
  justify-content: flex-end;
  gap: 2px;
  opacity: 0;
}

.data-table tr:hover .row-actions,
.row-actions:focus-within {
  opacity: 1;
}

.row-action {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.row-action:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.mobile-scenario-row,
.mobile-scenario-main {
  min-width: 0;
}

.editor-scroll,
.detail-scroll,
.report-scroll,
.assistant-scroll,
.live-scroll {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 24px 32px 48px;
}

.editor-header-meta {
  display: flex;
  align-items: center;
  gap: 6px;
}

.editor-form {
  max-width: 920px;
}

.editor-section {
  margin-bottom: 24px;
}

.editor-label {
  display: block;
  margin-bottom: 8px;
}

.editor-textarea {
  width: 100%;
  min-height: 76px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.editor-readonly {
  min-height: 76px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
  line-height: 1.55;
}

.precondition-list,
.step-list,
.gap-list,
.transition-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.precondition-row,
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-top: 1px solid var(--border-subtle);
}

.step-number {
  width: 24px;
  height: 24px;
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.step-copy {
  min-width: 0;
  flex: 1;
}

.step-copy strong {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
}

.step-expected {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.markdown-preview {
  min-height: 360px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.65;
  white-space: pre-wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 24px;
}

.detail-shot {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
  cursor: zoom-in;
}

.detail-shot img {
  width: 100%;
  max-height: 520px;
  display: block;
  object-fit: contain;
}

.detail-section {
  margin-bottom: 24px;
}

.detail-section h3 {
  margin: 0 0 8px;
  font-size: var(--text-sm);
  font-weight: 600;
}

.gap-row,
.transition-row {
  min-height: 44px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-subtle);
}

.gap-row.is-tappable {
  width: 100%;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.gap-row.is-tappable:hover {
  background: var(--bg-hover);
}

.gap-list > :first-child .gap-row,
.gap-list > .gap-row:first-child,
.transition-row:first-child {
  border-top: 1px solid var(--border);
}

.gap-icon {
  color: var(--warning);
}

.gap-copy {
  min-width: 0;
  flex: 1;
}

.gap-copy strong,
.gap-copy span {
  display: block;
}

.gap-copy strong {
  font-size: var(--text-sm);
}

.gap-copy span {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.assistant-scroll {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.assistant-empty {
  width: min(640px, 100%);
  margin: auto;
}

.assistant-empty h2 {
  margin: 0 0 6px;
  font-size: var(--text-xl);
}

.assistant-empty > p {
  margin: 0 0 20px;
  color: var(--text-secondary);
}

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

.prompt-card {
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease;
}

.prompt-card:hover {
  background: var(--bg-hover);
}

.prompt-card strong,
.prompt-card span {
  display: block;
}

.prompt-card strong {
  font-size: var(--text-sm);
}

.prompt-card span {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.chat-thread {
  width: min(760px, 100%);
  margin: 0 auto;
}

.chat-turn {
  margin-bottom: 24px;
}

.chat-turn-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.chat-avatar {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--accent-highlight-muted);
  color: var(--accent-highlight);
  font-size: var(--text-xxs);
  font-weight: 600;
}

.chat-time {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
}

.chat-body {
  margin-left: 30px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.chat-tool {
  margin: 12px 0 0 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.chat-tool-head {
  min-height: 32px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.chat-tool-body {
  padding: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.composer {
  min-height: 68px;
  padding: 10px 32px 16px;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  flex: none;
  border-top: 1px solid var(--border);
}

.composer textarea {
  min-height: 40px;
  max-height: 100px;
  flex: 1;
  resize: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 12px;
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: var(--text-sm);
}

.runs-layout {
  grid-template-columns: 1fr;
}

.runs-layout .data-table th:nth-child(1) { width: 30%; }
.runs-layout .data-table th:nth-child(2) { width: 12%; }
.runs-layout .data-table th:nth-child(3) { width: 14%; }
.runs-layout .data-table th:nth-child(4) { width: 14%; }
.runs-layout .data-table th:nth-child(5) { width: 10%; }
.runs-layout .data-table th:nth-child(6) { width: 10%; }
.runs-layout .data-table th:nth-child(7) { width: 10%; }

.live-status {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.live-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: var(--radius-full);
  background: var(--accent-highlight);
}

.live-elapsed {
  margin-left: auto;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.progress-track {
  height: 3px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--border);
}

.progress-fill {
  height: 100%;
  background: var(--accent-highlight);
  transition: width 220ms var(--ease-out-expo);
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(220px, 340px) minmax(0, 1fr);
  gap: 24px;
  margin-top: 20px;
}

.live-device {
  align-self: start;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-tertiary);
}

.live-device img {
  width: 100%;
  display: block;
}

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.timeline-step {
  min-height: 74px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 12px;
  position: relative;
  padding-bottom: 16px;
}

.timeline-step:not(:last-child)::before {
  content: "";
  width: 1px;
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  background: var(--border);
}

.timeline-icon {
  width: 28px;
  height: 28px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: var(--bg-primary);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.timeline-step.is-done .timeline-icon {
  color: var(--success);
  background: var(--success-bg);
  border-color: transparent;
}

.timeline-step.is-running .timeline-icon {
  color: var(--accent-highlight);
  background: var(--accent-highlight-muted);
  border-color: transparent;
}

.timeline-step.is-failed .timeline-icon {
  color: var(--error);
  background: var(--error-bg);
  border-color: transparent;
}

.timeline-step.is-running .timeline-icon svg {
  animation: spin 800ms linear infinite;
}

.timeline-copy {
  min-width: 0;
  padding-top: 4px;
}

.timeline-copy strong {
  font-size: var(--text-sm);
  font-weight: 600;
}

.timeline-copy p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.report-title {
  margin-bottom: 16px;
}

.report-title h1 {
  margin: 4px 0 0;
  font-size: 24px;
  line-height: 1.2;
}

.report-inner {
  width: min(1040px, 100%);
}

.verdict {
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

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

.verdict-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  border: 1px solid color-mix(in srgb, var(--error) 32%, var(--border));
  background: var(--bg-primary);
  color: var(--error);
}

.verdict-label {
  color: var(--text-primary);
  font-size: var(--text-md);
  font-weight: 600;
}

.verdict-copy {
  min-width: 150px;
  display: flex;
  flex-direction: column;
}

.verdict.is-passed .verdict-icon {
  border-color: color-mix(in srgb, var(--success) 32%, var(--border));
  color: var(--success);
}

.verdict-copy > span:last-child {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.verdict-stats {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.verdict-stats span {
  white-space: nowrap;
}

.verdict-stats strong {
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-weight: 600;
}

.environment {
  min-height: 46px;
  margin-bottom: 20px;
  padding: 7px 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
}

.environment-item {
  min-width: 0;
  padding: 0 14px;
  border-left: 1px solid var(--border-subtle);
}

.environment-item:first-child {
  padding-left: 0;
  border-left: 0;
}

.environment-item > span,
.environment-item > strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.environment-item > span {
  color: var(--text-muted);
  font-size: var(--text-xxs);
}

.environment-item > strong {
  margin-top: 2px;
  font-size: var(--text-xs);
  font-weight: 600;
}

.failure-focus {
  margin-bottom: 20px;
  padding: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 24px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--error);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
}

.failure-heading {
  display: flex;
  align-items: center;
  gap: 7px;
}

.failure-heading .report-kicker {
  margin-right: auto;
}

.failure-copy h2 {
  margin: 14px 0 5px;
  font-size: var(--text-xl);
  line-height: 1.25;
}

.failure-copy > p {
  max-width: 650px;
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.55;
}

.evidence-comparison {
  margin: 18px 0 0;
  border-top: 1px solid var(--border);
}

.evidence-comparison > div {
  min-height: 52px;
  padding: 9px 0;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 14px;
  align-items: baseline;
  border-bottom: 1px solid var(--border-subtle);
}

.evidence-comparison > div.is-observed {
  border-bottom: 0;
}

.evidence-comparison dt {
  color: var(--text-muted);
  font-size: var(--text-xxs);
  font-weight: 600;
  text-transform: uppercase;
}

.evidence-comparison dd {
  margin: 0;
  font-size: var(--text-sm);
}

.failure-visual {
  width: 260px;
  margin: 0;
}

.failure-visual figcaption {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: var(--text-xxs);
  text-align: center;
}

.report-section-head {
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-section-head > span {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
}

.report-artifacts {
  margin-bottom: 20px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.report-artifact {
  min-width: 0;
  min-height: 54px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background-color 120ms ease;
}

.report-artifact + .report-artifact {
  border-left: 1px solid var(--border);
}

.report-artifact:hover {
  background: var(--bg-hover);
}

.report-artifact-icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

.report-artifact-copy {
  min-width: 0;
  flex: 1;
}

.report-artifact-copy strong,
.report-artifact-copy small {
  display: block;
}

.report-artifact-copy strong {
  font-size: var(--text-xs);
}

.report-artifact-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-xxs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-artifact-action {
  flex: none;
  color: var(--accent-highlight);
  font-size: var(--text-xxs);
  font-weight: 600;
}

.report-steps {
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  list-style: none;
}

.report-step {
  min-height: 52px;
  padding: 0 12px;
  display: grid;
  grid-template-columns: 20px 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-primary);
}

.report-step:last-child {
  border-bottom: 0;
}

.report-step.is-failed {
  background: color-mix(in srgb, var(--error) 3%, var(--bg-primary));
}

.report-step-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  color: var(--success);
}

.report-step.is-failed .report-step-icon {
  color: var(--error);
}

.report-step.is-skipped .report-step-icon,
.report-step.is-skipped .report-step-title,
.report-step.is-skipped .report-step-state {
  color: var(--text-muted);
}

.report-step-number {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: var(--text-xxs);
}

.report-step-title {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-size: var(--text-sm);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-step-copy {
  min-width: 0;
}

.report-step-result {
  margin-top: 2px;
  display: block;
  overflow: hidden;
  color: var(--text-muted);
  font-size: var(--text-xxs);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-step-state {
  color: var(--text-muted);
  font-size: var(--text-xxs);
}

.report-shot {
  width: 100%;
  height: 210px;
  position: relative;
  padding: 0;
  display: block;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  cursor: zoom-in;
}

.report-shot img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center 45%;
}

.report-shot-edit-reset img {
  object-position: center 48%;
}

.report-shot-approval-failed img {
  object-position: center 30%;
}

.report-shot-action {
  min-height: 26px;
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  background: rgba(0, 0, 0, 0.76);
  color: #fff;
  font-size: var(--text-xxs);
  font-weight: 600;
}

.app-footer {
  height: var(--footer-height);
  flex: none;
  padding: 0 16px;
  display: flex;
  align-items: center;
  border-top: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-secondary);
  font-size: var(--text-xs);
}

.footer-spacer {
  flex: 1;
}

.footer-mock {
  margin-right: 16px;
  color: var(--accent-highlight);
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(12px) saturate(150%);
  -webkit-backdrop-filter: blur(12px) saturate(150%);
  opacity: 0;
  transition: opacity 260ms var(--ease-out-expo);
}

[data-theme="light"] .backdrop {
  background: rgba(220, 220, 220, 0.5);
}

.backdrop.is-open {
  opacity: 1;
}

.dialog {
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  box-shadow: var(--shadow-overlay);
  opacity: 0;
  transform: translateY(-16px) scale(0.94);
  transition: opacity 260ms var(--ease-out-expo), transform 340ms var(--ease-spring);
}

.backdrop.is-open .dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.dialog-header,
.dialog-footer {
  min-height: 52px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-header {
  border-bottom: 1px solid var(--border);
}

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

.dialog-title strong,
.dialog-title span {
  display: block;
}

.dialog-title strong {
  font-size: var(--text-md);
}

.dialog-title span {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.dialog-body {
  padding: 16px;
}

.dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}

.draft-preview {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.draft-preview h3 {
  margin: 0 0 6px;
  font-size: var(--text-md);
}

.draft-preview p {
  margin: 0 0 12px;
  color: var(--text-secondary);
}

.draft-preview ol {
  margin: 0;
  padding-left: 20px;
}

.draft-preview li {
  margin: 6px 0;
}

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

.option-row {
  min-height: 52px;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  cursor: pointer;
}

.option-row.is-selected {
  border-color: var(--accent-highlight);
  background: var(--accent-highlight-muted);
}

.option-row input {
  accent-color: var(--accent-highlight);
}

.option-copy strong,
.option-copy span {
  display: block;
}

.option-copy strong {
  font-size: var(--text-sm);
}

.option-copy span {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.lightbox .dialog {
  width: min(520px, 100%);
  overflow: hidden;
}

.lightbox-image {
  width: 100%;
  max-height: 75vh;
  display: block;
  object-fit: contain;
  background: #eef0f3;
}

.toast {
  min-width: 300px;
  max-width: calc(100vw - 32px);
  position: fixed;
  right: 16px;
  bottom: 44px;
  z-index: 300;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-primary);
  box-shadow: var(--shadow-overlay);
  animation: toast-in 260ms var(--ease-apple) both;
}

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

.toast span {
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.toast .btn-icon {
  margin-left: auto;
}

.concept-body {
  min-height: 100%;
  overflow: auto;
  background: #000;
  color: #fff;
}

.concept-page {
  width: min(1500px, 100%);
  margin: 0 auto;
  padding: 32px;
}

.concept-header {
  min-height: 128px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #1e1e1e;
}

.concept-eyebrow,
.concept-kicker {
  margin: 0 0 8px;
  color: #777;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.concept-header h1 {
  margin: 0;
  font-size: 44px;
  line-height: 1.08;
}

.concept-lede {
  margin: 12px 0 0;
  color: #aaa;
  font-size: 14px;
}

.concept-tabs {
  display: inline-flex;
  padding: 2px;
  border: 1px solid #1e1e1e;
  border-radius: var(--radius-lg);
  background: #0f0f0f;
}

.concept-tabs button {
  height: 28px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--radius-md);
  background: transparent;
  color: #aaa;
  cursor: pointer;
}

.concept-tabs button[aria-selected="true"] {
  background: #ededed;
  color: #000;
}

.concept-summary {
  min-height: 116px;
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(280px, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 20px 0;
}

.concept-summary h2 {
  margin: 0;
  font-size: var(--text-xl);
}

.concept-summary p {
  margin: 0;
  color: #aaa;
}

.concept-open {
  height: 32px;
  padding: 0 16px;
  background: #ededed;
  border-color: #ededed;
  color: #000;
}

.concept-frame-wrap {
  height: min(760px, calc(100vh - 170px));
  min-height: 560px;
  overflow: hidden;
  border: 1px solid #1e1e1e;
  border-radius: var(--radius-lg);
  background: #fff;
}

.concept-frame {
  width: 100%;
  height: 100%;
  display: block;
  border: 0;
}

.concept-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 32px;
  border-top: 1px solid #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
}

.concept-notes > div {
  min-height: 160px;
  padding: 24px;
  border-right: 1px solid #1e1e1e;
}

.concept-notes > div:last-child {
  border-right: 0;
}

.concept-notes h3 {
  margin: 0 0 8px;
  font-size: var(--text-lg);
}

.concept-notes p {
  margin: 0;
  color: #aaa;
}

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

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: no-preference) {
  .pulse-dot {
    animation: pulse 1.6s ease-in-out infinite;
  }
}

@media (max-width: 980px) {
  .view-header,
  .toolbar {
    padding-left: 20px;
    padding-right: 20px;
  }

  .map-stats {
    margin-left: 20px;
    margin-right: 20px;
  }

  .map-body,
  .editor-scroll,
  .detail-scroll,
  .report-scroll,
  .assistant-scroll,
  .live-scroll,
  .demo-intro-scroll {
    padding-left: 20px;
    padding-right: 20px;
  }

  .scenario-layout {
    grid-template-columns: 164px minmax(0, 1fr);
  }

  .prompt-grid {
    grid-template-columns: 1fr;
  }

  .concept-summary {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .concept-notes {
    grid-template-columns: 1fr;
  }

  .concept-notes > div {
    border-right: 0;
    border-bottom: 1px solid #1e1e1e;
  }

  .concept-notes > div:last-child {
    border-bottom: 0;
  }
}

@media (min-width: 769px) and (max-width: 1240px) {
  .view-header:not(.lateral-header) {
    min-height: auto;
    padding-top: 6px;
    padding-bottom: 6px;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .view-header:not(.lateral-header) > .view-title {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 4px;
  }

  .view-header:not(.lateral-header) > .view-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .failure-focus {
    grid-template-columns: 1fr;
  }

  .failure-visual {
    width: min(360px, 100%);
  }

  .report-shot {
    height: 230px;
  }
}

@media (max-width: 768px) {
  .backdrop {
    padding: 0;
    align-items: flex-end;
  }

  .backdrop.lightbox {
    padding: 16px;
    align-items: center;
  }

  .map-update-note {
    margin-right: 12px;
    margin-left: 12px;
  }

  .dialog {
    width: 100%;
    max-height: calc(100% - 56px);
    min-height: 0;
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    transform: translateY(40px);
  }

  .lightbox .dialog {
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
  }

  .backdrop:not(.lightbox) .dialog {
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .backdrop:not(.lightbox) .dialog-body {
    min-height: 0;
    flex: 1;
    overflow-y: auto;
  }

  .backdrop:not(.lightbox) .dialog-footer {
    flex: none;
    background: var(--bg-primary);
  }

  .lightbox .dialog {
    width: 100%;
  }

  .mobile-topbar {
    height: var(--topbar-height);
    flex: none;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-primary);
  }

  .mobile-menu {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: var(--radius-md);
    background: transparent;
    cursor: pointer;
  }

  .mobile-menu:hover {
    background: var(--bg-hover);
  }

  .mobile-title {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sidebar {
    width: var(--sidebar-drawer-width);
    position: absolute;
    inset: 0 auto 0 0;
    z-index: 102;
    transform: translateX(-100%);
    box-shadow: var(--shadow-overlay);
    transition: transform 340ms var(--ease-apple);
  }

  .app-shell.is-sidebar-collapsed .sidebar {
    width: var(--sidebar-drawer-width);
    flex-basis: var(--sidebar-drawer-width);
  }

  .app-shell.is-sidebar-collapsed .app-picker-row {
    padding: 10px 12px;
    flex-direction: row;
    gap: 6px;
  }

  .app-shell.is-sidebar-collapsed .app-picker {
    width: auto;
    flex: 1;
    justify-content: flex-start;
    padding: 0 8px;
  }

  .app-shell.is-sidebar-collapsed .app-picker-label,
  .app-shell.is-sidebar-collapsed .app-picker .lucide-chevron-down,
  .app-shell.is-sidebar-collapsed .nav-label,
  .app-shell.is-sidebar-collapsed .nav-item-count,
  .app-shell.is-sidebar-collapsed .device-copy,
  .app-shell.is-sidebar-collapsed .sidebar-brand span {
    display: initial;
  }

  .app-shell.is-sidebar-collapsed .sidebar-section-label {
    display: block;
  }

  .app-shell.is-sidebar-collapsed .sidebar-nav {
    padding: 8px;
  }

  .app-shell.is-sidebar-collapsed .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 0 12px;
  }

  .app-shell.is-sidebar-collapsed .sidebar-device,
  .app-shell.is-sidebar-collapsed .sidebar-brand {
    justify-content: flex-start;
    padding-left: 16px;
    padding-right: 16px;
  }

  .app-shell.is-menu-open .sidebar {
    transform: translateX(0);
  }

  .mobile-backdrop {
    position: absolute;
    inset: 0;
    z-index: 101;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px) saturate(150%);
    -webkit-backdrop-filter: blur(12px) saturate(150%);
    opacity: 0;
    pointer-events: none;
    transition: opacity 260ms var(--ease-out-expo);
  }

  .app-shell.is-menu-open .mobile-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-collapse {
    display: none;
  }

  .app-footer {
    display: none;
  }

  .view-header {
    min-height: 48px;
    padding: 6px 12px;
    flex-wrap: wrap;
  }

  .lateral-header {
    min-height: 46px;
    justify-content: flex-end;
  }

  .lateral-header .view-title {
    display: none;
  }

  .view-header:not(.lateral-header) {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
  }

  .view-header:not(.lateral-header) > .view-title {
    grid-column: 1 / -1;
    grid-row: 2;
    padding: 2px 0 4px;
  }

  .view-header:not(.lateral-header) > .view-actions {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  .view-actions {
    gap: 4px;
  }

  .view-subtitle,
  .view-actions .optional-action {
    display: none;
  }

  .view-header [data-action="toggle-theme"] {
    display: none;
  }

  .toolbar {
    min-height: 44px;
    padding: 8px 12px;
    overflow-x: auto;
  }

  .toolbar-count {
    display: none;
  }

  .map-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 10px 12px 0;
  }

  .map-body {
    padding: 0 12px 12px;
  }

  .map-footnote {
    display: none;
  }

  .flow-canvas {
    min-height: 300px;
  }

  .scenario-layout {
    display: none;
  }

  .facet-rail {
    display: none;
  }

  .mobile-scenario-list {
    min-height: 0;
    flex: 1;
    display: block;
    overflow-y: auto;
  }

  .runs-layout {
    display: none;
  }

  .mobile-run-list {
    min-height: 0;
    flex: 1;
    display: block;
    overflow-y: auto;
  }

  .mobile-run-row {
    width: 100%;
    min-height: 72px;
    padding: 10px 12px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 8px;
    border: 0;
    border-bottom: 1px solid var(--border-subtle);
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
  }

  .mobile-run-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .mobile-run-title strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-run-meta {
    grid-column: 1;
    overflow: hidden;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-run-row > .lucide {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .mobile-scenario-row {
    min-height: 86px;
    padding: 10px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-subtle);
  }

  .mobile-scenario-row.is-new {
    background: var(--accent-highlight-muted);
  }

  .mobile-scenario-main {
    flex: 1;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    text-align: left;
  }

  .mobile-scenario-main .name-cell {
    margin-bottom: 5px;
  }

  .mobile-scenario-meta {
    display: block;
    margin-bottom: 6px;
    overflow: hidden;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .editor-scroll,
  .detail-scroll,
  .report-scroll,
  .assistant-scroll,
  .live-scroll {
    padding: 16px 12px 32px;
  }

  .demo-intro-view .view-header {
    display: none;
  }

  .demo-intro-scroll {
    padding: 12px 12px 24px;
  }

  .detail-grid,
  .live-grid,
  .evidence-grid {
    grid-template-columns: 1fr;
  }

  .failure-focus {
    padding: 14px;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .failure-heading {
    flex-wrap: wrap;
  }

  .failure-heading .report-kicker {
    width: 100%;
  }

  .failure-visual {
    width: 100%;
    justify-self: start;
  }

  .report-shot {
    width: 100%;
    height: 220px;
  }

  .detail-shot {
    max-width: 360px;
  }

  .live-device {
    order: 2;
    max-width: 180px;
    margin: 0 auto;
  }

  .evidence-grid,
  .report-shot {
    margin-left: 0;
  }

  .verdict-row,
  .verdict-stats {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .verdict-stats {
    width: 100%;
    margin-left: 0;
    gap: 12px 18px;
  }

  .composer {
    padding: 8px 12px 12px;
  }

  .dialog-options {
    grid-template-columns: 1fr;
  }

  .concept-page {
    padding: 20px 12px;
  }

  .concept-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .concept-header h1 {
    font-size: 32px;
  }

  .concept-frame-wrap {
    height: 660px;
    min-height: 0;
  }
}

@media (max-width: 480px) {
	.report-artifacts {
		grid-template-columns: 1fr;
	}

	.report-artifact + .report-artifact {
		border-top: 1px solid var(--border);
		border-left: 0;
	}

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

  .environment-item {
    min-height: 46px;
    padding: 7px 10px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .environment-item:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
  }

  .environment-item:nth-child(n + 3) {
    border-top: 1px solid var(--border-subtle);
  }

  .evidence-comparison > div {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 8px;
  }
}

@media (max-width: 340px) {
  .view-header:not(.lateral-header) {
    grid-template-columns: 1fr;
  }

  .view-header:not(.lateral-header) > .view-actions {
    width: 100%;
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .view-header:not(.lateral-header) > .view-title {
    grid-column: 1;
    grid-row: 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}
