/* ==========================================================================
   Typinge.com - Pure Theme Overlay (Clean White & Vibrant Blue Refinement)
   Styles ONLY existing site elements. No new or extra HTML added.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Gurmukhi:wght@400;500;600;700&display=swap');

:root {
  --bg-page: #f8fafc;
  --primary-blue: #0066ff;
  --primary-blue-hover: #0052cc;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --soft-blue-key: #e6f4fe;
  --soft-blue-key-border: #bae6fd;
}

/* 1. Global Page Background & Typography */
html,
body {
  max-width: 100% !important;
  overflow-x: hidden !important;
  position: relative !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body {
  background-color: var(--bg-page) !important;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif !important;
  color: var(--text-dark) !important;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: 'Plus Jakarta Sans', sans-serif !important;
  color: var(--text-dark) !important;
  font-weight: 800 !important;
}

.page-title,
h1.m-0 {
  font-size: 34px !important;
  font-weight: 800 !important;
  text-align: center !important;
  color: var(--text-dark) !important;
  letter-spacing: -0.5px !important;
  margin: 14px 0 6px 0 !important;
}

.page-title span,
h1.m-0 span {
  color: var(--primary-blue) !important;
}

/* Social Share Buttons (Screenshot Style) */
.social-share-row {
  display: flex !important;
  justify-content: center !important;
  gap: 8px !important;
  flex-wrap: wrap !important;
  margin: 6px 0 20px 0 !important;
}

.social-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  padding: 7px 16px !important;
  border-radius: 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  transition: transform 0.15s, opacity 0.2s !important;
  line-height: 1.4 !important;
}

.social-btn:hover {
  transform: translateY(-1px) !important;
  opacity: 0.95 !important;
  color: #ffffff !important;
}

.btn-post {
  background: #000000 !important;
}

.btn-facebook {
  background: #0066ff !important;
}

.btn-telegram {
  background: #0ea5e9 !important;
}

.btn-whatsapp {
  background: #10b981 !important;
}

/* 2. Top Header / Navbar (Clean White with Vibrant Blue Accent, Pure White Hover) */
#update_nav-header,
#update_nav-header:hover {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-bottom: 1px solid var(--border-color) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  padding: 0 16px !important;
  height: 68px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

#update_nav-header .logo a {
  color: var(--text-dark) !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  letter-spacing: -0.5px !important;
  text-decoration: none !important;
  background: transparent !important;
}

#update_nav-header nav,
#update_nav-header nav:hover,
#update_nav-header nav>ul,
#update_nav-header nav>ul:hover,
#update_nav-header nav li,
#update_nav-header nav li:hover {
  background: transparent !important;
  background-color: transparent !important;
}

#update_nav-header nav>ul {
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

#update_nav-header nav li a {
  color: #475569 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  transition: color 0.2s !important;
  padding: 22px 4px !important;
  display: inline-block !important;
  text-decoration: none !important;
  background: transparent !important;
  background-color: transparent !important;
}

#update_nav-header a:hover,
#update_nav-header nav li a:hover,
#update_nav-header nav li:hover>a,
#update_nav-header nav .dropdown:hover>a {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--primary-blue) !important;
}

/* Mega dropdowns & regular dropdowns (Pure white background) */
#update_nav-header nav .mega-dropdown,
#update_nav-header nav .dropdown ul {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-bottom: 3px solid var(--primary-blue) !important;
  border-radius: 0 0 12px 12px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
  padding: 16px !important;
}

#update_nav-header nav .mega-col a,
#update_nav-header nav .dropdown li a,
#update_nav-header nav li li a {
  color: #334155 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 8px 12px !important;
  border-radius: 6px !important;
  background: transparent !important;
  background-color: transparent !important;
}

#update_nav-header nav .mega-col a:hover,
#update_nav-header nav .dropdown li a:hover,
#update_nav-header nav li li a:hover {
  background: #f0f7ff !important;
  background-color: #f0f7ff !important;
  color: var(--primary-blue) !important;
}

#update_nav-header #menu-icon span {
  border-color: #0f172a !important;
}

/* Navbar Search Input */
#update_nav-header .search {
  display: flex !important;
  align-items: center !important;
  margin: 0 !important;
}

#update_nav-header .search input {
  background: #f8fafc !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 8px 14px !important;
  font-size: 13px !important;
  color: var(--text-dark) !important;
  outline: none !important;
  width: 180px !important;
  transition: border-color 0.2s !important;
}

#update_nav-header .search input:focus {
  border-color: var(--primary-blue) !important;
}

/* 3. Main 3-Column Layout Architecture (1024px Baseline: Left Ad + Center Typing + Right Sidebar) */
main {
  width: 100% !important;
  max-width: 1440px !important;
  margin: 12px auto 28px auto !important;
  padding: 0 8px !important;
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 8px !important;
  align-items: flex-start !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

main>* {
  margin-left: 0 !important;
  margin-bottom: 0 !important;
}

/* Left Sidebar Ad (Skyscraper) */
.sidebar-left {
  width: 140px !important;
  flex: 0 0 140px !important;
  min-width: 140px !important;
  position: sticky !important;
  top: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  box-sizing: border-box !important;
  z-index: 5 !important;
}

.ad-sticky-container {
  position: sticky !important;
  top: 16px !important;
  width: 100% !important;
  max-width: 140px !important;
  display: flex !important;
  justify-content: center !important;
  overflow: hidden !important;
  border-radius: 8px !important;
}

.sidebar .ad-sticky-container {
  max-width: 100% !important;
  width: 100% !important;
}

/* Center Content (Typing Engine & Keyboard) */
.content {
  flex: 1 1 auto !important;
  max-width: 660px !important;
  min-width: 0 !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  float: none !important;
  box-sizing: border-box !important;
}

/* Right Sidebar (Cards & Ads) */
.sidebar {
  width: 180px !important;
  flex: 0 0 180px !important;
  min-width: 180px !important;
  position: sticky !important;
  top: 16px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  float: none !important;
  box-sizing: border-box !important;
  z-index: 5 !important;
}

/* Screen width >= 1200px: expand gracefully */
@media (min-width: 1200px) {
  main {
    gap: 14px !important;
    padding: 0 12px !important;
  }

  .sidebar-left {
    width: 160px !important;
    flex: 0 0 160px !important;
    min-width: 160px !important;
  }

  .ad-sticky-container {
    max-width: 160px !important;
  }

  .content {
    max-width: 740px !important;
  }

  .sidebar {
    width: 200px !important;
    flex: 0 0 200px !important;
    min-width: 200px !important;
  }
}

/* Wide Screens: Expand gracefully (>= 1380px) */
@media (min-width: 1380px) {
  main {
    gap: 20px !important;
    padding: 0 18px !important;
  }

  .sidebar-left {
    width: 160px !important;
    flex: 0 0 160px !important;
  }

  .content {
    max-width: 820px !important;
  }

  .sidebar {
    width: 260px !important;
    flex: 0 0 260px !important;
  }
}

@media (min-width: 1480px) {
  .content {
    max-width: 900px !important;
  }

  .sidebar {
    width: 280px !important;
    flex: 0 0 280px !important;
  }
}

/* Tablet & Mobile Breakpoint (< 992px) */
@media (max-width: 991px) {
  main {
    flex-direction: column !important;
    flex-wrap: wrap !important;
    gap: 16px !important;
    padding: 0 10px !important;
  }

  .sidebar-left {
    display: none !important;
  }

  .content {
    width: 100% !important;
    max-width: 100% !important;
  }

  .sidebar {
    width: 100% !important;
    flex: 1 1 auto !important;
    position: static !important;
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
    gap: 14px !important;
    margin-top: 16px !important;
  }
}

/* 4. Feature Cards in Sidebar (Exact Screenshot Theme) */
.feature-card {
  background: #ffffff !important;
  border-radius: 12px !important;
  border: 1px solid var(--border-color) !important;
  padding: 20px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02) !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  margin-bottom: 16px !important;
  box-sizing: border-box !important;
  width: 100% !important;
  transition: transform 0.2s, box-shadow 0.2s !important;
}

