/* ====== Typing Exam SITE - MAIN STYLESHEET ====== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: #eef1f5;
  color: #000;
  font: 14px Arial, sans-serif;
  min-height: 100vh;
}

a {
  text-decoration: none;
  color: #0f766e;
}
a:hover {
  text-decoration: underline;
}

/* ===== NAVBAR ===== */
.navbar {
  background: #fff;
  border-top: 4px solid #0f766e;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
  padding: 0 15px;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar-brand img {
  border-radius: 50%;
  height: 50px;
  width: 50px;
}
.navbar-brand span {
  font-size: 20px;
  font-weight: bold;
  color: #0f766e;
}
.nav-links {
  list-style: none;
  display: flex;
  gap: 5px;
  align-items: center;
  flex-wrap: wrap;
}
.nav-links li a {
  display: block;
  padding: 18px 12px;
  color: #555;
  font-size: 13px;
  font-weight: bold;
}
.nav-links li a:hover,
.nav-links li a.active {
  color: #0f766e;
  text-decoration: none;
  border-bottom: 3px solid #0f766e;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* ===== HERO SECTION (Home Page) ===== */
.hero-section {
  background: linear-gradient(135deg, #0f766e 0%, #1d4ed8 100%);
  color: #fff;
  padding: 34px 20px;
  text-align: center;
  border-bottom: 5px solid #f59e0b;
}
.hero-section h1 {
  font-size: 36px;
  margin-bottom: 12px;
  color: #fff;
}
.hero-section p {
  font-size: 18px;
  margin-bottom: 30px;
  opacity: 0.9;
}
.hero-btn {
  display: inline-block;
  background: #f59e0b;
  color: #0f766e;
  padding: 14px 35px;
  border-radius: 30px;
  font-size: 16px;
  font-weight: bold;
  border: none;
  cursor: pointer;
  text-decoration: none;
  margin: 5px;
  transition: background 0.3s;
}
.hero-btn:hover {
  background: #E6A832;
  color: #333;
  text-decoration: none;
}
.hero-btn.secondary {
  background: transparent;
  border: 2px solid #f59e0b;
  color: #f59e0b;
}
.hero-btn.secondary:hover {
  background: #f59e0b;
  color: #0f766e;
}

/* ===== CARDS / FEATURE TILES ===== */
.section-wrap {
  max-width: 1100px;
  margin: 30px auto;
  padding: 0 15px;
}
.portal-strip {
  background: #0f766e;
  color: #fff;
  font-size: 13px;
  padding: 8px 15px;
}
.portal-strip-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.portal-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 20px;
  max-width: 1100px;
  margin: 25px auto;
  padding: 0 15px;
}
.portal-panel,
.portal-sidebar {
  background: #fff;
  border: 1px solid #d4d7dc;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.portal-panel-title,
.portal-sidebar-title {
  background: #0f766e;
  color: #fff;
  padding: 10px 14px;
  font-size: 16px;
  font-weight: bold;
}
.portal-list {
  list-style: none;
  padding: 12px 16px;
}
.portal-list li {
  border-bottom: 1px solid #ececec;
  padding: 9px 0;
}
.portal-list li:last-child { border-bottom: none; }
.portal-list a {
  color: #27384a;
  font-weight: bold;
}
.portal-sidebar-body {
  padding: 14px;
  line-height: 1.6;
  color: #444;
}
.section-title {
  text-align: center;
  font-size: 24px;
  color: #0f766e;
  margin-bottom: 25px;
  font-weight: bold;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
}
.card-header-bar {
  height: 8px;
}
.card-body {
  padding: 20px;
}
.card-icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.card h3 {
  font-size: 17px;
  color: #333;
  margin-bottom: 8px;
}
.card p {
  font-size: 13px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.5;
}
.card-link {
  display: inline-block;
  background: #0f766e;
  color: #fff;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: bold;
  transition: background 0.2s;
}
.card-link:hover {
  background: #7B5C8A;
  color: #fff;
  text-decoration: none;
}

/* color variants */
.bar-purple { background: #0f766e; }
.bar-green  { background: #71B938; }
.bar-blue   { background: #1d4ed8; }
.bar-orange { background: #dc2626; }

/* ===== STATS STRIP ===== */
.stats-strip {
  background: #0f766e;
  color: #fff;
  padding: 20px 15px;
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
}
.stat-item .stat-number {
  font-size: 32px;
  font-weight: bold;
  color: #f59e0b;
}
.stat-item .stat-label {
  font-size: 14px;
  margin-top: 4px;
}

/* ===== TYPING TUTOR PAGE ===== */
.tutor-wrap {
  max-width: none;
  margin: 8px auto;
  padding: 0 10px 10px;
  width: 100%;
}
.tutor-header-panel {
  background: linear-gradient(to bottom, #dc2626, #f97316);
  color: #fff;
  padding: 10px 15px;
  border-radius: 5px 5px 0 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tutor-body {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 0 0 5px 5px;
  padding: 10px;
}

/* Time bar */
.time-info-bar {
  background: #E8E8E8;
  padding: 6px 12px;
  border-radius: 4px;
  display: flex;
  gap: 25px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.time-info-bar span {
  font-size: 14px;
  color: #333;
}
.time-info-bar .val {
  font-size: 18px;
  font-weight: bold;
  color: #000;
  margin-left: 6px;
}
#timer-val { color: #dc2626; }

/* Chunk indicator */
.chunk-label {
  background: #545454;
  color: #fff;
  display: inline-block;
  padding: 4px 14px;
  border-radius: 3px;
  font-size: 14px;
  margin-bottom: 10px;
}

/* Text display area */
.passage-box {
  border: 1px solid #ECECEC;
  background: #FFFAAE;
  padding: 12px 15px;
  font-size: 19px;
  font-family: Arial, sans-serif;
  color: #333;
  min-height: 82px;
  line-height: 1.8;
  margin-bottom: 12px;
  border-radius: 4px;
}
.passage-box .word {
  display: inline;
  padding: 0 2px;
  border-radius: 2px;
}
.passage-box .word.current {
  background: #FFD700;
  border-bottom: 2px solid #dc2626;
}
.passage-box .word.correct {
  color: #2d8a2d;
}
.passage-box .word.incorrect {
  color: #cc0000;
  text-decoration: underline wavy #cc0000;
}
.passage-box .word.typed {
  color: #888;
}

/* Typing textarea */
.typing-area-wrap {
  position: relative;
  margin-bottom: 12px;
}
#write_text {
  width: 100%;
  min-height: 22vh;
  border: 2px solid #0f766e;
  border-radius: 4px;
  padding: 10px;
  font-family: Arial, sans-serif;
  font-size: 18px;
  resize: vertical;
  outline: none;
  transition: border-color 0.3s;
}
#write_text:focus {
  border-color: #dc2626;
  box-shadow: 0 0 5px rgba(224,103,57,0.3);
}

/* Chunk nav buttons */
.chunk-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.btn-submit {
  background: linear-gradient(to bottom, #71B938, #5A9A28);
  color: #fff;
  border: 1px solid #4A8A1A;
  border-radius: 4px;
  padding: 8px 28px;
  font-size: 16px;
  cursor: pointer;
  font-weight: bold;
  transition: background 0.2s;
}
.btn-submit:hover {
  background: linear-gradient(to bottom, #5A9A28, #4A8A1A);
}
.btn-repeat {
  background: linear-gradient(to bottom, #dc2626, #f97316);
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 8px 20px;
  font-size: 14px;
  cursor: pointer;
  font-weight: bold;
}
.btn-repeat:hover {
  background: linear-gradient(to bottom, #C05629, #D07A3A);
}

/* Language tabs */
.lang-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 10px;
  border-bottom: 2px solid #ddd;
}
.lang-tab {
  padding: 8px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: bold;
  background: #fafafa;
  color: #555;
  border: 1px solid #ddd;
  border-bottom: none;
  border-radius: 4px 4px 0 0;
  margin-right: 3px;
  transition: background 0.2s;
}
.lang-tab.active {
  background: linear-gradient(to bottom, #A1B956, #87AB17);
  color: #fff;
  border-color: #87AB17;
}
.lang-tab:hover:not(.active) {
  background: #e8e8e8;
}

/* Progress bar */
.typing-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.chunk-dot {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  cursor: pointer;
  background: #ddd;
  color: #555;
}
.chunk-dot.active {
  background: #dc2626;
  color: #fff;
}
.chunk-dot.done {
  background: #71B938;
  color: #fff;
}
.progress-label {
  min-width: 50px;
  background: #545454;
  color: #fff;
  text-align: center;
  padding: 5px 8px;
  font-size: 14px;
}
.progress-outer {
  flex: 1;
  background: #efefef;
  border: 1px solid #ADA8A8;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
}
.progress-inner {
  height: 100%;
  background: linear-gradient(to right, #71B938, #A1D35A);
  transition: width 0.4s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: bold;
  color: #333;
}

/* ===== RESULT PAGE ===== */
.result-wrap {
  max-width: 900px;
  margin: 25px auto;
  padding: 0 15px 40px;
}
.result-header {
  background: linear-gradient(to bottom, #dc2626, #f97316);
  color: #fff;
  padding: 12px 18px;
  border-radius: 5px 5px 0 0;
  font-size: 18px;
  font-weight: bold;
}
.result-body {
  background: #fff;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 5px 5px;
  padding: 20px;
}
.result-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}
.stat-box {
  border-radius: 6px;
  padding: 12px 15px;
  color: #fff;
  text-align: center;
  height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}
.stat-box .stat-title {
  font-size: 14px;
  margin-bottom: 4px;
}
.stat-box .stat-value {
  font-size: 26px;
  font-weight: bold;
}
.stat-box .stat-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.bg-purple { background-color: #9787F7; }
.bg-purple .stat-icon { background: #8374DE; }
.bg-tile   { background-color: #5DC5E2; }
.bg-tile .stat-icon   { background: #51B1CC; }
.bg-blue   { background-color: #607FE6; }
.bg-blue .stat-icon   { background: #5069BD; }
.bg-green  { background-color: #95CA0D; }
.bg-green .stat-icon  { background: #7BA01A; }
.bg-red    { background-color: #E67DCC; }
.bg-red .stat-icon    { background: #D074B9; }
.bg-navy   { background-color: #4FBDFF; }
.bg-navy .stat-icon   { background: #49A7E0; }

/* Typed text comparison */
.comparison-section fieldset {
  border: 1px solid #6F6F6F;
  padding: 10px 15px 15px;
  margin-bottom: 18px;
  background: #F5F5F5;
  border-radius: 4px;
}
.comparison-section legend {
  background: #545454;
  color: #fff;
  padding: 5px 14px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: normal;
}
.text-compare-box {
  font-size: 16px;
  font-family: Arial, sans-serif;
  line-height: 1.8;
  padding: 10px;
}
ins.diff-ok  { color: #000; background: none; text-decoration: none; }
del.diff-err { color: red; background: #fdd; text-decoration: none; }

/* Keyboard layout (optional) */
.keyboard-wrap {
  background: #444;
  padding: 12px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: fit-content;
  margin: 0 auto;
}
.kb-row {
  display: flex;
  gap: 5px;
  justify-content: center;
}
.kb-key {
  background: #e8e8e8;
  border: 1px solid #999;
  border-radius: 4px;
  min-width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  cursor: default;
  transition: background 0.15s;
  box-shadow: 0 2px 0 #888;
}
.kb-key.wide { min-width: 60px; }
.kb-key.wider { min-width: 90px; }
.kb-key.widest { min-width: 200px; }
.kb-key.active {
  background: #f59e0b;
  border-color: #D69E31;
  box-shadow: 0 1px 0 #888;
}

/* ===== FOOTER ===== */
.site-footer {
  display: none;
  background: #333;
  color: #ccc;
  text-align: center;
  padding: 18px 15px;
  font-size: 13px;
  margin-top: 30px;
}
.site-footer a {
  color: #f59e0b;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-section h1 { font-size: 26px; }
  .navbar-inner { align-items: flex-start; flex-direction: column; padding: 8px 0; }
  .nav-links { display: flex; }
  .nav-links li a { padding: 9px 8px; }
  .time-info-bar { gap: 12px; }
  .tutor-wrap, .result-wrap { padding: 0 8px 30px; }
  .portal-layout { grid-template-columns: 1fr; }
}

fieldset:has(#keyboard_wrap) {
  display: none;
}

/* ====== TYPING EXAM TEST REFRESH ====== */
:root {
  --tet-ink: #172033;
  --tet-muted: #5b667a;
  --tet-line: #d8dee8;
  --tet-bg: #f5f7fb;
  --tet-panel: #ffffff;
  --tet-primary: #0f766e;
  --tet-primary-dark: #115e59;
  --tet-secondary: #1d4ed8;
  --tet-accent: #f59e0b;
  --tet-danger: #dc2626;
  --tet-success: #16a34a;
  --tet-shadow: 0 10px 30px rgba(23, 32, 51, .08);
}

body {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .08), transparent 280px),
    var(--tet-bg);
  color: var(--tet-ink);
  font-family: Arial, "Segoe UI", sans-serif;
}

a {
  color: var(--tet-primary);
}

.navbar {
  background: rgba(255, 255, 255, .96);
  border-top: 0;
  border-bottom: 1px solid var(--tet-line);
  box-shadow: 0 8px 24px rgba(23, 32, 51, .08);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar-inner {
  min-height: 68px;
}

.navbar-brand img {
  border-radius: 14px;
  height: 44px;
  width: 44px;
}

.navbar-brand span {
  color: var(--tet-primary-dark);
  font-size: 21px;
}

.nav-links li a {
  border-radius: 6px;
  color: var(--tet-muted);
  margin: 8px 0;
  padding: 10px 12px;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: #e8f5f3;
  border-bottom: 0;
  color: var(--tet-primary-dark);
}

.tutor-wrap,
.result-wrap {
  max-width: 1220px;
  margin: 16px auto;
}

.tutor-header-panel,
.result-header,
.reference-heading,
.info-heading,
.portal-panel-title,
.portal-sidebar-title {
  background: linear-gradient(135deg, var(--tet-primary), var(--tet-secondary)) !important;
  border-radius: 8px 8px 0 0;
}

.tutor-body,
.result-body,
.reference-panel,
.portal-panel,
.portal-sidebar,
.info-panel,
.practice-card,
.stat-tile {
  border: 1px solid var(--tet-line) !important;
  box-shadow: var(--tet-shadow) !important;
}

.tutor-body,
.result-body,
.reference-panel {
  border-radius: 0 0 8px 8px;
}

.time-info-bar {
  background: #eef6f5;
  border: 1px solid #cce7e3;
  border-radius: 8px;
}

.time-info-bar .val {
  color: var(--tet-primary-dark);
}

.passage-box,
fieldset[style*="FFFAAE"] {
  background: #fff8e5 !important;
  border: 1px solid #f4d995 !important;
  border-radius: 8px !important;
}

#write_text {
  border-color: var(--tet-primary) !important;
  border-radius: 8px !important;
}

#write_text:focus {
  border-color: var(--tet-secondary) !important;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .12) !important;
}

.btn-submit,
.home-btn.success,
.card-link {
  background: linear-gradient(135deg, var(--tet-primary), var(--tet-primary-dark)) !important;
  border-color: var(--tet-primary-dark) !important;
  border-radius: 6px !important;
  color: #fff !important;
}

.btn-repeat {
  background: linear-gradient(135deg, var(--tet-accent), #d97706) !important;
  border-radius: 6px !important;
}

.lang-tabs {
  border-bottom-color: var(--tet-line);
}

.lang-tab {
  border-radius: 6px 6px 0 0;
}

.lang-tab.active,
.chunk-dot.active {
  background: linear-gradient(135deg, var(--tet-primary), var(--tet-secondary)) !important;
  border-color: var(--tet-primary) !important;
}

.chunk-dot.done,
.progress-inner {
  background: linear-gradient(90deg, var(--tet-success), #22c55e) !important;
}

.passage-box .word.current {
  background: #fde68a !important;
  border-bottom-color: var(--tet-accent) !important;
}

.passage-box .word.correct {
  color: var(--tet-success);
}

.passage-box .word.incorrect,
del {
  color: var(--tet-danger);
}

.site-footer {
  background: var(--tet-ink);
}

@media (max-width: 768px) {
  .navbar-inner {
    min-height: auto;
  }

  .nav-links {
    gap: 3px;
  }
}

/* ====== V2 APP INTERFACE ====== */
body {
  background:
    radial-gradient(circle at 15% 0, rgba(245, 158, 11, .12), transparent 280px),
    linear-gradient(180deg, #eef6ff 0, #f8fafc 360px, #eef2f7 100%);
}

.navbar {
  background: #0b1220;
  border: 0;
  box-shadow: 0 14px 40px rgba(15, 23, 42, .18);
}

.navbar-inner {
  max-width: 1280px;
  min-height: 74px;
  padding: 0 18px;
}

.navbar-brand img {
  background: #fff;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 8px;
  height: 42px;
  width: 42px;
}

.navbar-brand span {
  color: #fff;
  font-size: 22px;
  letter-spacing: 0;
}

.nav-links {
  gap: 8px;
}

.nav-links li a {
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  color: #cbd5e1;
  margin: 0;
  padding: 9px 14px;
}

.nav-links li a:hover,
.nav-links li a.active {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #111827;
}

.tutor-wrap,
.result-wrap {
  max-width: 1280px;
  margin: 22px auto;
  padding: 0 18px 28px;
}

.lang-tabs {
  background: #dbeafe;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
}

.lang-tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #1e3a8a;
  margin: 0;
  padding: 9px 18px;
}

.lang-tab.active {
  background: #fff !important;
  box-shadow: 0 5px 16px rgba(30, 58, 138, .14);
  color: #0f172a;
}

.tutor-header-panel,
.reference-heading,
.result-header {
  background: #111827 !important;
  border-radius: 8px 8px 0 0;
  padding: 14px 18px;
}

.tutor-body,
.reference-panel,
.result-body {
  background: #fff;
  border: 0 !important;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .12) !important;
  padding: 16px;
}

.time-info-bar {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 10px;
}

.time-info-bar span {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #0ea5e9;
  border-radius: 7px;
  color: #475569;
  padding: 10px 12px;
}

.time-info-bar .val {
  color: #0f172a !important;
}

.typing-progress-wrap {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.progress-label {
  background: #1d4ed8;
  border-radius: 6px;
  min-width: 96px;
}

.progress-outer {
  background: #e5e7eb;
  border: 0;
  border-radius: 999px;
  height: 14px;
}

.progress-inner {
  background: linear-gradient(90deg, #0ea5e9, #22c55e) !important;
  border-radius: inherit;
}

.tutor-body fieldset,
fieldset.fsStyle {
  background: #f8fafc !important;
  border: 1px solid #dbe3ee !important;
  border-radius: 8px !important;
  margin-bottom: 14px !important;
  padding: 14px !important;
}

.tutor-body legend,
legend.legendStyle {
  background: #0f172a !important;
  border-radius: 999px !important;
  color: #fff;
  font-size: 12px !important;
  letter-spacing: .02em;
  padding: 6px 12px !important;
  text-transform: uppercase;
}

.passage-box {
  background: #fff !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 8px !important;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .02);
  font-size: 20px;
  min-height: 116px;
  padding: 16px !important;
}

#write_text {
  background: #fff;
  border: 2px solid #bfdbfe !important;
  border-radius: 8px !important;
  min-height: 190px;
  padding: 16px;
}

#write_text:focus {
  border-color: #1d4ed8 !important;
  box-shadow: 0 0 0 4px rgba(29, 78, 216, .14) !important;
}

.chunk-nav {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
}

.btn-submit,
.btn-repeat,
.home-btn,
.hero-btn,
.card-link {
  border-radius: 7px !important;
  box-shadow: none !important;
  min-height: 40px;
}

.btn-submit {
  background: #1d4ed8 !important;
  border: 1px solid #1e40af !important;
}

.btn-repeat {
  background: #f59e0b !important;
  border: 1px solid #d97706 !important;
  color: #111827 !important;
}

.reference-body {
  background: #fff;
  border-radius: 0 0 8px 8px;
}

.result-summary {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: block;
  padding: 10px;
}

.result-summary tbody,
.result-summary tr {
  display: block;
}

.result-summary tr {
  border-bottom: 1px solid #e2e8f0;
  padding: 6px 0;
}

.result-summary tr:last-child {
  border-bottom: 0;
}

.reference-columns {
  align-items: start;
}

.reference-chunk {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 7px;
  padding: 10px;
}

.reference-chunk-label {
  color: #1d4ed8;
}

@media (max-width: 780px) {
  .time-info-bar {
    grid-template-columns: 1fr;
  }

  .navbar-inner {
    gap: 12px;
    padding: 12px;
  }

  .nav-links li a {
    padding: 8px 10px;
  }
}

/* ====== V3 TYPING WORKSPACE ====== */
.tutor-wrap {
  max-width: 1360px;
}

.tutor-body {
  display: grid;
  gap: 14px;
  grid-template-columns: minmax(320px, .9fr) minmax(420px, 1.1fr);
}

.time-info-bar,
.typing-progress-wrap,
#chunk_dots,
.chunk-nav {
  grid-column: 1 / -1;
}

.tutor-body > fieldset:nth-of-type(1),
.tutor-body > fieldset:nth-of-type(2) {
  margin: 0 !important;
  min-height: 100%;
}

.tutor-body > fieldset:nth-of-type(1) {
  background: #0f172a !important;
  border-color: #0f172a !important;
  color: #e5e7eb;
}

.tutor-body > fieldset:nth-of-type(1) legend {
  background: #f59e0b !important;
  color: #111827;
}

.tutor-body > fieldset:nth-of-type(1) .passage-box {
  background: #111827 !important;
  border-color: #334155 !important;
  color: #e5e7eb;
  min-height: 260px;
}

.tutor-body > fieldset:nth-of-type(2) {
  background: #eff6ff !important;
}

.tutor-body > fieldset:nth-of-type(2) legend {
  background: #1d4ed8 !important;
}

#write_text {
  min-height: 260px;
}

.chunk-nav {
  justify-content: flex-end;
}

.chunk-nav .btn-submit,
.chunk-nav .btn-repeat {
  min-width: 150px;
}

@media (max-width: 920px) {
  .tutor-body {
    grid-template-columns: 1fr;
  }
}

/* ====== EXAM CLEANUP / STACKED WORKSPACE ====== */
.tutor-body {
  display: grid !important;
  gap: 12px !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto minmax(0, .95fr) minmax(0, 1.05fr) auto auto !important;
}

.time-info-bar,
.exam-settings,
.typing-progress-wrap,
#chunk_dots,
.tutor-body > fieldset,
.chunk-nav,
.exam-note {
  grid-column: 1 / -1 !important;
}

.typing-progress-wrap,
#chunk_dots {
  display: none !important;
}

.tutor-body > fieldset:nth-of-type(1),
.tutor-body > fieldset:nth-of-type(2) {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
}

.tutor-body > fieldset:nth-of-type(1) .passage-box {
  height: auto !important;
  max-height: clamp(170px, 28vh, 310px) !important;
  min-height: 150px !important;
  overflow: auto !important;
}

.typing-area-wrap {
  height: auto !important;
}

#write_text {
  height: clamp(180px, 31vh, 340px) !important;
  min-height: 180px !important;
  resize: none !important;
}

.time-info-bar {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)) !important;
}

.exam-settings {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 12px;
}

.exam-setting {
  align-items: center;
  color: #334155;
  display: inline-flex;
  font-size: 13px;
  gap: 8px;
}

.exam-setting input[type="number"] {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
  padding: 7px 9px;
  width: 82px;
}

.exam-setting input[type="checkbox"] {
  height: 16px;
  width: 16px;
}

.exam-note {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  font-size: 13px;
  line-height: 1.5;
  padding: 10px 12px;
}

.capslock-warning {
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 7px;
  color: #991b1b;
  display: none;
  font-size: 13px;
  font-weight: bold;
  padding: 9px 12px;
}

.capslock-warning.is-visible {
  display: block;
}

.chunk-step-btn {
  display: none !important;
}

.passage-box .word.correct,
.passage-box .word.incorrect {
  background: transparent !important;
  color: inherit !important;
  text-decoration: none !important;
}

.highlighted-mode .passage-box .word.correct {
  background: transparent !important;
  color: inherit !important;
}

.highlighted-mode .passage-box .word.incorrect {
  background: transparent !important;
  color: inherit !important;
}

/* Final visibility fix for passage panel */
.tutor-body > fieldset:first-of-type {
  background: #f8fbff !important;
  border: 1px solid #b7d9f2 !important;
  overflow: visible !important;
}

#passage_text.passage-box,
.tutor-body > fieldset:first-of-type #passage_text {
  background: #ffffff !important;
  border: 1px solid #c8e5fb !important;
  color: #111827 !important;
  display: block !important;
  font-size: 20px !important;
  height: auto !important;
  line-height: 1.85 !important;
  max-height: 32vh !important;
  min-height: 150px !important;
  opacity: 1 !important;
  overflow-y: auto !important;
  padding: 14px 16px !important;
  visibility: visible !important;
  white-space: normal !important;
}

#passage_text .word {
  color: #111827 !important;
  opacity: 1 !important;
  visibility: visible !important;
}

#passage_text .word.current {
  background: #fde68a !important;
  border-bottom: 2px solid #d97706 !important;
  color: #111827 !important;
}

/* Typing page height/readability override */
html,
body {
  overflow-y: auto !important;
}

.tutor-wrap {
  height: auto !important;
  min-height: calc(100vh - 58px) !important;
  overflow: visible !important;
}

.tutor-body {
  align-content: start !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto auto auto auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.tutor-body > fieldset {
  display: block !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.tutor-body > fieldset:first-of-type {
  min-height: 260px !important;
}

#passage_text.passage-box {
  font-size: 21px !important;
  height: clamp(240px, 36vh, 390px) !important;
  max-height: clamp(240px, 36vh, 390px) !important;
  min-height: 240px !important;
  overflow-y: auto !important;
}

.typing-area-wrap {
  display: block !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#write_text {
  display: block !important;
  font-size: 20px !important;
  height: clamp(210px, 30vh, 330px) !important;
  max-height: clamp(210px, 30vh, 330px) !important;
  min-height: 210px !important;
  overflow-y: auto !important;
}

@media (max-width: 920px) {
  #passage_text.passage-box {
    height: 260px !important;
    max-height: 260px !important;
  }

  #write_text {
    height: 230px !important;
    max-height: 230px !important;
  }
}

/* GovtTypingTest-style tutor workspace */
html,
body {
  height: auto !important;
  overflow: auto !important;
}

.tutor-wrap {
  height: auto !important;
  margin: 0 auto !important;
  max-width: 1180px !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 14px 14px 24px !important;
}

.lang-tabs {
  display: flex !important;
}

.tutor-header-panel {
  background: linear-gradient(to bottom, #5a5a5a, #3f3f3f) !important;
  border-radius: 4px 4px 0 0 !important;
  box-shadow: none !important;
  padding: 10px 14px !important;
}

.tutor-body {
  align-content: start !important;
  background: #fff !important;
  border: 1px solid #d7d7d7 !important;
  border-radius: 0 0 4px 4px !important;
  box-shadow: none !important;
  display: grid !important;
  gap: 10px !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: none !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 10px !important;
}

.time-info-bar,
.exam-settings,
.capslock-warning,
.exam-note,
.tutor-body > fieldset,
.chunk-nav {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
}

.time-info-bar {
  margin: 0 !important;
}

.exam-settings {
  padding: 8px 10px !important;
}

.exam-note {
  background: #f5f5f5 !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  color: #555 !important;
  font-size: 13px !important;
  line-height: 1.45 !important;
  padding: 8px 12px !important;
}

.tutor-body > fieldset {
  display: block !important;
  margin: 0 0 10px !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 10px !important;
}

.tutor-body > fieldset:first-of-type {
  background: #fffaae !important;
  border: 1px solid #ccc !important;
}

#passage_text.passage-box,
.tutor-body > fieldset:first-of-type #passage_text {
  background: transparent !important;
  border: none !important;
  color: #111827 !important;
  display: block !important;
  font-size: 20px !important;
  height: 230px !important;
  line-height: 1.8 !important;
  max-height: 230px !important;
  min-height: 230px !important;
  opacity: 1 !important;
  overflow-y: auto !important;
  padding: 8px !important;
  visibility: visible !important;
  white-space: normal !important;
}

.typing-area-wrap {
  height: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  overflow: visible !important;
}

#write_text {
  display: block !important;
  font-size: 20px !important;
  height: 210px !important;
  line-height: 1.65 !important;
  max-height: 210px !important;
  min-height: 210px !important;
  overflow-y: auto !important;
  resize: vertical !important;
}

.chunk-step-btn {
  display: inline-flex !important;
}

.chunk-nav {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin: 0 !important;
  padding: 0 !important;
}

.chunk-nav .btn-submit,
.chunk-nav .btn-repeat {
  min-height: 36px !important;
  min-width: 0 !important;
  padding: 7px 14px !important;
}

@media (max-width: 920px) {
  .tutor-wrap {
    padding: 10px 8px 20px !important;
  }

  #passage_text.passage-box,
  .tutor-body > fieldset:first-of-type #passage_text {
    height: 230px !important;
    max-height: 230px !important;
    min-height: 230px !important;
  }

  #write_text {
    height: 220px !important;
    max-height: 220px !important;
    min-height: 220px !important;
  }
}

/* Full-screen tutor coverage */
body:has(.tutor-wrap) {
  min-height: 100vh !important;
}

body:has(.tutor-wrap) .site-footer {
  margin-top: 0 !important;
}

.tutor-wrap {
  box-sizing: border-box !important;
  margin: 0 !important;
  max-width: none !important;
  min-height: calc(100vh - 58px) !important;
  padding: 8px 10px 10px !important;
  width: 100% !important;
}

.tutor-body {
  min-height: calc(100vh - 190px) !important;
}

#passage_text.passage-box,
.tutor-body > fieldset:first-of-type #passage_text {
  height: clamp(230px, 31vh, 340px) !important;
  max-height: clamp(230px, 31vh, 340px) !important;
  min-height: 230px !important;
}

#write_text {
  height: clamp(220px, 30vh, 330px) !important;
  max-height: clamp(220px, 30vh, 330px) !important;
  min-height: 220px !important;
}

@media (min-width: 1200px) {
  #passage_text.passage-box,
  .tutor-body > fieldset:first-of-type #passage_text {
    height: 32vh !important;
    max-height: 32vh !important;
  }

  #write_text {
    height: 31vh !important;
    max-height: 31vh !important;
  }
}

/* Stable fieldset heights on typing screens */
.tutor-body > fieldset {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  margin: 0 !important;
  padding: 10px !important;
}

.tutor-body > fieldset:first-of-type,
.tutor-body > fieldset:nth-of-type(2) {
  height: clamp(260px, 35vh, 380px) !important;
  min-height: clamp(260px, 35vh, 380px) !important;
}

.tutor-body > fieldset:first-of-type #passage_text,
#passage_text.passage-box {
  flex: 1 1 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
}

.typing-area-wrap {
  display: flex !important;
  flex: 1 1 auto !important;
}

#write_text {
  flex: 1 1 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
}

@media (max-width: 920px) {
  .tutor-body > fieldset:first-of-type,
  .tutor-body > fieldset:nth-of-type(2) {
    height: 260px !important;
    min-height: 260px !important;
  }

  .tutor-body > fieldset:first-of-type #passage_text,
  #passage_text.passage-box {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
  }
}

/* Final proper typing test layout */
body:has(.tutor-wrap) {
  background: #eef7ff !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

body:has(.tutor-wrap) .site-footer {
  display: none !important;
}

body:has(.tutor-wrap) .navbar {
  min-height: 58px !important;
}

.tutor-wrap {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  height: calc(100vh - 58px) !important;
  margin: 0 !important;
  max-width: none !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 8px 10px 10px !important;
  width: 100% !important;
}

.lang-tabs {
  flex: 0 0 auto !important;
  margin: 0 0 6px !important;
}

.tutor-header-panel {
  flex: 0 0 auto !important;
  min-height: 38px !important;
  padding: 8px 14px !important;
}

.tutor-body {
  box-sizing: border-box !important;
  display: grid !important;
  flex: 1 1 auto !important;
  gap: 8px !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto auto auto minmax(0, 1fr) minmax(0, 1fr) auto !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 8px !important;
}

.time-info-bar {
  display: grid !important;
  gap: 8px !important;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)) !important;
  margin: 0 !important;
  padding: 7px !important;
}

.time-info-bar span {
  min-height: 34px !important;
  padding: 7px 10px !important;
}

.exam-settings {
  margin: 0 !important;
  min-height: 38px !important;
  padding: 7px 10px !important;
}

.exam-note {
  margin: 0 !important;
  padding: 7px 10px !important;
}

.tutor-body > fieldset {
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
  margin: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
  padding: 9px 10px 10px !important;
}

.tutor-body > fieldset:first-of-type,
.tutor-body > fieldset:nth-of-type(2) {
  height: auto !important;
  min-height: 0 !important;
}

.tutor-body legend {
  flex: 0 0 auto !important;
  line-height: 1.2 !important;
  margin-bottom: 4px !important;
}

#passage_text.passage-box,
.tutor-body > fieldset:first-of-type #passage_text {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  font-size: 20px !important;
  height: auto !important;
  line-height: 1.75 !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  padding: 8px !important;
}

.typing-area-wrap {
  box-sizing: border-box !important;
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

#write_text {
  box-sizing: border-box !important;
  flex: 1 1 auto !important;
  font-size: 20px !important;
  height: auto !important;
  line-height: 1.65 !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  resize: none !important;
  width: 100% !important;
}

.chunk-nav {
  align-items: center !important;
  display: flex !important;
  flex: 0 0 auto !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
}

.chunk-nav .btn-submit,
.chunk-nav .btn-repeat {
  font-size: 14px !important;
  min-height: 36px !important;
  padding: 7px 14px !important;
}

.chunk-nav #submit_btn {
  margin-left: auto !important;
}

@media (max-width: 920px) {
  body:has(.tutor-wrap) {
    overflow: auto !important;
  }

  .tutor-wrap {
    height: auto !important;
    min-height: calc(100vh - 58px) !important;
    overflow: visible !important;
  }

  .tutor-body {
    display: grid !important;
    grid-template-rows: auto !important;
    overflow: visible !important;
  }

  .tutor-body > fieldset:first-of-type,
  .tutor-body > fieldset:nth-of-type(2) {
    height: 280px !important;
    min-height: 280px !important;
  }

  .chunk-nav #submit_btn {
    margin-left: 0 !important;
  }
}

/* GovtTypingTest matching layout for typing test pages */
body:has(.tutor-wrap) {
  background: #eef7ff !important;
  color: #000 !important;
  font: 14px Arial, sans-serif !important;
  min-height: 100vh !important;
  overflow: auto !important;
}

body:has(.tutor-wrap) .navbar {
  background: #fff !important;
  border-top: 4px solid #1f8de4 !important;
  border-bottom: 0 !important;
  box-shadow: 0 3px 0 rgba(18,102,174,.55) !important;
  min-height: 0 !important;
  padding: 0 15px !important;
}

body:has(.tutor-wrap) .navbar-inner {
  align-items: center !important;
  display: flex !important;
  justify-content: space-between !important;
  margin: 0 auto !important;
  max-width: 1200px !important;
  min-height: 0 !important;
  padding: 0 !important;
  width: 100% !important;
}

body:has(.tutor-wrap) .navbar-brand img {
  border-radius: 50% !important;
  height: 50px !important;
  width: 50px !important;
}

body:has(.tutor-wrap) .navbar-brand span {
  color: #1f8de4 !important;
  font-size: 20px !important;
  font-weight: bold !important;
}

body:has(.tutor-wrap) .nav-links {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 5px !important;
  list-style: none !important;
}

body:has(.tutor-wrap) .nav-links li a {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #555 !important;
  display: block !important;
  font-size: 13px !important;
  font-weight: bold !important;
  margin: 0 !important;
  padding: 18px 12px !important;
}

body:has(.tutor-wrap) .nav-links li a:hover,
body:has(.tutor-wrap) .nav-links li a.active {
  background: transparent !important;
  border-bottom: 3px solid #1f8de4 !important;
  color: #1f8de4 !important;
  text-decoration: none !important;
}

body:has(.tutor-wrap) .nav-links li a.sso-nav-btn {
  background: #ffbf32 !important;
  border-bottom: 0 !important;
  border-radius: 4px !important;
  color: #3b2a00 !important;
  margin-left: 4px !important;
  padding: 9px 14px !important;
}

body:has(.tutor-wrap) .nav-links li a.sso-nav-btn:hover {
  background: #ffd15c !important;
  border-bottom: 0 !important;
  color: #3b2a00 !important;
}

.tutor-wrap {
  background: transparent !important;
  display: block !important;
  height: auto !important;
  margin: 8px auto !important;
  max-width: none !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 0 10px 10px !important;
  width: 100% !important;
}

.lang-tabs {
  background: transparent !important;
  border: 0 !important;
  border-bottom: 2px solid #c8e5fb !important;
  border-radius: 0 !important;
  display: flex !important;
  gap: 0 !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.lang-tab {
  background: transparent !important;
  border: 0 !important;
  border-radius: 4px 4px 0 0 !important;
  color: #555 !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: bold !important;
  min-height: 0 !important;
  padding: 8px 20px !important;
}

.lang-tab.active {
  background: #1f8de4 !important;
  box-shadow: none !important;
  color: #fff !important;
}

.tutor-header-panel {
  align-items: center !important;
  background: #1f8de4 !important;
  border: 0 !important;
  border-radius: 5px 5px 0 0 !important;
  box-shadow: none !important;
  color: #fff !important;
  display: flex !important;
  font-size: 16px !important;
  justify-content: space-between !important;
  min-height: 0 !important;
  padding: 10px 15px !important;
}

.tutor-header-panel span {
  color: #fff !important;
  font-weight: bold !important;
}

.tutor-header-panel span + span {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #fff !important;
  font-weight: normal !important;
  padding: 0 !important;
}

.tutor-body {
  background: #fff !important;
  border: 1px solid #ddd !important;
  border-radius: 0 0 5px 5px !important;
  box-shadow: none !important;
  display: block !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 10px !important;
}

.time-info-bar {
  align-items: center !important;
  background: #e8f5ff !important;
  border: 0 !important;
  border-radius: 4px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 25px !important;
  margin: 0 0 12px !important;
  padding: 6px 12px !important;
}

.time-info-bar span {
  background: transparent !important;
  border: 0 !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  color: #333 !important;
  display: inline !important;
  font-size: 14px !important;
  min-height: 0 !important;
  padding: 0 !important;
}

.time-info-bar .val {
  color: #000 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  margin-left: 6px !important;
}

.highlight-settings,
.exam-settings {
  align-items: center !important;
  background: #f6fbff !important;
  border: 1px solid #c8e5fb !important;
  border-radius: 4px !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 12px !important;
  margin: 0 0 10px !important;
  min-height: 0 !important;
  padding: 8px 10px !important;
}

.highlight-settings label,
.exam-setting {
  align-items: center !important;
  color: #000 !important;
  display: inline-flex !important;
  font-size: 14px !important;
  font-weight: bold !important;
  gap: 6px !important;
}

.highlight-settings input[type="number"],
.exam-setting input[type="number"] {
  border: 1px solid #aaa !important;
  border-radius: 3px !important;
  height: auto !important;
  padding: 5px 7px !important;
  width: 72px !important;
}

.capslock-warning,
.caps-warning {
  background: #fff3cd !important;
  border: 1px solid #e0b341 !important;
  border-radius: 4px !important;
  color: #7a4d00 !important;
  font-weight: bold !important;
  margin: 0 0 10px !important;
  padding: 8px 10px !important;
}

.tutor-body > fieldset {
  background: #fff !important;
  border: 1px solid #ccc !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  display: block !important;
  height: auto !important;
  margin: 0 0 10px !important;
  min-height: 0 !important;
  overflow: visible !important;
  padding: 10px !important;
}

.tutor-body > fieldset:first-of-type {
  background: #fff8d8 !important;
}

.tutor-body > fieldset:nth-of-type(2) {
  background: #fff !important;
}

.tutor-body legend {
  background: #545454 !important;
  border-radius: 3px !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: normal !important;
  line-height: normal !important;
  margin-bottom: 0 !important;
  padding: 3px 12px !important;
}

#passage_text.passage-box,
.tutor-body > fieldset:first-of-type #passage_text {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  color: #333 !important;
  display: block !important;
  font-size: 19px !important;
  height: auto !important;
  line-height: 1.8 !important;
  margin: 0 !important;
  max-height: 200px !important;
  min-height: 82px !important;
  overflow-y: auto !important;
  padding: 5px !important;
  white-space: normal !important;
}

#passage_text .word,
.passage-box .word {
  border-radius: 2px !important;
  color: inherit !important;
  display: inline !important;
  opacity: 1 !important;
  padding: 0 2px !important;
}

#passage_text .word.current,
.passage-box .word.current,
body.highlighted-mode #passage_text .word.current,
body.highlighted-mode .passage-box .word.current {
  background: #FFD700 !important;
  border-bottom: 2px solid #ffbf32 !important;
  color: inherit !important;
  font-weight: bold !important;
}

.typing-area-wrap {
  display: block !important;
  margin-bottom: 12px !important;
  min-height: 0 !important;
  position: relative !important;
}

#write_text {
  background: #fff !important;
  border: 2px solid #1f8de4 !important;
  border-radius: 4px !important;
  box-shadow: none !important;
  color: #000 !important;
  display: block !important;
  font-size: 18px !important;
  height: auto !important;
  line-height: normal !important;
  min-height: 22vh !important;
  outline: none !important;
  padding: 10px !important;
  resize: vertical !important;
  width: 100% !important;
}

