/* =============================================
   TypingBoard.IN â€” Light / Daylight Theme
   Clean Â· Simple Â· Professional Â· Daily Use
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Sans+Devanagari:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');


:root {
  --bg: #f4f7fb;
  --bg-white: #ffffff;
  --bg-soft: #eaf3fa;
  --bg-btn: #689cc3;
  --bg-btn-hover: #5590bc;
  --card: #ffffff;
  --border: #ccdcec;
  --accent: #2f77ad;
  --accent-dark: #235d87;
  --accent-light: #e6f1f8;
  --accent2: #e63946;
  --green: #2b9348;
  --green-light: #edf7f0;
  --red: #e63946;
  --red-light: #fdecea;
  --orange: #f77f00;
  --text: #111111;
  --text-sub: #444444;
  --text-muted: #888888;
  --correct: #2b9348;
  --wrong: #e63946;
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.10);
  --radius-sm: 2px;
  --radius: 4px;
  --radius-md: 6px;
  --radius-lg: 14px;
  --font: 'IBM Plex Sans', sans-serif;
  --font-hindi: 'IBM Plex Sans Devanagari', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --transition: all 0.15s ease;
  --nav-h: 56px;
  --line-hight-sm: 1.2;
  --line-hight: 1.4;
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: var(--font);
}

input,
select,
textarea {
  font-family: var(--font);
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: #c8cce0;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent);
}

/* TOP BAR (Smart Animated Notification) */
.top-bar {
  position: fixed;
  top: var(--nav-h);
  left: 0;
  width: 100%;
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.82rem;
  font-weight: 500;
  z-index: 990;
  /* Below navbar */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);

  /* Animation baseline */
  transform: translateY(-100%);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease, visibility 0.4s ease;
}

.top-bar.show-promo {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
}

.top-bar-content {
  flex: 1;
  text-align: center;
}

.top-bar a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  margin-left: 6px;
}

.top-bar-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
  flex-shrink: 0;
}

.top-bar-close:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* NAVBAR */
nav.navbar {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.nav-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  /* Changed to stretch for full-height items */
  justify-content: space-between;
  padding: 0 18px;
  height: var(--nav-h);
}

.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}

.main-logo {
  height: 32px;
  width: auto;
  max-width: 200px;
  display: block;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.nav-logo:hover .main-logo {
  transform: scale(1.03);
}

@media (max-width: 480px) {
  .main-logo {
    height: 28px;
    max-width: 180px;
  }
}

.nav-menu {
  display: flex;
  align-items: stretch;
  /* Full-height items */
  gap: 0;
  /* No gap - boxy layout */
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  height: 100%;
  font-size: 1.0rem;
  font-weight: 400;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  border: none;
  background: none;
}

.nav-link svg {
  width: 12px;
  height: 12px;
  transition: var(--transition);
  color: var(--text-muted);
}

/* Custom icons in navbar */
.nav-icon {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: -3px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Hover State - remains active even when cursor is in the dropdown */
.nav-item:hover>.nav-link {
  color: var(--accent);
  background: var(--bg-soft);
}

.nav-item:hover>.nav-link svg {
  color: var(--accent);
  /* SVG turns dark too */
  transform: rotate(180deg);
}

/* Optional active styling if needed later, currently set to standard */
.nav-link.active {
  color: var(--accent);
  font-weight: 500;
  border-bottom: 2px solid var(--accent);
}

/* (Removed redundant transform rule, merged above) */

.dropdown {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: calc(100% + 12px);
  /* Default state slightly pushed down */
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px;
  min-width: 210px;
  z-index: 9999;
  box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.15);
  /* Elevated premium shadow */
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(10px);
}

/* Connecting Arrow pointing up to Navbar */
.dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 20px;
  width: 10px;
  height: 10px;
  background: var(--bg-white);
  border-left: 1px solid var(--border);
  border-top: 1px solid var(--border);
  transform: rotate(45deg);
}

/* Desktop Hover Logic */
@media (min-width: 1025px) {
  .nav-item:hover .dropdown {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    /* Glides into place */
    top: calc(100% + 8px);
    /* Connects */
  }
}

/* Mobile Fallback - Hide desktop dropdowns completely */
@media (max-width: 1024px) {
  .dropdown {
    display: none !important;
  }
}

.dropdown-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 8px 10px 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  font-size: 0.845rem;
  transition: var(--transition);
  cursor: pointer;
}

.dropdown-item:hover {
  background: var(--accent-light);
  color: var(--accent);
}

.dropdown-item .di-icon {
  font-size: 0.9rem;
  width: 18px;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: 4px;
  align-self: center;
  /* Vertically center it despite parent stretching */
  margin-left: -5px;
  /* Pull slightly closer to the left edge */
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  /* White lines on the dark accent navbar */
  border-radius: 2px;
  transition: var(--transition);
}

/* MOBILE DRAWER */

/* Dark backdrop */
.drawer-backdrop {
  visibility: hidden;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1099;
  backdrop-filter: blur(0.5px);
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.drawer-backdrop.open {
  visibility: visible;
  opacity: 1;
}

/* Drawer panel â€” slides in from left */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 280px;
  max-width: 82vw;
  background: var(--bg-white);
  z-index: 1100;
  overflow-y: auto;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.14);
  padding: 0 0 40px;
}

.mobile-drawer.open {
  transform: translateX(0);
}

/* Drawer header */
.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  position: sticky;
  top: 0;
  z-index: 1;
}

.drawer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: var(--font);
  transition: var(--transition);
  padding: 0;
  line-height: 1;
}

.drawer-close:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

/* --- Accordion Styles --- */
.drawer-section {
  border-bottom: 1px solid var(--border-light);
}

.drawer-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s ease;
}

.drawer-section-btn:hover {
  background: var(--bg-soft);
}

.drawer-section-btn .chevron {
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  color: var(--text-muted);
}

.drawer-section.active .drawer-section-btn {
  background: var(--bg-soft);
  color: var(--accent);
}

.drawer-section.active .chevron {
  transform: rotate(180deg);
  color: var(--accent);
}

.drawer-section-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--bg-white);
}

.drawer-links {
  display: flex;
  flex-direction: column;
  padding: 4px 0 12px;
}

.drawer-links a {
  padding: 10px 20px 10px 48px;
  font-size: 0.9rem;
  color: var(--text-sub);
  text-decoration: none;
  transition: all 0.2s ease;
  position: relative;
}

.drawer-links a::before {
  content: "";
  position: absolute;
  left: 28px;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: all 0.2s ease;
}