.feature-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04) !important;
}

.feature-header {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
}

.feature-icon-circle {
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 18px !important;
  color: white !important;
  flex-shrink: 0 !important;
}

.feature-icon-circle.blue {
  background: #0066ff !important;
}

.feature-icon-circle.purple {
  background: #7a38ff !important;
}

.feature-icon-circle.green {
  background: #00a854 !important;
}

.feature-title {
  font-size: 17px !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  margin: 0 !important;
}

.feature-desc {
  font-size: 12.5px !important;
  line-height: 1.5 !important;
  color: var(--text-muted) !important;
  margin: 0 !important;
}

.btn-feature {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  width: 100% !important;
  padding: 11px 14px !important;
  border-radius: 8px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  border: none !important;
  cursor: pointer !important;
  transition: all 0.2s !important;
  box-sizing: border-box !important;
}

.btn-feature.blue {
  background: #0066ff !important;
  box-shadow: 0 2px 8px rgba(0, 102, 255, 0.25) !important;
}

.btn-feature.blue:hover {
  background: #0052cc !important;
  color: #ffffff !important;
}

.btn-feature.purple {
  background: #7a38ff !important;
  box-shadow: 0 2px 8px rgba(122, 56, 255, 0.25) !important;
}

.btn-feature.purple:hover {
  background: #6528e0 !important;
  color: #ffffff !important;
}

.btn-feature.green {
  background: #00a854 !important;
  box-shadow: 0 2px 8px rgba(0, 168, 84, 0.25) !important;
}

.btn-feature.green:hover {
  background: #008f47 !important;
  color: #ffffff !important;
}

/* Backward compatibility for legacy cardsbox */
.cardsbox {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 18px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
  margin-bottom: 14px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.cardsbox .cardtextarea h2 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  margin: 0 0 6px 0 !important;
}

.cardsbox .cardtextarea p {
  font-size: 12.5px !important;
  color: var(--text-muted) !important;
  line-height: 1.5 !important;
  margin: 0 !important;
}

