@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Noto+Naskh+Arabic:wght@400;600&family=Noto+Sans+Devanagari:wght@400;600&family=Noto+Sans+Bengali:wght@400;600&family=Noto+Sans+Gujarati:wght@400;600&family=Noto+Sans+Gurmukhi:wght@400;600&family=Noto+Sans+Tamil:wght@400;600&family=Noto+Sans+Telugu:wght@400;600&family=Noto+Sans+Kannada:wght@400;600&family=Noto+Sans+Malayalam:wght@400;600&family=Noto+Sans+Oriya:wght@400;600&family=Noto+Sans+JP:wght@400;600&family=Noto+Sans+KR:wght@400;600&family=Noto+Sans+SC:wght@400;600&display=swap");
:root {
  --ink: #f6f3e8;
  --muted: #a9adb5;
  --bg: #0d0f13;
  --panel: #15181e;
  --panel2: #1b1f27;
  --line: #2b3039;
  --gold: #d1b245;
  --gold2: #efd66e;
  --green: #56c596;
  --red: #ef7777;
  --typing-font: Inter, system-ui, sans-serif;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body.typing-site {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, system-ui, sans-serif;
  line-height: 1.6;
}
a {
  color: inherit;
}
.typing-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: auto;
}
.typing-header {
  position: sticky;
  top: 0;
  z-index: 10000;
  background: #0d0f13f2;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}
.typing-nav {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 28px;
}
.typing-logo {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}
.typing-logo img {
  width: 150px;
  height: 48px;
  object-fit: contain;
}
.typing-links {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
}
.typing-links a {
  font-size: 13px;
  font-weight: 650;
  color: #c9ccd2;
  text-decoration: none;
  padding: 9px 11px;
  border-radius: 7px;
}
.typing-links a:hover,
.typing-links a[aria-current="page"] {
  background: #ffffff0a;
  color: #fff;
}
.typing-cta {
  background: var(--gold) !important;
  color: #151515 !important;
}
.typing-menu-button {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.typing-menu-button span {
  display: block;
  height: 2px;
  background: var(--gold);
  margin: 4px 0;
  width: 100%;
}
.typing-hero {
  padding: 76px 0 55px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #161811 0, #0d0f13 75%);
}
.typing-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 55px;
  align-items: center;
}
.eyebrow {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.typing-hero h1 {
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.045em;
  margin: 13px 0 19px;
  max-width: 780px;
}
.typing-hero h1 span {
  color: var(--gold);
}
.typing-hero p {
  font-size: 17px;
  color: var(--muted);
  max-width: 680px;
}
.hero-actions {
  display: flex;
  gap: 11px;
  margin-top: 28px;
  flex-wrap: wrap;
}
.gold-button,
.ghost-button,
.icon-button {
  border: 0;
  border-radius: 8px;
  padding: 11px 17px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
}
.gold-button {
  background: var(--gold);
  color: #151515;
}
.gold-button:hover {
  background: var(--gold2);
}
.ghost-button,
.icon-button {
  background: #1c2027;
  border: 1px solid #343a44;
  color: #fff;
}
.ghost-button:hover,
.icon-button:hover {
  border-color: var(--gold);
}
.hero-proof {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 8px;
  border-radius: 12px;
}
.hero-proof div {
  padding: 20px;
  border-bottom: 1px solid var(--line);
}
.hero-proof div:nth-child(odd) {
  border-right: 1px solid var(--line);
}
.hero-proof div:nth-last-child(-n + 2) {
  border-bottom: 0;
}
.hero-proof b {
  display: block;
  font-size: 24px;
  color: var(--gold);
}
.hero-proof span {
  font-size: 12px;
  color: var(--muted);
}
.platform-nav {
  border-bottom: 1px solid var(--line);
  background: #111318;
}
.platform-nav .typing-wrap {
  display: flex;
  gap: 4px;
  overflow: auto;
  padding-top: 9px;
  padding-bottom: 9px;
  scrollbar-width: none;
}
.platform-nav a {
  white-space: nowrap;
  text-decoration: none;
  color: #b8bdc6;
  font-size: 13px;
  font-weight: 650;
  padding: 8px 11px;
  border-radius: 6px;
}
.platform-nav a:hover,
.platform-nav a.active {
  background: #d1b24518;
  color: var(--gold2);
}
.section {
  padding: 64px 0;
}
.section.alt {
  background: #111318;
  border-block: 1px solid var(--line);
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 20px;
  margin-bottom: 28px;
}
.section-head h2 {
  font-size: clamp(27px, 4vw, 40px);
  letter-spacing: -0.03em;
  margin: 5px 0;
}
.section-head p {
  max-width: 520px;
  color: var(--muted);
  margin: 0;
}
.feature-grid,
.path-grid,
.language-grid,
.lesson-grid,
.challenge-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.feature-card,
.path-card,
.language-card,
.lesson-card,
.challenge-card {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 21px;
  border-radius: 10px;
}
.path-card,
.language-card {
  text-decoration: none;
  transition: 0.18s;
}
.path-card:hover,
.language-card:hover {
  border-color: #75662e;
  transform: translateY(-2px);
}
.feature-card b,
.path-card h3,
.language-card h3,
.lesson-card h3,
.challenge-card h3 {
  display: block;
  color: #fff;
  margin: 8px 0 6px;
}
.feature-card p,
.path-card p,
.language-card p,
.lesson-card p,
.challenge-card p {
  color: var(--muted);
  font-size: 13px;
  margin: 0;
}
.card-icon {
  font-size: 23px;
}
.card-link {
  display: inline-block;
  margin-top: 14px;
  color: var(--gold2);
  font-size: 12px;
  font-weight: 800;
}
.language-card {
  display: flex;
  align-items: center;
  gap: 14px;
}
.language-code {
  width: 38px;
  height: 38px;
  border: 1px solid #4b4326;
  color: var(--gold2);
  display: grid;
  place-items: center;
  border-radius: 8px;
  text-transform: uppercase;
  font-weight: 800;
  font-size: 11px;
}
.language-card h3 {
  margin: 0;
}
.language-card span {
  color: var(--muted);
  font-size: 12px;
}
.language-search {
  width: 100%;
  max-width: 500px;
  background: #15181e;
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 8px;
  padding: 13px 14px;
  font: inherit;
  margin: 0 0 24px;
}
.group-title {
  margin: 35px 0 14px;
  color: var(--gold2);
}
.test-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 18px;
  align-items: start;
}
.test-controls {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 17px;
  border-radius: 10px;
  position: sticky;
  top: 92px;
}
.control-group {
  margin-bottom: 16px;
}
.control-group label {
  display: block;
  color: #c4c8d0;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}
.control-group select,
.control-group input,
.control-group textarea {
  width: 100%;
  background: #0f1116;
  border: 1px solid #343a45;
  border-radius: 7px;
  padding: 10px;
  color: #fff;
  font: inherit;
}
.duration-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 5px;
}
.duration-buttons button {
  background: #1d2129;
  color: #cfd3da;
  border: 1px solid #333945;
  padding: 7px;
  border-radius: 6px;
  cursor: pointer;
}
.duration-buttons button.active {
  background: #d1b2451d;
  border-color: var(--gold);
  color: var(--gold2);
}
.type-console {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 11px;
  overflow: hidden;
}
.type-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 19px;
  border-bottom: 1px solid var(--line);
}
.type-kicker {
  display: block;
  color: var(--gold);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 800;
}
.type-top strong {
  font-size: 14px;
}
.type-actions {
  display: flex;
  gap: 7px;
}
.icon-button {
  padding: 7px 10px;
  font-size: 12px;
}
.icon-button:disabled {
  opacity: 0.4;
}
.live-metrics {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-bottom: 1px solid var(--line);
}
.live-metrics div {
  padding: 13px;
  text-align: center;
  border-right: 1px solid var(--line);
}
.live-metrics div:last-child {
  border: 0;
}
.live-metrics b {
  display: block;
  font-size: 22px;
  color: #fff;
}
.live-metrics span {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
}
.type-progress {
  height: 3px;
  background: #252a32;
}
.type-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--gold);
  transition: width 0.15s;
}
.type-target {
  font-family: var(--typing-font);
  font-size: clamp(21px, 2.7vw, 30px);
  line-height: 1.8;
  letter-spacing: 0.01em;
  min-height: 210px;
  max-height: 315px;
  overflow: auto;
  padding: 29px 28px;
  color: #747a84;
  white-space: pre-wrap;
}
.type-target .correct {
  color: #f2f0e8;
}
.type-target .incorrect {
  color: #ff8b8b;
  background: #ef77771c;
  text-decoration: underline;
}
.type-target .current {
  color: #fff;
  border-bottom: 2px solid var(--gold);
}
.engine-input {
  width: calc(100% - 38px);
  margin: 0 19px 12px;
  background: #0f1116;
  border: 1px solid #333945;
  border-radius: 8px;
  color: #fff;
  font-family: var(--typing-font);
  font-size: 18px;
  padding: 13px;
  resize: vertical;
  direction: inherit;
}
.engine-input:focus {
  outline: 2px solid #d1b24555;
  border-color: var(--gold);
}
.engine-hint {
  margin: 0 19px 16px;
  font-size: 11px;
  color: #767d88;
}

