/* Set 1 layout trial: one continuous toolbar with three purpose-based groups. */
.taskbar { display: none !important; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: block;
  width: 100%;
  height: 66px;
  min-height: 66px;
  padding: 0;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.toolbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  width: 100%;
  min-width: 0;
  height: 100%;
  gap: 30px;
  padding: 0 25px;
}
.toolbar-identity,
.toolbar-practice,
.toolbar-actions,
.toolbar-action-links {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  white-space: nowrap;
}
.toolbar-identity { gap: 14px; }
.toolbar-identity .brand {
  font-size: 1.11rem;
  font-weight: 850;
  color: var(--navy);
  text-decoration: none;
}
.toolbar-identity .exam-title {
  display: block;
  padding-left: 14px;
  border-left: 1px solid #dfe6ef;
  text-align: left;
}
.toolbar-identity .exam-title strong {
  display: block;
  font-size: .99rem;
  font-weight: 850;
  color: var(--navy);
}
.toolbar-practice {
  gap: 20px;
  padding: 0 22px;
  border-left: 1px solid #edf1f6;
  border-right: 1px solid #edf1f6;
}
.header-task-switch {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px;
  border-radius: 11px;
  background: #f2f5fa;
}
.header-task-switch .task-tab {
  min-height: 36px;
  padding: 7px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: .88rem;
  font-weight: 800;
}
.header-task-switch .task-tab:not(.active) {
  border-color: #e1e8f1;
  background: #fff;
}
.toolbar-practice .candidate-controls {
  position: relative;
  flex: 0 0 auto;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
}
.toolbar-practice .candidate-row,
.toolbar-practice .name-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
}
.toolbar-practice .name-row {
  position: relative;
  margin: 0;
}
.toolbar-practice .name-row label {
  margin: 0;
  color: var(--navy);
  font-size: .9rem;
  font-weight: 800;
}
.toolbar-practice .name-row input {
  width: 182px;
  min-width: 0;
  height: 39px;
  padding: 8px 12px;
  font-size: .9rem;
  border: 1px solid #dce3eb;
  border-radius: 10px;
  background: #fff;
}
.toolbar-practice .name-error {
  position: absolute;
  left: 0;
  top: calc(100% + 5px);
  z-index: 90;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #e3a8a8;
  border-radius: 8px;
  background: white;
  box-shadow: 0 6px 16px rgba(16,45,88,.12);
}
.toolbar-actions {
  justify-content: flex-end;
  gap: 20px;
  margin-left: auto;
}
.toolbar-actions .timer-wrap {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin: 0;
}
.toolbar-actions .timer {
  min-width: 77px;
  padding: 9px 10px;
  font-size: .94rem;
  line-height: 1.2;
}
.toolbar-actions #startBtn {
  min-height: 39px;
  padding: 9px 14px;
  border: 1px solid #16804d;
  border-radius: 10px;
  background: #16804d;
  color: #fff;
  font-size: .85rem;
  font-weight: 850;
}
.toolbar-actions #startBtn:hover { background: #10623b; border-color: #10623b; }
.toolbar-action-links {
  gap: 10px;
  padding-left: 19px;
  border-left: 1px solid #edf1f6;
}
.feedback-quick-link,
.feedback-quick-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 9px 13px;
  border: 1px solid #e5d4ff;
  border-radius: 10px;
  background: #f4eafe;
  color: #6d28d9;
  font-size: .86rem;
  font-weight: 850;
  text-decoration: none;
}
.feedback-quick-link:hover { background: #eadbff; }
.toolbar-action-links .submit-btn {
  min-height: 39px;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: .86rem;
  font-weight: 850;
}
.topbar #resetAttemptBtn { display: none !important; }
.feedback-quick-link:focus-visible,
.header-task-switch .task-tab:focus-visible,
.toolbar-actions #startBtn:focus-visible { outline: 3px solid rgba(37,99,235,.4); outline-offset: 2px; }
.workspace {
  height: calc(100vh - 66px);
  height: calc(100dvh - 66px);
}
.question-pane { padding-top: 19px; }
.answer-head { padding: 12px 18px; }
@media (max-width: 1440px) {
  .toolbar-inner { gap: 17px; padding: 0 17px; }
  .toolbar-practice { gap: 13px; padding: 0 13px; }
  .toolbar-actions { gap: 13px; }
  .toolbar-action-links { padding-left: 12px; }
  .toolbar-practice .name-row input { width: 155px; }
  .toolbar-identity { gap: 10px; }
  .toolbar-identity .exam-title { padding-left: 10px; }
}
@media (max-width: 1180px) {
  /* Horizontal panning is preferable to shrinking or splitting controls. */
  .topbar { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; }
  .toolbar-inner {
    min-width: max-content;
    width: max-content;
    gap: 20px;
    padding: 0 16px;
  }
  .toolbar-practice .name-row input { width: 170px; }
}
@media (max-width: 900px) {
  .topbar { height: 58px; min-height: 58px; }
  .toolbar-inner { gap: 15px; }
  .toolbar-identity .brand { font-size: 1rem; }
  .toolbar-identity .exam-title strong { font-size: .92rem; }
  .toolbar-actions #startBtn,
  .toolbar-action-links .submit-btn,
  .feedback-quick-link { min-height: 38px; }
  .workspace { height: auto; min-height: calc(100dvh - 58px); }
}
@media print {
  .feedback-quick-link { display: none !important; }
}