.cardsbox .btnmybutton {
  background: var(--primary-blue) !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  padding: 10px 14px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  text-align: center !important;
  display: block !important;
  cursor: pointer !important;
  border: none !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.cardsbox .btnmybutton p {
  color: #ffffff !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

/* Hand Type Box: Left Hand + Wide Center Text Area + Right Hand */
.handtypebox {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto 14px auto !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  flex-wrap: nowrap !important;
  padding: 0 !important;
}

.handtypebox .LHand,
.handtypebox .RHand {
  flex: 0 0 84px !important;
  width: 84px !important;
  height: 142px !important;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06) !important;
  position: relative !important;
  float: none !important;
  overflow: hidden !important;
}

.handtypebox .cardbox {
  flex: 1 1 auto !important;
  width: auto !important;
  max-width: calc(100% - 192px) !important;
  min-width: 0 !important;
  margin: 0 !important;
}

@media (max-width: 768px) {

  .handtypebox .LHand,
  .handtypebox .RHand {
    display: none !important;
  }

  .handtypebox .cardbox {
    max-width: 100% !important;
    width: 100% !important;
  }
}

/* 5. TypingMaster Drill Arena (4 Sections Layout) */
.cardbox {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

.cardbox .card-body {
  background: #ffffff !important;
  padding: 12px 14px 10px 14px !important;
  position: relative !important;
}

/* Prompt Screen Container */
.quote.static_text {
  background: #f8fafc !important;
  border: 1.5px solid #e2e8f0 !important;
  border-radius: 10px !important;
  padding: 12px 14px !important;
  min-height: 105px !important;
  margin-bottom: 10px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02) !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #64748b !important;
  text-align: center !important;
}

/* 4-Section 2x2 Grid */
.tm-drill-grid {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 6px 8px !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

@media (max-width: 900px) {
  .te-hud-bar,
  .te-hud-metrics {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .tm-drill-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* Individual Section Box (Groups keys + space) */
.tm-section-box {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 8px !important;
  padding: 3px 5px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 3px !important;
  transition: all 0.15s ease !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
  min-height: 36px !important;
  box-sizing: border-box !important;
  max-width: 100% !important;
}

/* Active Section Box Highlight */
.tm-section-box.active-box {
  border-color: #2563eb !important;
  background: #eff6ff !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2), 0 2px 6px rgba(37, 99, 235, 0.08) !important;
}

@font-face {
  font-family: 'Raavi';
  src: url('/font/Raavi.woff') format('woff'), url('/font/Raavi.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Button-Style Character Tiles & Grapheme Clusters */
.tm-section-box .tm-cluster,
.tm-section-box .tm-word-tile,
.tm-section-box>span:not(.is-space) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 28px !important;
  height: 32px !important;
  padding: 0 4px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, 'Noto Sans Gurmukhi', 'Raavi', sans-serif !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  color: #1e293b !important;
  box-shadow: 0 2px 0 #94a3b8 !important;
  transition: all 0.1s ease !important;
  user-select: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  white-space: nowrap !important;
  position: relative !important;
  text-align: center !important;
}

.tm-section-box .tm-cluster .tm-glyph,
.tm-section-box .tm-word-tile span {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  height: 100% !important;
  color: inherit !important;
  text-align: center !important;
  pointer-events: none !important;
}

/* Active Key Tile (Royal Blue - TypingMaster Style) */
.tm-section-box .tm-cluster.active_cluster,
.tm-section-box .tm-cluster:has(.active_char),
.tm-section-box .tm-word-tile.active-tile,
.tm-section-box .tm-word-tile:has(.active_char),
.tm-section-box>span:not(.is-space).active_char {
  background: #1a73e8 !important;
  color: #ffffff !important;
  border-color: #1557b0 !important;
  border-style: solid !important;
  box-shadow: 0 3px 0 #0d47a1, 0 3px 8px rgba(26, 115, 232, 0.35) !important;
  transform: translateY(-1px) !important;
  font-weight: 700 !important;
  z-index: 2 !important;
}

.tm-section-box .tm-cluster.active_cluster .tm-glyph,
.tm-section-box .tm-cluster:has(.active_char) .tm-glyph,
.tm-section-box .tm-word-tile.active-tile span,
.tm-section-box .tm-word-tile:has(.active_char) span {
  color: #ffffff !important;
}

/* Correct Key Tile */
.tm-section-box .tm-cluster.correct_cluster,
.tm-section-box .tm-word-tile.correct-tile,
.tm-section-box>span:not(.is-space).correct_char {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border-color: #86efac !important;
  border-style: solid !important;
  box-shadow: 0 1px 0 #86efac !important;
  transform: none !important;
  opacity: 0.85 !important;
}

.tm-section-box .tm-cluster.correct_cluster .tm-glyph,
.tm-section-box .tm-word-tile.correct-tile span {
  color: #16a34a !important;
}

/* Incorrect Key Tile */
.tm-section-box .tm-cluster.incorrect_cluster,
.tm-section-box .tm-word-tile.incorrect-tile,
.tm-section-box>span:not(.is-space).incorrect_char {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
  border-style: solid !important;
  box-shadow: 0 1px 0 #fca5a5 !important;
}

.tm-section-box .tm-cluster.incorrect_cluster .tm-glyph,
.tm-section-box .tm-word-tile.incorrect-tile span {
  color: #dc2626 !important;
}

/* ========================================================
   VIRTUAL KEYBOARD - 15-UNIT PERFECTLY JUSTIFIED GRID
   ======================================================== */
.softkeyboard {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 10px auto 16px auto !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  user-select: none !important;
}

.softkeyboard .row {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: space-between !important;
  gap: 3px !important;
  margin: 0 auto 3px auto !important;
  width: 100% !important;
  max-width: 100% !important;
}

/* Base key: 1 Unit */
.btnKeyboard {
  position: relative !important;
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 1 1 0px !important;
  height: 42px !important;
  min-width: 0 !important;
  padding: 1px 1px !important;
  margin: 0 !important;
  float: none !important;
  background-color: #ffffff;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 0 #94a3b8 !important;
  cursor: pointer !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
  transition: all 0.1s ease !important;
  line-height: 1.05 !important;
  text-align: center !important;
  overflow: hidden !important;
}

/* Key label text */
.btnKeyboard span {
  display: inline-block !important;
  line-height: 1.05 !important;
}

.btnKeyboard .withShift {
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

.btnKeyboard .noshift {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* Proportional Flex Units for 100% Justified 15-Unit Rows */
/* Row 1: 13 standard keys (13 x 1) + Backspace (2) = 15 */
.btnKeyboard#back,
.btnKeyboard.big#back {
  flex: 2 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  letter-spacing: -0.2px !important;
  padding: 1px 0 !important;
}

/* Row 2: Tab (1.5) + 12 standard keys (12 x 1) + \ (1.5) = 15 */
.btnKeyboard#tab,
.btnKeyboard.big#tab {
  flex: 1.5 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 1px 0 !important;
}

.btnKeyboard#pip {
  flex: 1.5 1 0px !important;
}

/* Row 3: Caps (1.75) + 11 standard keys (11 x 1) + Enter (2.25) = 15 */
.btnKeyboard#caps,
.btnKeyboard.big#caps {
  flex: 1.75 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 1px 0 !important;
}

.btnKeyboard#enter,
.btnKeyboard.Enter#enter,
.btnKeyboard.Enter {
  flex: 2.25 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 1px 0 !important;
}

/* Row 4: ShiftL (2.25) + 10 standard keys (10 x 1) + ShiftR (2.75) = 15 */
.btnKeyboard#shiftL,
.btnKeyboard.Shift#shiftL {
  flex: 2.25 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 1px 0 !important;
}

.btnKeyboard#shiftR,
.btnKeyboard.Shift#shiftR {
  flex: 2.75 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 1px 0 !important;
}

/* Row 5: 6 modifiers (each 1.458) + Space (6.25) = 15 */
.btnKeyboard.medium {
  flex: 1.458 1 0px !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  padding: 1px 0 !important;
}

.btnKeyboard#space,
.btnKeyboard.Space#space,
.btnKeyboard.Space {
  flex: 6.25 1 0px !important;
}

/* Finger-Color Theming (Soft Pastels) */
.btnKeyboard.LF1:not(.select),
#tilde:not(.select),
[id="1"]:not(.select),
#tab:not(.select),
#q:not(.select),
#caps:not(.select),
#a:not(.select),
#shiftL:not(.select),
#z:not(.select),
#ctrlL:not(.select) {
  background-color: #dcf6ff !important;
  border-color: #b9e9fc !important;
}

.btnKeyboard.LF2:not(.select),
[id="2"]:not(.select),
#w:not(.select),
#s:not(.select),
#x:not(.select) {
  background-color: #fcd1f3 !important;
  border-color: #f7a9e6 !important;
}

.btnKeyboard.LF3:not(.select),
[id="3"]:not(.select),
#e:not(.select),
#d:not(.select),
#c:not(.select) {
  background-color: #dbf7d3 !important;
  border-color: #b3f2a2 !important;
}

.btnKeyboard.LF4:not(.select),
[id="4"]:not(.select),
[id="5"]:not(.select),
#r:not(.select),
#t:not(.select),
#f:not(.select),
#g:not(.select),
#v:not(.select),
#b:not(.select) {
  background-color: #d1dbfa !important;
  border-color: #b1c1f5 !important;
}

.btnKeyboard.RF1:not(.select),
.btnKeyboard.RF2:not(.select),
[id="6"]:not(.select),
[id="7"]:not(.select),
#y:not(.select),
#u:not(.select),
#h:not(.select),
#j:not(.select),
#n:not(.select),
#m:not(.select) {
  background-color: #edf2d1 !important;
  border-color: #dbe4a2 !important;
}

.btnKeyboard.RF3:not(.select),
[id="8"]:not(.select),
#i:not(.select),
#k:not(.select),
#less:not(.select) {
  background-color: #dbf7d3 !important;
  border-color: #b3f2a2 !important;
}

.btnKeyboard.RF4:not(.select),
[id="9"]:not(.select),
#o:not(.select),
#l:not(.select),
#grt:not(.select) {
  background-color: #fcd1f3 !important;
  border-color: #f7a9e6 !important;
}

.btnKeyboard.RF5:not(.select),
[id="0"]:not(.select),
#dash:not(.select),
#plus:not(.select),
#back:not(.select),
#p:not(.select),
#curlyR:not(.select),
#curlyL:not(.select),
#pip:not(.select),
#colon:not(.select),
#comma:not(.select),
#enter:not(.select),
#qsn:not(.select),
#shiftR:not(.select),
#ctrlR:not(.select) {
  background-color: #dcf6ff !important;
  border-color: #b9e9fc !important;
}

.btnKeyboard.Space:not(.select),
.btnKeyboard.space:not(.select),
#altL:not(.select),
#space:not(.select),
#altR:not(.select),
#window:not(.select) {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
}

