:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #172033;
  background: #f3f6fb;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 0.6rem;
  padding: 0.75rem 1rem;
  color: #fff;
  background: #2259c4;
  cursor: pointer;
  font-weight: 650;
}

button:hover:not(:disabled) {
  background: #1948a4;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

input,
select {
  min-width: 0;
  border: 1px solid #c8d1df;
  border-radius: 0.5rem;
  padding: 0.7rem 0.75rem;
  background: #fff;
}

label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.92rem;
  font-weight: 650;
}

.shell {
  width: min(1050px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 3.5rem 0 2rem;
}

.hero {
  max-width: 700px;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: #2259c4;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.6rem);
  letter-spacing: -0.045em;
}

.hero > p:last-child {
  color: #4c5870;
  font-size: 1.1rem;
  line-height: 1.6;
}

.panel {
  border: 1px solid #e0e6ef;
  border-radius: 0.9rem;
  padding: 1.35rem;
  background: #fff;
  box-shadow: 0 10px 30px rgb(21 39 74 / 5%);
}

h2,
h3 {
  margin: 0 0 0.8rem;
}

.hint {
  color: #627087;
  font-size: 0.9rem;
  line-height: 1.5;
}

.upload-row {
  display: flex;
  align-items: end;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
}

.file-picker {
  width: 100%;
}

#assembly-file {
  flex: 1 1 280px;
}

.status {
  min-height: 1.4rem;
  margin: 1rem 0 0;
  color: #315a35;
  font-size: 0.92rem;
}

.status.error {
  color: #a12626;
}

.results {
  margin-top: 2rem;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}

.summary-grid > div {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
  border: 1px solid #e0e6ef;
  border-radius: 0.65rem;
  padding: 0.85rem;
  background: #fff;
}

.summary-grid span {
  color: #627087;
  font-size: 0.82rem;
}

.summary-grid strong {
  overflow-wrap: anywhere;
}

.data-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
}

.data-list {
  max-height: 22rem;
  margin: 0;
  padding-left: 1.25rem;
  overflow: auto;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

#candidate-select {
  width: 100%;
  margin-bottom: 1rem;
}

.edit-row {
  display: flex;
  gap: 0.65rem;
}

.edit-row input {
  width: 8rem;
}

code {
  border-radius: 0.25rem;
  padding: 0.1rem 0.25rem;
  background: #eef2f8;
}

footer {
  margin-top: 2rem;
  color: #627087;
  font-size: 0.85rem;
}

@media (max-width: 700px) {
  .shell {
    padding-top: 2rem;
  }

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

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

  .edit-row input {
    width: 100%;
  }
}
