:root {
  --bg: #eef2f7;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --border: #d9e2ef;
  --low: #15803d;
  --medium: #b45309;
  --high: #b91c1c;
  --shadow: 0 18px 45px rgba(15, 23, 42, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 32rem),
    linear-gradient(135deg, #f8fafc 0%, var(--bg) 100%);
  color: var(--text);
}

.app-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 32px auto;
}

.hero {
  background: linear-gradient(135deg, #0f172a, #1d4ed8);
  color: white;
  border-radius: 28px;
  padding: 34px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  color: #bfdbfe;
  font-weight: 700;
}

h1, h2, p {
  margin-top: 0;
}

h1 {
  font-size: clamp(32px, 5vw, 54px);
  margin-bottom: 12px;
  line-height: 1.05;
}

.hero-text {
  color: #dbeafe;
  font-size: 17px;
  max-width: 700px;
  line-height: 1.6;
  margin-bottom: 0;
}

.model-card {
  min-width: 170px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  backdrop-filter: blur(12px);
}

.model-card strong {
  display: block;
  font-size: 42px;
  margin: 8px 0;
}

.model-label, .model-card small {
  color: #dbeafe;
}

.content-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.9fr;
  gap: 24px;
  margin-top: 24px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.form-panel, .result-panel, .equation-panel {
  padding: 28px;
}

.panel-header h2 {
  font-size: 22px;
  margin-bottom: 6px;
}

.panel-header p {
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #263244;
}

input, select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  color: var(--text);
  background: white;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

button {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  background: var(--primary);
  color: white;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s;
}

button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
}

.secondary-btn {
  background: #e5e7eb;
  color: #111827;
}

.secondary-btn:hover {
  background: #d1d5db;
}

.empty-state {
  min-height: 380px;
  display: grid;
  place-content: center;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: 18px;
}

.empty-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #eff6ff;
  color: var(--primary);
  font-size: 28px;
}

.hidden {
  display: none;
}

.result-box {
  text-align: center;
}

.score-circle {
  width: 210px;
  height: 210px;
  margin: 8px auto 24px;
  border-radius: 50%;
  display: grid;
  place-content: center;
  background: conic-gradient(var(--primary) 0deg, #e5e7eb 0deg);
  position: relative;
}

.score-circle::before {
  content: "";
  position: absolute;
  inset: 16px;
  background: white;
  border-radius: 50%;
}

.score-circle span,
.score-circle small {
  position: relative;
  z-index: 1;
}

.score-circle span {
  font-size: 42px;
  font-weight: 800;
}

.score-circle small {
  color: var(--muted);
  margin-top: 4px;
}

.result-list {
  display: grid;
  gap: 12px;
  text-align: left;
}

.result-list div {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.result-list span {
  color: var(--muted);
}

.badge-low {
  color: var(--low);
}

.badge-medium {
  color: var(--medium);
}

.badge-high {
  color: var(--high);
}

.scale-note {
  margin-top: 18px;
  text-align: left;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  line-height: 1.5;
}

.equation-panel {
  margin-top: 24px;
  line-height: 1.7;
}

.disclaimer {
  color: var(--muted);
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .hero, .content-grid {
    grid-template-columns: 1fr;
  }

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

  .model-card {
    width: 100%;
  }
}

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

  .actions {
    flex-direction: column;
  }

  .form-panel, .result-panel, .equation-panel, .hero {
    padding: 22px;
  }
}
