/* MeroKalam.com official easy-nepali-typing styles. Unauthorized copying or republication is not permitted. */
/* ── Mode toggle bar ── */
.mk-mode-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin:1rem auto 1.5rem;padding:.45rem;max-width:760px;background:rgba(255,255,255,.9);border:1px solid #dbeafe;border-radius:20px;box-shadow:0 14px 36px rgba(15,23,42,.08);}
.mk-mode-bar button{background:#f8fafc;border:1px solid #e2e8f0;padding:.8rem .95rem;font-family:inherit;color:#475569;cursor:pointer;border-radius:16px;transition:all .18s;display:grid;grid-template-columns:auto 1fr;align-items:center;gap:.7rem;text-align:left;min-height:4.3rem;}
.mk-mode-bar button:hover:not(.active){border-color:#93c5fd;color:#1d4ed8;background:#eff6ff;transform:translateY(-1px);}
.mk-mode-bar button.active{background:linear-gradient(135deg,#2563eb,#0891b2);border-color:transparent;color:#fff;box-shadow:0 10px 24px rgba(37,99,235,.24);}
.mk-mode-bar button[data-mode="speed"].active{background:linear-gradient(135deg,#f97316,#dc2626);box-shadow:0 10px 28px rgba(249,115,22,.35);}
.mk-mode-bar button[data-mode="speed"]:hover:not(.active){border-color:#fed7aa;background:#fff7ed;color:#c2410c;}
.mk-mode-bar .mode-mark{width:2.2rem;height:2.2rem;display:inline-flex;align-items:center;justify-content:center;border-radius:12px;background:#e0f2fe;color:#0369a1;font-weight:900;font-size:1.05rem;}
.mk-mode-bar .mode-mark.speed-mark{font-size:1.1rem;letter-spacing:.02em;background:#fff7ed;color:#ea580c;}
.mk-mode-bar .mode-mark svg{display:block;width:1.05rem;height:1.05rem;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.mk-mode-bar button.active .mode-mark{background:rgba(255,255,255,.2);color:#fff;}
.mk-mode-bar button[data-mode="speed"].active small{color:#fff!important;}
.mk-mode-bar strong{display:block;font-size:.95rem;line-height:1.15;font-weight:850;letter-spacing:.01em;}
.mk-mode-bar small{display:block;margin-top:.18rem;font-size:.72rem;line-height:1.25;font-weight:600;color:currentColor;opacity:.78;}
.mk-mode-bar button.active strong{color:#fff!important;-webkit-text-fill-color:#fff!important;}
.mk-mode-bar button.active small{color:#eff6ff!important;-webkit-text-fill-color:#eff6ff!important;opacity:1;text-shadow:0 1px 1px rgba(15,23,42,.18);}
.mk-mode-bar button span:last-child{min-width:0;}
@media(max-width:640px){.mk-mode-bar{grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem;padding:.35rem;margin:.8rem auto 1.1rem;border-radius:16px}.mk-mode-bar button{min-height:3.5rem;padding:.55rem .45rem;gap:.45rem;border-radius:13px;grid-template-columns:auto 1fr}.mk-mode-bar .mode-mark{width:1.85rem;height:1.85rem;border-radius:10px;font-size:.92rem}.mk-mode-bar .mode-mark.speed-mark{font-size:.6rem}.mk-mode-bar strong{font-size:.82rem}.mk-mode-bar small{font-size:.62rem;line-height:1.15}}

/* ── Hide existing translate UI when in speed test mode ── */
body.mode-speed-test .examples-row,
body.mode-speed-test .card-converter,
body.mode-speed-test .mk-translate-ui,
body.mode-speed-test .easy-typing-tool,
body.mode-speed-test #typingTool,
body.mode-speed-test .typing-input-area{display:none !important;}

/* ── Speed test panel ── */
.speed-test-mode{display:none;max-width:920px;margin:0 auto 2rem;}
body.mode-speed-test .speed-test-mode{display:block;}

.st-setup{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.25rem 1.4rem;margin-bottom:1rem;box-shadow:0 1px 4px rgba(0,0,0,.04);}
.st-setup-title{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#1e40af;margin-bottom:.85rem;display:flex;align-items:center;gap:.35rem;}
.st-setup-title .mk-line-icon svg,.st-pb .mk-line-icon svg,.st-results-title .mk-line-icon svg,.st-actions .mk-line-icon svg,.st-toggle-btn .mk-line-icon svg{display:block;width:.95rem;height:.95rem;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.st-setup-row{display:flex;flex-wrap:wrap;gap:1.5rem;align-items:flex-start;}
.st-setup-group{flex:1;min-width:180px;}
.st-setup-group .lbl{font-size:.7rem;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#64748b;margin-bottom:.4rem;}
.st-chips{display:flex;gap:.35rem;flex-wrap:wrap;}
.st-chip{background:#fff;border:1.5px solid #e2e8f0;border-radius:99px;padding:.35rem .85rem;font-family:inherit;font-size:.78rem;font-weight:700;color:#64748b;cursor:pointer;transition:all .15s;}
.st-chip:hover:not(.active){border-color:#2563eb;color:#2563eb;}
.st-chip.active{background:linear-gradient(135deg,#2563eb,#0891b2);border-color:transparent;color:#fff;}

/* ── Live HUD (WPM, accuracy, timer) ── */
.st-hud{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:.6rem;margin-bottom:1rem;}
.hud-stat{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:.75rem 1rem;text-align:center;}
.hud-stat .v{font-family:'DM Mono',monospace;font-size:1.6rem;font-weight:800;color:#0f172a;line-height:1;letter-spacing:-.02em;}
.hud-stat .l{font-size:.65rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#94a3b8;margin-top:.25rem;}
.hud-stat.timer .v{color:#2563eb;}
.hud-stat.timer.running .v{color:#16a34a;}
.hud-stat.timer.warning .v{color:#dc2626;}
.hud-stat.wpm .v{color:#0891b2;}
.hud-stat.accuracy .v{color:#16a34a;}
.hud-stat.errors .v{color:#dc2626;}
@media(max-width:640px){.st-setup{padding:.75rem .6rem;border-radius:14px;margin-bottom:.7rem}.st-setup-title{font-size:.66rem;margin-bottom:.5rem;letter-spacing:.06em}.st-setup-row{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr);gap:.45rem;align-items:start}.st-setup-group{min-width:0}.st-setup-group .lbl{font-size:.56rem;margin-bottom:.28rem;letter-spacing:.045em}.st-chips{display:flex;flex-wrap:nowrap;gap:.2rem}.st-chip{flex:1 1 0;min-width:0;padding:.26rem .22rem;font-size:.54rem;min-height:1.75rem;line-height:1;white-space:nowrap;text-align:center}.st-hud{grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem;margin-bottom:.7rem}.hud-stat{padding:.55rem .25rem;border-radius:10px;min-width:0}.hud-stat .v{font-size:clamp(1rem,6.5vw,1.45rem);letter-spacing:-.04em}.hud-stat .l{font-size:.48rem;letter-spacing:.04em;margin-top:.18rem}}
@media(max-width:380px){.st-setup{padding:.68rem .45rem}.st-setup-row{grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);gap:.32rem}.st-chip{padding:.22rem .14rem;font-size:.5rem}.hud-stat .v{font-size:clamp(.9rem,6vw,1.25rem)}.hud-stat .l{font-size:.44rem}}

/* ── Passage display ── */
.st-passage{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:1.5rem 1.75rem;margin-bottom:1rem;font-family:'Noto Sans Devanagari',sans-serif;font-size:1.5rem;line-height:1.85;color:#475569;letter-spacing:.01em;min-height:120px;position:relative;}
@media(max-width:600px){.st-passage{padding:1.1rem 1.2rem;font-size:1.25rem;}}
.st-passage .ch{position:relative;display:inline;}
.st-passage .ch.done{color:#16a34a;}
.st-passage .ch.wrong{color:#dc2626;background:#fee2e2;border-radius:3px;}
.st-passage .ch.current{background:#dbeafe;border-radius:3px;animation:cursorBlink 1s infinite;}
@keyframes cursorBlink{0%,49%{background:#dbeafe;}50%,100%{background:#bfdbfe;}}
.st-passage-source{position:absolute;top:.5rem;right:.75rem;font-family:'DM Mono',monospace;font-size:.62rem;color:#cbd5e1;font-weight:700;letter-spacing:.05em;}

/* ── Input area ── */
.st-input-wrap{position:relative;margin-bottom:1rem;}
.st-input{width:100%;padding:.95rem 1.1rem;border:2px solid #e2e8f0;border-radius:12px;font-family:'DM Mono',monospace;font-size:1rem;background:#fff;color:#0f172a;outline:none;transition:all .2s;font-weight:500;}
.st-input:focus{border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.1);}
.st-input.locked{background:#f8fafc;color:#94a3b8;}
.st-output{margin-top:.55rem;font-family:'Noto Sans Devanagari',sans-serif;font-size:1.15rem;line-height:1.5;color:#0f172a;min-height:1.5em;padding:.5rem .85rem;background:#f8fafc;border-radius:8px;border:1px dashed #e2e8f0;}
.st-output:empty::before{content:'Your typed Devanagari will appear here…';color:#cbd5e1;font-style:italic;}
.st-input-hint{font-size:.74rem;color:#64748b;margin-top:.35rem;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:.4rem;}
.st-input-hint kbd{background:#f1f5f9;border:1px solid #e2e8f0;border-radius:4px;padding:.05rem .35rem;font-size:.7rem;font-family:'DM Mono',monospace;font-weight:700;color:#475569;}

/* ── Action buttons ── */
.st-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem;}
.st-actions button{flex:1;min-width:130px;background:#fff;border:1.5px solid #e2e8f0;color:#475569;padding:.6rem 1rem;border-radius:10px;font-family:inherit;font-size:.85rem;font-weight:700;cursor:pointer;transition:all .15s;display:inline-flex;align-items:center;justify-content:center;gap:.4rem;}
.st-actions button:hover{border-color:#2563eb;color:#2563eb;}
.st-actions button.primary{background:linear-gradient(135deg,#2563eb,#0891b2);border-color:transparent;color:#fff;}
.st-actions button.primary:hover{filter:brightness(1.05);transform:translateY(-1px);}

/* ── Results card ── */
.st-results{display:none;background:linear-gradient(135deg,#f0f9ff,#ecfeff);border:1px solid #bfdbfe;border-radius:16px;padding:1.5rem;margin-bottom:1.5rem;}
.st-results.show{display:block;animation:resultsIn .4s ease;}
@keyframes resultsIn{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:translateY(0);}}
.st-results-title{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#1e40af;margin-bottom:.85rem;display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:.5rem;}
.st-results-title .pb-badge{background:linear-gradient(135deg,#f59e0b,#d97706);color:#fff;padding:.2rem .6rem;border-radius:99px;font-size:.65rem;letter-spacing:.05em;}
.st-results-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:.75rem;margin-bottom:1rem;}
.res-stat{background:#fff;border:1px solid #bfdbfe;border-radius:10px;padding:.85rem 1rem;text-align:center;}
.res-stat .v{font-family:'DM Mono',monospace;font-size:1.6rem;font-weight:800;color:#0f172a;line-height:1;}
.res-stat .l{font-size:.66rem;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:#64748b;margin-top:.3rem;}
.res-stat .sub{font-size:.7rem;color:#475569;margin-top:.2rem;}
.res-stat.wpm .v{color:#0891b2;}
.res-stat.accuracy .v{color:#16a34a;}
.res-stat.percentile .v{color:#7c3aed;}
.st-rank{padding:.85rem 1rem;background:#fff;border:1px solid #bfdbfe;border-radius:10px;font-size:.85rem;color:#1e293b;line-height:1.5;}
.st-rank strong{color:#1e40af;}
@media(max-width:640px){.st-results{padding:1rem}.st-results-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.55rem}.res-stat{padding:.75rem .45rem;min-width:0}.res-stat .v{font-size:clamp(1.35rem,8vw,2rem)}.res-stat.percentile .v{font-size:clamp(1.15rem,6vw,1.55rem);white-space:normal;overflow-wrap:anywhere}.res-stat .l{font-size:.58rem}.res-stat .sub{font-size:.64rem;line-height:1.25}.st-rank{font-size:.82rem}}

/* ── Personal best card ── */
.st-pb{background:#fffbeb;border:1px solid #fde68a;border-radius:12px;padding:.65rem 1rem;margin-bottom:1rem;font-size:.82rem;color:#78350f;display:flex;align-items:center;justify-content:space-between;gap:.5rem;flex-wrap:wrap;}
.st-pb .pb-stats{display:flex;gap:1rem;flex-wrap:wrap;}
.st-pb .pb-stats span{font-family:'DM Mono',monospace;font-weight:700;color:#92400e;}
.st-pb button{background:transparent;border:none;color:#92400e;cursor:pointer;font-size:.74rem;text-decoration:underline;font-family:inherit;}
.st-pb button:hover{color:#451a03;}

/* ── Hint bar ── */
.st-hint-bar{display:none;align-items:center;justify-content:center;gap:.35rem;padding:.35rem .8rem;background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;font-family:'DM Mono',monospace;font-size:.82rem;font-weight:700;color:#15803d;margin-bottom:.65rem;min-height:2.1rem;animation:hintFadeIn .2s ease;}
.st-hint-bar.visible{display:flex;}
.st-hint-bar .mk-line-icon svg{display:block;width:.95rem;height:.95rem;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round;}
.st-hint-bar kbd{background:#dcfce7;border:1px solid #86efac;border-radius:4px;padding:.1rem .45rem;font-size:.8rem;font-weight:800;color:#166534;}
@keyframes hintFadeIn{from{opacity:0;transform:translateY(-3px);}to{opacity:1;transform:translateY(0);}}

/* ── Toggle buttons (Hint / Keyboard) ── */
.st-toggle-btn{background:#fff;border:1.5px solid #e2e8f0;border-radius:8px;padding:.22rem .6rem;font-family:inherit;font-size:.71rem;font-weight:700;color:#64748b;cursor:pointer;transition:all .15s;white-space:nowrap;line-height:1.4;display:inline-flex;align-items:center;justify-content:center;gap:.28rem;}
.st-toggle-btn:hover{border-color:#2563eb;color:#2563eb;}
.st-toggle-btn.on{background:#eff6ff;border-color:#2563eb;color:#1d4ed8;}

/* ── Visual keyboard ── */
.st-kb-wrap{display:none;padding:.85rem 1.1rem .8rem;background:#d1d8e0;border:1px solid #b0bec5;border-radius:16px;margin-bottom:1rem;overflow-x:auto;text-align:center;}
.st-kb-wrap.visible{display:block;}
@media(max-width:900px){.st-kb-wrap,.st-kb-wrap.visible,#stKbBtn{display:none!important;}}
.st-kb{display:inline-flex;flex-direction:column;gap:5px;text-align:left;}
.st-kb-row{display:flex;gap:5px;}
/* Standard key */
.st-key{position:relative;min-width:46px;height:52px;background:linear-gradient(180deg,#fff 45%,#f1f5f9 100%);border:1px solid #94a3b8;border-radius:7px;box-shadow:0 3.5px 0 #6b7280,inset 0 1px 0 rgba(255,255,255,.9);display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:default;user-select:none;transition:transform .07s,box-shadow .07s,background .07s;padding:0 3px;gap:1px;}
.st-key-main{font-family:'DM Mono',monospace;font-size:.82rem;font-weight:800;color:#1e293b;line-height:1;}
.st-key-sub{font-family:'Noto Sans Devanagari',sans-serif;font-size:.5rem;color:#94a3b8;line-height:1;}
.st-key-shift-lbl{position:absolute;top:3px;right:4px;font-size:.44rem;font-family:'DM Mono',monospace;font-weight:800;color:#60a5fa;line-height:1;}
/* Meta keys (Tab, Caps, Shift, Enter, etc.) */
.st-key.meta{background:linear-gradient(180deg,#e8edf2 45%,#dce3ea 100%);border-color:#8a9bb0;justify-content:flex-end;padding-bottom:7px;}
.st-key.meta .st-key-main{font-size:.52rem;font-weight:700;color:#475569;}
/* Space bar */
.st-key.kbspace{background:linear-gradient(180deg,#fff 45%,#f1f5f9 100%);}
.st-key.kbspace .st-key-main{font-size:.65rem;font-weight:700;letter-spacing:.06em;color:#64748b;}
/* States */
.st-key.active{transform:translateY(3.5px);box-shadow:0 0 0 #6b7280,inset 0 1px 0 rgba(255,255,255,.5);background:linear-gradient(180deg,#bfdbfe 0%,#dbeafe 100%);border-color:#3b82f6;}
.st-key.active .st-key-main{color:#1d4ed8;}
.st-key.hint-key{background:linear-gradient(180deg,#bbf7d0 0%,#dcfce7 100%);border-color:#22c55e;box-shadow:0 3.5px 0 #15803d,0 0 0 2.5px rgba(34,197,94,.3),inset 0 1px 0 rgba(255,255,255,.85);animation:kbHintPulse .85s ease-in-out infinite;}
.st-key.hint-key .st-key-main{color:#15803d;font-weight:900;}
@keyframes kbHintPulse{0%,100%{box-shadow:0 3.5px 0 #15803d,0 0 0 2.5px rgba(34,197,94,.3),inset 0 1px 0 rgba(255,255,255,.85);}50%{box-shadow:0 3.5px 0 #15803d,0 0 0 5px rgba(34,197,94,.45),inset 0 1px 0 rgba(255,255,255,.85);}}

/* ── Empty state when no test running ── */
.st-empty{text-align:center;padding:1.5rem 1rem;color:#94a3b8;font-size:.9rem;background:#fff;border:1px dashed #e2e8f0;border-radius:12px;margin-bottom:1rem;}
.st-empty strong{color:#1e293b;}

/* SEO content added for Nepali typing speed test */
.blog-section h2.sec{font-size:1.35rem;margin-top:2rem;margin-bottom:.85rem;color:#0f172a;line-height:1.25;}
.blog-section h3.sub{font-size:1.05rem;margin-top:1.35rem;margin-bottom:.45rem;color:#1e40af;line-height:1.3;}
.blog-section table.ct{width:100%;border-collapse:collapse;margin:1rem 0 1.35rem;font-size:.93rem;border:1px solid #e2e8f0;border-radius:12px;overflow:hidden;display:table;}
.blog-section table.ct th,.blog-section table.ct td{padding:.8rem .9rem;border-bottom:1px solid #e2e8f0;text-align:left;vertical-align:top;}
.blog-section table.ct th{background:#f8fafc;color:#334155;font-weight:800;}
.blog-section table.ct tr:last-child td{border-bottom:none;}
.blog-section .callout{margin:1.1rem 0;padding:1rem 1.1rem;border-left:4px solid #2563eb;background:#eff6ff;border-radius:10px;color:#1e3a8a;line-height:1.7;}
.blog-section .callout.tip{border-left-color:#f59e0b;background:#fffbeb;color:#78350f;}
.blog-section details.faq{border:1px solid #e2e8f0;border-radius:10px;padding:.85rem 1rem;margin:.7rem 0;background:#fff;}
.blog-section details.faq summary{font-weight:800;color:#0f172a;cursor:pointer;}
.blog-section details.faq p{margin:.65rem 0 0;}
@media(max-width:720px){.blog-section table.ct{display:block;overflow-x:auto;white-space:normal;}.blog-section h2.sec{font-size:1.18rem;}}