.drawer-links a:hover {
  background: var(--accent-light);
  color: var(--accent);
  padding-left: 54px;
}

.drawer-links a:hover::before {
  background: var(--accent);
}

.drawer-footer-links {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-footer-link {
  padding: 12px 16px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: var(--transition);
}

.drawer-footer-link:hover {
  background: var(--accent-light);
  color: var(--accent);
}

/* QUICK TOOLS */
.quick-tools {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.quick-tools-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  padding: 0 20px;
}

.qt-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-sub);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.qt-item span {
  font-size: 0.95rem;
}

.qt-item:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.qt-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* LAYOUT */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 12px 20px;
}

.page-container {
  flex: 1;
  width: 100%;
}

.page-section {
  display: none;
  padding: 0 0 50px;
}

.page-section.active {
  display: block;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

/* Category Sections */
.section-category {
  padding: 8px;
}

.section-category h2 {
  text-align: center;
  margin-bottom: 8px;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--accent);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title h2 {
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-sub);
}

/* Back link ka style */
.section-back-link a {
  font-size: 0.9rem;
  color: var(--text-muted, #555);
  /* Default color agar variable na ho */
  text-decoration: none;
  /* Underline hata di */
  transition: color 0.2s ease;
}

.section-back-link a:hover {
  color: var(--primary-color, #007bff);
  /* Hover par color badlega */
  text-decoration: underline;
  /* Hover par underline aayegi */
}

.st-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

/* HERO */
.hero {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  padding: 18px 16px 0px 16px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 50px;
  padding: 4px 14px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 500;
  line-height: 1;
  color: var(--text);
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: 0.85 rem;
  color: var(--text-sub);
  max-width: 520px;
  margin: 0 auto 12px;
  line-height: 1.4;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.hero-stat .hs-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.hero-stat .hs-lbl {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* Mobile Hero Redesign */
@media (max-width: 768px) {
  .hero {
    padding: 8px 12px;
  }

  .hero-badge {
    margin-bottom: 10px;
  }

  .hero h1 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    line-height: 1.1;
  }

  .hero p {
    font-size: 0.85rem;
    line-height: 1.15;
    margin-bottom: 10px;
  }

  /* Force stats into a single line */
  .hero-stats {
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
    flex-wrap: nowrap;
  }

  .hero-stat {
    flex: 0 0 auto;
    /* important */
    text-align: center;
    line-height: 0.7;
  }

  .hero-stat .hs-num {
    font-size: 1.2rem;
    padding-bottom: 3px;
  }

  .hero-stat .hs-lbl {
    font-size: 0.6rem;
    letter-spacing: 0;
    line-height: 1;
  }

  /* Triangle CTA Layout â€” clean grid approach */
  .hero-cta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 8px;
    padding-bottom: 8px;
  }

  /* Main Menu spans both columns (full width row 1) */
  .cta-full-width {
    grid-column: 1 / -1;
    max-width: 60%;
    /* visually narrower  */
    margin: 0 auto;
    /* centred inside that full row */
    justify-content: center;
  }
}

/* Desktop Only Helper */
@media (min-width: 769px) {
  .mobile-only-btn {
    display: none !important;
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 2px 8px rgba(67, 97, 238, 0.2);
}

.btn-primary:hover {
  background: var(--accent-dark);
}

.btn-outline {
  background: white;
  color: var(--text-sub);
  border: 1px solid var(--border) !important;
}

.btn-outline:hover {
  border-color: var(--accent) !important;
  color: var(--accent);
}

/* HOME CARDS */
.home-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.home-card {
  flex: 0 0 200px;
  min-height: 160px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 8px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.home-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  background: var(--bg-soft);
}

.hc-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  transition: transform 0.3s ease;
}

.home-card:hover .hc-icon {
  transform: scale(1.1);
}

.hc-icon.blue,
.hc-initials.blue {
  background: #eef1fd;
  color: #3b82f6;
}

.hc-icon.pink,
.hc-initials.pink {
  background: #fff1f2;
  color: #f43f5e;
}

.hc-icon.green,
.hc-initials.green {
  background: #f0fdf4;
  color: #22c55e;
}

.hc-icon.teal,
.hc-initials.teal {
  background: #f0f9ff;
  color: #0ea5e9;
}

.hc-icon.gold,
.hc-initials.gold {
  background: #fffbeb;
  color: #f59e0b;
}

.hc-icon.purple,
.hc-initials.purple {
  background: #faf5ff;
  color: #a855f7;
}

.home-card h3 {
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.2;
}

.home-card p {
  font-size: 0.82rem;
  color: var(--text-sub);
  line-height: 1.5;
  margin: 0;
  /* PDF24 style typically has very short, truncated descriptions */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hc-arrow {
  display: none !important;
  /* Hide old arrow for the new boxy look */
}

.hc-badge {
  font-size: 0.65rem;
  padding: 2px 6px;
  background: var(--accent);
  color: white;
  border-radius: 4px;
  margin-left: 4px;
  vertical-align: middle;
}

.hc-arrow {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 1rem;
  transition: var(--transition);
}

.home-card:hover .hc-arrow {
  color: var(--accent);
  transform: translateY(-50%) translateX(3px);
}

.hc-badge {
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-left: 5px;
  vertical-align: middle;
}

/* HOME CARD SMALL */
.home-card-small {
  flex: 0 0 160px;
  min-height: 70px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 8px;
  text-align: center;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.home-card-small:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
  background: var(--bg-soft);
}

.hc-initials {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 1.2px;
  transition: transform 0.3s ease;
}

.home-card-small:hover .hc-initials {
  transform: scale(1.1);
}

.home-card-small h3 {
  font-size: 0.81rem;
  font-weight: 400;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}

@media (max-width: 480px) {
  .home-card-small {
    flex: 0 0 calc(50% - 8px);
    padding: 12px 6px;
    min-height: 100px;
  }
}

/* Blog List on Home */
.blog-list-home {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 30px;
}

.blog-item-home {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  transition: var(--transition);
}

.blog-item-home:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  background: var(--bg-soft);
}

.bih-icon {
  width: 42px;
  height: 42px;
  background: var(--accent-light);
  color: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.bih-content {
  flex: 1;
}

.bih-content h4 {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}

.bih-content .bih-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* TEST SETUP */
.test-setup-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
  display: none;
}

/* About Section Cards */
.info-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.info-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
  background: var(--bg-soft);
}


.test-setup-card.active {
  display: block;
}

.setup-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 20px;
}