.phonetic-bar {
  align-items: center;
  background: rgba(221, 170, 45, 0.08);
  border: 1px solid rgba(221, 170, 45, 0.28);
  border-radius: 12px;
  display: flex;
  gap: 14px;
  justify-content: space-between;
  margin: 16px 0 10px;
  padding: 10px 12px;
}

.phonetic-switch {
  align-items: center;
  color: var(--typing-text);
  cursor: pointer;
  display: inline-flex;
  font-size: 0.82rem;
  font-weight: 800;
  gap: 9px;
  white-space: nowrap;
}

.phonetic-switch input {
  block-size: 1px;
  inline-size: 1px;
  opacity: 0;
  position: absolute;
}

.phonetic-switch span {
  background: #3a4050;
  border-radius: 999px;
  display: inline-block;
  height: 22px;
  position: relative;
  transition: 0.2s ease;
  width: 40px;
}

.phonetic-switch span::after {
  background: #fff;
  border-radius: 50%;
  content: "";
  height: 16px;
  left: 3px;
  position: absolute;
  top: 3px;
  transition: 0.2s ease;
  width: 16px;
}

.phonetic-switch input:checked + span {
  background: var(--typing-gold);
}

.phonetic-switch input:checked + span::after {
  transform: translateX(18px);
}