/* Mobile & Tablet Responsiveness */
@media (max-width: 768px) {
  .softkeyboard {
    padding: 0 4px !important;
    margin: 10px auto !important;
  }

  .softkeyboard .row {
    gap: 3px !important;
    margin-bottom: 3px !important;
  }

  .btnKeyboard {
    height: 42px !important;
    border-radius: 5px !important;
    padding: 1px !important;
  }

  .btnKeyboard .withShift {
    font-size: 10px !important;
  }

  .btnKeyboard .noshift {
    font-size: 13px !important;
  }

  .btnKeyboard#back,
  .btnKeyboard#tab,
  .btnKeyboard#caps,
  .btnKeyboard#enter,
  .btnKeyboard#shiftL,
  .btnKeyboard#shiftR,
  .btnKeyboard.medium {
    font-size: 10px !important;
  }
}

.btnKeyboard {
  cursor: pointer !important;
}

/* Selected / Highlighted Virtual Keyboard Key (Vibrant Blue - TypingMaster Style) */
.btnKeyboard.select,
.btnKeyboard.select[id],
#Keyboard .btnKeyboard.select,
.softkeyboard .btnKeyboard.select {
  background: #1a73e8 !important;
  background-color: #1a73e8 !important;
  color: #ffffff !important;
  border-color: #1557b0 !important;
  box-shadow: 0 3px 0 #0d47a1, 0 0 14px rgba(26, 115, 232, 0.55) !important;
  transform: translateY(1px) !important;
}

.btnKeyboard.select span,
.btnKeyboard.select .withShift,
.btnKeyboard.select .english,
.btnKeyboard.select .noshift,
#Keyboard .btnKeyboard.select span,
.softkeyboard .btnKeyboard.select span {
  color: #ffffff !important;
}

/* Space Bar Key Tile (Clean, Solid Keyboard Spacebar Style) */
.tm-section-box span.is-space {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 48px !important;
  height: 32px !important;
  padding: 0 6px !important;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  text-transform: uppercase !important;
  color: #475569 !important;
  background: #ffffff !important;
  border: 1.5px solid #94a3b8 !important;
  border-radius: 6px !important;
  box-shadow: 0 2px 0 #94a3b8 !important;
  cursor: pointer !important;
  user-select: none !important;
  transition: all 0.1s ease !important;
  box-sizing: border-box !important;
}

.tm-section-box span.is-space .tm-space-txt {
  display: inline-block !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.5px !important;
  color: inherit !important;
}

.tm-section-box span.is-space.active_char {
  background: #1a73e8 !important;
  color: #ffffff !important;
  border: 1.5px solid #1557b0 !important;
  box-shadow: 0 4px 0 #0d47a1, 0 4px 12px rgba(26, 115, 232, 0.4) !important;
  transform: translateY(-2px) scale(1.02) !important;
  z-index: 2 !important;
}

.tm-section-box span.is-space.active_char .tm-space-txt {
  color: #ffffff !important;
}

.tm-section-box span.is-space.correct_char {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border: 1.5px solid #86efac !important;
  box-shadow: 0 1px 0 #86efac !important;
  transform: none !important;
}

.tm-section-box span.is-space.correct_char .tm-space-txt {
  color: #16a34a !important;
}

.tm-section-box span.is-space.incorrect_char {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1.5px solid #fca5a5 !important;
  box-shadow: 0 1px 0 #fca5a5 !important;
  transform: none !important;
}

.tm-section-box span.is-space.incorrect_char .tm-space-txt {
  color: #dc2626 !important;
}

/* Active Key Tile (Royal Blue - TypingMaster Style) */
.tm-section-box span.active_char {
  background: #1a73e8 !important;
  color: #ffffff !important;
  border-color: #1557b0 !important;
  border-style: solid !important;
  box-shadow: 0 3px 0 #0d47a1, 0 3px 8px rgba(26, 115, 232, 0.35) !important;
  transform: translateY(-1px) !important;
  font-weight: 700 !important;
  z-index: 2 !important;
}

/* Correct Character */
.tm-section-box span.correct_char {
  background: #f0fdf4 !important;
  color: #16a34a !important;
  border-color: #86efac !important;
  border-style: solid !important;
  box-shadow: 0 1px 0 #86efac !important;
  transform: none !important;
  opacity: 0.8 !important;
}

/* Incorrect Character */
.tm-section-box span.incorrect_char {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #ef4444 !important;
  border-style: solid !important;
  box-shadow: 0 2px 0 #dc2626 !important;
}

/* Instruction Header for Drills */
.tm-drill-header,
.quote[data-custom-font="1"] .tm-drill-header {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: 100% !important;
  max-width: 740px !important;
  margin: 0 auto 12px auto !important;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #475569 !important;
  gap: 8px !important;
  direction: ltr !important;
  text-align: left !important;
}

.tm-drill-play-icon {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 20px !important;
  height: 20px !important;
  background: #22c55e !important;
  color: #ffffff !important;
  border-radius: 50% !important;
  font-size: 10px !important;
  line-height: 1 !important;
  font-style: normal !important;
}

/* ==========================================
   Word Drill Layout (Matching worddrill2.jpeg)
   ========================================== */
.tm-word-drill {
  width: 100% !important;
  max-width: 740px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.tm-word-stream {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  flex-wrap: wrap !important;
  gap: 14px 28px !important;
  padding: 16px 20px !important;
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  min-height: 80px !important;
  box-sizing: border-box !important;
}

.tm-word {
  display: inline-flex !important;
  align-items: center !important;
  font-size: 32px !important;
  font-weight: 600 !important;
  color: #2e7d32 !important;
  letter-spacing: 1px !important;
  line-height: 1.2 !important;
  transition: all 0.15s ease !important;
  position: relative !important;
}

.tm-word.active-word {
  color: #1a73e8 !important;
  font-weight: 700 !important;
  transform: scale(1.04) !important;
}

.tm-word.active-word::before {
  content: "▶" !important;
  font-size: 20px !important;
  color: #1a73e8 !important;
  margin-right: 6px !important;
  display: inline-block !important;
}

.tm-word.completed-word {
  color: #16a34a !important;
  opacity: 0.6 !important;
}

.tm-word span {
  display: inline-block !important;
  position: relative !important;
  transition: color 0.1s ease !important;
}

.tm-word span.active_char {
  background: #1a73e8 !important;
  color: #ffffff !important;
  border-radius: 4px !important;
  padding: 0 2px !important;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.4) !important;
}

.tm-word span.correct_char {
  color: #16a34a !important;
}

.tm-word span.incorrect_char {
  color: #dc2626 !important;
  background: #fee2e2 !important;
  border-radius: 4px !important;
  padding: 0 2px !important;
}

/* ==========================================
   Paragraph Drill Layout (Matching paragraph.jpeg)
   ========================================== */
.tm-paragraph-drill {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  box-sizing: border-box !important;
}

.tm-paragraph-text {
  background: #ffffff !important;
  border: 1.5px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 16px 22px !important;
  font-size: 22px !important;
  line-height: 1.8 !important;
  letter-spacing: 0.5px !important;
  text-align: left !important;
  color: #1e293b !important;
  min-height: 100px !important;
  word-break: break-word !important;
  white-space: pre-wrap !important;
  box-sizing: border-box !important;
}

.tm-paragraph-text span {
  display: inline !important;
  position: relative !important;
  transition: all 0.1s ease !important;
}

.tm-paragraph-text span.active_char {
  background: #1a73e8 !important;
  color: #ffffff !important;
  border-radius: 3px !important;
  padding: 1px 3px !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 6px rgba(26, 115, 232, 0.35) !important;
}