@media (max-width: 600px) {
  .setup-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

.setup-or {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  position: relative;
}

@media (max-width: 600px) {
  .setup-or {
    height: 20px;
    margin: 4px 0;
  }
}

.setup-field label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.setup-field input,
.setup-field select,
.setup-field textarea {
  width: 100%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: var(--transition);
  font-family: inherit;
}

.setup-field textarea {
  resize: none;
  height: 42px;
}

.setup-field input:focus,
.setup-field select:focus,
.setup-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.time-chip {
  padding: 8px 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.time-chip:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.time-chip.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.mobile-time-select {
  display: none;
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  font-family: inherit;
  font-weight: 600;
}

@media (max-width: 600px) {
  .hide-on-mobile {
    display: none !important;
  }

  .show-on-mobile-flex {
    display: flex !important;
  }
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
  margin-bottom: 24px;
}

.setting-item label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  margin-bottom: 10px;
}

.radio-group {
  display: flex;
  background: var(--bg-soft);
  padding: 2px;
  border-radius: var(--radius-sm);
  gap: 2px;
  border: 1px solid var(--border);
  box-sizing: border-box;
  height: auto;
}

.radio-btn {
  flex: 1;
  cursor: pointer;
  position: relative;
  display: block;
  margin: 0 !important;
}

.radio-btn input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.radio-btn span {
  display: block;
  height: 32px;
  line-height: 32px;
  padding: 0 12px;
  border-radius: 3px;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-sub);
  transition: var(--transition);
  text-align: center;
  white-space: nowrap;
}

.radio-btn:hover input:not(:checked)+span {
  background: var(--bg-soft);
}

.radio-btn input:checked+span {
  background: white;
  color: var(--accent);
  box-shadow: var(--shadow-sm);
}

.mode-toggle {
  display: inline-flex;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.mode-btn {
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-sub);
  background: none;
  border: none;
  cursor: pointer;
  transition: var(--transition);
}

.mode-btn.active {
  background: var(--accent);
  color: white;
}

.options-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  align-items: center;
}

.toggle-option {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  user-select: none;
}

.toggle-option input[type="checkbox"] {
  display: none;
}

.toggle-sw {
  width: 34px;
  height: 20px;
  background: #d0d5e8;
  border-radius: 50px;
  position: relative;
  transition: var(--transition);
}

.toggle-sw::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.toggle-option input:checked+.toggle-sw {
  background: var(--accent);
}

.toggle-option input:checked+.toggle-sw::after {
  transform: translateX(14px);
}

.toggle-label {
  font-size: 0.82rem;
  color: var(--text-sub);
}

.start-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* TYPING ARENA */
.typing-arena {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.arena-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 11px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

.arena-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}

.arena-user {
  font-size: 0.88rem;
  color: var(--accent);
  font-weight: 600;
}

.live-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
}

.ls-item {
  padding: 12px 16px;
  text-align: center;
  border-right: 1px solid var(--border);
}

.ls-item:last-child {
  border-right: none;
}

.ls-val {
  font-size: 1.6rem;
  font-weight: 800;
  display: block;
  line-height: 1;
  font-family: var(--font-mono);
  color: var(--text);
}

.ls-lbl {
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-top: 2px;
}

.ls-item.timer .ls-val {
  color: var(--accent2);
}

.ls-item.wpm .ls-val {
  color: var(--accent);
}

.ls-item.accuracy .ls-val {
  color: var(--green);
}

.ls-item.errors .ls-val {
  color: var(--red);
}

/* —— 10-stat grid: unified view —— */
.live-stats.ls-10 {
  grid-template-columns: repeat(10, 1fr);
}

.live-stats.ls-10 .ls-item {
  padding: 10px 8px;
  border-right: 1px solid var(--border);
}

.live-stats.ls-10 .ls-val {
  font-size: var(--ls-val-size);
  line-height: 1;
}

.live-stats.ls-10 .ls-lbl {
  font-size: var(--ls-lbl-size);
  letter-spacing: 0.4px;
  text-transform: capitalize;
  line-height: 1;
  margin-top: 2px;
}

@media (max-width: 992px) {
  .live-stats.ls-10 {
    grid-template-columns: repeat(5, 1fr);
  }

  .live-stats.ls-10 .ls-item {
    border-bottom: 1px solid var(--border);
    padding: 6px 4px;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .live-stats.ls-10 .ls-val {
    font-size: var(--ls-val-size-mob);
  }

  .live-stats.ls-10 .ls-lbl {
    font-size: var(--ls-lbl-size-mob);
  }

  /* Reset border-right for wrapping every 5 items */
  .live-stats.ls-10 .ls-item:nth-child(5n) {
    border-right: none;
  }
}

@media (max-width: 480px) {
  .live-stats.ls-10 .ls-lbl {
    letter-spacing: 0;
  }
}

/* Correct stat counter: green */
.ls-item.correct-stat .ls-val {
  color: var(--correct);
}

/* Wrong stat counter: red */
.ls-item.wrong-stat .ls-val {
  color: var(--wrong);
}

/* Net WPM: gold/teal accent */
.ls-item.net-wpm .ls-val {
  color: var(--gold, #f59e0b);
}

/* —— Arena Timer pulse (now targeting ls-item) —— */
.ls-item.timer.danger .ls-val {
  color: var(--wrong);
  animation: pulse-danger-text 0.8s infinite alternate;
}

@keyframes pulse-danger-text {
  from {
    opacity: 1;
  }

  to {
    opacity: 0.55;
  }
}

.progress-bar-wrap {
  height: 3px;
  background: var(--bg-soft);
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  width: 0%;
  transition: width 0.4s ease;
}

/* â”€â”€â”€â”€ MIRROR SHARED VARIABLES â”€â”€â”€â”€
   Both passage-display & type-input use IDENTICAL
   font, size, line-height, padding so they look
   like a true mirror of each other.
â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
:root {
  --passage-font-size: 1.05rem;
  --passage-line-height: 1.9;
  --passage-padding: 12px 14px;
  --passage-min-height: 155px;

  /* Live Stats Typography (Editable) */
  --ls-val-size: 1.2rem;
  /* Desktop Value */
  --ls-lbl-size: 0.6rem;
  /* Desktop Label */
  --ls-val-size-mob: 0.9rem;
  /* Mobile Value */
  --ls-lbl-size-mob: 0.5rem;
  /* Mobile Label */
}

.passage-area {
  padding: 18px 20px;
}

@media (max-width: 768px) {
  .passage-area {
    padding: 12px 8px;
  }

  :root {
    --passage-padding: 8px 10px;
  }
}

/* â”€â”€ Passage Display (top â€” reference text) â”€â”€ */
.passage-display {
  background: #fafcff;
  /* A very light, clean off-white */
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--passage-padding);
  font-family: var(--font-mono);
  font-size: var(--passage-font-size);
  line-height: var(--passage-line-height);
  letter-spacing: 0.2px;
  margin-bottom: 12px;
  min-height: var(--passage-min-height);
  user-select: none;
  word-break: break-word;
  overflow-y: auto;
  text-align: justify;
  hyphens: auto;
}

