:root {
  color-scheme: dark;
  --bg: #071019;
  --bg-elevated: #0c151f;
  --bg-soft: #111d28;
  --bg-hover: #152331;
  --line: rgba(226, 232, 240, 0.09);
  --line-strong: rgba(226, 232, 240, 0.15);
  --text: #e8eef5;
  --muted: #8a9aac;
  --muted-2: #607184;
  --cyan: #67e8f9;
  --cyan-soft: rgba(103, 232, 249, 0.09);
  --green: #6ee7b7;
  --amber: #fcd34d;
  --red: #f87171;
  --blue: #7dd3fc;
  --radius: 10px;
  --shadow: 0 22px 65px rgba(0, 0, 0, 0.24);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    radial-gradient(circle at 78% 0%, rgba(34, 211, 238, 0.075), transparent 30rem),
    var(--bg);
  background-size: 36px 36px, 36px 36px, auto, auto;
  line-height: 1.5;
}

button,
input,
select {
  font: inherit;
}

button,
a,
input,
select,
summary {
  outline: none;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

a {
  color: inherit;
  text-decoration: none;
}

code,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

code {
  overflow-wrap: anywhere;
  color: #c8d7e6;
  font-size: 0.84rem;
}

::selection {
  color: #f8fafc;
  background: rgba(103, 232, 249, 0.28);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.mobile-only {
  display: none !important;
}

.topbar {
  position: sticky;
  z-index: 50;
  top: 0;
  height: 64px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 16, 25, 0.92);
  backdrop-filter: blur(18px);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100%, 1600px);
  height: 100%;
  padding: 0 28px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 11px;
}

.brand-mark {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(103, 232, 249, 0.24);
  border-radius: 9px;
  color: var(--cyan);
  background: rgba(103, 232, 249, 0.075);
  box-shadow: inset 0 0 24px rgba(103, 232, 249, 0.035);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

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

.brand strong {
  font-size: 0.9rem;
  letter-spacing: 0.01em;
}

.brand small {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.topbar__actions,
.inline-form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.button,
.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 120ms ease;
}

.button {
  min-height: 38px;
  gap: 8px;
  padding: 8px 14px;
  font-size: 0.84rem;
  font-weight: 700;
}

.button:active,
.icon-button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button--primary {
  color: #061117;
  background: var(--cyan);
}

.button--primary:hover:not(:disabled) {
  background: #a5f3fc;
}

.button--secondary {
  border-color: rgba(103, 232, 249, 0.22);
  color: #bdf5fb;
  background: rgba(103, 232, 249, 0.055);
}

.button--secondary:hover:not(:disabled) {
  border-color: rgba(103, 232, 249, 0.36);
  background: rgba(103, 232, 249, 0.1);
}

.button--ghost {
  color: var(--muted);
  background: transparent;
}

.button--ghost:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.button--full {
  width: 100%;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-color: var(--line);
  color: var(--muted);
  background: transparent;
  font-size: 1.15rem;
}

.icon-button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.045);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  gap: 7px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.74rem;
  font-weight: 650;
}

.status-pill--ok {
  border-color: rgba(110, 231, 183, 0.2);
  color: var(--green);
  background: rgba(110, 231, 183, 0.055);
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #526170;
}

.status-pill--ok .status-dot,
.status-dot--ok {
  background: var(--green);
  box-shadow: 0 0 9px rgba(110, 231, 183, 0.75);
}

.app-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  width: min(100%, 1600px);
  min-height: calc(100vh - 64px);
  margin: 0 auto;
}

.sidebar {
  position: sticky;
  top: 64px;
  height: calc(100vh - 64px);
  padding: 24px 16px;
  border-right: 1px solid var(--line);
}

.sidebar nav {
  display: grid;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  min-height: 42px;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted-2);
  font-size: 0.86rem;
  font-weight: 580;
  transition: color 150ms ease, background 150ms ease;
}

.nav-link span {
  width: 18px;
  color: #75889a;
  font-family: "SFMono-Regular", Consolas, monospace;
  text-align: center;
}