#write_text:focus {
  border-color: #ffbf32 !important;
  box-shadow: 0 0 5px rgba(255,191,50,0.35) !important;
}

.chunk-nav {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 10px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
}

.chunk-nav .btn-submit,
.chunk-nav .btn-repeat,
.btn-submit,
.btn-repeat {
  border-radius: 4px !important;
  cursor: pointer !important;
  font-weight: bold !important;
}

.chunk-nav .btn-submit,
.btn-submit {
  background: #1f8de4 !important;
  border: 1px solid #1266ae !important;
  color: #fff !important;
  font-size: 16px !important;
  padding: 8px 28px !important;
}

.chunk-nav .btn-submit:hover,
.btn-submit:hover {
  background: #1f76c4 !important;
}

.chunk-nav .btn-repeat,
.btn-repeat {
  background: #ffbf32 !important;
  border: none !important;
  color: #1f2937 !important;
  font-size: 14px !important;
  padding: 8px 20px !important;
}

.chunk-nav .btn-repeat:hover,
.btn-repeat:hover {
  background: #ffd15c !important;
}

.chunk-nav #submit_btn {
  background: #1f8de4 !important;
  border-color: #1266ae !important;
  color: #fff !important;
  margin-left: auto !important;
}

.chunk-step-btn {
  display: none !important;
}

