:root {
  color-scheme: dark;
  --bg: #071012;
  --panel: rgba(16, 28, 32, 0.88);
  --panel-strong: #101d21;
  --line: rgba(143, 244, 230, 0.18);
  --line-strong: rgba(143, 244, 230, 0.34);
  --text: #eef8f8;
  --muted: #92a9ac;
  --teal: #27e1cf;
  --teal-strong: #00bdaa;
  --orange: #ff9f43;
  --orange-strong: #f97316;
  --red: #ff5f73;
  --green: #78f5a1;
  --blue: #58a6ff;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    linear-gradient(rgba(39, 225, 207, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 225, 207, 0.06) 1px, transparent 1px),
    radial-gradient(circle at 20% 0%, rgba(255, 159, 67, 0.12), transparent 28rem),
    linear-gradient(135deg, #061114, #10171b 46%, #05090b);
  background-size: 48px 48px, 48px 48px, auto, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
}

.landing-shell {
  min-height: 100vh;
  overflow: hidden;
}

.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 72px;
  padding: 12px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 15, 18, 0.9);
  backdrop-filter: blur(18px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.landing-brand span:last-child {
  display: grid;
  gap: 3px;
}

.landing-brand strong {
  font-size: 16px;
  line-height: 1;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.landing-nav-actions a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.04);
}

.landing-nav-actions .nav-master {
  border-color: rgba(255, 159, 67, 0.45);
  color: #ffd6a5;
}

.landing-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: calc(100svh - 138px);
  padding: 54px 28px 64px;
  border-bottom: 1px solid var(--line);
  background: #071012;
  isolation: isolate;
}

.landing-scene {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background:
    linear-gradient(rgba(39, 225, 207, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(39, 225, 207, 0.08) 1px, transparent 1px),
    linear-gradient(145deg, rgba(8, 28, 33, 0.96), rgba(13, 16, 18, 0.76) 52%, rgba(6, 9, 11, 0.92));
  background-size: 44px 44px, 44px 44px, auto;
}

.landing-scene::before {
  content: "";
  position: absolute;
  inset: 10% 4% 8%;
  border: 1px solid rgba(39, 225, 207, 0.2);
  border-radius: 8px;
  background:
    linear-gradient(90deg, transparent 49%, rgba(255, 159, 67, 0.28) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(39, 225, 207, 0.18) 50%, transparent 51%);
}

.field-lane,
.field-node,
.robot-silhouette,
.telemetry-strip {
  position: absolute;
}

.field-lane {
  height: 2px;
  transform-origin: left center;
  background: rgba(39, 225, 207, 0.48);
}

.lane-a {
  left: 54%;
  top: 28%;
  width: 360px;
  transform: rotate(22deg);
}

.lane-b {
  left: 48%;
  top: 68%;
  width: 430px;
  transform: rotate(-16deg);
  background: rgba(255, 159, 67, 0.44);
}

.field-node {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(39, 225, 207, 0.7);
  border-radius: 50%;
  background: rgba(6, 15, 18, 0.86);
  box-shadow: 0 0 24px rgba(39, 225, 207, 0.28);
}

.node-a {
  left: 67%;
  top: 23%;
}

.node-b {
  left: 82%;
  top: 62%;
  border-color: rgba(255, 159, 67, 0.72);
}

.node-c {
  left: 58%;
  top: 72%;
}

.robot-silhouette {
  right: 10%;
  bottom: 15%;
  width: 220px;
  height: 118px;
  border: 1px solid rgba(143, 244, 230, 0.32);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(39, 225, 207, 0.18), rgba(255, 159, 67, 0.16)),
    rgba(2, 8, 10, 0.62);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

.robot-silhouette::before,
.robot-silhouette::after {
  content: "";
  position: absolute;
  bottom: -18px;
  width: 58px;
  height: 58px;
  border: 10px solid rgba(238, 248, 248, 0.18);
  border-radius: 50%;
  background: rgba(3, 11, 13, 0.9);
}

.robot-silhouette::before {
  left: 22px;
}

.robot-silhouette::after {
  right: 22px;
}

.robot-silhouette span {
  position: absolute;
  top: 18px;
  width: 54px;
  height: 22px;
  border: 1px solid rgba(255, 159, 67, 0.42);
  border-radius: 6px;
  background: rgba(255, 159, 67, 0.18);
}

.robot-silhouette span:first-child {
  left: 24px;
}

.robot-silhouette span:last-child {
  right: 24px;
}

.telemetry-strip {
  display: grid;
  place-items: center;
  min-width: 82px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(6, 15, 18, 0.74);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.strip-a {
  right: 28%;
  top: 20%;
}

.strip-b {
  right: 12%;
  top: 34%;
}

.strip-c {
  right: 20%;
  bottom: 34%;
  color: #ffd6a5;
  border-color: rgba(255, 159, 67, 0.34);
}

.landing-hero-content {
  width: 100%;
  max-width: 760px;
  min-width: 0;
  display: grid;
  gap: 18px;
}

.landing-hero-content h1 {
  max-width: 720px;
  min-width: 0;
  font-size: 58px;
  line-height: 1;
  overflow-wrap: anywhere;
}

.landing-hero-content p:not(.eyebrow) {
  max-width: 680px;
  min-width: 0;
  color: #c8d8da;
  font-size: 18px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.landing-actions a,
a.primary-button,
a.secondary-button,
a.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.landing-actions .ghost-button {
  margin-top: 0;
  border-color: rgba(255, 159, 67, 0.42);
  color: #ffd6a5;
}

.landing-content {
  display: grid;
  gap: 24px;
  padding: 28px;
}

.landing-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.landing-feature-card,
.landing-flow-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 28, 32, 0.74);
}

.landing-feature-card {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.landing-feature-card h2,
.landing-flow h2 {
  font-size: 22px;
}

.landing-feature-card p,
.landing-flow-row p {
  color: var(--muted);
  line-height: 1.55;
}

.landing-flow {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(320px, 1.15fr);
  gap: 18px;
  align-items: start;
  padding: 22px 0 36px;
}

.landing-flow-list {
  display: grid;
  gap: 10px;
}

.landing-flow-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 14px;
}

.landing-flow-row span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--teal);
  color: #03211f;
  font-weight: 900;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto minmax(220px, 0.8fr);
  gap: 24px;
  align-items: center;
  padding: 18px 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 15, 18, 0.9);
  backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 159, 67, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255, 159, 67, 0.22), rgba(39, 225, 207, 0.16));
  color: #fff;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 22px;
  line-height: 1.1;
}

