:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  background: #f5f7f2;
  color: #15201b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

button,
input,
select {
  font: inherit;
}

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

.workspace {
  display: grid;
  gap: 18px;
}

.topbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #d9dfd3;
  padding-bottom: 18px;
}

.eyebrow {
  margin: 0 0 4px;
  color: #597163;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
}

.status {
  min-width: 88px;
  border: 1px solid #bdc9bf;
  border-radius: 999px;
  padding: 8px 12px;
  text-align: center;
  color: #315342;
  background: #ffffff;
}

.panel {
  display: grid;
  grid-template-columns: 0.8fr 1fr 1fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
  border: 1px solid #d9dfd3;
  background: #ffffff;
}

label {
  display: grid;
  gap: 7px;
  color: #42554a;
  font-size: 0.88rem;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #c7d0c8;
  border-radius: 6px;
  padding: 0 12px;
  background: #fbfcfa;
  color: #15201b;
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #ffffff;
  background: #176b4d;
  font-weight: 800;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.65;
}

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

.scoreline,
.probabilities,
.analysis,
.raw {
  border: 1px solid #d9dfd3;
  background: #ffffff;
}

.scoreline {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: center;
  min-height: 112px;
  padding: 22px;
  text-align: center;
}

.scoreline span {
  overflow-wrap: anywhere;
  font-size: clamp(1.25rem, 4vw, 2.5rem);
  font-weight: 900;
}

.scoreline strong {
  min-width: 96px;
  color: #b0362f;
  font-size: clamp(2.3rem, 7vw, 5rem);
  line-height: 1;
}

.probabilities {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.probabilities div {
  display: grid;
  gap: 6px;
  padding: 18px;
  border-right: 1px solid #d9dfd3;
}

.probabilities div:last-child {
  border-right: 0;
}

.probabilities span {
  color: #597163;
  font-size: 0.86rem;
  font-weight: 700;
}

.probabilities strong {
  font-size: 2rem;
}

.analysis {
  display: grid;
  align-content: start;
  gap: 12px;
  min-height: 150px;
  padding: 18px;
}

.analysis p {
  color: #34483d;
  line-height: 1.65;
}

ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 18px;
  color: #34483d;
  line-height: 1.55;
}

.raw {
  grid-column: 1 / -1;
  padding: 14px 18px;
}

summary {
  cursor: pointer;
  font-weight: 800;
}

pre {
  overflow: auto;
  margin: 12px 0 0;
  padding: 14px;
  border-radius: 6px;
  background: #101814;
  color: #e8f4ec;
}

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

  .topbar,
  .panel,
  .result-grid,
  .probabilities,
  .scoreline {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: start;
  }

  .scoreline {
    min-height: 0;
  }

  .probabilities div {
    border-right: 0;
    border-bottom: 1px solid #d9dfd3;
  }

  .probabilities div:last-child {
    border-bottom: 0;
  }
}