.tm-paragraph-text span.correct_char {
  color: #16a34a !important;
}

.tm-paragraph-text span.incorrect_char {
  color: #dc2626 !important;
  background: #fee2e2 !important;
  border-radius: 3px !important;
  padding: 1px 2px !important;
}

.tm-paragraph-text span.is-enter {
  color: #94a3b8 !important;
  font-size: 16px !important;
  margin-left: 2px !important;
  user-select: none !important;
}

.tm-paragraph-text span.is-enter.active_char {
  background: #1a73e8 !important;
  color: #ffffff !important;
}

.tm-paragraph-text span.is-enter.correct_char {
  color: #16a34a !important;
}

/* Caps Lock Warning Popup */
.tm-caps-warning-popup {
  position: absolute !important;
  top: 14px !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9999 !important;
  display: none !important;
  align-items: center !important;
  gap: 12px !important;
  background: #fffbeb !important;
  border: 1.5px solid #f59e0b !important;
  border-radius: 10px !important;
  padding: 10px 18px !important;
  box-shadow: 0 10px 25px -5px rgba(245, 158, 11, 0.3), 0 4px 10px rgba(0, 0, 0, 0.05) !important;
  animation: tmBounceIn 0.25s ease-out !important;
  max-width: 90% !important;
  box-sizing: border-box !important;
}

.tm-caps-warning-popup.show {
  display: flex !important;
}

@keyframes tmBounceIn {
  0% {
    transform: translateX(-50%) translateY(-10px);
    opacity: 0;
  }

  100% {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.tm-caps-icon {
  font-size: 24px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
}

.tm-caps-content {
  text-align: left !important;
  flex: 1 1 auto !important;
}

.tm-caps-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #92400e !important;
  line-height: 1.3 !important;
}

.tm-caps-desc {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #b45309 !important;
  line-height: 1.3 !important;
  margin-top: 2px !important;
}

.tm-caps-close {
  background: transparent !important;
  border: none !important;
  font-size: 20px !important;
  line-height: 1 !important;
  color: #b45309 !important;
  cursor: pointer !important;
  padding: 0 4px !important;
  margin-left: 6px !important;
  transition: color 0.15s !important;
}

.tm-caps-close:hover {
  color: #78350f !important;
}

/* Start Button */
.startbtn {
  position: absolute !important;
  top: 47% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 20 !important;
  padding: 7px 24px !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  border-radius: 20px !important;
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.45), 0 4px 12px rgba(0, 0, 0, 0.25) !important;
  color: #ffffff !important;
  cursor: pointer !important;
  letter-spacing: 0.5px !important;
  margin: 0 !important;
  width: auto !important;
  transition: all 0.15s ease !important;
}

.startbtn:hover {
  background: linear-gradient(180deg, #15803d 0%, #166534 100%) !important;
  transform: translate(-50%, -50%) scale(1.04) !important;
  color: #ffffff !important;
}

@media (max-width: 900px) {
  .te-hud-bar,
  .te-hud-metrics {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .startbtn,
  .startbtn:hover {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    display: block !important;
    width: 100% !important;
    max-width: 240px !important;
    margin: 4px auto 12px auto !important;
    padding: 10px 24px !important;
    font-size: 15px !important;
  }
}

/* Typing Textarea - Visually Hidden (Keys show directly in 4 section boxes; keep Speed Booster <p> visible!) */
textarea.type_text_area,
#foo,
textarea.input_area,
.cardbox textarea {
  position: absolute !important;
  opacity: 0 !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  border: 0 !important;
  outline: none !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  pointer-events: none !important;
  resize: none !important;
}


/* 6. Existing Sidebar Items in layout/aside.php */
.sidebar .btnside,
.sidebar .btn-one,
.sidebar .btn-2 {
  display: block !important;
  width: 100% !important;
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  padding: 10px 14px !important;
  border-radius: 8px !important;
  color: #1e293b !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  box-sizing: border-box !important;
  margin-bottom: 8px !important;
  transition: all 0.15s !important;
  text-align: left !important;
}

.sidebar .btnside:hover,
.sidebar .btn-one:hover {
  background: #f0f7ff !important;
  border-color: var(--primary-blue) !important;
  color: var(--primary-blue) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04) !important;
}

/* Strip Legacy Clashing Colored Sidebar Wrapper Boxes */
.sidebar .box-3,
.sidebar .box-2,
.sidebar .custom-box-1,
.sidebar .component,
.sidebar .component .footer {
  background: transparent !important;
  background-color: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  border: none !important;
  box-shadow: none !important;
  width: 100% !important;
}

.sidebar a {
  text-decoration: none !important;
}

/* Feedback Button in Sidebar */
.sidebar .box-3 .btn-2 {
  background: #1e293b !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.sidebar .box-3 .btn-2:hover {
  background: #0f172a !important;
}

/* Download Offline Button in Sidebar */
.sidebar .box-2 .btn-2 {
  background: #6825ec !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  text-align: center !important;
}

.sidebar .box-2 .btn-2:hover {
  background: #5619cb !important;
}

/* Homepage & Speed Booster Widget Clean Word Wrapping & Responsive Fit */
#main-TPinput,
.containerTP {
  width: 100% !important;
  max-width: 100% !important;
  margin: 14px auto !important;
  box-sizing: border-box !important;
}

.typing_quote,
.typing_quote p,
.TT_text {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  white-space: normal !important;
  line-height: 1.75 !important;
  font-size: 18px !important;
  text-align: left !important;
}

#TT_startbtn {
  background: linear-gradient(180deg, #16a34a 0%, #15803d 100%) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  font-size: 15px !important;
  border-radius: 24px !important;
  border: 2px solid #ffffff !important;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35) !important;
  padding: 9px 28px !important;
  width: auto !important;
  min-width: 140px !important;
  left: 50% !important;
  top: 50% !important;
  margin: 0 !important;
  transform: translate(-50%, -50%) !important;
  cursor: pointer !important;
  z-index: 10 !important;
}

/* 7. Global Site Footer */
footer,
footer.tp-global-footer {
  background: #0f172a !important;
  color: #94a3b8 !important;
  padding: 32px 20px !important;
  font-size: 13.5px !important;
  margin-top: 48px !important;
  text-align: center !important;
  border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
}

.tp-footer-inner {
  max-width: 1200px !important;
  margin: 0 auto !important;
}

.tp-footer-links {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  gap: 10px 22px !important;
  margin-bottom: 16px !important;
  padding-bottom: 16px !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
}

footer a,
.tp-footer-links a {
  color: #e2e8f0 !important;
  text-decoration: none !important;
  font-weight: 600 !important;
  transition: color 0.15s ease !important;
}

footer a:hover,
.tp-footer-links a:hover {
  color: #60a5fa !important;
}

.tp-footer-copy {
  color: #94a3b8 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
}

/* 8. Existing Content Pages & Details */
.text-justify {
  background: #ffffff !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  padding: 24px !important;
  margin-top: 20px !important;
  line-height: 1.7 !important;
  color: #334155 !important;
}

details {
  background: #f8fafc !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  margin: 12px 0 !important;
}

summary {
  font-weight: 700 !important;
  color: var(--text-dark) !important;
  cursor: pointer !important;
}


/* ==============================================================
   9. Universal PSSSB-Style Practice Engine Styling
   ============================================================== */
.practice-main-wrapper {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  margin: 15px auto 25px auto;
  max-width: 1000px;
}

.practice-main-wrapper.is-rtl {
  direction: rtl;
  text-align: right;
}

/* Info Bar Toolbar */
.info-bar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 9px 14px;
  margin-bottom: 16px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
  box-sizing: border-box;
}

