:root {
  --font-sophia: "Sofia Pro", "SofiaPro", "Sofia Pro Semi Bold", "Sofia Pro Light", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --bg: #0a0b0d;
  --surface: #121316;
  --surface-2: #0d0f12;
  --ink: #f4f6f8;
  --muted: #a9afb6;
  --line: #2d3239;
  --accent: #f3f5f7;
  --accent-2: #cdd3d9;
  --warn: #f6f8fa;
  --ok: #c4cbd3;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-sophia);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 0%, rgba(255, 255, 255, 0.12), transparent 34%),
    radial-gradient(circle at 90% 10%, rgba(180, 187, 196, 0.12), transparent 30%),
    linear-gradient(170deg, #08090b, #101318 45%, #0b0d10);
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 1rem 4rem;
}

header h1 {
  margin: 0;
  font-size: 2rem;
  font-family: var(--font-sophia);
  letter-spacing: 0.01em;
}

header p {
  margin: 0.5rem 0 1.5rem;
  color: var(--muted);
  max-width: 72ch;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

label {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
  color: #d7dce2;
}

select,
textarea,
input,
button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.65rem;
  font-size: 0.95rem;
  margin-top: 0.35rem;
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--font-sophia);
}

textarea {
  resize: vertical;
}

button {
  border: 1px solid #dde3e9;
  background: var(--accent);
  color: #080a0d;
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-sophia);
}

button:hover {
  filter: brightness(0.96);
}

button.secondary {
  background: transparent;
  color: #e8edf2;
  border: 1px solid #5c646d;
  width: auto;
  padding: 0.5rem 0.9rem;
}

button.small {
  width: auto;
  padding: 0.45rem 0.7rem;
  font-size: 0.85rem;
  margin-right: 0.35rem;
}

button.danger {
  background: #2a2f36;
  border: 1px solid #9aa4af;
  color: #f3f6f9;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

th,
td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 0.65rem 0.4rem;
  vertical-align: top;
  word-break: break-word;
}

th {
  color: #eef2f6;
  font-weight: 600;
  font-family: var(--font-sophia);
  background: rgba(255, 255, 255, 0.06);
}

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

.ok {
  color: var(--ok);
  font-weight: 700;
}

.subtle {
  color: var(--muted);
  font-size: 0.86rem;
}

.risk-pill {
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  display: inline-block;
}

.risk-low {
  background: #2a2a2a;
  color: #f0f0f0;
}

.risk-medium {
  background: #525861;
  color: #f1f4f7;
}

.risk-high {
  background: #f1f4f7;
  color: #0b0d10;
}

pre {
  white-space: pre-wrap;
  background: #101010;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.8rem;
  max-height: 320px;
  overflow: auto;
  font-size: 0.84rem;
  font-family: var(--font-sophia);
}

h2 {
  font-family: var(--font-sophia);
  font-size: 1.15rem;
  color: #f2f5f8;
}

#textOutputTable td:nth-child(3) {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

#textOutputTable th:nth-child(1),
#textOutputTable td:nth-child(1) {
  width: 140px;
  word-break: normal;
  overflow-wrap: anywhere;
}

#textOutputTable th:nth-child(2),
#textOutputTable td:nth-child(2) {
  width: 70px;
  white-space: nowrap;
  word-break: normal;
}

.hidden {
  display: none;
}

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

  .container {
    padding: 1rem 0.7rem 3rem;
  }
}
