body.st-body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6f8;
  color: #1a1a1a;
}
.st-card {
  max-width: 640px;
  margin: 48px auto;
  background: #fff;
  padding: 28px 32px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
}
.st-login label { display: block; margin: 12px 0 6px; }
.st-login input {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.st-btn, .st-login button {
  margin-top: 16px;
  background: #1e5aa8;
  color: #fff;
  border: 0;
  padding: 10px 22px;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
}
.st-btn:disabled { background: #9aa8b8; cursor: not-allowed; }
.st-alert, .st-fail { color: #a40000; }
.st-list { list-style: none; padding: 0; }
.st-list li { padding: 10px 0; border-bottom: 1px solid #eee; }
.st-exam { max-width: 960px; margin: 24px auto 48px; padding: 0 16px; }
.st-phase {
  background: #e8f0fb;
  border: 1px solid #c5d6ef;
  padding: 12px 16px;
  margin-bottom: 12px;
  border-radius: 4px;
  font-size: 18px;
}
.st-text, .st-task-a {
  width: 100%;
  min-height: 320px;
  box-sizing: border-box;
  font-size: 20px;
  line-height: 1.5;
  padding: 12px;
  border: 1px solid #bbb;
  border-radius: 4px;
}
.st-task-a { min-height: 80px; margin-bottom: 16px; }
.st-locked {
  background: #fff;
  border: 1px solid #ddd;
  padding: 16px;
  margin-bottom: 20px;
  white-space: pre-wrap;
  font-size: 18px;
  line-height: 1.5;
}
.st-away {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #c62828;
  color: #fff;
  text-align: center;
  padding: 12px;
  font-weight: 700;
}
.st-task-q { font-weight: 600; margin: 12px 0 6px; }
audio { display: none; }

/* Student navigation */
.st-nav {
  display: flex;
  align-items: center;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 12px;
  margin-bottom: 20px;
}
.st-nav a {
  color: #475569;
  text-decoration: none;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 4px;
  margin-right: 8px;
}
.st-nav a:hover {
  background: #f1f5f9;
  color: #1e293b;
}
.st-nav a.active {
  background: #1e5aa8;
  color: #fff;
}
.st-nav a.pull-right {
  margin-left: auto;
  margin-right: 0;
  color: #94a3b8;
  font-weight: normal;
}
.st-nav a.pull-right:hover {
  color: #dc2626;
}

/* Essay writing layout */
.st-essay {
  max-width: 1200px;
  margin: 16px auto 48px;
}
.st-topbar {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,.04);
}
.st-title-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.st-title-box h1 {
  margin: 0;
  font-size: 22px;
}
.st-timer-box {
  font-size: 15px;
  color: #64748b;
  font-weight: 600;
}
.st-timer-val {
  font-size: 20px;
  color: #d9534f;
  font-weight: 700;
  margin-left: 6px;
}
.st-word-bar {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.st-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}
.st-badge-success { background: #dcfce7; color: #166534; }
.st-badge-warning { background: #fef3c7; color: #92400e; }
.st-badge-danger { background: #fee2e2; color: #991b1b; }
.st-hint { font-size: 12px; color: #94a3b8; }

.st-topic-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 15px;
}
.st-comment-box {
  background: #fdf8e6;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 10px 16px;
  margin-bottom: 14px;
  font-size: 14px;
  color: #78350f;
}

.st-split-row {
  display: flex;
  gap: 16px;
}
.st-split-col {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.st-col-source {
  max-width: 45%;
}
.st-col-editor {
  max-width: 55%;
}
.st-pane-header {
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  padding: 10px 14px;
  font-size: 14px;
}
.st-source-view {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 6px 6px;
  padding: 16px;
  height: 520px;
  overflow-y: auto;
  font-family: Georgia, serif;
  font-size: 16px;
  line-height: 1.6;
}
.st-essay-textarea {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 0 0 6px 6px;
  padding: 16px;
  height: 520px;
  box-sizing: border-box;
  font-size: 18px;
  line-height: 1.6;
  resize: vertical;
  font-family: "Segoe UI", Arial, sans-serif;
}
.st-actions {
  text-align: right;
  margin-top: 16px;
}
.st-btn-finish {
  background: #16a34a;
  font-size: 18px;
  padding: 12px 28px;
}
.st-btn-finish:hover {
  background: #15803d;
}

/* Results screen */
.st-result-card {
  max-width: 900px;
}
.st-result-metrics {
  display: flex;
  gap: 16px;
  margin: 20px 0;
}
.st-metric {
  flex: 1;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 14px;
  text-align: center;
}
.st-metric .st-val {
  font-size: 24px;
  font-weight: 700;
  color: #1e5aa8;
}
.st-metric .st-lbl {
  font-size: 12px;
  color: #64748b;
  text-transform: uppercase;
  margin-top: 4px;
}
.st-criteria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.st-crit-item {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.st-crit-score {
  font-weight: 700;
  color: #1e5aa8;
}
.st-feedback-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 20px;
  line-height: 1.6;
}
.st-highlighted-box {
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 18px;
  font-size: 16px;
  line-height: 1.7;
}

/* Error highlight marks */
.essay-mark {
  position: relative;
  border-radius: 3px;
  padding: 1px 3px;
  cursor: help;
}
.mark-spell { background-color: #ffd7d7; border-bottom: 2px wavy #d9534f; color: #900; }
.mark-punct { background-color: #ffe6cc; border-bottom: 2px dashed #f0ad4e; color: #995c00; }
.mark-grammar { background-color: #d9edf7; border-bottom: 2px solid #337ab7; color: #245269; }
.mark-speech { background-color: #f3e5f5; border-bottom: 2px dotted #8e24aa; color: #4a148c; }
.essay-badge {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  background: rgba(0,0,0,0.12);
  border-radius: 2px;
  padding: 0 3px;
  margin-right: 3px;
  vertical-align: super;
}

