:root {
  color-scheme: light;
  --navy: #103f66;
  --blue: #0f5f9a;
  --cyan: #50b7ca;
  --ink: #15344f;
  --muted: #687b8e;
  --line: #dbe6ef;
  --surface: #ffffff;
  --background: #f2f6fa;
  --focus: #168ac1;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 0%, rgba(80, 183, 202, 0.12), transparent 28rem),
    var(--background);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.hero {
  position: relative;
  display: flex;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  min-height: 178px;
  padding: 34px 38px;
  color: #fff;
  border-radius: 24px;
  background: linear-gradient(128deg, #103f66 0%, #0f679f 58%, #50b7ca 118%);
  box-shadow: 0 18px 44px rgba(15, 76, 129, 0.2);
}

.hero::after {
  position: absolute;
  width: 280px;
  height: 280px;
  right: -72px;
  top: -128px;
  border: 44px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  content: "";
}

.brand-mark {
  position: relative;
  flex: 0 0 64px;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.3);
}

.brand-mark::before,
.brand-mark::after {
  position: absolute;
  left: 50%;
  top: 50%;
  border-radius: 3px;
  background: #fff;
  content: "";
  transform: translate(-50%, -50%);
}

.brand-mark::before {
  width: 29px;
  height: 9px;
}

.brand-mark::after {
  width: 9px;
  height: 29px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 6px;
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  color: rgba(255, 255, 255, 0.74);
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(1.85rem, 4vw, 2.55rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
}

.model-line {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.94rem;
}

.panel,
.results {
  margin-top: 20px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(30, 64, 92, 0.06);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.section-kicker {
  color: var(--blue);
}

h2 {
  margin: 0;
  color: var(--navy);
  font-size: 1.34rem;
  letter-spacing: -0.018em;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: #f8fbfd;
}

.status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9eacb8;
  content: "";
}

.status.ready::before {
  background: #20a06b;
  box-shadow: 0 0 0 4px rgba(32, 160, 107, 0.1);
}

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

.field,
.binary-field {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.field label,
.binary-field legend {
  display: block;
  margin-bottom: 8px;
  color: #294b67;
  font-size: 0.84rem;
  font-weight: 720;
}

.field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  color: var(--ink);
  border: 1px solid #cfdde8;
  border-radius: 12px;
  outline: none;
  background: #fbfdff;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.field input:hover {
  border-color: #a9c1d3;
}

.field input:focus {
  border-color: var(--focus);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(22, 138, 193, 0.12);
}

.binary-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.binary-option {
  position: relative;
}

.binary-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.binary-option span {
  display: grid;
  height: 48px;
  place-items: center;
  border: 1px solid #cfdde8;
  border-radius: 12px;
  color: #536b7f;
  background: #fbfdff;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 680;
  transition: all 150ms ease;
}

.binary-option input:checked + span {
  color: #0a5f91;
  border-color: #4da6cc;
  background: #eaf7fb;
  box-shadow: inset 0 0 0 1px #4da6cc;
}

.binary-option input:focus-visible + span {
  box-shadow: 0 0 0 4px rgba(22, 138, 193, 0.14);
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 26px;
  border: 0;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(100deg, #0f5f9a, #1687b6);
  box-shadow: 0 10px 22px rgba(15, 95, 154, 0.18);
  cursor: pointer;
  font-weight: 760;
  transition: transform 150ms ease, box-shadow 150ms ease, opacity 150ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 95, 154, 0.24);
}

.primary-button:focus-visible {
  outline: 3px solid rgba(22, 138, 193, 0.28);
  outline-offset: 3px;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.results {
  animation: reveal 300ms ease both;
}

.results-heading {
  margin-bottom: 18px;
}

.result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.result-card {
  min-height: 158px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #f9fcfe;
}

.result-card p {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 680;
}

.result-card strong {
  display: block;
  color: var(--navy);
  font-size: clamp(1.8rem, 5vw, 2.35rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.probability-track {
  width: 100%;
  height: 8px;
  margin-top: 22px;
  overflow: hidden;
  border-radius: 99px;
  background: #dfeaf1;
}

.probability-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1aa0bc, #0f5f9a);
  transition: width 500ms cubic-bezier(0.2, 0.75, 0.25, 1);
}

.class-code {
  display: inline-flex;
  margin-top: 14px;
  padding: 5px 9px;
  color: #64798c;
  border-radius: 8px;
  background: #eaf1f6;
  font-size: 0.76rem;
  font-weight: 700;
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 1080px);
    padding-top: 10px;
  }

  .hero {
    min-height: 152px;
    padding: 26px 22px;
    border-radius: 19px;
  }

  .brand-mark {
    flex-basis: 52px;
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }

  .panel,
  .results {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .field-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
