:root {
  --bg: #ffffff;
  --card: #ffffff;
  --ink: #1e293b;
  --muted: #64748b;
  --line: #e7e5e4;
  --blue: #2563eb;
  --navy: #1e1b4b;
  --good: #0d8a62;
  --bad: #c43b3b;
  --gold: #a67c2d;
  color-scheme: light;
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  color: var(--ink);
  background: #eef2f7;
}
html, body { background: #eef2f7; }

* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  height: 72px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.header-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(1280px, 100%);
}
.head-nav { display: flex; align-items: center; gap: 8px; }
.head-btn, .head-blog {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.head-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.head-typing { border-color: #ddd6fe; background: #f5f3ff; color: #5b21b6; }
.head-edit { border-color: #dbeafe; background: #eff6ff; color: #1d4ed8; }
.head-blog { border: 0; background: transparent; margin-left: auto; padding-right: 0; }
.typing-wrap { position: relative; }
.typing-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(320px, calc(100vw - 24px));
  max-height: min(70vh, 520px);
  overflow: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid #ddd6fe;
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}
.typing-panel[hidden] { display: none; }
.typing-label { margin: 4px 10px 6px; color: #4f46e5; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.typing-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}
.typing-panel a small { color: #6d28d9; background: #f5f3ff; border-radius: 999px; padding: 2px 7px; font-size: 10px; }
.typing-panel a.is-on, .typing-panel a:hover { background: #f5f3ff; }
.brand { display: flex; gap: 10px; align-items: center; text-decoration: none; }
.mark {
  display: block;
  color: var(--blue);
  font-family: Sora, sans-serif;
  font-size: 2.15rem;
  font-weight: 700;
  line-height: 1;
}
.brand strong { display: block; font-family: Sora, sans-serif; }
.brand small, .note, .lead, .card p { color: var(--muted); }
h1, h2, h3 { font-family: Sora, sans-serif; margin: 0; color: var(--navy); }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -0.03em; }
h2 { font-size: 1.4rem; margin-bottom: 12px; }
.eyebrow { margin: 0 0 6px; color: var(--blue); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.lead { margin: 8px 0 0; line-height: 1.55; max-width: 68ch; }
main { max-width: 1120px; margin: 0 auto; padding: 96px 28px 64px; min-width: 0; }
.hero, .tool-head { margin-bottom: 22px; }
.block { margin-top: 28px; }
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(23, 32, 51, 0.04);
}
.card { min-height: 190px; padding: 16px; display: flex; flex-direction: column; justify-content: space-between; text-decoration: none; }
.card p { margin: 8px 0 0; font-size: 0.92rem; line-height: 1.45; }
.badge { align-self: flex-start; border-radius: 999px; padding: 4px 8px; font-size: 0.75rem; font-weight: 700; background: #eef3ff; color: var(--blue); }
.card[data-tone="green"] .badge { background: #e7f7f0; color: var(--good); }
.card[data-tone="violet"] .badge { background: #f3eefe; color: #6d4cc4; }
.card[data-tone="rose"] .badge { background: #fdecec; color: var(--bad); }
.card[data-tone="orange"] .badge { background: #fff3df; color: #9a6412; }
.panel { padding: 18px; min-width: 0; max-width: 100%; background: #fff; }
.layout.with-side { display: grid; grid-template-columns: 240px 1fr; gap: 14px; }
.side { display: flex; flex-direction: column; gap: 8px; }
.lesson, .chip, .key, .btn {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
}
.lesson { text-align: left; padding: 8px 10px; }
.lesson span, .key small, .stat-grid span, .field span { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 700; }
.lesson.is-on, .chip.is-on, .key.is-next { border-color: var(--blue); background: #e8efff; color: var(--blue); }
.field { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.field input, .field textarea, .field select, textarea, input[data-word] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: white;
}
textarea { min-height: 140px; resize: vertical; line-height: 1.6; }
textarea.mono, input.mono { font-family: "IBM Plex Sans", ui-monospace, monospace; }
.chips, .row-actions, .split { display: flex; gap: 8px; flex-wrap: wrap; }
.split > * { flex: 1; }
.chip { padding: 8px 12px; font-weight: 700; }
.btn { background: var(--blue); color: white; border-color: var(--blue); padding: 10px 14px; font-weight: 700; }
.btn-ghost { background: white; color: var(--navy); }
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.stat-grid div { background: #f4f7ff; border: 1px solid #e2e8f8; border-radius: 12px; padding: 10px; }
.stat-grid strong { font-family: Sora, sans-serif; font-size: 1.4rem; }
.prompt {
  margin: 12px 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f7f9fc;
  border: 1px solid #dbe3f0;
  line-height: 1.85;
  font-size: 1.2rem;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  max-width: 100%;
}
.char { white-space: pre-wrap; }
.char.space { white-space: pre-wrap; }
@font-face {
  font-family: "Kruti Dev 010";
  src: url("../fonts/KrutiDev010.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}
.hindi-typing,
.hindi-typing .char,
.kb-devanagari .key b {
  font-family: "Kruti Dev 010", sans-serif;
}
.hindi-typing::placeholder,
.kb-devanagari .key-space b {
  font-family: Manrope, "IBM Plex Sans", sans-serif;
}
.char.ok { color: var(--good); }
.char.bad { background: #ffd9d6; color: var(--bad); border-radius: 4px; }
.char.cur { border-bottom: 2px solid var(--blue); }
.next-key { font-weight: 800; color: var(--blue); }
.kb { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; max-width: 100%; overflow-x: auto; }
.kb-row { display: flex; justify-content: center; gap: 4px; }
.key { min-width: 42px; height: 48px; }
.key b { font-size: 1rem; }
.kb.is-caps .key { border-color: #c4b5fd; background: #f5f3ff; }
.caps-note { margin: 8px 0 0; text-align: center; color: #5b21b6; font-size: 0.85rem; font-weight: 800; }
.key-space { min-width: 180px; }
.note { min-height: 1.2em; }
.hidden { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.disclaimer { margin-top: 28px; color: var(--muted); font-size: 0.92rem; }
.arena {
  position: relative;
  height: 360px;
  margin: 12px 0;
  overflow: hidden;
  border-radius: 16px;
  background:
    linear-gradient(90deg, transparent 24%, rgba(36, 87, 214, 0.08) 25%, transparent 26%) 0 0 / 25% 100%,
    #e7eefc;
}
.fall {
  position: absolute;
  top: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: white;
  font-weight: 700;
}
.review { padding: 8px 10px; border-radius: 10px; background: #f8fafc; }
.review.ok { background: #e7f7f0; }
.review.bad { background: #fdecec; }
.cert-box { margin-top: 16px; }
.cert-preview { width: min(100%, 720px); height: auto; margin-top: 12px; border-radius: 12px; }
.tool-head h1 { font-size: clamp(1.7rem, 3vw, 2.5rem); }

@media (max-width: 1000px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .layout.with-side, .stat-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .site-header { height: auto; min-height: 72px; padding: 10px 16px; }
  .header-bar { flex-wrap: wrap; }
  main { padding: 128px 16px 48px; }
  .head-blog { display: none; }
  .grid, .layout.with-side, .stat-grid, .split { grid-template-columns: 1fr; display: grid; }
  .split { display: grid; }
}
