/* =============================================================
   SafeGuard — design system
   Refined dark "security lab" aesthetic.
   Red = attack, green = safe, amber = warn/deny, blue = brand.
   ============================================================= */

:root {
  --bg: #08090c;
  --bg-elevated: #101218;
  --bg-panel: rgba(16, 18, 24, 0.62);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --text: #e8ecf2;
  --text-muted: #9aa3b2;
  --text-faint: #6b7280;

  --red: #ff5c5c;
  --red-soft: rgba(255, 92, 92, 0.12);
  --green: #2fd6a0;
  --green-soft: rgba(47, 214, 160, 0.12);
  --amber: #f5b73d;
  --amber-soft: rgba(245, 183, 61, 0.14);
  --blue: #5b9dff;
  --blue-soft: rgba(91, 157, 255, 0.14);
  --violet: #8b7cff;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  --shadow-sm: 0 4px 16px rgba(0, 0, 0, 0.35);

  --font-mono: ui-monospace, "SF Mono", "Cascadia Code", "JetBrains Mono", Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60rem 42rem at 12% -12%, rgba(139, 124, 255, 0.16), transparent 60%),
    radial-gradient(50rem 36rem at 100% -4%, rgba(91, 157, 255, 0.12), transparent 55%);
}

::selection { background: var(--blue-soft); color: var(--text); }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--bg-elevated);
  padding: 0.12em 0.4em;
  border-radius: 5px;
  color: var(--blue);
  border: 1px solid var(--border);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 2rem;
  background: rgba(8, 9, 12, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  background: linear-gradient(135deg, var(--blue-soft), rgba(139, 124, 255, 0.18));
  border: 1px solid var(--border-strong);
  color: var(--blue);
  flex: none;
}
.brand__mark svg { width: 1.45rem; height: 1.45rem; }

.brand__title {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.brand__tagline {
  margin: 0.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.status-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.5;
  color: inherit;
  cursor: pointer;
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--bg-panel);
}

.status-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-faint);
  flex: none;
}

.status-pill--unknown { color: var(--text-muted); }
.status-pill--live { color: var(--green); border-color: rgba(47, 214, 160, 0.4); }
.status-pill--live .status-pill__dot {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(47, 214, 160, 0.5);
  animation: pulse-dot 1.8s ease-out infinite;
}
.status-pill--sim { color: var(--amber); border-color: rgba(245, 183, 61, 0.4); }
.status-pill--sim .status-pill__dot { background: var(--amber); }
.status-pill--absent .status-pill__dot { background: var(--red); }
.status-pill--absent { color: var(--red); border-color: rgba(255, 92, 92, 0.4); }

.mode-indicator {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-pill:hover {
  border-color: var(--border-strong);
  background: rgba(16, 18, 24, 0.85);
}
.status-pill:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* ---------- Tool inspector dropdown ---------- */
.tool-list {
  position: absolute;
  top: calc(100% + 0.6rem);
  right: 0;
  z-index: 60;
  width: min(440px, calc(100vw - 2rem));
  max-height: 72vh;
  overflow-y: auto;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.5rem;
}

.tool-list__head {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  padding: 0.35rem 0.55rem 0.55rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.3rem;
}
.tool-list__title {
  font-weight: 600;
  font-size: 0.9rem;
}
.tool-list__subtitle {
  color: var(--text-faint);
  font-size: 0.72rem;
}

.tool-list__item {
  padding: 0.6rem 0.55rem;
  border-bottom: 1px solid var(--border);
}
.tool-list__item:last-child { border-bottom: 0; }

.tool-list__row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}
.tool-list__name {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue);
}
.tool-list__badge {
  font-size: 0.64rem;
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
}
.tool-list__badge--readonly {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(47, 214, 160, 0.3);
}
.tool-list__badge--benign {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(47, 214, 160, 0.3);
}
.tool-list__badge--attack {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(255, 92, 92, 0.3);
}