.nav-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.035);
}

.nav-link--active {
  color: #bdf5fb;
  background: var(--cyan-soft);
}

.nav-link--active span {
  color: var(--cyan);
}

.sidebar__policy {
  display: grid;
  gap: 11px;
  padding: 22px 12px 0;
  margin-top: 34px;
  border-top: 1px solid var(--line);
}

.sidebar__policy p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-2);
  font-size: 0.75rem;
}

.sidebar__policy .sidebar__label {
  margin-bottom: 3px;
  color: #506173;
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.policy-icon {
  width: 14px;
  color: #7d8c9d;
  text-align: center;
}

.policy-icon--ok {
  color: var(--green);
}

.content {
  min-width: 0;
  padding: 30px 28px 56px;
}

.page-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 24px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--cyan);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(103, 232, 249, 0.75);
}

.page-heading h1 {
  margin: 0;
  color: #f2f7fb;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.page-heading > div > p:last-child {
  max-width: 750px;
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.run-meta {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding-bottom: 4px;
  color: var(--muted-2);
  font-size: 0.74rem;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  position: relative;
  min-height: 142px;
  padding: 19px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.045);
  border-radius: var(--radius);
  background: rgba(17, 25, 35, 0.88);
}

.metric::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, var(--metric-color), transparent);
  opacity: 0.42;
}

.metric--critical { --metric-color: var(--red); }
.metric--warning { --metric-color: var(--amber); }
.metric--signal { --metric-color: var(--cyan); }
.metric--safe { --metric-color: var(--green); }

.metric__icon {
  display: grid;
  position: absolute;
  top: 17px;
  right: 17px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--metric-color) 25%, transparent);
  border-radius: 7px;
  color: var(--metric-color);
  background: color-mix(in srgb, var(--metric-color) 7%, transparent);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 800;
}

.metric p {
  padding-right: 30px;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.metric strong {
  display: block;
  margin-top: 12px;
  color: #f4f8fb;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.08em;
}

.metric small {
  display: block;
  margin-top: 9px;
  color: #526577;
  font-size: 0.72rem;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  align-items: start;
  gap: 18px;
}

.dashboard-main,
.dashboard-side {
  display: grid;
  min-width: 0;
  gap: 18px;
}

.dashboard-side {
  position: sticky;
  top: 82px;
}

.panel,
.empty-state,
.priority-banner,
.notice {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(12, 21, 31, 0.92);
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
}

.panel__header--wrap {
  align-items: center;
  flex-wrap: wrap;
}

.panel__header h2 {
  margin: 0;
  color: #e9f0f6;
  font-size: 0.96rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.panel__header h2 span {
  margin-right: 5px;
  color: var(--cyan);
}

.panel__header p {
  margin: 3px 0 0;
  color: var(--muted-2);
  font-size: 0.74rem;
}

.priority-banner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  padding: 17px 18px;
  border-color: rgba(248, 113, 113, 0.18);
  background: linear-gradient(90deg, rgba(248, 113, 113, 0.095), rgba(12, 21, 31, 0.82) 70%);
}

.priority-banner__mark {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  margin-top: 2px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 50%;
  color: var(--red);
  background: rgba(248, 113, 113, 0.08);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 800;
}

.priority-banner p,
.priority-banner h2,
.priority-banner span {
  margin: 0;
}

.priority-banner p {
  color: var(--red);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.09em;
}

.priority-banner h2 {
  margin-top: 3px;
  font-size: 0.96rem;
}

.priority-banner span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, auto));
  align-items: center;
  gap: 8px;
  padding: 18px;
  overflow-x: auto;
}

.flow__step {
  min-width: 145px;
  min-height: 83px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg-soft);
}

.flow__step small,
.flow__step strong {
  display: block;
}

.flow__step small {
  color: #53687b;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.flow__step strong {
  margin-top: 9px;
  color: #dce7f0;
  font-size: 0.78rem;
  font-weight: 650;
}

.flow__arrow {
  color: #405466;
  font-size: 1.3rem;
}

