:root {
  color-scheme: dark;
  --bg: #07090f;
  --panel: #10141f;
  --panel-2: #161b28;
  --line: #2a3144;
  --text: #eef3ff;
  --muted: #9ca8bd;
  --hot: #8cffd2;
  --warn: #ffd166;
  --danger: #ff5c8a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(140, 255, 210, 0.08), transparent 32%),
    radial-gradient(circle at 82% 12%, rgba(255, 92, 138, 0.16), transparent 30%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 24px;
  align-items: stretch;
  min-height: 360px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--hot);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(34px, 5vw, 62px);
  line-height: 1.08;
  letter-spacing: 0;
  overflow-wrap: anywhere;
}

.lead,
.summary,
.evidence p,
.status {
  color: var(--muted);
  line-height: 1.65;
}

#status {
  margin: 0;
  padding: 12px 14px;
  border-radius: 8px;
  text-align: center;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

#status.is-complete {
  background: linear-gradient(90deg, rgba(140, 255, 210, 0.9), rgba(255, 209, 102, 0.92));
  color: #07100d;
  font-weight: 900;
  box-shadow: 0 0 0 1px rgba(140, 255, 210, 0.22), 0 12px 28px rgba(140, 255, 210, 0.18);
}

#status.is-error {
  background: rgba(255, 92, 138, 0.16);
  color: #ffd5df;
  font-weight: 800;
}

.lead {
  max-width: 620px;
  font-size: 18px;
}

.selected-files-panel {
  max-width: 620px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid rgba(140, 255, 210, 0.22);
  border-radius: 8px;
  background: rgba(16, 20, 31, 0.64);
}

.selected-files-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(42, 49, 68, 0.8);
}

.selected-files-head span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.selected-files-head strong {
  color: var(--warn);
}

.selected-file-list {
  display: grid;
  gap: 8px;
  max-height: 176px;
  overflow: auto;
  padding: 10px;
}

.selected-file-list p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.selected-file {
  display: grid;
  gap: 4px;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid rgba(140, 255, 210, 0.18);
  border-radius: 8px;
  background: rgba(12, 16, 25, 0.9);
  color: var(--text);
  font: inherit;
  text-align: left;
}

.selected-file:hover,
.selected-file.is-active {
  border-color: rgba(255, 209, 102, 0.62);
  background: rgba(255, 209, 102, 0.1);
}

.selected-file span {
  overflow-wrap: anywhere;
  font-weight: 800;
}

.selected-file small {
  color: var(--muted);
  font-size: 12px;
}

.upload,
.grade-panel,
.metrics > div,
.band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 20, 31, 0.82);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26);
}

.upload {
  display: grid;
  gap: 14px;
  align-content: center;
  padding: 18px;
}

.dropzone {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 220px;
  padding: 18px;
  border: 1px dashed #4c5872;
  border-radius: 8px;
  background: #0c1019;
  cursor: pointer;
  text-align: center;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.dropzone.is-dragging {
  border-color: var(--hot);
  background: rgba(140, 255, 210, 0.08);
  transform: translateY(-2px);
}

.drop-title {
  font-size: 22px;
  font-weight: 900;
}

.drop-sub {
  max-width: 100%;
  color: var(--muted);
  overflow-wrap: anywhere;
}

input[type="file"] {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

button {
  min-height: 52px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--hot), var(--warn));
  color: #07100d;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  filter: grayscale(0.65);
}

button.selected-file {
  min-height: 0;
  border: 1px solid rgba(140, 255, 210, 0.18);
  background: rgba(12, 16, 25, 0.9);
  color: var(--text);
  font-size: inherit;
  font-weight: inherit;
  text-align: left;
}

button.selected-file:hover,
button.selected-file.is-active {
  border-color: rgba(255, 209, 102, 0.62);
  background: rgba(255, 209, 102, 0.1);
}

.ghost-button {
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(140, 255, 210, 0.45);
  background: transparent;
  color: var(--hot);
  white-space: nowrap;
}

