:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --ink: #18202f;
  --muted: #667085;
  --line: #d8dee9;
  --accent: #0f766e;
  --accent-strong: #115e59;
  --warn: #b45309;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

a {
  color: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 28px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
}

.page {
  width: min(1120px, calc(100vw - 32px));
  margin: 28px auto 56px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}

.hero h1 {
  margin: 0 0 8px;
  font-size: 40px;
  letter-spacing: 0;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 680px;
}

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.button.primary,
button.primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.grid {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

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

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

article,
.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

h1,
h2,
h3 {
  line-height: 1.25;
}

h2 {
  margin-top: 0;
  font-size: 20px;
}

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

.compact {
  padding-top: 12px;
}

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

.answer {
  white-space: pre-wrap;
  background: #f3f5f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
}

.question-list {
  display: grid;
  gap: 14px;
}

.question-item {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.chips,
.graph-view {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chips span,
.tag,
.graph-node {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 3px 8px;
  background: #f3f5f8;
  font-size: 13px;
}

.graph-node.event {
  border-color: #0f766e;
}

.graph-node.entity {
  border-color: #7c3aed;
}

.severity-high {
  color: var(--danger);
  font-weight: 700;
}

.severity-medium {
  color: var(--warn);
  font-weight: 700;
}

.severity-low {
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

textarea {
  min-height: 128px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 14px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--panel);
}

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

@media (max-width: 760px) {
  .topbar,
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

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

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