.passage-display.hindi {
  font-family: var(--font-hindi);
  font-size: var(--passage-font-size);
  line-height: 2.2;
  letter-spacing: 0;
}

/* â”€â”€â”€ OLD char-based classes (kept for tutor compatibility) â”€â”€â”€ */
.char {
  display: inline;
}

.char.correct {
  color: var(--correct);
}

.char.wrong {
  color: var(--wrong);
  background: var(--red-light);
  border-radius: 2px;
}

.char.current {
  background: #fff3cd;
  color: var(--text);
  border-bottom: 2px solid var(--accent);
}

.char.pending {
  color: var(--text);
}

/* â”€â”€â”€ NEW word-based classes (for typing tests) â”€â”€â”€ */
.word {
  display: inline;
  border-radius: 3px;
  padding: 1px 0;
  transition: background 0.12s, color 0.12s;
}

/* Current word: highlighted like cursor â€” warm amber glow */
.word.current {
  background: rgba(255, 214, 75, 0.35);
  outline: 1.5px solid rgba(255, 180, 0, 0.6);
  border-radius: 3px;
  color: var(--text-primary);
}

/* Correctly typed word: green */
.word.correct {
  color: var(--correct);
  background: rgba(67, 233, 123, 0.08);
}

/* Incorrectly typed word: red */
.word.wrong {
  color: var(--wrong);
  background: rgba(255, 64, 88, 0.1);
}

/* Pending words: normal color, no highlight */
.word.pending {
  color: var(--text);
}

.type-input-wrap {
  position: relative;
}

/* â”€â”€ Type Input (bottom â€” user typing area) â”€â”€ */
.type-input {
  width: 100%;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);

  /* â†“ Exactly match passage-display spacing */
  padding: var(--passage-padding);

  color: var(--text);

  /* â†“ Mirror same font & size as passage */
  font-size: var(--passage-font-size);
  font-family: var(--font-mono);
  letter-spacing: 0.2px;

  resize: none;
  min-height: var(--passage-min-height);
  height: auto;
  transition: var(--transition);

  /* â†“ Mirror same line-height as passage */
  line-height: var(--passage-line-height);
  word-break: break-word;
  overflow-y: auto;
  text-align: justify;
}

/* Hindi mirror â€” same font, line-height synced */
.type-input.hindi {
  font-family: var(--font-hindi);
  letter-spacing: 0;
  line-height: 2.2;
}

.type-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.type-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  color: var(--text-muted);
  pointer-events: none;
}

.start-overlay {
  position: absolute;
  inset: 0;
  background: rgba(245, 246, 250, 0.94);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: 1.5px dashed var(--accent);
}

.start-overlay:hover {
  background: var(--accent-light);
}

.arena-footer {
  padding: 10px 20px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

@media (max-width: 600px) {
  .arena-footer {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }
}

.arena-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.arena-actions {
  display: flex;
  gap: 8px;
}

@media (max-width: 600px) {
  .arena-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0;
  }
}

.icon-btn {
  background: white;
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 0 8px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  transition: var(--transition);
  font-family: var(--font);
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.icon-btn:hover {
  background: #f8fafc;
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

@media (max-width: 600px) {
  .icon-btn {
    flex: 1;
    font-size: 0.8rem;
    padding: 6px 4px;
    height: auto;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-right: 1px solid var(--border);
    box-shadow: none;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    /* icon aur text ke beech thoda space */
  }

  .icon-btn i {
    font-size: 1rem;
  }
}

.icon-btn:last-child {
  border-right: 1px solid var(--border);
}

/* TEST CARDS (Setup, Arena, Result) */
.test-card {
  display: none;
}

.test-card.active {
  display: block !important;
}

/* RESULT */
.result-panel.active {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.result-header {
  background: var(--accent);
  padding: 24px 28px;
  text-align: center;
}

.result-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: white;
  margin-bottom: 4px;
}

.result-header p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.85rem;
}

.result-grade {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  padding: 4px 16px;
  margin-top: 10px;
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
}

.result-body {
  padding: 24px 28px;
}

.result-main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 22px;
}

.result-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 12px;
  text-align: center;
  border-top: 3px solid transparent;
}

.result-card.rc-speed {
  border-top-color: var(--accent);
}

.result-card.rc-net {
  border-top-color: #6f42c1;
}

.result-card.rc-acc {
  border-top-color: var(--green);
}

.result-card.rc-err {
  border-top-color: var(--red);
}

.result-card.rc-time {
  border-top-color: var(--orange);
}

.result-card .rv {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1;
  font-family: var(--font-mono);
  margin-bottom: 3px;
  color: var(--text);
}

.result-card.rc-speed .rv {
  color: var(--accent);
}

.result-card.rc-net .rv {
  color: #6f42c1;
}

.result-card.rc-acc .rv {
  color: var(--green);
}

.result-card.rc-err .rv {
  color: var(--red);
}

.result-card.rc-time .rv {
  color: var(--orange);
}

.result-card .rl {
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.detail-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
}

.detail-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
}

.detail-tab.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.detail-content {
  display: none;
}

.detail-content.active {
  display: block;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}

.detail-table th {
  background: var(--bg-soft);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.detail-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
}

.detail-table td:last-child {
  color: var(--text);
  font-weight: 600;
  font-family: var(--font-mono);
}

.detail-table tr:last-child td {
  border-bottom: none;
}

.detail-table tr:hover td {
  background: var(--bg-soft);
}

.result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

/* =============== CONVERTER TOOLS =============== */
.converter-container .section-header {
  margin-left: auto;
  margin-right: auto;
}


.converter-stacked-layout {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 16px;
  margin: 0 auto;
}

.converter-panel {
  flex: 1;
}