.exam-note,
.govt-test-note {
  background: #e8f5ff !important;
  border: 1px solid #c8e5fb !important;
  border-radius: 4px !important;
  color: #555 !important;
  font-size: 13px !important;
  line-height: normal !important;
  margin: 0 !important;
  padding: 8px 12px !important;
}

.tet-switch {
  align-items: center !important;
  color: #1f2937 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  font-size: 13px !important;
  gap: 7px !important;
  line-height: 1 !important;
  margin-left: 10px !important;
  white-space: nowrap !important;
}

.tet-switch input {
  height: 1px !important;
  opacity: 0 !important;
  position: absolute !important;
  width: 1px !important;
}

.tet-switch-slider {
  background: #cbd5e1 !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 999px !important;
  display: inline-block !important;
  height: 22px !important;
  position: relative !important;
  transition: background .18s ease, border-color .18s ease !important;
  width: 54px !important;
}

.tet-switch-slider::before {
  background: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .35) !important;
  content: "" !important;
  height: 18px !important;
  left: 2px !important;
  position: absolute !important;
  top: 1px !important;
  transition: transform .18s ease !important;
  width: 18px !important;
  z-index: 1 !important;
}

.tet-switch-slider::after {
  color: #334155 !important;
  content: "OFF" !important;
  font-size: 9px !important;
  font-weight: 700 !important;
  line-height: 20px !important;
  position: absolute !important;
  right: 6px !important;
  top: 0 !important;
}