.evidence,
.severity,
.module-label,
.priority-tag,
.model-label,
.live-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: 0.035em;
}

.evidence--confirmed {
  border-color: rgba(110, 231, 183, 0.2);
  color: var(--green);
  background: rgba(110, 231, 183, 0.055);
}

.evidence--strongly_indicated {
  border-color: rgba(252, 211, 77, 0.2);
  color: var(--amber);
  background: rgba(252, 211, 77, 0.055);
}

.evidence--hypothesis {
  border-color: rgba(125, 211, 252, 0.2);
  color: var(--blue);
  background: rgba(125, 211, 252, 0.055);
}

.severity--critical {
  border-color: rgba(248, 113, 113, 0.22);
  color: #fca5a5;
  background: rgba(248, 113, 113, 0.07);
}

.severity--high {
  border-color: rgba(252, 211, 77, 0.22);
  color: #fde68a;
  background: rgba(252, 211, 77, 0.065);
}

.severity--medium {
  border-color: rgba(125, 211, 252, 0.22);
  color: #bae6fd;
  background: rgba(125, 211, 252, 0.065);
}

.severity--low,
.severity--info,
.severity--informational {
  color: #94a3b8;
  background: rgba(148, 163, 184, 0.05);
}

.module-label {
  border-radius: 5px;
  color: #8194a6;
  background: rgba(255, 255, 255, 0.025);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-weight: 500;
}

.filters {
  display: flex;
  gap: 8px;
}

.filters input,
.filters select,
.auth-form input {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  color: var(--text);
  background: #09131d;
  font-size: 0.78rem;
}

.filters input {
  width: 190px;
  padding: 7px 10px;
}

.filters select {
  padding: 7px 30px 7px 10px;
}

.filters input::placeholder {
  color: #536477;
}

.table-wrap {
  overflow-x: auto;
}

.findings-table {
  width: 100%;
  min-width: 780px;
  border-collapse: collapse;
  font-size: 0.78rem;
}

.findings-table th,
.findings-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  text-align: left;
}

.findings-table th {
  color: #536477;
  font-size: 0.65rem;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.findings-table tr:last-child td {
  border-bottom: 0;
}

.findings-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.018);
}

.finding-detail summary {
  max-width: 430px;
  color: #dce7f0;
  cursor: pointer;
  font-size: 0.81rem;
  font-weight: 620;
}

.finding-detail summary::marker,
.scenario summary::marker {
  color: var(--cyan);
}

.finding-detail__body {
  max-width: 620px;
  padding: 12px 0 3px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.6;
}

.finding-detail__body p,
.finding-detail__body ul {
  margin: 0 0 8px;
}

.finding-detail__body ul {
  padding-left: 18px;
}

.muted {
  color: var(--muted-2);
}

.panel-empty,
.filter-empty {
  padding: 24px 18px;
  margin: 0;
  color: var(--muted-2);
  font-size: 0.8rem;
}

.module-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
}

.module-card {
  min-height: 128px;
  padding: 16px 17px;
  background: var(--bg-elevated);
}

.module-card__id {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.63rem;
  letter-spacing: 0.04em;
}

.module-card h3 {
  margin: 8px 0 5px;
  color: #dfe9f1;
  font-size: 0.83rem;
}

.module-card p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.74rem;
  line-height: 1.55;
}

.scenario-list {
  display: grid;
}

.scenario {
  border-bottom: 1px solid var(--line);
}

.scenario:last-child {
  border-bottom: 0;
}

.scenario summary {
  display: grid;
  grid-template-columns: 70px 1fr auto;
  align-items: center;
  gap: 12px;
  min-height: 53px;
  padding: 10px 18px;
  cursor: pointer;
  list-style: none;
}

.scenario summary::-webkit-details-marker {
  display: none;
}

.scenario summary:hover {
  background: rgba(255, 255, 255, 0.02);
}

.scenario__id {
  color: var(--cyan);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.7rem;
}

.scenario summary strong {
  font-size: 0.8rem;
  font-weight: 620;
}