.phonetic-switch input:focus-visible + span {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

#phoneticMessage {
  color: var(--typing-muted);
  font-size: 0.78rem;
  text-align: end;
}

#phoneticMessage[data-state="success"] {
  color: #72dda6;
}

#phoneticMessage[data-state="error"] {
  color: #ff9b91;
}

@media (max-width: 560px) {
  .phonetic-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  #phoneticMessage {
    text-align: start;
  }
}
.result-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 11px;
  padding: 22px;
  margin-top: 18px;
}
.result-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-heading h2 {
  margin: 3px 0;
}
.result-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 18px 0;
}
.result-grid div {
  background: #101319;
  border: 1px solid #292f38;
  border-radius: 8px;
  padding: 13px;
}
.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}
.result-grid b {
  font-size: 21px;
}
.result-detail {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 16px;
}
.result-detail canvas {
  width: 100%;
  height: 190px;
  background: #101319;
  border-radius: 8px;
}
.result-detail > div {
  background: #101319;
  border-radius: 8px;
  padding: 16px;
}
.result-detail p {
  color: var(--muted);
  font-size: 13px;
}
.progress-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.progress-summary div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 17px;
}
.progress-summary span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}
.progress-summary b {
  font-size: 25px;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
}
.history-table th,
.history-table td {
  text-align: left;
  border-bottom: 1px solid var(--line);
  padding: 11px 9px;
  font-size: 13px;
}
.history-table th {
  color: var(--muted);
}
.chart-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  padding: 20px;
  margin-top: 16px;
}
.chart-card canvas {
  width: 100%;
  height: 240px;
}
.game-shell {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
}
.game-modes {
  display: grid;
  gap: 7px;
}
.game-modes button {
  background: var(--panel);
  border: 1px solid var(--line);
  color: #fff;
  padding: 12px;
  text-align: left;
  border-radius: 7px;
  cursor: pointer;
}
.game-modes button.active {
  border-color: var(--gold);
  color: var(--gold2);
}
.game-board {
  height: 470px;
  background: #0b0d11;
  border: 1px solid var(--line);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}