.info-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  flex-shrink: 0;
}

#active-segment {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: #0f172a !important;
  font-size: 13px !important;
  font-weight: 800 !important;
  padding: 5px 10px;
  border-radius: 8px;
  white-space: nowrap;
}

/* Time Options Toolbar Group */
.time-btn-group {
  display: inline-flex;
  gap: 2px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 3px;
  border-radius: 9px;
}

.time-opt-btn {
  background: transparent;
  color: #475569;
  border: none;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.time-opt-btn:hover {
  background: rgba(255, 255, 255, 0.8);
  color: #0f172a;
}

.time-opt-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  box-shadow: 0 1px 4px rgba(37, 99, 235, 0.3);
}

.info-item p {
  margin: 0;
  font-weight: 700;
  color: #1e293b;
  font-size: 0.92rem;
}

#clock-display {
  display: inline-flex;
  align-items: center;
  background: #fff1f2;
  border: 1px solid #fecdd3;
  color: #be123c !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  font-variant-numeric: tabular-nums;
  padding: 5px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.settings {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.settings label {
  margin: 0;
  white-space: nowrap;
}

.settings input[type="range"] {
  width: 64px;
  cursor: pointer;
  accent-color: #2563eb;
}

@media (max-width: 960px) {
  .info-bar {
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* Segment Navigation & Progress */
.segment-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 12px 0;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-btn {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.nav-btn:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
}

.segment-progress {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  max-width: 60%;
}

.progress-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: all 0.2s ease;
}

.progress-dot.active {
  background: #2563eb;
  transform: scale(1.35);
}

.progress-dot.completed {
  background: #10b981;
}

/* Sample Text Box & Input Textarea */
.sample-text-container {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

#sample-text {
  background: #ffffff;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px 20px;
  min-height: 120px;
  max-height: 240px;
  overflow-y: auto;
}

#sample-paragraph {
  line-height: 1.8;
  margin: 0;
  color: #0f172a;
}

#input-box {
  width: 100%;
  padding: 16px 20px;
  line-height: 1.8;
  border: 2px solid #cbd5e1;
  border-radius: 10px;
  resize: vertical;
  min-height: 150px;
  background: #ffffff;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

#input-box:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
  outline: none;
}

/* Action Buttons */
.btn-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 18px 0;
}

.btn-group button,
#action-btns button {
  padding: 10px 22px;
  font-size: 0.95rem;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#submit-action {
  background: #10b981;
  color: #ffffff;
}

#submit-action:hover {
  background: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

#return-btn {
  background: #64748b;
  color: #ffffff;
}

#return-btn:hover {
  background: #475569;
}

#expand-btn {
  background: #2563eb;
  color: #ffffff;
}

#expand-btn:hover {
  background: #1d4ed8;
}

#custom-para-btn {
  background: #f59e0b;
  color: #ffffff;
}

#custom-para-btn:hover {
  background: #d97706;
}

/* Shortcuts Panel */
.shortcuts-panel {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 12px 18px;
  margin-top: 15px;
}

.shortcuts-panel h4 {
  margin: 0 0 8px 0;
  font-size: 0.95rem;
  color: #1e293b;
  font-weight: 700;
}

.shortcuts-panel ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: #475569;
}

.key-bind {
  background: #1e293b;
  color: #ffffff;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-family: monospace;
}

/* Results Section & Stats Table */
.stats-section {
  margin-top: 24px;
}

#stats-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 24px;
}

#stats-heading {
  font-size: 1.5rem;
  font-weight: 800;
  padding: 16px;
  background: linear-gradient(90deg, #2563eb, #3b82f6);
  color: #ffffff;
  text-align: center;
  margin: 0;
}

#stats-table td {
  padding: 14px 18px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
}

#stats-table td:first-child {
  font-weight: 700;
  width: 40%;
  color: #334155;
}

#stats-table tr:nth-child(even) {
  background: #f8fafc;
}

.gross-speed-instruction {
  color: #b45309;
  font-size: 0.82rem;
  font-weight: 600;
  margin-left: 6px;
}

.pass-result {
  color: #10b981;
  font-weight: 800;
  font-size: 1.1rem;
}

.fail-result {
  color: #ef4444;
  font-weight: 800;
  font-size: 1.1rem;
}

#retry-btn {
  background: #2563eb;
  color: #ffffff;
  margin-right: 10px;
}

#new-test-btn {
  background: #64748b;
  color: #ffffff;
}

/* Mistakes Table */
#errors-display {
  margin-top: 20px;
}

.mistake-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.mistake-table th {
  background: #ef4444;
  color: #ffffff;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.9rem;
}

.mistake-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.correct {
  color: #10b981;
  font-weight: 600;
}

.wrong {
  color: #ef4444;
  text-decoration: underline;
  font-weight: 600;
}

.skipped-half-line {
  background: #fef08a;
  border: 1px solid #facc15;
  border-radius: 4px;
  color: #854d0e;
  padding: 2px 6px;
  font-weight: 600;
}

.given {
  color: #475569;
}

/* History Section */
.history-section {
  background: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 24px;
  border: 1px solid #e2e8f0;
}

.history-section h3 {
  margin: 0 0 12px 0;
  font-size: 1.15rem;
  color: #1e293b;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.history-table th {
  background: #f1f5f9;
  padding: 10px 12px;
  text-align: left;
  color: #334155;
}

.history-table td {
  padding: 8px 12px;
  border-bottom: 1px solid #e2e8f0;
}

#clear-history-btn {
  background: #64748b;
  color: #ffffff;
  padding: 6px 14px;
  border: none;
  border-radius: 6px;
  font-size: 0.85rem;
  cursor: pointer;
}

/* Modals */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.55);
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #ffffff;
  border-radius: 14px;
  padding: 24px 28px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  max-width: 420px;
  width: 90%;
}

.modal-content h2 {
  margin: 0 0 12px 0;
  font-size: 1.4rem;
  color: #1e293b;
}

.modal-content p {
  color: #475569;
  margin: 0 0 20px 0;
  line-height: 1.5;
}

.modal-content button {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   TOP MODE SWITCHER & CURRICULUM DRAWER (Lessons vs Practice Navigation)
   ========================================================================== */
.tm-top-mode-nav {
  width: 100%;
  margin: 10px auto 16px auto;
  box-sizing: border-box;
}

.tm-mode-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 6px 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

.tm-mode-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 280px;
}

.tm-mode-tab-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  padding: 8px 16px;
  border-radius: 10px;
  text-decoration: none !important;
  color: #475569 !important;
  background: transparent;
  border: 1.5px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-sizing: border-box;
  cursor: pointer;
}