.scenario__summary-state {
  display: block;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 0.66rem;
  font-weight: 520;
}

.scenario__summary-state--confirmed,
.scenario__summary-state--exposure {
  color: var(--amber);
}

.scenario__summary-state--indicators,
.scenario__summary-state--failed {
  color: var(--red);
}

.scenario__summary-state--no_evidence {
  color: var(--green);
}

.priority-tag {
  color: var(--amber);
  background: rgba(252, 211, 77, 0.05);
}

.scenario__body {
  padding: 0 18px 16px 100px;
  color: var(--muted);
  font-size: 0.75rem;
}

.scenario__body p {
  margin: 7px 0 0;
}

.scenario-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 13px;
  margin: 2px 0 10px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--muted-2);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.018);
}

.scenario-result > div strong,
.scenario-result > div span {
  display: block;
}

.scenario-result > div span {
  margin-top: 2px;
  color: var(--muted);
}

.scenario-result > b {
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.67rem;
  white-space: nowrap;
}

.scenario-result--confirmed,
.scenario-result--exposure {
  border-left-color: var(--amber);
}

.scenario-result--indicators,
.scenario-result--failed {
  border-left-color: var(--red);
}

.scenario-result--no_evidence {
  border-left-color: var(--green);
}

.scenario-gaps {
  padding: 10px 13px;
  margin-bottom: 10px;
  border: 1px solid rgba(252, 211, 77, 0.18);
  border-radius: 7px;
  color: #d8c88a;
  background: rgba(252, 211, 77, 0.045);
}

.scenario-gaps ul {
  padding-left: 18px;
  margin: 5px 0 0;
}

.scenario-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.scenario-module {
  display: inline-flex;
  gap: 6px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-2);
  background: var(--bg-soft);
  font-size: 0.65rem;
}

.scenario-module--completed {
  color: var(--green);
}

.scenario-module--failed {
  color: var(--red);
}

.scenario-module-error {
  align-self: center;
  color: var(--red);
}

.scenario-chain {
  display: grid;
  gap: 7px;
  padding: 0;
  margin: 12px 0;
  list-style: none;
}

.scenario-stage {
  display: grid;
  grid-template-columns: 25px minmax(0, 1fr);
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.012);
}

.scenario-stage__mark {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
}

.scenario-stage--observed .scenario-stage__mark {
  border-color: rgba(252, 211, 77, 0.28);
  color: var(--amber);
  background: rgba(252, 211, 77, 0.06);
}

.scenario-stage > div > strong {
  color: #dce7f0;
  font-size: 0.75rem;
}

.scenario-stage > div > p {
  color: var(--muted-2);
}

.scenario-evidence-list {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.scenario-evidence {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #09131d;
}

.scenario-evidence > div {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 6px;
}

.scenario-evidence > strong,
.scenario-evidence > code,
.scenario-evidence > time {
  display: block;
}

.scenario-evidence > p {
  margin: 3px 0 5px;
}

.scenario-evidence > time {
  margin-top: 4px;
  color: var(--muted-2);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.64rem;
}

.event-panel {
  max-height: 520px;
}

.event-list {
  max-height: 438px;
  padding: 3px 18px 8px;
  overflow-y: auto;
}

.event {
  display: grid;
  grid-template-columns: 57px 10px minmax(0, 1fr);
  gap: 9px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.event:last-child {
  border-bottom: 0;
}

.event time {
  padding-top: 1px;
  color: #506275;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
}

.event__dot {
  width: 7px;
  height: 7px;
  margin-top: 5px;
  border-radius: 50%;
  background: #64748b;
}

.event__dot--critical { background: var(--red); box-shadow: 0 0 9px rgba(248, 113, 113, 0.72); }
.event__dot--high { background: var(--amber); }
.event__dot--medium { background: var(--blue); }
.event__dot--low { background: var(--green); }
.event__dot--info { background: var(--cyan); }

.event strong,
.event p,
.event small {
  display: block;
  margin: 0;
}

.event strong {
  color: #d9e5ee;
  font-size: 0.78rem;
  font-weight: 620;
}

.event p {
  margin-top: 3px;
  overflow-wrap: anywhere;
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.5;
}

.event small {
  margin-top: 4px;
  color: #425466;
  font-size: 0.64rem;
}

.live-label {
  gap: 5px;
  border-color: rgba(110, 231, 183, 0.18);
  color: var(--green);
  background: rgba(110, 231, 183, 0.05);
}

.live-label span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green);
}