.converter-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.converter-panel:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.cp-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 4px 7px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cp-title {
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.cp-actions {
  display: flex;
  gap: 6px;
}

.cp-textarea {
  width: 100%;
  border: none;
  padding: 12px;
  font-size: 1.1rem;
  line-height: 1.4;
  resize: vertical;
  min-height: 280px;
  background: white;
  color: var(--text);
  transition: var(--transition);
  text-align: justify;
}

.cp-textarea:focus {
  outline: none;
}

.krutidev-textarea,
.chanakya-textarea {
  font-family: 'Kruti Dev 501', 'Kruti Dev 010', 'Chanakya', var(--font-hindi);
  font-size: 1.2rem;
  /* Larger font for legacy Hindi fonts */
  line-height: 1.5;
}

.unicode-textarea {
  font-family: var(--font-hindi);
  font-size: 1rem;
  /* Standard/slightly smaller for Unicode */
}

/* Ensure placeholder text is always readable in English/Default font */
.krutidev-textarea::placeholder,
.chanakya-textarea::placeholder,
.unicode-textarea::placeholder {
  font-family: var(--font);
  font-size: 1rem;
}

/* Responsive Converters */
@media (max-width: 1000px) {
  .converter-stacked-layout {
    flex-direction: column;
  }

  .cp-textarea {
    min-height: 250px;
  }
}

.converter-action-area {
  display: flex;
  justify-content: center;
  margin: 4px 0;
}

.btn-convert {
  font-size: 1.05rem !important;
  padding: 12px 32px !important;
  border-radius: 50px !important;
  box-shadow: 0 4px 14px rgba(67, 97, 238, 0.25) !important;
}

.btn-convert span {
  font-size: 1.2rem;
  transition: transform 0.2s;
  display: inline-block;
}

.btn-convert:hover span {
  transform: translateY(2px);
}

.conv-char-count {
  font-size: 0.79rem;
  font-weight: 500;
  color: var(--text-muted);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 12px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  box-sizing: border-box;
}

/* =============================================== */

/* INFO CARDS */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.info-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 8px;
}

.info-card h3 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--accent);
}

.info-card p {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: var(--line-hight-sm);
  text-align: justify;
}

.info-card strong {
  font-weight: 500;
  color: var(--text);
}

/* FAQ */
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-q {
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 600;
  transition: var(--transition);
}

.faq-q:hover {
  background: var(--bg-soft);
}

.faq-arrow {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: var(--transition);
}

.faq-item.open .faq-arrow {
  transform: rotate(180deg);
}

.faq-a {
  display: none;
  padding: 0 16px 14px;
  font-size: 0.83rem;
  color: var(--text-sub);
  line-height: 1.7;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.faq-item.open .faq-a {
  display: block;
}

/* TUTOR */
.tutor-grid {
  display: grid;
  grid-template-columns: 1fr;
  /* Vertical Stack */
  gap: 20px;
  max-width: 1280px;
  margin: 0 auto;
}

.lesson-card.centered-keyboard {
  padding: 30px 80px !important;
  /* Increased side padding to center */
}

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

.lesson-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
}

.lesson-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.lesson-progress-bar {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  flex: 1;
}

.lesson-progress-fill {
  height: 100%;
  background: var(--accent);
  transition: width 0.4s ease;
}

.lesson-body {
  padding: 18px;
}

.lesson-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 14px;
}

.lesson-key-display {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-bottom: 2px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
}

.tutor-passage {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-family: var(--font-mono);
  font-size: 1.05rem;
  line-height: 2;
}

.tutor-input {
  width: 100%;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-mono);
  transition: var(--transition);
}

.tutor-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.lesson-list {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 480px;
  overflow-y: auto;
}

.ll-header {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 11px 16px;
  font-weight: 700;
  font-size: 0.85rem;
  position: sticky;
  top: 0;
}

.lesson-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.lesson-item:hover {
  background: var(--bg-soft);
}

.lesson-item.active {
  background: var(--accent-light);
  border-left: 3px solid var(--accent);
}

.lesson-item:last-child {
  border-bottom: none;
}

.li-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
  color: var(--text-sub);
}

.li-num.done {
  background: var(--green);
  border-color: var(--green);
  color: white;
}

.li-num.current {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

.li-title {
  font-size: 0.83rem;
  font-weight: 600;
}

.li-sub {
  font-size: 0.73rem;
  color: var(--text-muted);
}

.li-badge {
  margin-left: auto;
  font-size: 0.67rem;
  padding: 2px 7px;
  border-radius: 3px;
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green);
}

/* KEYBOARD */
.kb-container {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 12px 12px;
  margin-bottom: 16px;
}

@media (max-width: 768px) {
  .kb-container {
    padding: 6px;
  }

  .container {
    padding: 0 8px;
  }
}

@media (max-width: 480px) {
  .kb-container {
    padding: 6px;
  }
}

.kb-lang-select {
  display: none;
}

.kb-lang-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.kb-lang-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-sub);
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.kb-lang-btn.active,
.kb-lang-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

:root {
  --key-unit: 44px;
  --kb-gap: 6px;
}

/* Responsive scaling for different viewports */
@media (max-width: 1200px) {
  :root {
    --key-unit: 40px;
    --kb-gap: 5px;
  }
}

@media (max-width: 992px) {
  :root {
    --key-unit: 34px;
    --kb-gap: 4px;
  }
}

@media (max-width: 768px) {
  :root {
    --key-unit: 28px;
    --kb-gap: 3px;
  }
}

.keyboard-visual {
  display: flex;
  flex-direction: column;
  gap: var(--kb-gap);
  padding: 10px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  box-sizing: border-box;
}

.kb-row {
  display: flex;
  gap: var(--kb-gap);
  justify-content: center;
  width: 100%;
}

.key {
  background: white;
  border: 1px solid #d0d5e8;
  border-bottom: 3px solid #b0b8d0;
  border-radius: 6px;
  width: var(--key-unit);
  height: calc(var(--key-unit) * 1.15);
  min-height: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  position: relative;
  font-family: var(--font-mono);
  flex-shrink: 0;
  transition: all 0.1s ease;
}

.key:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.key.pressed,
.key:active {
  background: var(--accent);
  border-color: var(--accent-dark);
  transform: translateY(1px);
  border-bottom-width: 1px;
  color: white;
  /* Ensure text color changes for generic children if any */
}

.key .k-main {
  font-size: calc(var(--key-unit) * 0.35);
  font-weight: 600;
  color: var(--text);
  line-height: 1;
}

.key.pressed .k-main,
.key:active .k-main {
  color: white;
}

.key.pressed .k-shift,
.key:active .k-shift {
  color: rgba(255, 255, 255, 0.8);
}

.key .k-shift {
  font-size: calc(var(--key-unit) * 0.22);
  color: var(--text-muted);
  position: absolute;
  top: 4px;
  right: 4px;
}

