:root {
  --bg: #0b0d10;
  --panel: #11151b;
  --panel2: #0f1318;
  --text: #e8eef5;
  --muted: #a8b3c2;
  --border: rgba(255, 255, 255, 0.10);

  --accent: #ff8a00;
  --accent2: #ffb15c;

  --good: #2ecc71;
  --bad: #ff4d4d;
  --warn: #ffb000;

  --shadow: 0 10px 30px rgba(0,0,0,0.45);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(255, 138, 0, 0.18), transparent 60%),
    radial-gradient(900px 400px at 110% 10%, rgba(255, 138, 0, 0.10), transparent 55%),
    linear-gradient(180deg, var(--bg), #07080a);
  line-height: 1.45;
}

/* Header / Brand */
header {
  padding: 18px 16px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,138,0,0.08), transparent 70%);
}

.brand {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.brandLeft {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.logoMark {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, rgba(255,138,0,0.22), rgba(255,138,0,0.06));
  border: 1px solid rgba(255,138,0,0.35);
  box-shadow: var(--shadow);
}

/* Tool logo SVG colors */
.toolsIcon { width: 40px; height: 40px; }
.toolsIcon .wrench { fill: rgba(255, 138, 0, 0.95); }
.toolsIcon .hole { fill: rgba(11, 13, 16, 0.95); }
.toolsIcon .driver { fill: rgba(255, 177, 92, 0.95); }
.toolsIcon .metal { fill: rgba(232, 238, 245, 0.80); }
.toolsIcon .rule { fill: rgba(255, 138, 0, 0.30); }
.toolsIcon .tick { stroke: rgba(232, 238, 245, 0.55); stroke-width: 2; stroke-linecap: round; fill: none; }

.brandText { min-width: 0; }
.brandName {
  font-size: 1.55rem;
  font-weight: 950;
  letter-spacing: 0.6px;
  line-height: 1.05;
  display: flex;
  gap: 10px;
  align-items: baseline;
}

.logoCNC {
  color: var(--accent);
}

.logoAcademy {
  color: rgba(232, 238, 245, 0.88);
}

/* The hidden admin trigger (Y) */
.logoY {
  display: inline-block;
  user-select: none;
  -webkit-user-select: none;
  /* No visible hint; still tappable */
}

.brandTag {
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
  font-size: 0.95rem;
}

.brandRight {
  display: flex;
  align-items: center;
  gap: 10px;
}

.container {
  max-width: 980px;
  margin: 22px auto 40px;
  padding: 0 16px;
  display: grid;
  gap: 16px;
}

.panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 55%), var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
}

.panelHead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.panelHead h2 { margin: 0; font-size: 1.35rem; }

.meta { display: flex; gap: 10px; align-items: center; }

.pill {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,138,0,0.35);
  background: rgba(255,138,0,0.10);
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
}

.studentRow {.nameError {
  grid-column: 2;
  font-size: 0.85rem;
  color: rgba(255,77,77,0.75);
  margin-top: -6px;
  display: none;
}
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 10px;
  align-items: center;
  margin: 10px 0 14px;
}
.studentLabel { color: var(--muted); font-weight: 800; }

.input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.03);
  color: var(--text);
  outline: none;
}
.input:focus {
  border-color: rgba(255,138,0,0.65);
  box-shadow: 0 0 0 3px rgba(255,138,0,0.15);
}

#questionStage { margin-top: 8px; }

.qCard {
  background: var(--panel2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 10px;
}

.qText { margin: 0 0 10px; font-size: 1.05rem; }

.choice {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: transform 0.06s ease, border-color 0.15s ease, background 0.15s ease;
}
.choice:hover {
  border-color: rgba(255,138,0,0.35);
  background: rgba(255,138,0,0.06);
}
.choice:active { transform: translateY(1px); }
.choice input[type="radio"] { transform: scale(1.15); accent-color: var(--accent); }

.navRow {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

button {
  appearance: none;
  border: 1px solid rgba(255,138,0,0.45);
  background: linear-gradient(180deg, rgba(255,138,0,0.22), rgba(255,138,0,0.10));
  color: var(--text);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 900;
  letter-spacing: 0.2px;
  transition: transform 0.06s ease, border-color 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}
button:hover {
  border-color: rgba(255,138,0,0.75);
  background: linear-gradient(180deg, rgba(255,138,0,0.30), rgba(255,138,0,0.12));
}
button:active { transform: translateY(1px); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

button.ghost {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.04);
}
button.danger {
  border-color: rgba(255,77,77,0.50);
  background: rgba(255,77,77,0.10);
}

.reviewBtn {
  margin-top: 10px;
  border-color: rgba(255,176,0,0.60);
  background: rgba(255,176,0,0.15);
}
.reviewBtn:hover { background: rgba(255,176,0,0.25); }

.result {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,0.20);
  box-shadow: var(--shadow);
}
.result .big { font-size: 1.15rem; font-weight: 900; }
.result .sub { color: var(--muted); margin-top: 6px; }
.result .rating { margin-top: 8px; font-weight: 900; }
.result .rating.good { color: var(--good); }
.result .rating.warn { color: var(--warn); }
.result .rating.bad  { color: var(--bad); }

@media (max-width: 600px) {
  .studentRow { grid-template-columns: 1fr; }
  .brandName { font-size: 1.35rem; gap: 8px; }
}