.ai-panel {
  border-color: rgba(103, 232, 249, 0.12);
  background: linear-gradient(150deg, rgba(103, 232, 249, 0.055), rgba(12, 21, 31, 0.94) 48%);
}

.model-label {
  color: var(--cyan);
  background: rgba(103, 232, 249, 0.045);
  font-family: "SFMono-Regular", Consolas, monospace;
}

.ai-guards {
  display: grid;
  gap: 8px;
  padding: 16px 18px;
}

.ai-guards p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.ai-guards span {
  color: var(--green);
}

.ai-panel form {
  padding: 0 18px 17px;
}

.ai-empty,
.control-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.72rem;
  line-height: 1.55;
}

.ai-empty {
  padding: 0 18px 16px;
}

.control-note {
  padding: 0 18px 16px;
  text-align: center;
}

.analysis-result {
  margin: 0 18px 16px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(4, 11, 17, 0.35);
  color: var(--muted);
  font-size: 0.72rem;
}

.analysis-result__heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.analysis-result__heading small {
  color: var(--muted-2);
}

.analysis-result > p {
  margin: 10px 0;
  line-height: 1.55;
}

.analysis-result details {
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid var(--line);
}

.analysis-result summary {
  color: #b7c7d6;
  cursor: pointer;
  font-weight: 650;
}

.analysis-result ul {
  padding-left: 18px;
  margin: 8px 0 0;
}

.compact-panel .panel__header {
  border-bottom: 0;
}

.guardrail-list {
  display: grid;
  gap: 0;
  padding: 0 18px 13px;
  margin: 0;
  list-style: none;
}

.guardrail-list li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.guardrail-list span {
  color: #4b6275;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.66rem;
}

.guardrail-list p {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.guardrail-list strong {
  display: block;
  margin-bottom: 2px;
  color: #cbd8e3;
  font-size: 0.75rem;
}

.empty-state {
  display: grid;
  place-items: center;
  padding: 38px 24px;
  text-align: center;
}

.empty-state > span {
  color: var(--cyan);
  font-size: 2rem;
}

.empty-state h2 {
  margin: 8px 0 4px;
  font-size: 1rem;
}

.empty-state p {
  max-width: 560px;
  margin: 0 0 17px;
  color: var(--muted);
  font-size: 0.8rem;
}

.notice {
  padding: 12px 15px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 0.78rem;
}

.notice strong {
  color: var(--amber);
}

.notice--warning {
  border-color: rgba(252, 211, 77, 0.2);
  background: rgba(252, 211, 77, 0.05);
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.8rem;
}

.flash button {
  padding: 0 3px;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
}

.flash--success {
  border-color: rgba(110, 231, 183, 0.2);
  color: #a7f3d0;
  background: rgba(110, 231, 183, 0.055);
}

.flash--error {
  border-color: rgba(248, 113, 113, 0.22);
  color: #fecaca;
  background: rgba(248, 113, 113, 0.06);
}

.dialog {
  width: min(720px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  color: var(--text);
  background: #0a141e;
  box-shadow: var(--shadow);
}

.dialog::backdrop {
  background: rgba(0, 5, 9, 0.76);
  backdrop-filter: blur(5px);
}

.dialog__surface {
  display: grid;
  max-height: calc(100vh - 40px);
}

.dialog__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px;
  border-bottom: 1px solid var(--line);
}

.dialog__header h2 {
  margin: 0;
  font-size: 1.05rem;
}

.dialog__intro {
  padding: 14px 20px 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.module-picker {
  display: grid;
  gap: 8px;
  padding: 16px 20px;
  margin: 0;
  overflow-y: auto;
  border: 0;
}

.module-picker label {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 11px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.018);
}

.module-picker label:hover {
  border-color: rgba(103, 232, 249, 0.2);
  background: rgba(103, 232, 249, 0.035);
}

.module-picker input {
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  accent-color: var(--cyan);
}

.module-picker strong,
.module-picker small {
  display: block;
}

.module-picker strong {
  color: #dce7ef;
  font-size: 0.8rem;
}

.module-picker small {
  margin-top: 3px;
  color: var(--muted-2);
  font-size: 0.7rem;
}

.dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(100%, 470px);
}