h2 {
  font-size: 18px;
  line-height: 1.2;
}

.eyebrow {
  color: var(--orange);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.mode-switch,
.segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
}

.mode-switch button,
.segmented button {
  min-height: 38px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.mode-switch button.active,
.segmented button.active {
  background: var(--teal);
  color: #03211f;
}

.surface-pill {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.22);
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.surface-pill.admin {
  border-color: rgba(255, 159, 67, 0.44);
  background: rgba(255, 159, 67, 0.1);
}

.surface-pill.test {
  border-color: rgba(39, 225, 207, 0.42);
  background: rgba(39, 225, 207, 0.1);
}

.status-pill {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(120, 245, 161, 0.28);
  border-radius: 8px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--green);
  box-shadow: 0 0 18px var(--green);
  flex: 0 0 auto;
}

.workspace {
  padding: 28px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.panel-head,
.panel-head.split,
.section-title,
.editor-header,
.candidate-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.admin-grid {
  display: grid;
  grid-template-columns: 260px minmax(540px, 1fr) 300px;
  gap: 18px;
  align-items: start;
}

.rail,
.bank,
.builder,
.progress-panel,
.candidate-panel,
.start-panel,
.checklist-panel,
.login-card {
  padding: 18px;
}

.rail,
.bank {
  position: sticky;
  top: 104px;
}

.test-list,
.template-group,
.editor-stack,
.answer-stack,
.flow-list {
  display: grid;
  gap: 10px;
}

.rail .segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  max-width: 100%;
  margin: 16px 0;
}