.tm-mode-tab-btn:hover {
  background: #f1f5f9;
  color: #0f172a !important;
}

/* Active Mode States */
.tm-mode-tab-btn.active-mode.active-lessons {
  background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%) !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
}

.tm-mode-tab-btn.active-mode.active-practice {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border-color: #6d28d9 !important;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3) !important;
}

.tm-mode-icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
}

.tm-mode-info {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.tm-mode-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
}

.tm-mode-desc {
  font-size: 11px;
  opacity: 0.85;
  line-height: 1.2;
}

.tm-mode-tab-btn.active-mode .tm-mode-desc {
  color: rgba(255, 255, 255, 0.9);
}

.tm-mode-badge-active {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

/* Drawer Toggle Button */
.tm-drawer-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tm-drawer-toggle-btn:hover {
  background: #ffffff;
  border-color: #94a3b8;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.tm-drawer-toggle-icon {
  font-size: 15px;
}

.tm-drawer-arrow {
  font-size: 11px;
  transition: transform 0.2s ease;
}

/* Expandable Drawer Panel */
.tm-curriculum-drawer {
  margin-top: 10px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 12px 28px -6px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
  padding: 16px 20px;
  box-sizing: border-box;
}

.tm-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid #f1f5f9;
}

.tm-drawer-switch-pills {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tm-drawer-switch-pill {
  padding: 6px 16px;
  border-radius: 20px;
  border: 1.5px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tm-drawer-switch-pill:hover {
  background: #f1f5f9;
  color: #1e293b;
}

.tm-drawer-switch-pill.active {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.tm-drawer-close-btn {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tm-drawer-close-btn:hover {
  background: #fecaca;
  color: #b91c1c;
}

.tm-drawer-subheading {
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 12px;
}

/* Lessons Grid */
.tm-lessons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  max-height: 480px;
  overflow-y: auto;
  padding: 2px 4px;
}

.tm-chapter-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.tm-chapter-header {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 13px;
  color: #1e293b;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.tm-chapter-count {
  margin-left: auto;
  font-size: 11px;
  color: #64748b;
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 500;
}

.tm-sublessons-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tm-sublesson-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none !important;
  font-size: 12.5px;
  color: #334155 !important;
  background: #ffffff;
  border: 1px solid #f1f5f9;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.tm-sublesson-link:hover {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8 !important;
}

.tm-sublesson-link.current-active-lesson {
  background: #dbeafe !important;
  border-color: #3b82f6 !important;
  color: #1d4ed8 !important;
  font-weight: 700 !important;
}

.tm-sublesson-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #94a3b8;
  flex-shrink: 0;
}

.tm-sublesson-link.current-active-lesson .tm-sublesson-dot {
  background: #2563eb;
}

.tm-now-badge {
  margin-left: auto;
  background: #2563eb;
  color: #ffffff;
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: 8px;
  font-weight: 700;
  flex-shrink: 0;
}

/* Practice Grid */
.tm-practice-pills-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 4px;
}

.tm-practice-pill-card {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 8px 4px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none !important;
  font-size: 13px;
  font-weight: 700;
  color: #334155 !important;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.tm-practice-pill-card:hover {
  background: #f5f3ff;
  border-color: #7c3aed;
  color: #6d28d9 !important;
}

