:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #607086;
  --border: #dbe3ef;
  --accent: #1d6fdc;
  --accent-dark: #124f9e;
  --danger-bg: #fff0f0;
  --danger-text: #b42318;
  --success-bg: #edf9f2;
  --success-text: #067647;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

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

.intro {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
}

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

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

h2 {
  margin-bottom: 18px;
  font-size: 18px;
}

p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

.result-card {
  min-width: 260px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

.result-card.high-risk {
  background: var(--danger-bg);
  color: var(--danger-text);
}

.result-card.low-risk {
  background: var(--success-bg);
  color: var(--success-text);
}

.result-card.error-card {
  background: #fff8eb;
  color: #9a6700;
}

.result-label,
.result-card span {
  display: block;
  font-size: 14px;
}

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

.prediction-form {
  display: grid;
  gap: 18px;
}

.form-section {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
}

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

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

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 400;
  padding: 10px 12px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(29, 111, 220, 0.16);
}

button {
  justify-self: start;
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  padding: 0 24px;
}

button:hover {
  background: var(--accent-dark);
}

@media (max-width: 760px) {
  .app-shell {
    width: min(100% - 24px, 1120px);
    padding: 24px 0;
  }

  .intro {
    display: grid;
  }

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

  .result-card {
    min-width: 0;
  }

  button {
    width: 100%;
  }
}
