/* Reset & Global Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, Helvetica, sans-serif;
}

body {
  background-color: #ffffff;
  color: #333333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  user-select: none;
}

/* Watermark Background pattern for Welcome Page */
.welcome-bg {
  background-color: #fcfcfc;
  background-image: repeating-linear-gradient(
    -30deg,
    rgba(210, 200, 200, 0.15),
    rgba(210, 200, 200, 0.15) 15px,
    transparent 15px,
    transparent 60px
  );
  position: relative;
  overflow-x: hidden;
}

/* Diagonal Roll Number text overlay background */
.watermark-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  font-size: 26px;
  font-weight: 700;
  color: #a09090;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 30px 40px;
  transform: rotate(-25deg) scale(1.3);
  overflow: hidden;
}

/* Header Styles */
.top-header {
  position: relative;
  z-index: 10;
  background: #ffffff;
  border-bottom: 1px solid #cccccc;
}

.header-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  min-height: 56px;
  position: relative;
}

.header-brand-login {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 20px;
  min-height: 56px;
  position: relative;
}

.header-photos-right {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 8px;
}

.header-photo-thumb {
  width: 36px;
  height: 42px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
  overflow: hidden;
}

.blue-info-bar-solid {
  height: 8px;
  background-color: #005aa6;
  width: 100%;
}

/* Sized off its neighbours rather than the replica's original: the emblem was
   reading as an afterthought beside the candidate photo boxes. */
.ssc-logo {
  height: 52px;
  width: 52px;
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
}

