/* AgentSafety-72 Attack Browser — Office 2026 light */

#agent-safety-browser-demo {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
}

.as-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.as-search {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
}
.as-search:focus { outline: none; border-color: var(--accent); box-shadow: var(--shadow-accent); }

.as-select {
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--text);
  cursor: pointer;
}

.as-btn {
  background: var(--accent);
  color: white;
  border: 0;
  padding: 0.55rem 1rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}
.as-btn:hover { background: var(--accent-hover); }
.as-btn.as-btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.as-btn.as-btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

.as-layout {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 900px) { .as-layout { grid-template-columns: 1fr; } }

.as-grid-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.as-grid-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 0.875rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-muted);
}
.as-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.5rem;
  padding: 0.75rem;
  max-height: 28rem;
  overflow-y: auto;
}
.as-cell {
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.625rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  transition: all 0.12s;
}
.as-cell:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.as-cell.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--shadow-2);
}
.as-cell-id {
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: 0.6px;
}
.as-cell-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.25;
}

.as-detail {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.as-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.as-detail-title-block {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}
.as-detail-id {
  font-family: ui-monospace, monospace;
  font-size: 0.6875rem;
  letter-spacing: 1.2px;
  color: var(--accent);
  font-weight: 700;
}
.as-detail-name {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.as-verdict {
  font-family: ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 1.2px;
  font-weight: 700;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  text-transform: uppercase;
}
.as-verdict.held { background: var(--success-bg); color: var(--success); }
.as-verdict.broken { background: var(--critical-bg); color: var(--critical); }

.as-kv {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.4rem 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  line-height: 1.45;
}
.as-kv .k { color: var(--text-muted); }
.as-kv .v { color: var(--text); word-break: break-word; }
.as-kv .v.accent { color: var(--accent-deep); font-weight: 600; }

.as-measured {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.75rem 0.875rem;
  font-family: ui-monospace, monospace;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.as-measured .label { color: var(--text-muted); }

.as-detail-summary {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 0.75rem 0.875rem;
  background: var(--bg-page);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.as-progress {
  height: 4px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
  width: 100%;
  margin-top: 0.25rem;
}
.as-progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.3s linear;
}

.as-sweep-status {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: ui-monospace, monospace;
}
