:root { color-scheme: light dark; }
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: #f6f7fb;
  color: #1a1a2e;
}
.shell { max-width: 960px; margin: 0 auto; padding: 32px 20px 80px; }
.masthead { margin-bottom: 24px; }
.eyebrow { letter-spacing: 0.08em; font-size: 12px; color: #6b6b8a; text-transform: uppercase; }
h1 { margin: 4px 0; font-size: 28px; }
.lede { color: #4a4a68; max-width: 640px; }

.upload-panel {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.drop-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border: 2px dashed #c7c7e0;
  border-radius: 10px;
  padding: 32px;
  cursor: pointer;
  text-align: center;
}
.drop-zone.drag { border-color: #5b5bd6; background: #f0f0ff; }
.drop-zone input { display: none; }
.upload-mark { font-size: 24px; color: #5b5bd6; }

button {
  margin-top: 16px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  background: #5b5bd6;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}
button:disabled { opacity: 0.6; cursor: default; }

.error-box {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffecec;
  color: #a12a2a;
}
.error-box .error-message { margin: 0 0 8px; font-weight: 600; }
.error-box table { background: #fff; border-radius: 6px; overflow: hidden; }
.error-box th, .error-box td { border-color: #f3caca; color: #6b1f1f; }
.hidden { display: none; }

.results { margin-top: 28px; }
.results-summary { margin-bottom: 12px; color: #4a4a68; }

.changes-summary {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  background: #eceafc;
  color: #3a3a70;
}
.changes-summary h3 { margin: 0 0 6px; font-size: 14px; }
.changes-summary ul { margin: 0; padding-left: 20px; font-size: 13px; }
.changes-summary li { margin-bottom: 2px; }

.attempt-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }

.excel-downloads { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.excel-downloads a {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eceafc;
  color: #5b5bd6;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
}
.excel-downloads a:hover { background: #ddd9fb; }

.violations-summary { display: grid; gap: 10px; margin-bottom: 20px; }
.violation-group {
  border-radius: 10px;
  padding: 10px 14px;
}
.violation-group h3 { margin: 0 0 6px; font-size: 14px; }
.violation-group ul { margin: 0; padding-left: 20px; font-size: 13px; }
.violation-group li { margin-bottom: 2px; }
.violation-group .penalty { opacity: 0.75; }
.violation-red { background: #ffecec; color: #a12a2a; }
.violation-orange { background: #fff2e0; color: #a15a00; }
.violation-yellow { background: #fffbe0; color: #8a7500; }

.view-switcher { display: flex; gap: 6px; margin-bottom: 16px; flex-wrap: wrap; }
.view-tab {
  margin-top: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: #eceafc;
  color: #5b5bd6;
  font-weight: 600;
  font-size: 13px;
}
.view-tab.active { background: #5b5bd6; color: #fff; }
.class-list { display: grid; gap: 12px; }
.class-card {
  background: #fff;
  border-radius: 10px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.class-card header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.kind-badge {
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eceafc;
  color: #5b5bd6;
  font-weight: 600;
}
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 4px 8px; border-bottom: 1px solid #eee; }

@media (prefers-color-scheme: dark) {
  body { background: #14141f; color: #e6e6f0; }
  .upload-panel, .class-card { background: #1d1d2c; box-shadow: none; }
  .drop-zone { border-color: #3a3a52; }
  th, td { border-color: #2a2a3c; }
  .view-tab { background: #2a2a44; color: #b5b5e0; }
  .view-tab.active { background: #5b5bd6; color: #fff; }
  .violation-red { background: #3a1c1c; color: #ff9c9c; }
  .violation-orange { background: #3a2a10; color: #ffbe70; }
  .violation-yellow { background: #35300f; color: #f0d878; }
  .changes-summary { background: #2a2a44; color: #c7c7f0; }
  .excel-downloads a { background: #2a2a44; color: #b5b5e0; }
  .excel-downloads a:hover { background: #34345a; }
}