.rail .segmented button {
  min-width: 0;
  width: 100%;
  min-height: 54px;
  padding: 0 8px;
  line-height: 1.12;
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-session-card {
  display: grid;
  gap: 4px;
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.admin-session-card strong {
  color: var(--text);
}

.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(39, 225, 207, 0.42);
  border-radius: 8px;
  background: rgba(39, 225, 207, 0.08);
  color: #bffff8;
  font-size: 12px;
  font-weight: 900;
}

.profile-panel {
  max-width: 860px;
}

.test-card,
.template-card,
.sequence-row,
.choice {
  display: grid;
  gap: 6px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
}

.test-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.test-card-main {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.delete-test-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(255, 95, 115, 0.32);
  border-radius: 6px;
  background: rgba(255, 95, 115, 0.08);
  color: #ffc8d0;
  font-size: 12px;
  font-weight: 900;
}

.delete-confirm {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}

.compact {
  min-height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
}

.test-card.active,
.template-card.selected,
.sequence-row.active,
.choice.selected {
  border-color: var(--teal);
  background: rgba(39, 225, 207, 0.1);
}

.template-card:disabled {
  opacity: 0.42;
}

.test-card span,
.test-card-main span,
.template-card strong,
.sequence-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

small {
  color: var(--muted);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.ghost-button,
.danger-button,
.mini-button,
.run-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.primary-button {
  border: 1px solid rgba(39, 225, 207, 0.65);
  background: linear-gradient(135deg, var(--teal), var(--teal-strong));
  color: #02201d;
}

.secondary-button,
.ghost-button,
.mini-button {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.danger-button {
  border: 1px solid rgba(255, 95, 115, 0.4);
  background: rgba(255, 95, 115, 0.12);
  color: #ffc8d0;
}

.run-button {
  border: 1px solid rgba(255, 159, 67, 0.5);
  background: rgba(255, 159, 67, 0.14);
  color: #ffd5a8;
}

.run-program-button {
  width: 100%;
  min-height: 56px;
  margin-top: 12px;
  border-color: rgba(255, 159, 67, 0.78);
  background: linear-gradient(135deg, var(--orange), var(--orange-strong));
  color: #1d0c02;
  box-shadow: 0 12px 28px rgba(249, 115, 22, 0.22);
  font-size: 15px;
}

.full {
  width: 100%;
}

.ghost-button {
  margin-top: 16px;
}

.inline-action {
  margin-top: 0;
}

.form-grid {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: 1.4fr 0.8fr 0.8fr;
}

.invite-form {
  display: grid;
  gap: 12px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.invite-link-row {
  margin-top: 12px;
}

.auth-note {
  padding: 12px;
  border: 1px solid rgba(255, 159, 67, 0.34);
  border-radius: 8px;
  background: rgba(255, 159, 67, 0.1);
  color: #ffe0bd;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.auth-note a {
  color: #fff4cf;
  font-weight: 900;
}

.return-link {
  display: inline-flex;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.return-link:hover {
  color: var(--text);
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(2, 8, 10, 0.62);
  color: var(--text);
  outline: none;
}

input,
select {
  height: 42px;
  padding: 0 12px;
}

textarea {
  min-height: 92px;
  padding: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(39, 225, 207, 0.12);
}

.question-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
}

.question-sequence,
.question-editor {
  min-height: 540px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.sequence-row {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.type-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  color: #041214;
  font-size: 11px;
  font-weight: 900;
}

.type-mc {
  background: var(--blue);
}

.type-java {
  background: var(--orange);
}

.type-frq {
  background: var(--green);
}

.template-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
}

.template-card.bank-readonly {
  cursor: default;
}

.section-title {
  margin: 10px 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.mini-button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.mini-button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.editor-header {
  margin-bottom: 12px;
}

.slot-pool-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.pool-list {
  display: grid;
  gap: 10px;
}

.pool-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.pool-card strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pool-card p {
  display: -webkit-box;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.bank-source-note {
  padding: 14px;
  border: 1px solid rgba(39, 225, 207, 0.24);
  border-radius: 8px;
  background: rgba(39, 225, 207, 0.07);
}

.bank-source-note strong {
  display: block;
  color: var(--text);
  margin-bottom: 6px;
}

.bank-source-note p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.submissions-panel {
  grid-column: 2 / -1;
  padding: 18px;
}

.question-bank-editor {
  grid-column: 2 / -1;
  padding: 18px;
}

.bank-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 16px 0;
}

.bank-editor-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 14px;
}

.bank-template-list,
.bank-template-editor {
  min-height: 560px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.15);
}

.bank-template-list {
  display: grid;
  align-content: start;
  gap: 10px;
  max-height: calc(100vh - 220px);
  overflow: auto;
}

.bank-template-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 6px 10px;
  align-items: center;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  text-align: left;
}

.bank-template-row.active {
  border-color: var(--teal);
  background: rgba(39, 225, 207, 0.1);
}

.bank-template-row strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-template-row small {
  grid-column: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-editor {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.option-edit-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.option-edit-row input[type="radio"] {
  width: 18px;
  height: 18px;
}

.correct-answer-note {
  padding: 10px 12px;
  border: 1px solid rgba(120, 245, 161, 0.28);
  border-radius: 8px;
  background: rgba(120, 245, 161, 0.08);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.java-template-fields textarea {
  min-height: 260px;
}

.editor-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.submission-list {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.submission-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.submission-main {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.submission-main strong {
  color: var(--text);
}

.submission-main p {
  margin-top: 4px;
  color: var(--muted);
}

.score-badge,
.score-result {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(120, 245, 161, 0.3);
  border-radius: 8px;
  background: rgba(120, 245, 161, 0.09);
}

.score-badge {
  min-width: 110px;
  text-align: right;
}

.submission-card-actions {
  display: grid;
  gap: 8px;
  justify-items: stretch;
}

.score-badge span,
.score-result span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.score-badge strong,
.score-result strong {
  color: var(--green);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 24px;
  line-height: 1;
}

.score-result {
  margin: 14px 0;
}

.score-result strong {
  font-size: 34px;
}

.score-result small {
  line-height: 1.4;
}

.submission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.submission-meta span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.submission-meta span.meta-warning {
  border-color: rgba(255, 159, 67, 0.42);
  background: rgba(255, 159, 67, 0.1);
  color: #ffd5a8;
}

.submission-details summary {
  color: var(--teal);
  cursor: pointer;
  font-weight: 900;
}

.proctor-details {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
}

.proctor-details.has-violations {
  border-color: rgba(255, 159, 67, 0.36);
  background: rgba(255, 159, 67, 0.07);
}

.proctor-details summary {
  color: var(--orange);
  cursor: pointer;
  font-weight: 900;
}

.proctor-details > p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.proctor-event-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.proctor-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.proctor-event.violation {
  border-color: rgba(255, 95, 115, 0.36);
  background: rgba(255, 95, 115, 0.08);
}

.proctor-event strong {
  color: var(--text);
}

.proctor-event span,
.proctor-event small {
  color: var(--muted);
  font-size: 12px;
}

.proctor-event p {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.score-detail-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.score-detail-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
}

.score-question {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.score-question > summary {
  cursor: pointer;
  list-style: none;
}

.score-question > summary::-webkit-details-marker {
  display: none;
}

.score-question[open] > summary {
  border-color: var(--teal);
  border-radius: 8px 8px 0 0;
  background: rgba(39, 225, 207, 0.08);
}

.score-detail-row strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.question-review {
  display: grid;
  gap: 12px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.12);
}

.response-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.review-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.review-block span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.review-block p,
.review-block pre {
  margin: 0;
  color: var(--text);
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

.review-block pre {
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 12px;
}

.review-block.correct,
.correct-response {
  border-color: rgba(120, 245, 161, 0.35);
  background: rgba(120, 245, 161, 0.08);
}

.review-block.incorrect {
  border-color: rgba(255, 95, 115, 0.35);
  background: rgba(255, 95, 115, 0.08);
}

.review-block.neutral,
.prompt-block {
  border-color: rgba(255, 159, 67, 0.28);
  background: rgba(255, 159, 67, 0.06);
}

.option-row {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  margin-bottom: 8px;
}

.option-row input[type="radio"],
.choice input[type="radio"] {
  width: 18px;
  height: 18px;
}

.code-textarea {
  min-height: 220px;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.55;
  tab-size: 4;
  background: #061014;
  color: #d9fff9;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 110px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.empty-state.tall {
  min-height: 420px;
}

.login-shell,
.start-grid {
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(260px, 360px);
  gap: 18px;
  justify-content: center;
  align-items: start;
}

.login-shell {
  grid-template-columns: minmax(320px, 460px);
  padding-top: 8vh;
}

.login-card h2,
.start-panel h2,
.checklist-panel h2 {
  margin: 4px 0 18px;
  font-size: 24px;
}

.test-preview {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 18px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(39, 225, 207, 0.07);
}

.test-preview p {
  margin-top: 6px;
  color: var(--muted);
}

.test-preview span {
  flex: 0 0 auto;
  color: var(--orange);
  font-weight: 900;
}

.timeout-note {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid rgba(255, 95, 115, 0.34);
  border-radius: 8px;
  background: rgba(255, 95, 115, 0.1);
  color: #ffc8d0;
  font-weight: 800;
}

.active-attempts {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.section-title.compact {
  min-height: auto;
  padding: 0;
  border: 0;
  background: transparent;
}

.active-attempt-list {
  display: grid;
  gap: 8px;
}

.active-attempt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.active-attempt-row p {
  margin-top: 4px;
  color: var(--muted);
}

.active-attempt-row small {
  display: block;
  margin-top: 6px;
  color: var(--orange);
  font-weight: 800;
}

.flow-list span {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.test-grid {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.countdown-timer {
  position: fixed;
  top: 92px;
  right: 28px;
  z-index: 20;
  display: grid;
  gap: 3px;
  min-width: 170px;
  padding: 12px 14px;
  border: 1px solid rgba(39, 225, 207, 0.42);
  border-radius: 8px;
  background: rgba(3, 11, 13, 0.92);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.36);
  text-align: right;
  backdrop-filter: blur(12px);
}

.countdown-timer span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.countdown-timer strong {
  color: var(--teal);
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 26px;
  line-height: 1;
}

.countdown-timer.danger {
  border-color: rgba(255, 95, 115, 0.65);
}

.countdown-timer.danger strong {
  color: var(--red);
}

.proctor-warning {
  position: fixed;
  top: 92px;
  right: 220px;
  left: 28px;
  z-index: 21;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 159, 67, 0.48);
  border-radius: 8px;
  background: rgba(28, 16, 7, 0.94);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(12px);
}

.proctor-warning div {
  display: grid;
  gap: 4px;
}

.proctor-warning strong {
  color: #ffd5a8;
}

.proctor-warning span {
  color: var(--muted);
  font-size: 13px;
}

.progress-panel {
  position: sticky;
  top: 104px;
}

.progress-bar {
  height: 10px;
  margin: 16px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--orange));
}

.question-map {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 18px;
}

.timer-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(39, 225, 207, 0.07);
}

.timer-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.timer-summary strong {
  color: var(--orange);
}

.proctor-summary.warning {
  border-color: rgba(255, 95, 115, 0.4);
  background: rgba(255, 95, 115, 0.1);
}

.proctor-summary.warning strong {
  color: var(--red);
}

.question-map button {
  display: grid;
  place-items: center;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.question-map button.active {
  border-color: var(--teal);
}

.question-map button.done {
  background: rgba(120, 245, 161, 0.12);
}

.candidate-head {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.candidate-head h2 {
  margin-top: 4px;
  font-size: 24px;
}

.prompt-copy {
  margin: 18px 0;
  color: #c8d8d9;
  line-height: 1.6;
  max-height: none;
  overflow: visible;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.choice {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  color: var(--text);
  font-size: 15px;
}

.java-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.code-panel,
.output-panel {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
}

.code-panel {
  display: grid;
  gap: 12px;
  align-content: start;
}

.candidate-code {
  min-height: 430px;
  resize: vertical;
}

.output-panel pre,
.expected-output pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

.output-panel > pre {
  min-height: 200px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: #030607;
  color: #d9fff9;
}

.expected-output {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 159, 67, 0.24);
  border-radius: 8px;
  background: rgba(255, 159, 67, 0.08);
}

.expected-output span {
  display: block;
  margin-bottom: 8px;
  color: var(--orange);
  font-size: 12px;
  font-weight: 900;
}

.frq-box textarea {
  min-height: 340px;
}

.candidate-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 1180px) {
  .landing-hero-content h1 {
    font-size: 48px;
  }

  .robot-silhouette {
    right: 5%;
    width: 190px;
  }

  .landing-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-feature-card:last-child {
    grid-column: 1 / -1;
  }

  .landing-flow {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .bank {
    position: static;
    grid-column: 1 / -1;
  }

  .template-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .template-group .section-title {
    grid-column: 1 / -1;
  }

  .java-workbench {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .landing-nav {
    position: static;
    align-items: stretch;
    flex-direction: column;
    padding: 14px 16px;
  }

  .landing-nav-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .landing-nav-actions a {
    justify-content: center;
    min-width: 0;
    padding: 0 8px;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .landing-hero {
    min-height: calc(100svh - 188px);
    padding: 38px 16px 46px;
  }

  .landing-scene::before {
    inset: 8% 14px 8%;
  }

  .lane-a,
  .lane-b,
  .field-node,
  .telemetry-strip,
  .robot-silhouette {
    opacity: 0.58;
  }

  .robot-silhouette {
    right: 18px;
    bottom: 8%;
    width: 152px;
    height: 86px;
  }

  .robot-silhouette::before,
  .robot-silhouette::after {
    width: 42px;
    height: 42px;
    bottom: -14px;
    border-width: 8px;
  }

  .strip-a {
    right: 44%;
  }

  .strip-b {
    right: 22px;
  }

  .landing-hero-content {
    gap: 14px;
  }

  .landing-hero-content h1 {
    font-size: 40px;
  }

  .landing-hero-content p:not(.eyebrow) {
    font-size: 16px;
  }

  .landing-actions a {
    width: 100%;
    min-height: 46px;
  }

  .landing-content {
    padding: 18px 16px 30px;
  }

  .landing-feature-grid {
    grid-template-columns: 1fr;
  }

  .landing-feature-card:last-child {
    grid-column: auto;
  }

  .landing-flow {
    padding-bottom: 18px;
  }

  .landing-flow-row {
    align-items: start;
  }

  .topbar {
    position: static;
    grid-template-columns: 1fr;
  }

  .surface-pill,
  .status-pill {
    justify-self: stretch;
  }

  .admin-grid,
  .question-layout,
  .test-grid,
  .start-grid,
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

  .countdown-timer {
    top: 12px;
    right: 16px;
    left: auto;
    min-width: 142px;
  }

  .countdown-timer strong {
    font-size: 22px;
  }

  .rail,
  .bank,
  .progress-panel {
    position: static;
  }

  .workspace {
    padding: 16px;
  }

  .template-group {
    grid-template-columns: 1fr;
  }

  .candidate-actions {
    grid-template-columns: 1fr;
  }

  .active-attempt-row {
    grid-template-columns: 1fr;
  }

  .pool-card {
    grid-template-columns: 1fr;
  }

  .submissions-panel {
    grid-column: auto;
  }

  .question-bank-editor {
    grid-column: auto;
  }

  .bank-editor-layout {
    grid-template-columns: 1fr;
  }

  .bank-template-list {
    max-height: none;
  }

  .submission-main,
  .score-detail-row,
  .response-grid,
  .proctor-event {
    grid-template-columns: 1fr;
  }

  .submission-main {
    display: grid;
  }

  .score-badge {
    text-align: left;
  }

  .submission-card-actions {
    justify-items: stretch;
  }

  .proctor-warning {
    position: static;
    flex-direction: column;
    align-items: stretch;
    margin-bottom: 14px;
  }
}

@media (max-width: 520px) {
  .landing-nav-actions {
    grid-template-columns: 1fr;
  }

  .landing-nav-actions a {
    min-height: 42px;
  }

  .landing-hero {
    min-height: calc(100svh - 250px);
  }

  .landing-hero-content h1 {
    font-size: 34px;
    line-height: 1.08;
  }

  .landing-hero-content p:not(.eyebrow) {
    max-width: 34ch;
    font-size: 15px;
  }

  .landing-actions {
    max-width: 34ch;
  }
}
