:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  color: #e3edf4;
  background: #0b1118;
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
header {
  padding: 26px 30px 18px;
  background: #131d29;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
h1 {
  font-size: 28px;
  letter-spacing: -0.8px;
  margin: 6px 0;
}
h2 {
  font-size: 16px;
  margin: 8px 0;
}
p {
  line-height: 1.55;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: #a0b2c4;
  font-weight: 700;
}
header p {
  color: #a0b2c4;
  margin: 0;
}
.tabs {
  display: flex;
  gap: 8px;
  padding: 10px 30px;
  background: #131d29;
  border-bottom: 1px solid #2d3e50;
  align-items: center;
}
.tabs a {
  margin-left: auto;
  font-size: 12px;
}
a {
  color: #63d7cf;
}
button,
select,
input,
textarea {
  font: inherit;
}
button,
select,
input[type="text"],
textarea {
  border: 1px solid #344a60;
  border-radius: 7px;
  background: #131d29;
  padding: 8px 10px;
  color: inherit;
}
button {
  cursor: pointer;
  white-space: nowrap;
}
button:hover {
  background: #22364a;
  border-color: #789bb2;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #6cddd4;
  outline-offset: 2px;
}
.primary,
[aria-current="page"] {
  background: #63d7cf !important;
  color: #092629;
}
.tabs button {
  border: 0;
}
.tabs [aria-current="page"] {
  border-radius: 20px;
}
#notice {
  min-height: 42px;
  padding: 12px 30px;
  font-size: 13px;
}
main {
  padding: 0 20px 24px;
}
.workspace {
  display: grid;
  grid-template-columns: 210px minmax(300px, 1fr) minmax(360px, 480px);
  gap: 14px;
  align-items: start;
}
.workspace > *,
section:not(#review) {
  background: #131d29;
  border: 1px solid #2d3e50;
  border-radius: 12px;
  padding: 16px;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.muted {
  font-size: 12px;
  color: #a0b2c4;
}
.tools {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  align-items: center;
  margin: 10px 0;
}
.tools button {
  font-size: 12px;
  padding: 7px;
}
.queue {
  position: sticky;
  top: 10px;
  max-height: 80vh;
  overflow: auto;
}
#queue button {
  display: block;
  width: 100%;
  text-align: left;
  white-space: normal;
  margin: 8px 0;
  padding: 12px;
  font-size: 12px;
}
#queue small {
  display: block;
  color: #a0b2c4;
  margin-top: 5px;
}
#viewport {
  height: 67vh;
  overflow: auto;
  background: #0c141e;
  border-radius: 8px;
  position: relative;
  overscroll-behavior: contain;
}
#imageBox {
  position: relative;
  margin: auto;
}
#image {
  display: block;
  position: absolute;
  transform-origin: center center;
  max-width: none;
}
#previewEmpty {
  padding: 30px;
  color: #a0b2c4;
}
.assessment {
  max-height: 83vh;
  overflow: auto;
}
.field {
  padding: 12px 0;
  border-bottom: 1px solid #0c141e;
}
.field h3 {
  font-size: 13px;
  margin: 0 0 7px;
  overflow-wrap: anywhere;
}
.value {
  font-size: 14px;
  padding: 10px;
  background: #1c2b3c;
  border-radius: 6px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.choices {
  display: flex;
  gap: 4px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.choices button {
  font-size: 12px;
  padding: 6px 8px;
}
.choices .correct.selected {
  background: #133c32;
  border-color: #47c59d;
}
.choices .yellow.selected {
  background: #49391a;
  border-color: #e5b746;
}
.choices .error.selected {
  background: #4f242d;
  border-color: #f07b87;
}
.choices .not_applicable.selected {
  background: #293849;
}
.field select,
.field textarea,
.field input {
  width: 100%;
  margin-top: 7px;
}
.badge {
  border-radius: 20px;
  padding: 5px 9px;
  font-size: 11px;
  background: #26394b;
  white-space: nowrap;
}
.savebar {
  position: sticky;
  bottom: -16px;
  background: #131d29;
  padding: 14px 0 3px;
  display: flex;
  gap: 8px;
  box-shadow: 0 -8px 12px #131d29;
}
.template-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr auto;
  gap: 8px;
  margin: 10px 0;
}
.template-row input {
  min-width: 0;
}
#results,
#checklists {
  max-width: 1100px;
  margin: auto;
}
#resultSummary {
  white-space: pre-wrap;
}
@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 170px 1fr;
  }
  .assessment {
    grid-column: 1/-1;
    max-height: none;
  }
  .savebar {
    bottom: 0;
  }
}
@media (max-width: 650px) {
  header {
    padding: 20px;
  }
  .tabs {
    padding: 8px;
    flex-wrap: wrap;
  }
  .tabs a {
    margin-left: 0;
  }
  .workspace {
    display: block;
  }
  .workspace > * {
    margin-bottom: 12px;
  }
  .queue {
    position: static;
    max-height: 220px;
  }
  main {
    padding: 0 10px;
  }
  #viewport {
    height: 50vh;
  }
  .template-row {
    grid-template-columns: 1fr;
  }
}

.scorecards {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.scorecard {
  padding: 20px;
  background: #1c2b3c;
  border-radius: 10px;
  min-width: 135px;
}
.scorecard strong {
  display: block;
  font-size: 30px;
}
.scorecard span {
  font-size: 12px;
  color: #a0b2c4;
}

[hidden] {
  display: none !important;
}
#queue button[aria-current="true"] {
  border-color: #63d7cf;
  background: #163635;
}
.classification-card {
  padding: 4px 0 20px;
  border-bottom: 0;
}
.classification-card h3 {
  color: #a0b2c4;
  font-size: 12px;
  font-weight: 500;
}
.classification-card .value {
  font-size: 23px;
  font-weight: 650;
  padding: 14px 0;
  background: transparent;
}
.classification-card .choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.classification-card .choices button {
  min-height: 60px;
  font-size: 14px;
  font-weight: 650;
  border-width: 2px;
  white-space: normal;
}
.classification-card .correct {
  background: #174336;
  border-color: #337961;
  color: #aeefd2;
}
.classification-card .yellow {
  background: #493815;
  border-color: #a9832a;
  color: #ffe2a0;
}
.classification-card .error {
  background: #59232d;
  border-color: #bb5465;
  color: #ffd4d9;
}
.classification-card .selected {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
#fieldSetup,
#legacyFields {
  margin: 14px 0;
  color: #a0b2c4;
}
summary {
  cursor: pointer;
}
#types label {
  display: block;
  margin: 10px 0;
}
#types select {
  max-width: 100%;
}
.queue > label {
  display: block;
  margin: 10px 0;
}
#queueSearch {
  width: 100%;
  margin-top: 6px;
}
textarea:focus-visible {
  outline: 3px solid #6cddd4;
  outline-offset: 2px;
}

#queueMode,
#queueGroup {
  display: block;
  width: 100%;
  margin-top: 6px;
  margin-bottom: 12px;
  min-width: 0;
}

.queue-status { display: block; font-size: 11px; margin: 5px 0; color: #a0b2c4; }
.queue-status.reviewed { color: #63d7af; }
.queue-status.in_progress { color: #f3ce72; }

.auth-gate { max-width: 38rem; margin: 3rem auto; padding: 2rem; border: 1px solid #314659; border-radius: 14px; background: #131d29; }
.account { display: flex; flex-direction: column; gap: .4rem; align-items: flex-end; }
#signedIn { overflow-wrap: anywhere; }