.result {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.hidden {
  display: none;
}

.grade-panel {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 24px;
}

.grade-title {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
}

h2 {
  margin: 0;
  color: var(--warn);
  font-size: 64px;
  line-height: 1;
}

.grade-title strong {
  padding-bottom: 6px;
  color: var(--hot);
  font-size: 26px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

.score-ring {
  display: grid;
  place-items: center;
  align-content: center;
  flex: 0 0 136px;
  width: 136px;
  height: 136px;
  border: 1px solid rgba(140, 255, 210, 0.38);
  border-radius: 50%;
  background: #090d15;
}

.score-ring span {
  font-size: 42px;
  font-weight: 900;
}

.score-ring small {
  max-width: 92px;
  margin-top: -8px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
}

.metrics {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.metrics > div {
  display: grid;
  gap: 8px;
  padding: 16px;
  min-width: 0;
}

.metrics span {
  color: var(--muted);
  font-size: 13px;
}

.metrics strong {
  overflow-wrap: anywhere;
}

.band {
  padding: 22px;
}

.section-head h3 {
  margin: 0 0 16px;
  font-size: 24px;
}

.row-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.row-head h3 {
  margin-bottom: 0;
}

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

.evidence {
  padding: 16px;
  border: 1px solid #242c3e;
  border-radius: 8px;
  background: var(--panel-2);
}

.evidence-detail {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.evidence-detail p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-line;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  align-items: flex-start;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  width: 100%;
  gap: 8px;
  align-items: flex-start;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: 100%;
  padding: 6px 10px;
  border: 1px solid rgba(140, 255, 210, 0.28);
  border-radius: 999px;
  background: rgba(140, 255, 210, 0.08);
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  overflow-wrap: anywhere;
}

button.chip {
  cursor: pointer;
  font-family: inherit;
}

button.chip:hover,
.chip.is-active {
  border-color: rgba(255, 209, 102, 0.7);
  background: rgba(255, 209, 102, 0.14);
  color: var(--warn);
}

button.chip:focus-visible {
  outline: 2px solid rgba(140, 255, 210, 0.75);
  outline-offset: 2px;
}

.project-career-row {
  align-items: center;
}

.chip-project {
  gap: 6px;
  border-color: rgba(255, 209, 102, 0.62);
  background: rgba(255, 209, 102, 0.11);
}

.project-name {
  color: var(--warn);
}

.project-period {
  color: var(--text);
}

.chip-role {
  border-color: rgba(140, 255, 210, 0.38);
  background: rgba(140, 255, 210, 0.12);
  color: var(--hot);
}

.chip-group {
  border-color: rgba(255, 209, 102, 0.5);
  background: rgba(255, 209, 102, 0.12);
  color: var(--warn);
}

.evidence-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.evidence-top span {
  color: var(--warn);
  font-weight: 900;
  text-align: right;
}

.bar {
  height: 8px;
  margin: 14px 0;
  overflow: hidden;
  border-radius: 999px;
  background: #0a0e17;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--danger), var(--hot));
}

.questions {
  display: grid;
  gap: 12px;
  margin: 18px 0 0;
  padding-left: 22px;
}

.questions li {
  padding-left: 8px;
  line-height: 1.55;
}

.llm-band {
  border-color: rgba(140, 255, 210, 0.32);
}

.analysis-list {
  display: grid;
  gap: 0;
  margin: 18px 0 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #242c3e;
  border-radius: 8px;
  background: #0a0e17;
}

.analysis-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  min-height: 48px;
  padding: 10px 14px;
  border-bottom: 1px solid #242c3e;
  color: var(--text);
  line-height: 1.6;
}

.analysis-item:last-child {
  border-bottom: 0;
}

.analysis-item span {
  display: grid;
  place-items: center;
  margin-top: 2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--hot), var(--warn));
  color: #07100d;
  font-size: 14px;
  font-weight: 900;
}

.analysis-item p {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 820px) {
  .hero,
  .metrics,
  .evidence-list {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 40px;
  }

  .grade-panel {
    flex-direction: column;
  }

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