.brand-title {
  font-size: 20px;
  font-weight: bold;
  color: #000000;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Blue info bar on Welcome Screen */
.blue-info-bar {
  background-color: #005aa6;
  color: #ffffff;
  padding: 6px 16px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* =========================================================
   SCREEN 2: CANDIDATE LOGIN PAGE STYLES
   ========================================================= */
.login-page-container {
  max-width: 900px;
  margin: 15px auto 30px auto;
  width: 100%;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-subject-banner {
  text-align: center;
  margin-bottom: 20px;
}

.sub-line1 {
  font-size: 15px;
  font-weight: bold;
  color: #003399;
}

.sub-line2 {
  font-size: 17px;
  font-weight: bold;
  color: #003399;
  margin-top: 2px;
}

.sub-pass-hint {
  font-size: 14px;
  font-weight: bold;
  color: #0055ff;
  margin-top: 15px;
  letter-spacing: 0.5px;
}

.candidate-login-box {
  width: 520px;
  max-width: 100%;
  background-color: #e9e4d9;
  border: 1px solid #b0a590;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  margin-bottom: 25px;
}

.login-box-header {
  background-color: #d8d2c4;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: bold;
  color: #000000;
  border-bottom: 1px solid #c4bcae;
}

.login-box-body {
  padding: 16px 20px;
}

.login-field-row {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.login-field-label {
  width: 100px;
  font-weight: bold;
  color: #000000;
}

.login-colon {
  font-weight: bold;
  margin-right: 10px;
}

.login-input-text {
  flex: 1;
  max-width: 250px;
  padding: 4px 8px;
  font-size: 14px;
  font-weight: bold;
  border: 1px solid #808080;
  background: #ffffff;
  outline: none;
}

.login-btn-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.virtual-keyboard-card {
  background: #ffffff;
  border: 1px solid #707070;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.vk-row {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.vk-row-center {
  justify-content: center;
}

.vk-key {
  background: #ffffff;
  border: 1px solid #000000;
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  font-weight: bold;
  min-width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 1px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.15);
  user-select: none;
  transition: background 0.1s;
}

.vk-key:hover {
  background: #e2e8f0;
}

.vk-key:active {
  background: #cbd5e1;
}

.vk-backspace {
  min-width: 85px;
  font-size: 14px;
  font-family: Arial, sans-serif;
}

.vk-warning-text {
  color: #d10000;
  font-size: 16px;
  font-weight: bold;
  margin-top: 20px;
  text-align: center;
}

/* =========================================================
   SCREEN 3: VERIFY NAME & PHOTOGRAPH STYLES
   ========================================================= */
.verifynp-container {
  max-width: 1180px;
  width: 96%;
  margin: 20px auto 40px auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
}

.verifynp-notice {
  font-size: 15px;
  font-weight: bold;
  color: #0033aa;
  text-align: center;
  margin-bottom: 20px;
}

.verifynp-card {
  border: 2px double #ceb99e;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.verifynp-tab-header {
  background-color: #ded7c8;
  padding: 6px 30px 6px 14px;
  font-size: 13px;
  font-weight: bold;
  color: #000000;
  display: inline-block;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
  border-bottom: 1px solid #b0a590;
  margin-bottom: -1px;
}

.verifynp-card-body {
  padding: 30px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.verifynp-details-left {
  font-size: 15px;
  line-height: 2.2;
}

.verifynp-photos-outer-box {
  border: 1px solid #a89d8c;
  padding: 12px 16px;
  background: #ffffff;
  display: flex;
  gap: 20px;
}

.photo-item-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-frame-inner {
  width: 125px;
  height: 140px;
  background-color: #e8e8e8;
  border: 1px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-caption {
  font-size: 11px;
  color: #000000;
  margin-top: 6px;
  text-align: center;
  font-weight: 500;
}

.verifynp-action-row {
  display: flex;
  justify-content: center;
  margin-top: 25px;
}

.btn-ssc-continue {
  background: linear-gradient(to bottom, #f5f2eb 0%, #ded7c8 100%);
  border: 1px solid #706858;
  padding: 4px 22px;
  font-weight: bold;
  font-size: 13px;
  color: #000000;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0,0,0,0.15);
  border-radius: 2px;
  transition: all 0.15s ease;
}

.btn-ssc-continue:hover {
  background: linear-gradient(to bottom, #ffffff 0%, #d5ccb8 100%);
  border-color: #000000;
  box-shadow: 0 0 5px rgba(0, 90, 166, 0.4);
}

.btn-ssc-continue:active {
  background: #c8beab;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* =========================================================
   SCREEN 4: HAND WRITING PROCESS STYLES
   ========================================================= */
.handwriting-container {
  max-width: 1180px;
  width: 96%;
  margin: 20px auto 40px auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hw-title {
  color: #0033aa;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 25px;
  text-align: center;
}

.hw-content-wrapper {
  width: 100%;
  max-width: 100%;
}

.hw-subheading {
  color: #0000ff;
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 12px;
}

.hw-statement-box {
  border: 2px double #ceb99e;
  background-color: #ffffff;
  padding: 25px 30px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.hw-text-en {
  font-size: 15px;
  line-height: 1.6;
  color: #000000;
  margin-bottom: 20px;
  font-family: Arial, sans-serif;
}

.hw-text-hi {
  font-size: 15px;
  line-height: 1.6;
  color: #000000;
  font-family: Arial, 'Noto Sans Devanagari', sans-serif;
}

.hw-confirm-red {
  color: #d10000;
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  margin-top: 25px;
  margin-bottom: 15px;
}

.hw-action-row {
  display: flex;
  justify-content: center;
  margin-top: 15px;
}

/* =========================================================
   SCREEN 5: INSTRUCTIONS PAGE STYLES
   ========================================================= */
.inst-container {
  max-width: 1180px;
  width: 96%;
  margin: 20px auto 40px auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
}

.inst-card {
  border: 2px double #ceb99e;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.inst-tab-header {
  background-color: #ded7c8;
  padding: 6px 30px 6px 14px;
  font-size: 13px;
  font-weight: bold;
  color: #000000;
  display: inline-block;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 100%, 0 100%);
  border-bottom: 1px solid #b0a590;
  margin-bottom: -1px;
}

.inst-card-body {
  padding: 25px 35px;
}

.inst-blue-val {
  color: #0000ff;
  font-weight: bold;
}

.inst-section {
  margin-bottom: 25px;
}

.inst-sec-title {
  font-weight: bold;
  font-size: 14px;
  color: #000000;
  margin-bottom: 12px;
}

.inst-bullets {
  list-style-type: disc;
  padding-left: 24px;
  line-height: 1.6;
}

.inst-bullets li {
  margin-bottom: 12px;
  font-size: 13px;
  color: #000000;
}

.inst-hi-text {
  color: #222222;
  font-size: 12px;
  display: inline-block;
  margin-top: 2px;
}

/* Marks Table */
.inst-marks-table {
  width: 100%;
  margin: 18px 0;
  border-collapse: collapse;
  border: 1px solid #b0a590;
  font-size: 13px;
}

.inst-marks-table th {
  background-color: #ded7c8;
  color: #000000;
  font-weight: bold;
  padding: 7px 12px;
  border: 1px solid #b0a590;
  text-align: center;
}

.inst-marks-table td {
  padding: 6px 12px;
  border: 1px solid #c4bcae;
  color: #000000;
  background-color: #ffffff;
}

.inst-marks-table td:nth-child(1) {
  text-align: left;
  font-weight: 500;
  width: 15%;
}

.inst-marks-table td:nth-child(2) {
  text-align: left;
  width: 45%;
}

.inst-marks-table td:nth-child(3) {
  text-align: center;
  width: 20%;
}

.inst-marks-table td:nth-child(4) {
  text-align: center;
  width: 20%;
}

.inst-good-luck {
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  color: #000000;
  margin-top: 30px;
  margin-bottom: 10px;
}

.inst-action-row {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 25px;
}

/* =========================================================
   SCREEN 6: SYMBOLS & LEGEND GUIDE STYLES
   ========================================================= */
.symbols-container {
  max-width: 1180px;
  width: 96%;
  margin: 20px auto 40px auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
}

.symbols-notice {
  font-size: 15px;
  font-weight: bold;
  color: #0033aa;
  text-align: center;
  margin-bottom: 20px;
  line-height: 1.5;
}

.symbols-card {
  border: 2px double #ceb99e;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.symbols-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.symbols-table th {
  background-color: #ded7c8;
  color: #000000;
  font-weight: bold;
  padding: 7px 12px;
  border: 1px solid #b0a590;
  text-align: left;
}

.symbols-table th:first-child {
  text-align: center;
}

.symbols-table td {
  padding: 8px 14px;
  border: 1px solid #c4bcae;
  vertical-align: middle;
}

.symbol-col-center {
  text-align: center;
}

.sym-radio {
  transform: scale(1.2);
}

.sym-desc-text {
  color: #000000;
  font-weight: 500;
}

.sym-desc-blue {
  color: #0000ff;
  font-weight: bold;
}

/* Symbol Badges */
.sym-badge {
  display: inline-block;
  padding: 2px 7px;
  font-weight: bold;
  font-size: 12px;
  border-radius: 2px;
  min-width: 22px;
  text-align: center;
}

.badge-blue {
  background-color: #0000ff;
  color: #ffffff;
}

.badge-green {
  background-color: #00aa00;
  color: #ffffff;
}

.badge-red {
  background-color: #d10000;
  color: #ffffff;
}

.badge-yellow {
  background-color: #eab308;
  color: #000000;
}

.sym-badge-wrapper {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}

.sym-arrow-up {
  font-size: 10px;
  color: #000000;
  line-height: 1;
  margin-top: 1px;
}

/* Gradient Action Buttons inside Table */
.sym-btn-blue {
  background: linear-gradient(to bottom, #005aa6 0%, #004080 100%);
  color: #ffffff;
  border: 1px solid #002266;
  padding: 4px 14px;
  font-weight: bold;
  font-size: 12px;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.symbols-action-row {
  display: flex;
  justify-content: space-between;
  margin-top: 25px;
}

.btn-ssc-dark-blue {
  background: linear-gradient(to bottom, #004080 0%, #002b55 100%);
  color: #ffffff;
  border: 1px solid #001a33;
  padding: 6px 22px;
  font-weight: bold;
  font-size: 13px;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  transition: all 0.15s ease;
}

.btn-ssc-dark-blue:hover {
  background: linear-gradient(to bottom, #0053a6 0%, #003870 100%);
  border-color: #000000;
}

/* =========================================================
   SCREEN 7: LANGUAGE SELECTION STYLES
   ========================================================= */
.langselect-container {
  max-width: 900px;
  margin: 40px auto;
  width: 100%;
  padding: 0 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.langselect-title {
  color: #004080;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 30px;
  text-align: center;
}

.langselect-box {
  border: 1px solid #000000;
  background-color: #ffffff;
  width: 680px;
  max-width: 100%;
  display: flex;
  align-items: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.langselect-left-cell {
  flex: 1;
  padding: 16px 20px;
  font-weight: bold;
  font-size: 14px;
  color: #000000;
}

.langselect-right-cell {
  padding: 16px 25px;
  border-left: 1px solid #000000;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #ffffff;
}

.langselect-dropdown {
  font-size: 13px;
  padding: 3px 8px;
  border: 1px solid #707070;
  background-color: #ffffff;
  color: #000000;
  font-weight: 500;
  outline: none;
  cursor: pointer;
}

.langselect-action-row {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

/* =========================================================
   SCREEN 8: SUBJECTS & READY FOR TEST STYLES (Exact Screenshot Match)
   ========================================================= */
.subjects-container {
  max-width: 1080px;
  width: 94%;
  margin: 20px auto 40px auto;
  padding: 0 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.subjects-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #d0c8b8;
  font-size: 13px;
  margin-bottom: 25px;
}

.subjects-table th {
  background-color: #ded7c8;
  color: #000000;
  font-weight: bold;
  padding: 8px 12px;
  border: 1px solid #d0c8b8;
  text-align: center;
}

.subjects-table td {
  padding: 8px 14px;
  border: 1px solid #e2dad0;
  color: #000000;
  background-color: #ffffff;
}

.subjects-table tr:nth-child(even) td {
  background-color: #fcfbfa;
}

.subjects-table td:nth-child(1),
.subjects-table td:nth-child(3),
.subjects-table td:nth-child(4) {
  text-align: center;
}

.subjects-notice-p {
  color: #0000ff;
  font-weight: bold;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  margin: 10px 0 25px 0;
  max-width: 950px;
}

.txt-red {
  color: #ff0000;
  font-weight: bold;
}

/* Red Rounded Important Instruction Box */
.subjects-red-card {
  border: 2px solid #ff0000;
  border-radius: 14px;
  background-color: #ffffff;
  padding: 25px 35px;
  width: 100%;
  box-shadow: 0 4px 15px rgba(255,0,0,0.03);
  box-sizing: border-box;
}

.red-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.red-card-title {
  color: #c00000;
  font-size: 20px;
  font-weight: bold;
  font-family: Georgia, 'Times New Roman', serif;
}

.red-card-subheading {
  font-size: 14px;
  color: #000000;
  text-align: center;
  margin-bottom: 20px;
  font-weight: 500;
}

.red-card-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
}

.red-card-bullets li {
  font-size: 13px;
  line-height: 1.85;
  color: #000000;
  margin-bottom: 10px;
  position: relative;
  padding-left: 20px;
}

.red-card-bullets li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: #000000;
  font-weight: bold;
  font-size: 16px;
  line-height: 1;
  top: 1px;
}

/* Action pointer & Cyan Button */
.subjects-action-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 30px;
}

.pointer-text {
  font-weight: bold;
  font-size: 14px;
  color: #000000;
}

.btn-ssc-cyan-ready {
  background: linear-gradient(to bottom, #00c3ff 0%, #0088ff 100%);
  color: #ffffff;
  border: 1px solid #0077dd;
  padding: 8px 30px;
  font-weight: bold;
  font-size: 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 136, 255, 0.3);
  transition: all 0.15s ease;
}

.btn-ssc-cyan-ready:hover {
  background: linear-gradient(to bottom, #33ccff 0%, #0066cc 100%);
  box-shadow: 0 4px 12px rgba(0, 136, 255, 0.4);
}

/* =========================================================
   SCREEN 6: CANDIDATE DECLARATION STYLES
   ========================================================= */
.declaration-container {
  max-width: 1180px;
  width: 96%;
  margin: 20px auto 40px auto;
  padding: 0 10px;
}

.declaration-card {
  border: 2px double #ceb99e;
  background-color: #ffffff;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}

.declaration-card-body {
  padding: 30px 40px;
}

.declaration-notice {
  font-weight: bold;
  color: #0033aa;
  margin-bottom: 20px;
  font-size: 14px;
}

.declaration-box {
  background-color: #fcfbfa;
  border: 1px solid #d8cfbe;
  padding: 20px;
  font-size: 13px;
  line-height: 1.6;
  color: #222222;
  margin-bottom: 25px;
}

.declaration-checkbox-wrapper {
  margin-bottom: 30px;
}

.declaration-chk-label {
  font-size: 13px;
  font-weight: bold;
  color: #000000;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}

.declaration-btn-row {
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Customizer Bar (Top Floating Control Panel) */
.customizer-panel {
  background-color: #1e293b;
  color: #ffffff;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 12px;
  z-index: 100;
  border-bottom: 2px solid #3b82f6;
  flex-wrap: wrap;
}

.customizer-panel label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.customizer-panel input {
  padding: 3px 6px;
  font-size: 12px;
  border-radius: 3px;
  border: 1px solid #475569;
  background: #334155;
  color: #ffffff;
  outline: none;
}

.customizer-panel button {
  background: #2563eb;
  color: white;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
}
.customizer-panel button:hover {
  background: #1d4ed8;
}

/* Page Views Container */
.view-screen {
  display: none;
  flex: 1;
  position: relative;
  z-index: 1;
}

.view-screen.active {
  display: flex;
  flex-direction: column;
}

/* =========================================================
   SCREEN 1: WELCOME SCREEN (As shown in Screenshot)
   ========================================================= */
.welcome-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  padding: 15px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.system-no-banner {
  text-align: center;
  margin-top: 5px;
  margin-bottom: 25px;
}

.system-no-label {
  font-size: 18px;
  font-weight: bold;
  color: #000000;
  letter-spacing: 1px;
}

.system-no-value {
  font-size: 64px;
  font-weight: 900;
  color: #000080;
  line-height: 1;
  letter-spacing: 2px;
  margin-top: 4px;
  font-family: 'Arial Black', Arial, sans-serif;
}

.welcome-content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  align-items: flex-start;
  margin-top: 10px;
}

.meta-details-left {
  font-size: 15px;
  line-height: 2.2;
}

.meta-row {
  display: flex;
}

.meta-label {
  font-weight: bold;
  color: #000000;
  width: 110px;
}

.meta-colon {
  font-weight: bold;
  margin-right: 8px;
}

.meta-value {
  color: #0000ff;
  font-weight: bold;
}

/* Framed Welcome Card */
.welcome-card-frame {
  border: 3px double #d4c2a7;
  background-color: #ffffff;
  padding: 30px 40px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
  text-align: center;
  border-radius: 2px;
}

.welcome-card-title {
  color: #0000d1;
  font-size: 21px;
  font-weight: bold;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.welcome-card-sub {
  color: #d10000;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 8px;
}

.welcome-photos-row {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 25px 0 35px 0;
}

.photo-box-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.photo-box {
  width: 140px;
  height: 150px;
  background-color: #f0f0f0;
  border: 1px solid #c0c0c0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-box img, .photo-box svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-label {
  font-size: 11px;
  color: #555555;
  margin-top: 6px;
}

.login-action-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 15px;
}

.login-text-prompt {
  font-weight: bold;
  font-size: 16px;
  color: #000000;
}

.btn-ssc-login {
  background: linear-gradient(to bottom, #ffffff 0%, #e0e0e0 100%);
  border: 1px solid #707070;
  padding: 6px 28px;
  font-weight: bold;
  font-size: 14px;
  color: #000000;
  cursor: pointer;
  box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0,0,0,0.2);
  border-radius: 2px;
  transition: all 0.15s ease;
}

.btn-ssc-login:hover {
  background: linear-gradient(to bottom, #f8f8f8 0%, #d5d5d5 100%);
  border-color: #000000;
  box-shadow: 0 0 5px rgba(0, 90, 166, 0.4);
}

.btn-ssc-login:active {
  background: #d0d0d0;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.3);
}

/* Footer */
/* Practice shortcut on the welcome card — straight to the paper, past
   login, photo verification, handwriting sample and instructions. */
.skip-formalities-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed #d8cfbb;
}

.btn-skip-formalities {
  padding: 7px 16px;
  border: 1px dashed #2a63ad;
  border-radius: 5px;
  background: #f2f7fd;
  color: #14498c;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-skip-formalities:hover {
  background: #e2edfa;
  border-style: solid;
}

/* =========================================================
   LOGIN MODAL / OVERLAY
   ========================================================= */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}

.modal-overlay.active {
  display: flex;
}

.login-modal {
  background: #ffffff;
  border-radius: 4px;
  width: 420px;
  max-width: 90%;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  overflow: hidden;
  border: 1px solid #005aa6;
}

.modal-header {
  background: #005aa6;
  color: white;
  padding: 12px 16px;
  font-weight: bold;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 24px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 6px;
  color: #333;
}

.form-group input {
  width: 100%;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  outline: none;
}

.form-group input:focus {
  border-color: #005aa6;
  box-shadow: 0 0 0 2px rgba(0, 90, 166, 0.2);
}

.modal-footer {
  padding: 12px 24px 20px 24px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-primary {
  background: #005aa6;
  color: white;
  border: none;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}
.btn-primary:hover {
  background: #004480;
}

.btn-secondary {
  background: #e2e8f0;
  color: #334155;
  border: none;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
}

/* =========================================================
   SCREEN 3 & 4: INSTRUCTIONS & DECLARATION
   ========================================================= */
.instructions-header {
  background: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.instructions-body {
  display: grid;
  grid-template-columns: 1fr 260px;
  flex: 1;
  overflow: hidden;
}

.instructions-content {
  padding: 24px 30px;
  overflow-y: auto;
  max-height: calc(100vh - 170px);
  line-height: 1.6;
  font-size: 14px;
}

.instructions-content h3 {
  color: #005aa6;
  margin-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 4px;
}

.instructions-content ol, .instructions-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.instructions-content li {
  margin-bottom: 8px;
}

.legend-list {
  list-style: none !important;
  padding-left: 0 !important;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px !important;
}

.palette-icon {
  width: 32px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 12px;
  color: white;
  border-radius: 2px;
}

.icon-not-visited { background: #e2e8f0; color: #333; border: 1px solid #cbd5e1; }
.icon-not-answered { background: #dc2626; clip-path: polygon(0 0, 100% 0, 100% 75%, 50% 100%, 0 75%); }
.icon-answered { background: #16a34a; clip-path: polygon(50% 0%, 100% 25%, 100% 100%, 0 100%, 0 25%); }
.icon-marked { background: #7c3aed; border-radius: 50%; }
.icon-ans-marked { background: #7c3aed; border-radius: 50%; position: relative; }
.icon-ans-marked::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 10px;
  height: 10px;
  background: #16a34a;
  border-radius: 50%;
  border: 1px solid white;
}

.instructions-sidebar {
  background: #f8fafc;
  border-left: 1px solid #e2e8f0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.inst-candidate-card {
  text-align: center;
  background: white;
  padding: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  width: 100%;
}

.inst-photo {
  width: 110px;
  height: 120px;
  margin: 0 auto 10px auto;
  border: 1px solid #cbd5e1;
  background: #f1f5f9;
}

.instructions-footer {
  background: #f1f5f9;
  border-top: 1px solid #cbd5e1;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.declaration-box {
  background: #fffbebfb;
  border: 1px solid #fef08a;
  padding: 15px 20px;
  border-radius: 4px;
  margin-top: 20px;
}

.declaration-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  cursor: pointer;
  font-weight: bold;
}

/* =========================================================
   SCREEN 9: LIVE CBT EXAM ENGINE

   Faithful copy of the SSC online mock interface
   (ssccbt.cbexams.com/sscmocktest/mframeset.aspx), minus the red
   "this is only a mock test" notice line above the links row.

   Fixed px and hard-coded colours on purpose: the whole point is that
   it looks like the same 2005-era ASP.NET page on every screen, so
   nothing here scales with the app's own type ramp.

   Two typefaces, as on the original — Times for the header block and
   the two notice lines, Arial for everything else.
   ========================================================= */

/* The exam screen owns exactly one viewport and never more. `.view-screen`
   gives every screen `flex: 1`, whose `flex-basis: 0%` overrides the height
   below on the body's column axis, and a flex item's default `min-height:auto`
   then refuses to shrink under its own content — so an 83-question palette or
   a long set of options grew the page instead of scrolling inside it, and the
   panels that are supposed to scroll (the palette grid, the question area)
   never got a bounded height to scroll within.
   `flex: none` hands the height back to the declaration; overflow:hidden makes
   sure nothing escapes the screen it belongs to. */
#screenExam {
  flex: none;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13px;
  color: #000000;
  /* Zoom (+) / Zoom (-) drive this; only the question body reads it. */
  --exam-zoom: 1;
}

/* ── Top white header ─────────────────────────────────────── */

.exam-top-header {
  flex: none;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 8px 6px;
  background: #ffffff;
  border-bottom: 1px solid #cccccc;
}

.exam-hdr-org {
  flex: none;
  width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

/* Exactly the height of .exam-photo-box, so the emblem and the two photo
   frames read as one row of equals across the exam header. */
.ssc-hdr-logo {
  height: 64px;
  width: auto;
  object-fit: contain;
}

.exam-org-name {
  font-size: 13px;
  font-weight: bold;
  color: #111111;
  white-space: nowrap;
}

/* A paper handed over from Aksh Niti is already identified before it reaches
   this engine. Keep the live exam neutral: no test title/date is exposed
   while questions are being attempted. The emblem is not a title, so it
   stays — hiding the whole .exam-hdr-org block took it down with the caption. */
body.aksh-inbound-test .exam-org-name,
body.aksh-inbound-test .exam-palette-column .palette-sec-title {
  visibility: hidden;
}

/* Level with the "SSC-Mock Test" caption, not with the middle of the
   header — that is where the original parks them. */
.exam-hdr-zoom {
  flex: none;
  align-self: flex-end;
  display: flex;
  gap: 12px;
  margin: 0 0 4px 140px;
}

.btn-zoom-pill {
  padding: 6px 16px;
  border: 1px solid #2a63ad;
  border-radius: 5px;
  background: linear-gradient(180deg, #5b8fc9 0%, #3d74b4 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-zoom-pill:hover {
  background: linear-gradient(180deg, #6b9ed4 0%, #4a81c0 100%);
}

.btn-zoom-pill:active {
  background: #35659c;
}

.exam-hdr-center {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
}

/* Every rule in this header block names its own font on purpose. The global
   reset at the top of this file sets `* { font-family: Arial }`, and a
   universal rule that matches an element directly beats a serif family
   inherited from its parent — which is why the header rendered in Arial
   while the original is Times. */
.ssc-hdr-title {
  margin: 0;
  font-family: 'Times New Roman', Times, serif;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.3px;
  color: #000000;
}

.exam-roll-info {
  margin-top: 10px;
  font-family: 'Times New Roman', Times, serif;
  font-size: 15px;
  font-weight: bold;
  color: #000000;
}

.exam-hdr-clock {
  flex: none;
  width: 180px;
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
}

/* "Time Left" sits above the box on the original, not inside it. */
.timer-label {
  font-family: 'Times New Roman', Times, serif;
  font-size: 15px;
  font-weight: bold;
  color: #000000;
}

.timer-countdown {
  margin-top: 3px;
  padding: 1px 0 2px;
  border: 1px solid #cccc66;
  background: #ffff99;
  font-family: 'Times New Roman', Times, serif;
  font-size: 17px;
  font-weight: bold;
  line-height: 1.15;
  color: #000000;
  font-variant-numeric: tabular-nums;
}

/* Pause and full screen, parked immediately left of the clock. Neither is
   on the original — the real hall has an invigilator and a kiosked browser
   instead — so they stay icon-only and borrow the zoom buttons' colours
   rather than adding new labels to a header the candidate has memorised. */
.exam-hdr-tools {
  flex: none;
  align-self: flex-end;
  display: flex;
  gap: 6px;
  margin-bottom: 4px;
}

.exam-icon-btn {
  width: 30px;
  height: 30px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1px solid #2a63ad;
  border-radius: 5px;
  background: linear-gradient(180deg, #5b8fc9 0%, #3d74b4 100%);
  color: #ffffff;
  cursor: pointer;
}

.exam-icon-btn:hover {
  background: linear-gradient(180deg, #6b9ed4 0%, #4a81c0 100%);
}

.exam-icon-btn svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
  display: block;
}

/* Under ten minutes the box warms, under five it goes red. The only
   behaviour here the original does not have, and worth keeping. */
.exam-hdr-clock.is-warning .timer-countdown {
  background: #ffd27f;
  border-color: #d9a441;
}

.exam-hdr-clock.is-critical .timer-countdown {
  background: #ffb3b3;
  border-color: #cc0000;
  color: #7a0000;
}

.exam-hdr-photos {
  flex: none;
  display: flex;
  gap: 8px;
}

.exam-photo-box {
  width: 75px;
  height: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 1px;
  padding-bottom: 2px;
  border: 1px solid #d3d3d3;
  background: #e9e9e9;
  overflow: hidden;
}

.exam-photo-box svg {
  width: 40px;
  height: 40px;
  flex: none;
}

.exam-photo-box em {
  font-size: 6px;
  font-style: normal;
  color: #8a8a8a;
  white-space: nowrap;
}

/* ── Links row ────────────────────────────────────────────── */

.exam-status-bar {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #ffffff;
}

.exam-links-left {
  display: flex;
  align-items: center;
  gap: 18px;
}

.status-link {
  font-size: 13px;
  font-weight: normal;
  text-decoration: underline;
  white-space: nowrap;
  cursor: pointer;
}

.link-blue { color: #1111cc; }
.link-orange { color: #b34700; }
.link-dark { color: #1a1a1a; font-weight: bold; }

.exam-status-center {
  text-align: center;
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  font-weight: bold;
  color: #cc0000;
}

.exam-status-right {
  text-align: right;
  font-family: 'Times New Roman', Times, serif;
  font-size: 16px;
  font-weight: bold;
  color: #000000;
  white-space: nowrap;
}

.exam-status-right b {
  font-family: 'Times New Roman', Times, serif;
  color: #ff6600;
}

/* ── PART strip ───────────────────────────────────────────── */

.exam-controls-row {
  flex: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 4px 8px;
  background: #ffffff;
}

.sec-tabs-wrapper {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-sec-tab {
  min-width: 85px;
  padding: 6px 10px;
  border: 1px solid #16209c;
  border-radius: 4px;
  background: #1a2fc8;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-sec-tab:hover {
  filter: brightness(1.12);
}

.btn-sec-tab.active-tab {
  background: #1fa01f;
  border-color: #157615;
}

.btn-sec-tab.inactive-tab {
  background: #1a2fc8;
  border-color: #16209c;
}

/* A saved part is closed for good and has to look closed, not merely
   fail on click. */
.btn-sec-tab.saved-tab {
  background: #8b8b8b;
  border-color: #6e6e6e;
  cursor: not-allowed;
}

.btn-sec-tab.saved-tab:hover {
  filter: none;
}

.sec-action-btns {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sec-action-btns-row {
  display: flex;
  gap: 24px;
}

.btn-exam-blue {
  min-width: 132px;
  padding: 7px 16px;
  border: 1px solid #2a63ad;
  border-radius: 5px;
  background: linear-gradient(180deg, #5b8fc9 0%, #3d74b4 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-exam-blue:hover {
  background: linear-gradient(180deg, #6b9ed4 0%, #4a81c0 100%);
}

/* Mark for Review turns into this once the question is flagged. */
.btn-exam-blue.btn-unmark {
  background: linear-gradient(180deg, #f2f0ea 0%, #dcd7c9 100%);
  border-color: #a89f8a;
  color: #333333;
}

.btn-exam-blue.btn-unmark:hover {
  background: linear-gradient(180deg, #f8f7f3 0%, #e6e2d7 100%);
}

/* Takes Save & Next's place on the last question of a part. */
.last-q-notice {
  display: none;
  align-self: center;
  max-width: 240px;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.35;
  color: #0033cc;
}

/* Shown by openExamPanel(), directly under the two buttons. */
.exam-panel-close {
  display: none;
  color: #cc0000;
  font-size: 12px;
  font-weight: bold;
  text-decoration: underline;
  cursor: pointer;
}

#screenExam.panel-open .exam-panel-close {
  display: block;
}

/* ── Workspace ────────────────────────────────────────────── */

.exam-workspace-grid {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  padding: 0;
  background: #ffffff;
  border-top: 1px solid #d3d3d3;
}

.exam-question-column {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Left padding matches .q-scroll-area's, so the caption starts on the same
   vertical as the question box and the options below it. */
.q-no-title-row {
  flex: none;
  padding: 8px 16px 6px;
  font-size: 15px;
  font-weight: bold;
  color: #000000;
}

.q-content-box {
  position: relative;
  flex: 1;
  min-height: 0;
  border: 1px solid #d3d3d3;
  border-left: 0;
  border-bottom: 0;
  background: transparent;
  overflow: hidden;
}

/* Watermark stays put while the question scrolls over it. */
.q-watermark {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  user-select: none;
}

.q-watermark span {
  position: absolute;
  color: #000000;
  opacity: 0.07;
  font-size: 15px;
  font-weight: bold;
  white-space: nowrap;
  transform: rotate(-14deg);
}

.q-scroll-area {
  position: relative;
  z-index: 1;
  height: 100%;
  overflow-y: auto;
  padding: 12px 16px 20px;
}

.q-lang-select-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}

.q-lang-dropdown {
  padding: 3px 6px;
  border: 1px solid #767676;
  border-radius: 0;
  background: #ffffff;
  font-family: inherit;
  font-size: 14px;
  color: #000000;
}

.q-text-area {
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid #a9a9a9;
  font-size: calc(16px * var(--exam-zoom));
  line-height: 1.7;
  color: #000000;
}

.q-text-area b {
  font-weight: bold;
}

/* Diagram and SVG figures arrive with the current test hand-off.  SVGs keep
   their vector clarity while staying within the question workspace. */
.exam-figure {
  width: min(100%, 560px);
  margin: 10px 0 2px;
  overflow: auto hidden;
}

.exam-figure svg,
.exam-figure img {
  display: block;
  max-width: 100%;
  height: auto;
}

.option-figure {
  margin: 8px 0 0;
}

.option-figure svg,
.option-figure img {
  max-height: 240px;
}

/* ── Options: ruled rows of radio buttons ─────────────────── */

.q-options-list {
  display: block;
  border: 1px solid #a9a9a9;
  border-bottom: 0;
}

/* Each option is a two-cell row: a ruled box holding the radio, then the
   text. Only the dial itself is clickable — not the box around it and not
   the text, same as the original. */
.exam-opt-item {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #a9a9a9;
  background: transparent;
  font-size: calc(16px * var(--exam-zoom));
  line-height: 1.55;
  color: #000000;
}

/* A chosen option shows only in the radio dial — the original tints
   nothing, and a blue row would be the loudest thing on the page. */

.opt-radio-cell {
  flex: none;
  width: 42px;
  display: grid;
  place-items: center;
  padding: 12px 0;
  border-right: 1px solid #a9a9a9;
}

.opt-text {
  flex: 1;
  min-width: 0;
  padding: 12px 18px;
}

/* "Both (English + Hindi)": the Hindi sits under the English — a ruled break
   inside the question box, and its own line under each option. */
.q-text-area .lang-part-hi {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #b5b5b5;
}

.opt-text .lang-part {
  display: block;
}

.opt-text .lang-part-hi {
  margin-top: 4px;
  color: #333333;
}

.solution-card span.lang-part-hi::before {
  content: " / ";
}

.option-radio {
  width: 16px;
  height: 16px;
  flex: none;
  margin: 0;
  accent-color: #2b5fa8;
  cursor: pointer;
}

/* ── Reading passage / cloze ──────────────────────────────────
   A comprehension question arrives with its passage already inlined ahead of
   the question text (practiceAndTestRuntime.js › withEduquityPassage), because
   this screen has no panel of its own to put one in. The markup is the study
   app's PassageReader card, so the class names are its; only the skin is
   restated here, in this page's ruled black-on-white idiom rather than the
   app's dark card.

   Deliberately uncapped: the real CBT prints the whole passage above the
   question and lets the workspace scroll, and #qScrollArea already returns to
   the top on every question. */

.q-text-area .passage-card {
  margin: -2px 0 14px;
  border: 1px solid #a9a9a9;
  background: #fbfbf7;
}

.q-text-area .passage-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border-bottom: 1px solid #a9a9a9;
  background: #ececec;
}

.q-text-area .passage-label {
  font-weight: bold;
  font-size: calc(14px * var(--exam-zoom));
  color: #000000;
}

.q-text-area .passage-counter {
  margin-left: auto;
  font-size: calc(13px * var(--exam-zoom));
  color: #333333;
  white-space: nowrap;
}

.q-text-area .passage-instruction {
  padding: 10px 14px 0;
  font-style: italic;
  font-size: calc(14px * var(--exam-zoom));
  color: #333333;
}

.q-text-area .passage-body {
  padding: 10px 14px 12px;
  font-size: calc(15px * var(--exam-zoom));
  line-height: 1.75;
  color: #000000;
  text-align: justify;
}

.q-text-area .passage-body p {
  margin: 0 0 10px;
}

.q-text-area .passage-body p:last-child {
  margin-bottom: 0;
}

/* An empty cloze gap, and the numbered word an "opposite in meaning to"
   question points at. Both stay black — a coloured highlight would be the
   loudest thing on a page that is otherwise entirely black on white. */
.q-text-area .cloze-blank {
  font-weight: bold;
  letter-spacing: 1px;
}

.q-text-area .cloze-blank sup {
  font-size: 0.7em;
  letter-spacing: 0;
}

.q-text-area .cloze-blank.is-word {
  letter-spacing: normal;
  text-decoration: underline dotted #666666;
  text-underline-offset: 3px;
}

/* ── Palette toggle handle ────────────────────────────────── */

.palette-toggle-arrow {
  flex: none;
  align-self: flex-start;
  width: 24px;
  height: 30px;
  margin-top: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.palette-toggle-arrow::before {
  content: '';
  width: 0;
  height: 0;
  border-top: 11px solid transparent;
  border-bottom: 11px solid transparent;
  border-left: 15px solid #1a6fd4;
}

.palette-toggle-arrow[aria-expanded="false"]::before {
  border-left: 0;
  border-right: 15px solid #1a6fd4;
}

/* ── Right palette column ─────────────────────────────────── */

.exam-palette-column {
  flex: none;
  width: 282px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #ffffff;
}

#screenExam.palette-collapsed .exam-palette-column {
  display: none;
}

.palette-sec-title {
  flex: none;
  padding: 8px 10px 10px;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.3;
  text-align: center;
  color: #000000;
}

.palette-grid-25 {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  /* Generous row gap: the ▲ that marks a review question hangs below
     its box and must not touch the row underneath. */
  gap: 20px 6px;
  align-content: start;
  padding: 4px 10px 12px;
  overflow-y: auto;
}

.pal-btn {
  height: 19px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 11px;
  font-weight: bold;
  line-height: 1;
  cursor: pointer;
  position: relative;
}

.pal-btn:hover {
  filter: brightness(1.15);
}

/* The four states the SYMBOLS table documents. */
.pal-unattempted { background: #1a2fc8; color: #ffffff; }
.pal-answered    { background: #1fa01f; color: #ffffff; }
.pal-marked      { background: #cc0000; color: #ffffff; }
.pal-ans-marked  { background: #ffd400; color: #000000; }

/* The ▲ under a review-marked box. Sized to the original's, which is
   noticeably chunkier than a default-size glyph. */
.pal-arrow {
  position: absolute;
  left: 50%;
  bottom: -10px;
  transform: translateX(-50%) scaleX(1.15);
  font-size: 13px;
  font-style: normal;
  line-height: 1;
  color: inherit;
}

.pal-btn.current-active {
  box-shadow: 0 0 0 2px #000000;
}

/* ── PART analysis table ──────────────────────────────────── */

.part-analysis-card {
  flex: none;
  margin: 0 8px 10px;
}

.part-analysis-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.part-analysis-title {
  padding: 5px 6px;
  border: 1px solid #7a7a7a;
  border-bottom: 0;
  background: #c9c9c9;
  font-size: 12px;
  font-weight: bold;
  color: #000000;
  text-align: center;
}

.part-analysis-tbl td {
  padding: 5px 8px;
  border: 1px solid #7a7a7a;
  background: #ffffff;
  text-align: left;
  font-weight: normal;
}

.part-analysis-tbl td:last-child {
  width: 44px;
  background: #ffff9e;
  color: #ff6600;
  font-weight: bold;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.palette-submit-row {
  flex: none;
  padding: 0 8px 10px;
}

/* Sits directly above Submit Test. Same shape, quieter fill: closing a part
   is final, but it is not the end of the paper, and the two must not read as
   the same weight of decision. */
.btn-submit-section {
  width: 100%;
  padding: 7px 12px;
  margin-bottom: 6px;
  border: 1px solid #9aa7b8;
  border-radius: 5px;
  background: linear-gradient(180deg, #f4f6f9 0%, #e3e8ef 100%);
  color: #2c3e50;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-submit-section:hover {
  background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
  border-color: #6d7f95;
}

.btn-submit-test {
  width: 100%;
  padding: 7px 12px;
  border: 1px solid #2a63ad;
  border-radius: 5px;
  background: linear-gradient(180deg, #5b8fc9 0%, #3d74b4 100%);
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-submit-test:hover {
  background: linear-gradient(180deg, #6b9ed4 0%, #4a81c0 100%);
}

/* ── SYMBOLS / INSTRUCTIONS / SUMMARY panels ──────────────────
   The original floats these over the exam rather than dimming the
   page behind them, and closes them from the [Close (x)] link that
   appears under the Save & Next button. Same here. */

.exam-panel {
  display: none;
  position: absolute;
  top: 6px;
  z-index: 50;
  max-height: calc(100% - 14px);
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid #b0a084;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.exam-panel.is-open {
  display: block;
}

.exam-panel-head {
  padding: 6px 12px;
  background: #e8e0ce;
  border-bottom: 1px solid #b0a084;
  font-size: 13px;
  font-weight: bold;
  color: #000000;
}

/* Corner close, in addition to the [Close (x)] link under Save & Next —
   a panel that covers the question needs a way out where the eye is. */
.exam-panel-x {
  position: absolute;
  top: 6px;
  right: 8px;
  z-index: 2;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #b0a084;
  border-radius: 3px;
  background: #f4efe3;
  color: #7a2d2d;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
}

.exam-panel-x:hover {
  background: #e8dcc4;
  color: #cc0000;
}

.exam-panel-body {
  padding: 14px 16px;
}

/* SYMBOLS */

.exam-panel-symbols {
  left: 150px;
  right: 150px;
  padding: 14px 16px 18px;
}

.symbols-lead {
  margin: 0 0 14px;
  font-size: 15px;
  font-weight: bold;
  line-height: 1.45;
  color: #0033cc;
}

.symbols-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.symbols-table th {
  padding: 6px 8px;
  border: 1px solid #b8ac93;
  background: #ede6d6;
  font-weight: bold;
  color: #000000;
  text-align: center;
}

.symbols-table th.sym-col {
  width: 180px;
}

.symbols-table td {
  padding: 8px;
  border: 1px solid #b8ac93;
  vertical-align: middle;
}

.symbols-table td:first-child {
  text-align: center;
}

.symbols-table td:last-child {
  color: #00339a;
  font-weight: bold;
  line-height: 1.45;
}

.sym-radio {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid #6b6b6b;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.18);
  position: relative;
}

.sym-radio.is-on::after {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  background: #2b5fa8;
}

/* The palette swatches reuse .pal-* so the legend can never drift
   from the real thing. Extra bottom room for the ▲ marker. */
.sym-pal {
  display: inline-flex;
  width: 44px;
  margin-bottom: 8px;
  cursor: default;
}

.sym-btn {
  display: inline-block;
  min-width: 132px;
  padding: 5px 12px;
  border: 1px solid #2a63ad;
  border-radius: 4px;
  background: linear-gradient(180deg, #5b8fc9 0%, #3d74b4 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: bold;
  text-align: center;
}

.sym-btn-grey {
  background: linear-gradient(180deg, #f2f0ea 0%, #dcd7c9 100%);
  border-color: #a89f8a;
  color: #333333;
}

/* INSTRUCTIONS */

.exam-panel-instructions {
  left: 250px;
  right: 320px;
}

.inst-ol {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  line-height: 1.7;
}

.inst-ol > li {
  margin-bottom: 16px;
}

.inst-ul {
  margin: 8px 0 12px;
  padding-left: 22px;
}

.inst-ul li {
  margin-bottom: 4px;
}

.inst-ol .num {
  color: #0033cc;
  font-weight: bold;
}

.inst-sec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  margin-top: 6px;
}

.inst-sec-table th,
.inst-sec-table td {
  padding: 7px 10px;
  border: 1px solid #cfc8b6;
}

.inst-sec-table th {
  background: #f3efe6;
  font-weight: bold;
  text-align: left;
}

.inst-sec-table td:nth-child(3),
.inst-sec-table td:nth-child(4),
.inst-sec-table th:nth-child(3),
.inst-sec-table th:nth-child(4) {
  text-align: center;
}

.inst-sec-table tbody tr:nth-child(even) {
  background: #faf8f3;
}

/* OVERALL TEST SUMMARY */

.exam-panel-summary {
  left: 150px;
  width: 820px;
  max-width: calc(100% - 300px);
}

.summary-body {
  padding: 26px 40px 30px;
}

.summary-body p {
  margin: 0 0 22px;
  font-size: 17px;
  font-weight: bold;
  color: #000000;
}

.summary-body p:last-child {
  margin-bottom: 0;
}

.summary-body b {
  color: #cc0000;
  padding: 0 6px;
}

/* ── Section-save confirmation ────────────────────────────────
   The one modal in the exam. Leaving a part is irreversible and
   forfeits its remaining time, so unlike the three information
   panels this one does block the page behind it. */

.exam-confirm-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.exam-confirm-overlay.is-open {
  display: flex;
}

.exam-confirm-box {
  width: 100%;
  max-width: 470px;
  background: #ffffff;
  border: 1px solid #b0a084;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.35);
}

.exam-confirm-body {
  padding: 16px 18px 18px;
}

.confirm-lead {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: bold;
  color: #0033cc;
}

.confirm-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 12px;
}

.confirm-tbl td {
  padding: 6px 10px;
  border: 1px solid #cfc8b6;
}

.confirm-tbl td:last-child {
  width: 90px;
  background: #ffff9e;
  color: #ff6600;
  font-weight: bold;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.confirm-warn {
  margin: 0 0 16px;
  font-size: 12px;
  line-height: 1.5;
  color: #cc0000;
}

.confirm-btn-row {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.btn-confirm-save {
  padding: 7px 16px;
  border: 1px solid #157615;
  border-radius: 5px;
  background: #1fa01f;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-confirm-save:hover {
  filter: brightness(1.1);
}

/* Same shape as the save button, in the colour the rest of the engine already
   uses for the irreversible thing on a screen. */
.btn-confirm-exit {
  padding: 7px 16px;
  border: 1px solid #8f1414;
  border-radius: 5px;
  background: #c62828;
  color: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: bold;
  cursor: pointer;
}

.btn-confirm-exit:hover {
  filter: brightness(1.1);
}

/* ── Paused ───────────────────────────────────────────────────
   The clock stops and the paper goes away with it. Hiding the
   question is the point: a paused exam you can still read is not
   a pause, it is free time. */

.exam-pause-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: #f4f2ec;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#screenExam.is-paused .exam-pause-overlay {
  display: flex;
}

.exam-pause-box {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border: 1px solid #b0a084;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.18);
  text-align: center;
}

.exam-pause-body {
  padding: 22px 24px 26px;
}

.exam-pause-body p {
  margin: 0 0 8px;
  font-size: 14px;
  color: #333333;
}

/* The pause box is centred, so its button row is too — unlike the section
   dialog's, which is right-aligned under a table. */
.pause-btn-row {
  justify-content: center;
}

.pause-exit-confirm {
  display: none;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #e0dcd2;
}

.pause-exit-confirm.is-open {
  display: block;
}

.pause-exit-confirm .confirm-btn-row {
  justify-content: center;
}

.pause-clock {
  margin: 14px auto 18px;
  width: 180px;
  padding: 2px 0;
  border: 1px solid #cccc66;
  background: #ffff99;
  font-family: 'Times New Roman', Times, serif;
  font-size: 19px;
  font-weight: bold;
  color: #000000;
  font-variant-numeric: tabular-nums;
}

/* ── Responsive ──────────────────────────────────────────────
   The original is a fixed desktop page and does not respond at all.
   This one still has to be usable on a phone, so below 1080px the
   header stacks and below 860px the palette becomes a drawer. */

@media (max-width: 1080px) {
  .exam-top-header {
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  .exam-hdr-photos {
    order: 1;
    margin-left: auto;
  }

  .exam-hdr-center {
    order: 3;
    flex-basis: 100%;
  }

  .exam-roll-info {
    margin-top: 2px;
  }

  .exam-status-bar {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .exam-status-center,
  .exam-status-right {
    text-align: left;
  }

  .exam-panel-symbols,
  .exam-panel-instructions,
  .exam-panel-summary {
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
}

@media (max-width: 860px) {
  #screenExam {
    height: auto;
    min-height: 100vh;
  }

  .exam-hdr-photos {
    display: none;
  }

  .exam-hdr-org {
    width: auto;
  }

  .ssc-hdr-logo {
    height: 44px;
  }

  .ssc-hdr-title {
    font-size: 14px;
  }

  .exam-roll-info,
  .timer-label {
    font-size: 12px;
  }

  .timer-countdown {
    font-size: 14px;
  }

  /* Auto width alone squeezes this to the label's width and clips the
     digits — the yellow box still needs room for hh:mm:ss. */
  .exam-hdr-clock {
    width: auto;
    min-width: 112px;
  }

  .exam-hdr-tools {
    align-self: center;
    margin-bottom: 0;
  }

  .btn-zoom-pill {
    padding: 4px 10px;
  }

  .exam-status-center,
  .exam-status-right {
    font-size: 13px;
  }

  .exam-controls-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .sec-tabs-wrapper {
    overflow-x: auto;
  }

  /* Three 132px buttons plus two 24px gaps is 444px — wider than the
     phone. Let them shrink and wrap instead of pushing the page sideways. */
  .sec-action-btns,
  .sec-action-btns-row {
    width: 100%;
  }

  .sec-action-btns-row {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .btn-exam-blue {
    min-width: 0;
    padding: 7px 12px;
  }

  .last-q-notice {
    flex-basis: 100%;
    max-width: none;
    text-align: center;
  }

  #screenExam {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }

  .exam-workspace-grid {
    display: block;
  }

  .q-content-box {
    border-left: 1px solid #d3d3d3;
    border-bottom: 1px solid #d3d3d3;
    overflow: visible;
  }

  .q-scroll-area {
    height: auto;
    overflow: visible;
  }

  .exam-palette-column {
    width: 100%;
    border-top: 1px solid #d3d3d3;
  }

  .palette-toggle-arrow {
    display: none;
  }

  #screenExam.palette-collapsed .exam-palette-column {
    display: flex;
  }
}

/* =========================================================
   SCREEN 6: RESULTS & DETAILED SOLUTION ANALYSIS
   ========================================================= */
.results-container {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 20px;
  width: 100%;
}

.scorecard-header-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  text-align: center;
  margin-bottom: 30px;
}

.score-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.score-metric-val {
  font-size: 32px;
  font-weight: 800;
  color: #38bdf8;
  margin-top: 6px;
}

.score-metric-label {
  font-size: 13px;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analysis-section-title {
  font-size: 18px;
  font-weight: bold;
  color: #0f172a;
  margin-bottom: 16px;
}

.solutions-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 40px;
}

.solution-card {
  background: white;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.sol-status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 12px;
}
.sol-correct { background: #dcfce7; color: #15803d; }
.sol-incorrect { background: #fee2e2; color: #b91c1c; }
.sol-unattempted { background: #f1f5f9; color: #475569; }

.sol-explanation-box {
  background: #f8fafc;
  border-left: 3px solid #0284c7;
  padding: 12px 16px;
  margin-top: 15px;
  font-size: 13px;
  line-height: 1.6;
}

/* =========================================================
   INBOUND (AKSH NITI) EDUQUITY INSTRUCTION SCREEN
   The paper handed over from the main app reuses the replica's own
   instruction card. These two blocks are the extras that flow carries
   in-page, because it never reaches the langselect and subjects screens.
   ========================================================= */
/* Pinned to the foot of the viewport while the instructions scroll behind it.
   Sticky, not fixed: at the end of the document it settles into place, so the
   page still has a real bottom edge. */
.aksh-inst-footer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  margin-top: 25px;
  padding: 14px 0 16px;
  background-color: #fcfcfc;
  border-top: 2px solid #b0a590;
  box-shadow: 0 -6px 14px rgba(0, 0, 0, 0.07);
}

.aksh-inst-footer-top {
  display: flex;
  align-items: stretch;
  gap: 16px;
  margin-bottom: 12px;
}

/* The framed language box keeps its own width from the replica's langselect
   screen; the declaration takes whatever is left. */
.aksh-inst-footer .langselect-box {
  width: auto;
  flex: 0 1 480px;
}

.aksh-inst-footer .langselect-left-cell,
.aksh-inst-footer .langselect-right-cell {
  padding: 10px 16px;
}

.aksh-declaration {
  flex: 1 1 340px;
  border: 1px solid #b0a590;
  background-color: #fdfaf3;
  padding: 10px 16px;
  display: flex;
  align-items: center;
}

.aksh-declaration-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #000000;
  cursor: pointer;
}

.aksh-declaration-label input {
  margin-top: 2px;
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex: none;
}

.aksh-inst-footer .inst-action-row {
  margin-top: 0;
}

/* Below the two-column width the bar would eat half the screen, so it stacks
   and the language box goes full width. Both children drop their flex growth:
   stacked, the main axis is vertical, and a 340px basis meant for a column
   width would otherwise become a 340px-tall declaration box. */
@media (max-width: 900px) {
  .aksh-inst-footer-top {
    flex-direction: column;
    gap: 10px;
  }

  .aksh-inst-footer .langselect-box {
    flex: none;
    width: 100%;
  }

  .aksh-declaration {
    flex: none;
  }
}