.tool-list__run {
  margin-left: auto;
  flex: none;
  font-family: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--blue);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.55rem;
  cursor: pointer;
}
.tool-list__run:hover {
  background: var(--blue-soft);
  border-color: var(--blue);
}
.tool-list__desc {
  margin: 0 0 0.3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.tool-list__params {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}

/* ---------- Hero ---------- */
.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 4rem 2rem 1.75rem;
  text-align: center;
}

.hero__kicker {
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--blue);
}

.hero__title {
  margin: 0;
  font-size: clamp(2.1rem, 5.5vw, 3.6rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 20%, #b8c1d0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero__title em {
  font-style: normal;
  background: linear-gradient(120deg, var(--red), #ff9a5c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero__subtitle {
  margin: 1.15rem auto 0;
  max-width: 680px;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.hero__subtitle em { color: var(--text); font-style: normal; }

.hero__flow {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.flow-node {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.85rem 1.15rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  min-width: 200px;
  box-shadow: var(--shadow-sm);
}
.flow-node__step {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  color: var(--text);
}
.flow-node__sub { font-size: 0.78rem; color: var(--text-muted); }
.flow-arrow {
  align-self: center;
  color: var(--text-faint);
  font-size: 1.5rem;
  font-family: var(--font-mono);
}

/* Trust boundary strip (hero) */
.hero__trust {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.25rem;
  flex-wrap: wrap;
}

.trust-col {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius);
  text-align: left;
  min-width: 220px;
  box-shadow: var(--shadow-sm);
}
.trust-col--lie { background: var(--red-soft); border: 1px solid rgba(255, 92, 92, 0.35); }
.trust-col--truth { background: var(--green-soft); border: 1px solid rgba(47, 214, 160, 0.35); }

.trust-col__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}
.trust-col--lie .trust-col__label { color: var(--red); }
.trust-col--truth .trust-col__label { color: var(--green); }
.trust-col__items { font-size: 0.9rem; color: var(--text); }

.trust-arrow {
  align-self: center;
  color: var(--text-faint);
  font-size: 1.5rem;
  font-family: var(--font-mono);
}

/* Trust boundary checklist section */
.trust-boundary {
  max-width: 1280px;
  margin: 0 auto;
  padding: 1.5rem 2rem 0.25rem;
}
.trust-boundary__header { margin-bottom: 1rem; }
.trust-boundary__title { margin: 0; font-size: 1.25rem; letter-spacing: -0.01em; }
.trust-boundary__subtitle {
  margin: 0.3rem 0 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 720px;
}

.trust-table {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.trust-row {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr 1.6fr;
  gap: 0.75rem;
  align-items: center;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
}
.trust-row:last-child { border-bottom: none; }
.trust-row--head {
  background: var(--bg-elevated);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  font-weight: 700;
}
.trust-cell { font-size: 0.86rem; }
.trust-cell--attack { color: var(--red); font-weight: 600; }

@media (max-width: 640px) {
  .trust-row { grid-template-columns: 1fr; gap: 0.3rem; }
  .trust-row--head { display: none; }
}

/* ---------- Layout ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  padding: 1.25rem 2rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ---------- Panels ---------- */
.panel {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.panel--attack {
  border-top: 3px solid var(--red);
  box-shadow: var(--shadow), 0 0 0 1px rgba(255, 92, 92, 0.06);
}
.panel--defend {
  border-top: 3px solid var(--green);
  box-shadow: var(--shadow), 0 0 0 1px rgba(47, 214, 160, 0.06);
}

.panel__header { margin-bottom: 1.25rem; }

.panel__title {
  margin: 0;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.panel__subtitle {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.panel__badge {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
}
.panel__badge--danger { background: var(--red-soft); color: var(--red); }
.panel__badge--safe { background: var(--green-soft); color: var(--green); }

/* ---------- Café state ---------- */
.cafe__account {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.4rem;
}

.cafe__stat {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.9rem;
  overflow: hidden;
}
.cafe__stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--blue);
  opacity: 0.6;
}

.cafe__label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

.cafe__value {
  display: block;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  margin-top: 0.2rem;
  word-break: break-all;
  color: var(--text);
}

.cafe__heading, .mandate__heading {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

/* ---------- Scenario cards ---------- */
.cafe__actions, .scenarios {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.scenario {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.95rem 1.05rem;
  transition: transform 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}
.scenario:hover {
  transform: translateY(-1px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.scenario__meta { flex: 1 1 auto; min-width: 0; }
.scenario .btn { flex: none; align-self: center; }

.scenario__tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.18rem 0.5rem;
  border-radius: 5px;
}
.scenario__tag--danger { background: var(--red-soft); color: var(--red); }
.scenario__tag--safe { background: var(--green-soft); color: var(--green); }
.scenario__tag--warn { background: var(--amber-soft); color: var(--amber); }

.scenario__name {
  margin: 0.4rem 0 0.2rem;
  font-size: 1rem;
  letter-spacing: -0.01em;
}

.scenario__desc {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.scenario__desc strong { color: var(--text); font-weight: 600; }

/* ---------- Buttons ---------- */
.btn {
  cursor: pointer;
  font-family: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.58rem 1.05rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform 0.05s ease, filter 0.12s ease, box-shadow 0.12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:hover { filter: brightness(1.12); }

.btn--danger {
  background: var(--red-soft);
  color: var(--red);
  border-color: rgba(255, 92, 92, 0.4);
}
.btn--danger:hover { box-shadow: 0 0 0 1px rgba(255, 92, 92, 0.25); }

.btn--safe {
  background: var(--green-soft);
  color: var(--green);
  border-color: rgba(47, 214, 160, 0.4);
}
.btn--safe:hover { box-shadow: 0 0 0 1px rgba(47, 214, 160, 0.25); }

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border-color: var(--border-strong);
}
.btn--ghost:hover { color: var(--text); }

.btn--primary {
  background: var(--blue);
  color: #04121f;
}

.btn--demo {
  background: linear-gradient(120deg, var(--blue), var(--violet));
  color: #fff;
  font-weight: 700;
  padding: 0.62rem 1.2rem;
  box-shadow: 0 4px 18px rgba(91, 157, 255, 0.28);
}
.btn--demo:hover { box-shadow: 0 6px 24px rgba(91, 157, 255, 0.4); }
.btn--demo:disabled { opacity: 0.6; cursor: default; filter: none; }

.btn--sm { padding: 0.32rem 0.72rem; font-size: 0.76rem; }

/* ---------- Mandate rule list & form ---------- */
.mandate { margin-bottom: 1.6rem; }

.rule-list {
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.rule-list__empty {
  color: var(--text-faint);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.rule {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.7rem;
  animation: row-in 0.25s ease both;
}

.rule__mode {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
}
.rule__mode--allow { background: var(--green-soft); color: var(--green); }
.rule__mode--deny { background: var(--red-soft); color: var(--red); }

.rule__limit { color: var(--text-muted); }
.rule__remove {
  margin-left: auto;
  cursor: pointer;
  background: none;
  border: none;
  color: var(--text-faint);
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
}
.rule__remove:hover { color: var(--red); }

.rule-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.rule-form__select, .rule-form__input {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.6rem;
}
.rule-form__input { width: 7.5rem; }

.mandate__tools {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin-top: 0.85rem;
}

/* ---------- Consent dialog ---------- */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(4, 5, 8, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100;
  padding: 1rem;
}

.modal__card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 1.6rem;
  width: min(440px, 92vw);
  box-shadow: var(--shadow);
  animation: modal-in 0.18s ease both;
}

.modal__title { margin: 0 0 0.5rem; font-size: 1.1rem; }

.modal__tool {
  display: inline-block;
  margin: 0 0 0.5rem;
  padding: 0.15rem 0.5rem;
  border-radius: var(--radius-sm);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
}

.modal__desc { margin: 0 0 1.25rem; color: var(--text-muted); font-size: 0.95rem; }
.modal__desc strong { color: var(--text); }

.modal__readonly {
  margin: 0 0 1.25rem;
  padding: 0.5rem 0.7rem;
  border-radius: var(--radius-sm);
  background: var(--green-soft);
  color: var(--green);
  font-size: 0.85rem;
  border: 1px solid rgba(47, 214, 160, 0.3);
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.6rem;
}

/* ---------- Log / audit trail ---------- */
.log {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 2rem;
}

.log__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.log__title { margin: 0; font-size: 1.15rem; letter-spacing: -0.01em; }

.log__table-wrap {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.log__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.log__table th, .log__table td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.log__table thead th {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
}

.log__table tbody tr:last-child td { border-bottom: none; }
.log__table tbody tr { animation: row-in 0.3s ease both; }
.log__table tbody tr:hover { background: rgba(255, 255, 255, 0.02); }

.log__table tbody tr.row--break { box-shadow: inset 3px 0 0 var(--red); }
.log__table tbody tr.row--allow { box-shadow: inset 3px 0 0 var(--green); }
.log__table tbody tr.row--deny { box-shadow: inset 3px 0 0 var(--amber); }

.log__empty { color: var(--text-faint); text-align: center; animation: none !important; }

/* verdict / effect chips */
.chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.16rem 0.5rem;
  border-radius: 4px;
}
.chip--allow { background: var(--green-soft); color: var(--green); }
.chip--deny { background: var(--red-soft); color: var(--red); }
.chip--none { background: var(--bg-elevated); color: var(--text-faint); border: 1px solid var(--border); }

.last-verdict {
  display: inline-block;
  margin-top: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.22rem 0.55rem;
  border-radius: 5px;
  animation: pop 0.22s ease both;
}
.last-verdict--allow  { background: var(--green-soft); color: var(--green); }
.last-verdict--deny   { background: var(--amber-soft); color: var(--amber); }
.last-verdict--attack { background: var(--red-soft); color: var(--red); }

.effect-line { margin: 0; font-size: 0.84rem; }
.effect-line--side { color: var(--red); }
.effect-line--hidden { color: var(--amber); }
.effect-line--swapped { color: var(--amber); }
.effect-line--neutral { color: var(--text-muted); }

.intent-tool {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--blue);
}
.consent-shown {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text);
}

/* ---------- Footer ---------- */
.site-footer {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 2rem 2.5rem;
  color: var(--text-faint);
  font-size: 0.8rem;
}

.site-footer__capability {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* ---------- Flash feedback ---------- */
@keyframes flash-ok {
  0%   { box-shadow: 0 0 0 2px var(--green); background: var(--green-soft); }
  100% { box-shadow: 0 0 0 0 transparent; background: var(--bg-elevated); }
}
@keyframes flash-deny {
  0%   { box-shadow: 0 0 0 2px var(--red); background: var(--red-soft); }
  100% { box-shadow: 0 0 0 0 transparent; background: var(--bg-elevated); }
}
.flash--ok   { animation: flash-ok 0.9s ease-out; }
.flash--deny { animation: flash-deny 0.9s ease-out; }

/* ---------- Motion ---------- */
@keyframes row-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(47, 214, 160, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(47, 214, 160, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 214, 160, 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero__inner { animation: rise 0.5s ease both; }
.panel, .log { animation: rise 0.5s ease both; }
.panel--attack { animation-delay: 0.05s; }
.panel--defend { animation-delay: 0.1s; }
.log { animation-delay: 0.15s; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .hero { padding-top: 3rem; }
  .hero__flow { gap: 0.6rem; }
  .flow-node { min-width: 160px; }
}

@media (max-width: 640px) {
  .site-header { padding: 0.75rem 1.1rem; }
  .status-bar { width: 100%; justify-content: flex-start; }
  .hero { padding: 2.5rem 1.1rem 1.25rem; }
  .hero__subtitle { font-size: 0.95rem; }
  .flow-arrow { display: none; }
  .flow-node { flex: 1 1 100%; }
  .layout { padding: 1rem 1.1rem; }
  .log { padding: 0 1.1rem 2rem; }
  .site-footer { padding: 0 1.1rem 2.25rem; }
}

@media (max-width: 520px) {
  .scenario { flex-direction: column; align-items: stretch; }
  .scenario .btn { width: 100%; }
}

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