.auth-panel {
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(12, 21, 31, 0.94);
  box-shadow: var(--shadow);
}

.auth-panel .brand-mark {
  width: 46px;
  height: 46px;
  margin-bottom: 21px;
}

.auth-panel h1 {
  margin: 0;
  color: #f1f6fa;
  font-size: 1.55rem;
  letter-spacing: -0.035em;
}

.auth-copy,
.auth-footnote {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.62;
}

.auth-copy {
  margin: 9px 0 21px;
}

.auth-footnote {
  margin: 17px 0 0;
  color: var(--muted-2);
  font-size: 0.72rem;
}

.auth-form {
  display: grid;
  gap: 9px;
}

.auth-form label {
  color: #b7c5d1;
  font-size: 0.76rem;
  font-weight: 650;
}

.auth-form input {
  min-height: 42px;
  padding: 8px 11px;
  margin-bottom: 5px;
}

.setup-steps {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.setup-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: start;
  gap: 10px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.018);
}

.setup-steps li > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: var(--cyan);
  background: var(--cyan-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
}

.setup-steps strong,
.setup-steps code {
  display: block;
}

.setup-steps strong {
  margin-bottom: 3px;
  font-size: 0.78rem;
}

@media (max-width: 1200px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .dashboard-side {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-panel {
    grid-column: 1 / -1;
  }
}

@media (max-width: 820px) {
  .mobile-only {
    display: inline-flex !important;
  }

  .topbar__inner {
    padding: 0 16px;
  }

  .topbar__inner > .mobile-only {
    margin-right: 8px;
  }

  .topbar__inner > .mobile-only span {
    display: block;
    width: 15px;
    height: 1px;
    background: currentColor;
  }

  .topbar__inner > .mobile-only {
    flex-direction: column;
    gap: 4px;
  }

  .brand {
    margin-right: auto;
  }

  .brand small,
  .status-pill {
    display: none;
  }

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

  .sidebar {
    position: fixed;
    z-index: 45;
    top: 64px;
    bottom: 0;
    left: 0;
    width: 240px;
    height: auto;
    transform: translateX(-102%);
    border-right-color: var(--line-strong);
    background: #08121b;
    box-shadow: 20px 0 50px rgba(0, 0, 0, 0.28);
    transition: transform 180ms ease;
  }

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

  .content {
    padding: 24px 17px 44px;
  }

  .page-heading {
    align-items: start;
    flex-direction: column;
    gap: 12px;
  }

  .run-meta {
    padding: 0;
  }

  .module-grid,
  .dashboard-side {
    grid-template-columns: minmax(0, 1fr);
  }

  .compact-panel {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .topbar .button--primary {
    width: 38px;
    padding: 0;
    overflow: hidden;
    color: transparent;
  }

  .topbar .button--primary span {
    color: #061117;
  }

  .topbar__actions {
    gap: 6px;
  }

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

  .metric {
    min-height: 126px;
  }

  .filters {
    width: 100%;
    flex-direction: column;
  }

  .filters input,
  .filters select {
    width: 100%;
  }

  .scenario summary {
    grid-template-columns: 60px 1fr;
  }

  .scenario .priority-tag {
    display: none;
  }

  .scenario__body {
    padding-left: 18px;
  }

  .auth-page {
    padding: 12px;
  }

  .auth-panel {
    padding: 25px 21px;
  }

  .dialog__footer {
    align-items: stretch;
    flex-direction: column-reverse;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
