:root {
  --bg: #0f172a;
  --card: #101827;
  --accent: #22d3ee;
  --accent-2: #f97316;
  --text: #f8fafc;
  --muted: #94a3b8;
  --page-pad: 32px;
  --safe-top: 0px;
  --safe-right: 0px;
  --safe-bottom: 0px;
  --safe-left: 0px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Unbounded", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 15% 20%, #1f2937 0%, #0f172a 55%, #030712 100%);
  min-height: 100vh;
  padding: calc(var(--page-pad) + var(--safe-top))
    calc(var(--page-pad) + var(--safe-right))
    calc(var(--page-pad) + var(--safe-bottom))
    calc(var(--page-pad) + var(--safe-left));
  position: relative;
  overflow-x: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(0px);
  opacity: 0.35;
  z-index: 0;
}

.orb-1 {
  width: 320px;
  height: 320px;
  background: #22d3ee;
  top: -80px;
  right: -60px;
}

.orb-2 {
  width: 240px;
  height: 240px;
  background: #f97316;
  bottom: -60px;
  left: -80px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.hero h1 {
  margin: 12px 0 8px;
  font-size: 32px;
  line-height: 1.1;
}

.subtitle {
  color: var(--muted);
  max-width: 520px;
}

.tag {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 12px;
  text-transform: uppercase;
}

.status {
  padding: 16px 20px;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 12px;
  text-align: right;
}

main {
  margin-top: 32px;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 24px;
}

.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.card {
  background: rgba(15, 23, 42, 0.7);
  border-radius: 20px;
  padding: 20px;
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.card h2 {
  margin-top: 0;
  font-size: 18px;
}

.card h3 {
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--accent-2);
}

textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 16px;
  padding: 14px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(2, 6, 23, 0.8);
  color: var(--text);
  font-family: "IBM Plex Mono", monospace;
  margin-bottom: 12px;
}

button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  color: #0f172a;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 25px rgba(34, 211, 238, 0.35);
}

input[type="file"] {
  display: block;
  margin: 12px 0;
  color: var(--muted);
}

.answer {
  margin-top: 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  color: var(--muted);
  white-space: pre-wrap;
}

.branch-list {
  display: grid;
  gap: 10px;
}

.branch-item {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.2);
  font-size: 13px;
}

.branch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.branch-name {
  font-weight: 600;
  letter-spacing: 0.2px;
}

.branch-level {
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  text-transform: lowercase;
}

.branch-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.15);
  border: 1px solid rgba(148, 163, 184, 0.2);
  overflow: hidden;
}

.branch-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.35);
  transition: width 0.3s ease;
}

.summary {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  color: var(--muted);
  white-space: pre-wrap;
  margin-bottom: 12px;
}

.risks {
  display: grid;
  gap: 8px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
}

.risk-item {
  padding: 10px;
  border-radius: 12px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
}

.muted {
  color: var(--muted);
  font-size: 12px;
}

footer .muted {
  display: block;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: #0b1220;
  border-radius: 18px;
  padding: 24px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  max-width: 420px;
  text-align: center;
}

.modal-card p {
  color: var(--muted);
  font-size: 13px;
}

footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 720px) {
  :root {
    --page-pad: 20px;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .status {
    width: 100%;
    text-align: left;
  }
}