.tm-practice-pill-card.current-active-practice {
  background: linear-gradient(135deg, #6d28d9 0%, #7c3aed 100%) !important;
  color: #ffffff !important;
  border-color: #6d28d9 !important;
  box-shadow: 0 3px 10px rgba(124, 58, 237, 0.3) !important;
}

.tm-active-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  position: absolute;
  top: 4px;
  right: 4px;
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .te-hud-bar,
  .te-hud-metrics {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .tm-mode-tabs-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .tm-mode-tabs {
    flex-direction: column;
    width: 100%;
  }

  .tm-mode-tab-btn {
    width: 100%;
  }

  .tm-drawer-toggle-btn {
    width: 100%;
    justify-content: center;
  }

  .tm-lessons-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   Editorial Educational Guides (.tp-guide)
   ============================================================ */
.tp-guide {
  max-width: 960px;
  margin: 28px auto 36px auto;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 32px 32px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  color: #334155;
  line-height: 1.75;
  font-size: 16px;
  box-sizing: border-box;
}
.tp-guide-header {
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 18px;
  margin-bottom: 22px;
}
.tp-guide h2 {
  font-size: 22px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  margin: 0 0 12px 0 !important;
  line-height: 1.35 !important;
}
.tp-guide-section {
  margin-top: 28px;
}
.tp-guide-lead {
  font-size: 16px;
  color: #475569;
  margin: 0;
}
.tp-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 18px 0 24px 0;
}
.tp-spec-item {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.tp-spec-item span {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #64748b;
}
.tp-spec-item strong {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}
.tp-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 14px 0 18px 0;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}
.tp-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}
.tp-data-table th {
  background: #f1f5f9;
  color: #0f172a;
  font-weight: 700;
  text-align: left;
  padding: 11px 14px;
  border-bottom: 1px solid #cbd5e1;
}
.tp-data-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
}
.tp-data-table tr:last-child td {
  border-bottom: none;
}
.tp-guide kbd {
  display: inline-block;
  padding: 2px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-bottom-width: 2px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.tp-steps-list {
  padding-left: 20px;
  margin: 12px 0;
}
.tp-steps-list li {
  margin-bottom: 10px;
}
.tp-callout-box {
  background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 24px 0;
}
.tp-callout-box h3 {
  font-size: 17px !important;
  font-weight: 800 !important;
  color: #1e3a8a !important;
  margin: 0 0 10px 0 !important;
}
.tp-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.tp-pill-link {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  background: #ffffff;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe;
  border-radius: 20px;
  font-size: 13.5px;
  font-weight: 700;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.tp-pill-link:hover {
  background: #2563eb;
  color: #ffffff !important;
  border-color: #2563eb;
}
.tp-dir-group {
  margin-top: 20px;
}
.tp-dir-group h3 {
  font-size: 16px !important;
  font-weight: 800 !important;
  color: #1e293b !important;
  margin: 0 0 10px 0 !important;
}
.tp-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(165px, 1fr));
  gap: 10px;
}
.tp-lang-card {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.tp-lang-card:hover {
  background: #eff6ff;
  border-color: #60a5fa;
  transform: translateY(-1px);
}
.tp-lang-card strong {
  font-size: 14px;
  color: #0f172a;
}
.tp-lang-card span {
  font-size: 13px;
  color: #2563eb;
  font-weight: 600;
}
.tp-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tp-faq-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 18px;
}
.tp-faq-card summary {
  font-weight: 700;
  color: #0f172a;
  cursor: pointer;
  font-size: 15.5px;
}
.tp-faq-card p {
  margin: 10px 0 0 0;
  color: #475569;
  font-size: 14.5px;
}
.tp-kb-figure {
  margin: 16px 0;
  text-align: center;
}
.tp-kb-figure img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
}
.tp-kb-figure figcaption {
  font-size: 13px;
  color: #64748b;
  margin-top: 6px;
}
@media (max-width: 900px) {
  .te-hud-bar,
  .te-hud-metrics {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .tp-guide {
    padding: 20px 16px;
    margin: 18px auto 24px auto;
  }
  .tp-guide h2 {
    font-size: 19px !important;
  }
}

/* ============================================================
   Typinge Distinct SaaS Header (.te-topbar)
   ============================================================ */
.te-topbar {
  background: #0f172a;
  color: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.18);
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.te-topbar-accent {
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 55%, #8b5cf6 100%);
}
.te-topbar-inner {
  max-width: 1380px;
  margin: 0 auto;
  padding: 10px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.te-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none !important;
  flex-shrink: 0;
}
.te-brand-keycap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, #10b981 0%, #059669 100%);
  color: #ffffff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: 0 3px 0 #065f46, inset 0 1px 0 rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(110, 231, 183, 0.55);
}
.te-brand-text {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.te-brand-text strong {
  font-size: 22px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.4px;
}
.te-brand-text small {
  font-size: 11px;
  font-weight: 700;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(96, 165, 250, 0.3);
  padding: 2px 8px;
  border-radius: 999px;
}
.te-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1;
  gap: 16px;
}
.te-nav-list {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.te-nav-item {
  position: relative;
}
.te-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  border-radius: 9px;
  color: #e2e8f0 !important;
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  border: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.15s ease, color 0.15s ease;
}
.te-nav-link:hover,
.te-has-mega:hover > .te-nav-link,
.te-has-mega.is-mega-open > .te-nav-link {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}
.te-caret {
  font-size: 11px;
  opacity: 0.8;
}
.te-mega-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 760px;
  max-width: 90vw;
  max-height: 75vh;
  overflow-y: auto;
  background: #ffffff;
  color: #0f172a;
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
  border: 1px solid #e2e8f0;
  z-index: 10000;
}
.te-has-mega::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 10px;
}
@media (min-width: 993px) {
  .te-has-mega:hover > .te-mega-panel,
  .te-has-mega.is-mega-open > .te-mega-panel {
    display: block;
  }
}
.te-mega-heading {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: #64748b;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f1f5f9;
}
.te-mega-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.te-mega-grid.te-mega-featured {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.te-mega-item {
  display: block;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155 !important;
  text-decoration: none !important;
  transition: background 0.12s ease, color 0.12s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.te-mega-item:hover {
  background: #eff6ff;
  color: #1d4ed8 !important;
}
.te-mega-item.is-accent {
  background: #f8fafc;
  color: #1d4ed8 !important;
  border: 1px solid #dbeafe;
  font-weight: 700;
}
.te-mega-item.is-accent:hover {
  background: #2563eb;
  color: #ffffff !important;
  border-color: #2563eb;
}
.te-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.te-search-form input {
  width: 205px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.85);
  color: #f8fafc;
  font-size: 13.5px;
  outline: none;
  transition: border-color 0.15s ease, width 0.2s ease, background 0.15s ease;
}
.te-search-form input::placeholder {
  color: #94a3b8;
}
.te-search-form input:focus {
  border-color: #60a5fa;
  background: #1e293b;
  width: 240px;
}
.te-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 15px;
  border-radius: 999px;
  background: #2563eb;
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none !important;
  border: 1px solid #3b82f6;
  transition: background 0.15s ease;
  white-space: nowrap;
}
.te-auth-btn:hover {
  background: #1d4ed8;
}
.te-auth-btn.is-ghost {
  background: transparent;
  border-color: rgba(148, 163, 184, 0.4);
}
.te-mobile-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.25);
  cursor: pointer;
}
.te-mobile-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
@media (max-width: 992px) {
  .te-mobile-toggle {
    display: inline-flex;
  }
  .te-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #0f172a;
    flex-direction: column;
    align-items: stretch;
    padding: 14px 18px 20px 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.35);
    max-height: 82vh;
    overflow-y: auto;
  }
  .te-nav.is-open {
    display: flex;
  }
  .te-nav-list {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .te-nav-link {
    width: 100%;
    justify-content: space-between;
    padding: 11px 12px;
  }
  .te-mega-panel {
    position: static;
    width: 100%;
    max-width: 100%;
    max-height: none;
    margin-top: 6px;
    box-shadow: none;
  }
  .te-has-mega.is-mega-open > .te-mega-panel {
    display: block;
  }
  .te-mega-grid,
  .te-mega-grid.te-mega-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .te-topbar-actions {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
  }
  .te-search-form input,
  .te-search-form input:focus {
    width: 100%;
    box-sizing: border-box;
  }
}

/* ============================================================
   Modern Light SaaS HUD Bar (.te-hud-bar) & Speed Card (.containerTP)
   ============================================================ */
.containerTT {
  width: 100%;
  max-width: 860px;
  margin: 0 auto 14px auto;
}
.te-hud-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 8px 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 9px 12px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}
.te-hud-metrics {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}
.te-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  line-height: 1;
  border: 1px solid transparent;
  user-select: none;
  white-space: nowrap;
}
.te-chip-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.45px;
  opacity: 0.85;
}
.te-chip-val {
  font-size: 14.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.te-chip.is-timer {
  background: #eff6ff;
  color: #1d4ed8;
  border-color: #bfdbfe;
}
.te-chip.is-wpm {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.te-chip.is-acc {
  background: #eef2ff;
  color: #4338ca;
  border-color: #c7d2fe;
}
.te-chip.is-err {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}
.te-hud-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}
.te-hud-btn {
  cursor: pointer;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  padding: 6px 13px;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s ease;
  user-select: none;
}
.te-hud-btn:hover {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.te-hud-btn.is-resume {
  background: #10b981;
  color: #ffffff;
  border-color: #059669;
}
.te-hud-btn.is-resume:hover {
  background: #059669;
}
.te-hud-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  line-height: 1;
}
.te-hud-select-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.te-hud-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #f8fafc !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 11px center !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 10px !important;
  padding: 7px 32px 7px 12px !important;
  font-size: 13.5px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  cursor: pointer;
  max-width: 190px;
  text-overflow: ellipsis;
  height: auto !important;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.te-hud-select:hover,
.te-hud-select:focus {
  border-color: #3b82f6 !important;
  background-color: #ffffff !important;
}

/* Modernize Homepage & Speed Booster Card (.containerTP) */
.containerTP {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  border-top: 3px solid #10b981 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.06) !important;
  padding: 18px 20px !important;
}
.containerTP .te-hud-bar {
  border: none;
  box-shadow: none;
  background: #f8fafc;
  padding: 10px 12px;
  margin-bottom: 14px;
}

@media (max-width: 900px) {
  .te-hud-bar,
  .te-hud-metrics {
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .te-hud-bar {
    padding: 10px;
    gap: 8px;
  }
  .te-hud-metrics {
    width: 100%;
    justify-content: space-between;
  }
  .te-chip {
    flex: 1 1 calc(50% - 6px);
    justify-content: center;
    padding: 6px 8px;
  }
  .te-hud-controls {
    width: 100%;
    justify-content: space-between;
  }
  .te-hud-select-wrap {
    flex: 1;
  }
  .te-hud-select {
    width: 100%;
    max-width: 100%;
  }
}