.falling-word {
  position: absolute;
  color: #fff;
  background: #1c2129;
  border: 1px solid #3b424e;
  border-radius: 5px;
  padding: 5px 8px;
  font-weight: 700;
}
.game-hud {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.game-input {
  position: absolute;
  bottom: 15px;
  left: 15px;
  right: 15px;
  width: calc(100% - 30px);
  padding: 12px;
  background: #15191f;
  border: 1px solid #434b58;
  color: #fff;
  border-radius: 7px;
  font: inherit;
}
.custom-panel {
  border: 1px solid var(--line);
  background: var(--panel);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 18px;
}
.custom-panel textarea {
  width: 100%;
  min-height: 180px;
  background: #0f1116;
  border: 1px solid #333945;
  color: #fff;
  padding: 14px;
  border-radius: 8px;
  font: inherit;
}
.custom-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 14px;
}
.lesson-card.completed {
  border-color: #3d7f64;
}
.lesson-card .lesson-state {
  font-size: 11px;
  color: var(--green);
}
.typing-footer {
  border-top: 1px solid var(--line);
  padding: 45px 0 25px;
  background: #0a0c0f;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 30px;
}
.footer-grid img {
  width: 145px;
}
.footer-grid p,
.footer-grid a {
  color: var(--muted);
  font-size: 13px;
}
.footer-grid a {
  display: block;
  text-decoration: none;
  margin: 7px 0;
}
.footer-grid a:hover {
  color: var(--gold2);
}
.footer-title {
  color: #fff !important;
  font-weight: 800;
}
.footer-bottom {
  border-top: 1px solid var(--line);
  margin-top: 30px;
  padding-top: 18px;
  color: #777d87;
  font-size: 11px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 3px solid #d1b24588;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 980px) {
  .typing-header {
    background: #0d0f13;
    backdrop-filter: none;
  }
  .typing-links {
    position: fixed;
    z-index: 9997;
    top: 72px;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(88vw, 380px);
    overflow-y: auto;
    background: #101318f7;
    border-left: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: -22px 30px 60px #000b;
    padding: 14px 20px 90px;
    display: none;
    flex-direction: column;
    align-items: stretch;
  }
  .typing-links.open {
    display: flex;
  }
  .typing-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
  }
  .typing-menu-button {
    display: block;
    position: relative;
    z-index: 9998;
  }
  .typing-hero-grid,
  .test-layout {
    grid-template-columns: 1fr;
  }
  .test-controls {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .feature-grid,
  .path-grid,
  .lesson-grid,
  .challenge-grid {
    grid-template-columns: 1fr 1fr;
  }
  .language-grid {
    grid-template-columns: 1fr 1fr;
  }
  .result-detail {
    grid-template-columns: 1fr;
  }
  .game-shell {
    grid-template-columns: 1fr;
  }
  .game-modes {
    grid-template-columns: repeat(4, 1fr);
  }
  .progress-summary {
    grid-template-columns: repeat(3, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 620px) {
  .typing-wrap {
    width: min(100% - 24px, 1180px);
  }
  .typing-nav {
    height: 64px;
  }
  .typing-logo img {
    width: 128px;
    height: 42px;
  }
  .typing-links {
    top: 64px;
    width: 100%;
  }
  .typing-hero {
    padding: 48px 0 38px;
  }
  .typing-hero-grid {
    gap: 28px;
  }
  .hero-proof {
    grid-template-columns: 1fr 1fr;
  }
  .section {
    padding: 44px 0;
  }
  .section-head {
    display: block;
  }
  .feature-grid,
  .path-grid,
  .language-grid,
  .lesson-grid,
  .challenge-grid {
    grid-template-columns: 1fr;
  }
  .test-controls {
    grid-template-columns: 1fr;
  }
  .live-metrics {
    grid-template-columns: repeat(3, 1fr);
  }
  .live-metrics div:nth-child(3) {
    border-right: 0;
  }
  .live-metrics div:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
  .type-target {
    padding: 20px 16px;
    min-height: 235px;
  }
  .engine-input {
    width: calc(100% - 24px);
    margin-inline: 12px;
  }
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
  .progress-summary {
    grid-template-columns: 1fr 1fr;
  }
  .game-modes {
    grid-template-columns: 1fr 1fr;
  }
  .game-board {
    height: 430px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .history-table {
    display: block;
    overflow: auto;
  }
  .hero-actions > * {
    width: 100%;
  }
}
@media (max-width: 360px) {
  .typing-wrap {
    width: min(100% - 18px, 1180px);
  }
  .typing-hero h1 {
    font-size: 35px;
  }
  .live-metrics b {
    font-size: 18px;
  }
  .live-metrics div {
    padding: 10px 5px;
  }
  .result-grid {
    grid-template-columns: 1fr;
  }
  .duration-buttons {
    grid-template-columns: 1fr 1fr;
  }
}

/* Mobile navigation and immediate typing focus states. */
body.typing-menu-open {
  overflow: hidden;
}
body.typing-menu-open::after {
  content: none;
  display: none;
}
.typing-menu-button {
  cursor: pointer;
}
.typing-menu-button span {
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}
.typing-menu-button.active span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}
.typing-menu-button.active span:nth-child(2) {
  opacity: 0;
}
.typing-menu-button.active span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}
.engine-input[autofocus] {
  box-shadow: inset 3px 0 0 var(--gold);
}
@media (max-width: 980px) {
  .typing-links {
    top: 72px;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(88vw, 360px);
    max-height: calc(100dvh - 72px);
    overflow: auto;
    padding: 14px;
    color: var(--ink);
    background: #101318;
    box-shadow: -20px 25px 55px #000b;
    align-items: stretch;
  }
  .typing-links.open {
    display: flex;
    opacity: 1;
    visibility: visible;
  }
  .typing-links a {
    min-height: 46px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #292e37;
    border-radius: 0;
    padding-inline: 12px;
    color: #e8e9ed;
  }
}
@media (max-width: 620px) {
  .typing-links {
    top: 64px;
    width: 100%;
    max-height: calc(100dvh - 64px);
  }
  .platform-nav .typing-wrap {
    padding-inline: 2px;
  }
}