/* Width multipliers using variables for scalability */
.key.w-1-25 {
  width: calc(var(--key-unit) * 1.25 + var(--kb-gap) * 0.25);
}

.key.w-1-5 {
  width: calc(var(--key-unit) * 1.5 + var(--kb-gap) * 0.5);
}

.key.w-1-75 {
  width: calc(var(--key-unit) * 1.75 + var(--kb-gap) * 0.75);
}

.key.w-2-0 {
  width: calc(var(--key-unit) * 2.0 + var(--kb-gap) * 1.0);
}

.key.w-2-25 {
  width: calc(var(--key-unit) * 2.25 + var(--kb-gap) * 1.25);
}

.key.w-2-5 {
  width: calc(var(--key-unit) * 2.5 + var(--kb-gap) * 1.5);
}

.key.w-2-75 {
  width: calc(var(--key-unit) * 2.75 + var(--kb-gap) * 1.75);
}

.key.w-5-0 {
  width: calc(var(--key-unit) * 5.0 + var(--kb-gap) * 4.0);
}

.key.w-6-0 {
  width: calc(var(--key-unit) * 6.0 + var(--kb-gap) * 5.0);
}

.key.space-key {
  width: calc(var(--key-unit) * 6.0 + var(--kb-gap) * 5.0);
}

@media (max-width: 768px) {
  .keyboard-visual {
    padding: 0.5px 0.5px;
    overflow: hidden;
    border-radius: 4px;
    gap: 1px;
  }

  .kb-row {
    display: flex;
    gap: 1px;
    justify-content: center;
    width: 100%;
    align-items: stretch;
  }

  .key {
    flex: 1 1 0;
    min-width: 0;
    aspect-ratio: 1 / 1.2;
    height: 30px;
    min-height: unset;
    border: 0.5px solid;
    border-radius: 3px;
    border-bottom-width: 1px;
    box-sizing: border-box;
    width: unset;
  }

  /* Wide keys — flex-grow se proportional */
  .key.w-1-25 {
    flex: 1.25 1 0;
  }

  .key.w-1-5 {
    flex: 1.5 1 0;
  }

  .key.w-1-75 {
    flex: 1.75 1 0;
  }

  .key.w-2-0 {
    flex: 2.0 1 0;
  }

  .key.w-2-25 {
    flex: 2.25 1 0;
  }

  .key.w-2-5 {
    flex: 2.5 1 0;
  }

  .key.w-2-75 {
    flex: 2.75 1 0;
  }

  .key.w-5-0 {
    flex: 5.0 1 0;
  }

  .key.space-key {
    flex: 6.0 1 0;
  }

  .key .k-main {
    font-size: clamp(12px, 3.2vw, 16px);
    font-weight: 400;
    transform: scaleX(0.85);
  }

  .key .k-shift {
    font-size: clamp(5px, 1.8vw, 10px);
    top: 2px;
    right: 2px;
  }

  .kb-actions {
    display: flex;
    margin-bottom: 8px;
    width: 100%;
  }

  .kb-actions .icon-btn {
    flex: 1;
    /* This ensures equal width for all 5 buttons */
    font-size: 0.85rem;
    font-weight: 400;
    padding: 2px 2px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-sub);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 30px;
  }

  .icon-btn svg {
    display: none;
  }

  .kb-actions .icon-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--bg-soft);
    transform: translateY(-0.5px);
    box-shadow: var(--shadow-sm);
  }

  .kb-actions .icon-btn svg,
  .kb-actions .icon-btn img {
    flex-shrink: 0;
  }


  .kb-lang-label {
    padding: 0 0 0 6px;
  }
}

.kb-lang-wrapper {
  display: flex;
  align-items: center;
  padding: 12px 0px;
  width: 100%;
  flex-wrap: nowrap;
  gap: 4px;
}

.kb-lang-select {
  flex: 1;
  min-width: 0;
  display: block !important;
  padding: 2px 8px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  min-height: 30px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
  /* ← select ka koi default margin hata do */
  vertical-align: middle;
}

.kb-lang-label {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-sub);
  white-space: nowrap;
  flex-shrink: 0;
  line-height: 1;
}

.kb-lang-select:focus {
  outline: none;
  box-shadow: 0 0 0 1px rgba(47, 119, 173, 0.1);
}

.kb-lang-label {
  display: inline-block;
  margin-right: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
}

.kb-lang-wrapper {
  display: flex;
  align-items: center;
}

.kb-textarea {
  width: 100%;
  /* background: var(--bg-soft); */
  border: 0px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font-hindi);
  resize: vertical;
  max-height: 120px;
  transition: var(--transition);
}

@media (max-width: 768px) {
  .kb-textarea {
    padding: 8px 6px;
    font-size: 0.9rem;
    max-height: 90px;
  }

  .kb-lang-bar {
    display: none;
  }
}

.kb-textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: white;
}

/* TOAST */
.toast-container {
  position: fixed;
  top: 70px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.toast {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 16px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text);
  box-shadow: var(--shadow-md);
  max-width: 280px;
}

.toast.success {
  border-left: 3px solid var(--green);
}

.toast.error {
  border-left: 3px solid var(--red);
}

.toast.info {
  border-left: 3px solid var(--accent);
}

/* FOOTER */
footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 20px 0;
  margin-top: 24px;
}

.footer-grid {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

@media(max-width:1000px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media(max-width:600px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand p {
  font-size: 0.81rem;
  color: var(--text-sub);
  line-height: 1.7;
  margin: 8px 0;
}

.footer-social {
  display: none;
  gap: 8px;
}

.social-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
}

.social-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.footer-col h4 {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: var(--text-sub);
  font-size: 0.82rem;
  margin-bottom: 7px;
  transition: var(--transition);
}

.footer-col a:hover {
  color: var(--accent);
  padding-left: 3px;
}

.footer-mobile-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0;
  width: 100%;
}

.footer-mobile-actions {
  display: none;
}

.footer-action-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-sub);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.footer-action-btn:hover {
  background: var(--accent-light);
  color: var(--accent);
  border-color: var(--accent);
}

.footer-action-btn .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

@media (max-width: 600px) {
  .footer-grid {
    display: block;
    width: 100%;
    padding: 0 12px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    padding: 8px 12px 12px 12px;
  }

  footer {
    padding: 6px 0px 12px 0px;
  }

  .info-card p {
    font-size: 0.81rem;
  }

  .footer-brand {
    width: 100%;
    margin-bottom: 6px;
  }

  .footer-mobile-actions {
    display: flex;
    margin-left: auto;
    gap: 8px;
  }

  .footer-mobile-header {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-between !important;
    align-items: center;
    text-align: left;
    margin-bottom: 0;
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-bottom-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
  }
}