.tet-switch input:checked + .tet-switch-slider {
  background: #16a34a !important;
  border-color: #15803d !important;
}

.tet-switch input:checked + .tet-switch-slider::before {
  transform: translateX(32px) !important;
}

.tet-switch input:checked + .tet-switch-slider::after {
  color: #fff !important;
  content: "ON" !important;
  left: 8px !important;
  right: auto !important;
}

.tet-switch input:focus-visible + .tet-switch-slider {
  outline: 2px solid #1d4ed8 !important;
  outline-offset: 2px !important;
}

.tet-passage-chunk {
  border-bottom: 1px dashed rgba(100, 116, 139, .55) !important;
  display: block !important;
  margin-bottom: 8px !important;
  padding-bottom: 8px !important;
}

.tet-passage-chunk:last-child {
  border-bottom: 0 !important;
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

.tet-passage-chunk-label {
  color: #64748b !important;
  display: inline-block !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  margin-right: 6px !important;
}

body:has(.tutor-wrap) .site-footer {
  display: none !important;
}

@media (max-width: 768px) {
  body:has(.tutor-wrap) .navbar-inner {
    align-items: flex-start !important;
    flex-direction: column !important;
    padding: 8px 0 !important;
  }

  body:has(.tutor-wrap) .nav-links {
    display: flex !important;
  }

  body:has(.tutor-wrap) .nav-links li a {
    padding: 9px 8px !important;
  }

  .time-info-bar {
    gap: 12px !important;
  }

  .tutor-wrap {
    padding: 0 8px 30px !important;
  }

  .tutor-header-panel {
    align-items: flex-start !important;
    flex-direction: column !important;
    gap: 4px !important;
  }

  .tutor-body > fieldset:first-of-type,
  .tutor-body > fieldset:nth-of-type(2) {
    height: auto !important;
    min-height: 0 !important;
  }

  .chunk-nav #submit_btn {
    margin-left: 0 !important;
  }
}