/* Specific adjustment for very small screens */
@media (max-width: 400px) {
  .footer-action-btn .label {
    display: none;
    /* Just icons on very small screens to save space */
  }

  .footer-action-btn {
    padding: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    justify-content: center;
  }
}

.footer-bottom {
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid var(--border);
  padding: 8px 20px 0px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.footer-bottom p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-bottom-links {
  display: flex;
  gap: 4px;
}

.footer-bottom-links a:not(:last-child)::after {
  content: "|";
  margin-left: 4px;
  color: var(--text-muted);
  pointer-events: none;
}

/* =============================================
   CONTACT PAGE
   ============================================= */
.contact-container {
  max-width: 1280px;
  padding-top: 12px;
  padding-bottom: 16px;
}

.contact-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-primary);
}

.contact-intro {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.4;
  margin-bottom: 16px;
}

.contact-email-section {
  margin-bottom: 40px;
}

.contact-email-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.contact-email-card a {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
}

.contact-email-card svg {
  color: var(--accent);
}

.contact-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 10px;
  margin-left: 4px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  max-width: 1280px;
}

.contact-info-box {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.contact-info-box h3 {
  font-size: 1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-info-box p {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.5;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================= */

.footer-bottom-links a {
  font-size: 0.78rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}

.footer-bottom-links a:hover {
  color: var(--accent);
}

/* UTILITY */
.hidden {
  display: none !important;
}

.text-accent {
  color: var(--accent);
}

.text-muted {
  color: var(--text-muted);
}

/* RESPONSIVE */
@media(max-width:1024px) {
  .nav-menu {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .nav-container {
    padding: 10px 12px;
    height: auto;
    justify-content: flex-start;
    gap: 8px;
  }
}

@media(max-width:768px) {
  .hero {
    padding: 16px 8px 0px 8px;
  }

  /* Mobile mirror: both get same smaller size */
  .passage-display,
  .type-input {
    font-size: 0.92rem;
    padding: 10px 12px;
    min-height: 140px;
    /* ~5 lines on mobile */
  }


  .setup-row {
    grid-template-columns: 1fr;
  }

  .live-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .result-body {
    padding: 18px 14px;
  }

  .ls-val {
    font-size: 1.3rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hide-on-mobile {
    display: none !important;
  }

  .quick-tools {
    display: none;
  }

  .container {
    padding: 8px 12px;
  }

  .home-card {
    flex: 0 0 30%;
    justify-content: center;
    text-align: center;
    min-height: 80px;
    padding: 6px 8px;
  }

  .home-card .hc-icon {
    margin: 0 auto 6px;
  }

  .home-card h3 {
    font-size: 0.75rem;
  }

  .home-card p {
    margin-top: 8px;
  }

  .home-card .hc-arrow {
    display: none;
  }

  .home-card-small {
    flex: 0 0 calc(50% - 4px);
    justify-content: center;
    text-align: center;
    min-height: 60px;
    padding: 6px 8px;
  }
}

@media(max-width:480px) {
  .result-main-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-stats {
    gap: 20px;
  }

  .home-card {
    flex: 0 0 30%;
    justify-content: center;
    min-height: 80px;
    padding: 6px 8px;
  }

  .home-card p {
    display: none;
  }
}

/* =======================================================
   GOOGLE ADSENSE â€” ANCHOR / STICKY BOTTOM AD STYLES
   ======================================================= */

/* Main anchor container â€” fixed at screen bottom */
#adsense-anchor {
  display: none;
  /* JS à¤¸à¥‡ show à¤¹à¥‹à¤—à¤¾ */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10000;
  background: #fff;
  border-top: 1px solid var(--border);
  box-shadow: 0 -1px 8px rgba(0, 0, 0, 0.12);
  text-align: center;
  min-height: 50px;
  display: none;
  align-items: center;
  justify-content: center;
  animation: anchorSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes anchorSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close button */
.anchor-close-btn {
  position: absolute;
  top: 4px;
  right: 6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.68rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  transition: var(--transition);
  line-height: 1;
}

.anchor-close-btn:hover {
  background: var(--red-light);
  border-color: var(--red);
  color: var(--red);
}

/* AdSense <ins> element */
#adsense-anchor .adsbygoogle {
  display: block;
  margin: 0 auto;
}

/* ðŸ”§ TESTING PLACEHOLDER â€” real AdSense à¤¹à¥‹à¤¨à¥‡ à¤ªà¤° à¤¯à¤¹ hide à¤¹à¥‹à¤—à¤¾ */
.anchor-test-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 320px;
  height: 50px;
  background: repeating-linear-gradient(45deg,
      #f4f7fb,
      #f4f7fb 8px,
      #e6f1f8 8px,
      #e6f1f8 16px);
  border: 1.5px dashed var(--accent);
  border-radius: 4px;
}

.anchor-ad-label {
  background: var(--accent);
  color: white;
  font-size: 0.6rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}

.anchor-ad-text {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Desktop à¤ªà¤° à¤•à¤­à¥€ à¤¨à¤¹à¥€à¤‚ à¤¦à¤¿à¤–à¥‡à¤—à¤¾ */
@media(min-width: 769px) {
  #adsense-anchor {
    display: none !important;
  }
}

/* Mobile à¤ªà¤° body à¤•à¥‹ à¤¨à¥€à¤šà¥‡ spacing à¤¦à¥‡à¤‚ à¤¤à¤¾à¤•à¤¿ content banner à¤•à¥‡ à¤ªà¥€à¤›à¥‡ à¤¨ à¤›à¥à¤ªà¥‡ */
@media(max-width: 768px) {
  body.anchor-ad-visible {
    padding-bottom: 50px;
  }
}

@media (max-width: 600px) {
  .conv-char-count {
    height: 30px;
    padding: 0 8px;
    font-size: 0.70rem;
    padding: 0 6px;
  }
}

/* --------------- INFO PAGES (About, Privacy, etc.) --------------- */
.info-page-container {
  max-width: 1280px;
  margin: 0 auto;
  padding-bottom: 80px;
}

.info-card-accent {
  border-left: 4px solid var(--accent);
  margin-bottom: 24px;
}

/* Tool Info Block */
.tool-info-section {
  margin-top: 40px;
  padding: 16px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.tool-info-section h3 {
  color: var(--accent);
  margin-bottom: 6px;
  font-size: 1.1rem;
}

.tool-info-section h4 {
  margin-top: 16px;
  margin-bottom: 5px;
  font-size: 1.1rem;
  color: var(--text);
}

.tool-info-section p {
  color: var(--text-sub);
  line-height: 1.4;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

@media (max-width: 768px) {
  .tool-info-section {
    padding: 16px;
    margin-top: 30px;
  }
}

.info-card-accent p {
  font-size: 1.1rem;
  line-height: 1.5;
}

.info-section {
  margin-bottom: 24px;
}

.info-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-section p {
  color: var(--text-sub);
  line-height: 1.5;
  margin-bottom: 12px;
}

.info-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.info-grid-item h3 {
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 8px;
}

.info-grid-item p {
  font-size: 0.9rem;
  color: var(--text-sub);
  line-height: 1.45;
  margin-bottom: 0px !important;
}

.info-list {
  color: var(--text-sub);
  padding-left: 20px;
  line-height: 1.8;
}

.info-list li {
  margin-bottom: 8px;
}

.info-promise-card {
  margin-bottom: 32px;
  text-align: center;
  border: 2px dashed var(--border);
}

/* --- Finger-wise keyboard colors --- */
/* Purple/Indigo (Pinky Fingers) - Code L1/R1 */
.key.finger-l1 {
  background: rgba(108, 99, 255, 0.05);
  border-color: rgba(108, 99, 255, 0.3);
}

.key.finger-l2 {
  background: rgba(67, 233, 123, 0.05);
  border-color: #43a047;
}

/* Lighter Green border */
.key.finger-l3 {
  background: rgba(255, 235, 59, 0.05);
  border-color: #f9a825;
}

/* Soft Navy Blue (Index Fingers) - Code L4/R4 */
.key.finger-l4 {
  background: rgba(26, 115, 232, 0.05);
  border-color: rgba(26, 115, 232, 0.3);
}

.key.finger-r1 {
  background: rgba(108, 99, 255, 0.05);
  border-color: rgba(108, 99, 255, 0.3);
}

.key.finger-r2 {
  background: rgba(67, 233, 123, 0.05);
  border-color: #43a047;
}

.key.finger-r3 {
  background: rgba(255, 235, 59, 0.05);
  border-color: #f9a825;
}

.key.finger-r4 {
  background: rgba(26, 115, 232, 0.05);
  border-color: rgba(26, 115, 232, 0.3);
}

.key.finger-t {
  background: rgba(33, 150, 243, 0.05);
  border-color: rgba(33, 150, 243, 0.3);
}

/* Highlighted keys for Tutor */
.key.target-hint {
  background: rgba(47, 119, 173, 0.2) !important;
  /* Slightly darker */
  border: 1px solid var(--accent) !important;
  border-bottom-width: 3px !important;
  /* Thicker bottom border */
  box-shadow: none !important;
  transform: translateY(-1px);
  z-index: 2;
}

.key.target-hint .k-main,
.key.target-hint .k-shift {
  color: #333 !important;
}

/* Finger-specific highlights (Opacities) */
/* Purple/Indigo Highlight */
.key.finger-l1.target-hint {
  background: rgba(108, 99, 255, 0.25) !important;
  border-color: #6c63ff !important;
}

.key.finger-l2.target-hint {
  background: rgba(67, 160, 71, 0.35) !important;
  border-color: #43a047 !important;
}

/* Darker Green */
.key.finger-l3.target-hint {
  background: rgba(249, 168, 37, 0.35) !important;
  border-color: #f9a825 !important;
}

/* Soft Navy Highlight */
.key.finger-l4.target-hint {
  background: rgba(26, 115, 232, 0.25) !important;
  border-color: #1a73e8 !important;
}

.key.finger-r1.target-hint {
  background: rgba(108, 99, 255, 0.25) !important;
  border-color: #6c63ff !important;
}

.key.finger-r2.target-hint {
  background: rgba(67, 160, 71, 0.35) !important;
  border-color: #43a047 !important;
}

/* Darker Green */
.key.finger-r3.target-hint {
  background: rgba(249, 168, 37, 0.35) !important;
  border-color: #f9a825 !important;
}

.key.finger-r4.target-hint {
  background: rgba(26, 115, 232, 0.25) !important;
  border-color: #1a73e8 !important;
}

.key.finger-t.target-hint {
  background: rgba(33, 150, 243, 0.2) !important;
  border-color: #2196f3 !important;
}

.key.error-hint {
  border: 1px solid var(--red) !important;
  border-bottom-width: 3px !important;
  /* Thicker bottom border */
  background: rgba(230, 57, 70, 0.2) !important;
  animation: kb-shake 0.15s ease-in-out 7;
  box-shadow: none !important;
}

.key.error-hint .k-main,
.key.error-hint .k-shift {
  color: #333 !important;
}

@keyframes kb-shake {

  0%,
  100% {
    transform: translateX(0);
  }

  33% {
    transform: translateX(-1px);
  }

  66% {
    transform: translateX(1px);
  }
}

/* Hands Beside Keyboard Layout */
.keyboard-with-hands {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 30px;
  width: 100%;
}

.hand-side {
  flex: 0 0 120px;
  max-width: 120px;
}

@media (max-width: 768px) {
  .keyboard-with-hands {
    flex-direction: column;
    align-items: center;
  }

  .hand-side {
    flex: 0 0 auto;
    width: 200px;
    max-width: 50%;
  }

  @media (max-width: 480px) {
    .hand-side {
      display: none;
    }
  }
}

.hand-svg {
  width: 100%;
  height: auto;
  max-height: 200px;
  overflow: visible;
}

.hand-path {
  transition: all 0.3s ease;
}

.finger-spot {
  fill: rgba(0, 0, 0, 0.03);
  stroke: var(--border);
  stroke-width: 1;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: center;
}

.finger-spot.active {
  fill: var(--accent);
  filter: drop-shadow(0 0 5px var(--accent));
}

/* --- AI Passage Generator --- */
@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.pg-generate-btn {
  background: var(--bg-btn);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.1s ease;
  box-shadow: 0 1px 6px rgba(0, 102, 255, 0.2);
  width: auto;
}

.pg-generate-btn:hover {
  background: var(--bg-btn-hover);
  transform: translateY(-0.5px);
}

.pg-generate-btn:active {
  transform: translateY(0);
}

.pg-generate-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@media (max-width: 600px) {
  .pg-generate-btn {
    width: 100%;
    padding: 8px;
    font-size: 0.95rem;
  }

  #tr-panels {
    grid-template-columns: 1fr !important;
  }
}