/* Page-only layout for /testar-teclado-online/. Key hits stay in browser-tests.js. */

body.page-testar-teclado-online .kbd-page { --kbd-blue: #2563eb; --kbd-ink: #172033; }
@media (min-width: 1100px) {
  body.page-testar-teclado-online .kbd-page { --cv-aside: clamp(230px, 18vw, 280px); }
}
body.page-testar-teclado-online .kbd-page .conv-title {
  font-size: clamp(1.55rem, 2vw, 2.05rem);
  letter-spacing: -0.045em;
  line-height: 1.05;
}
body.page-testar-teclado-online .article .kbd-page .conv-lede {
  margin: 0 0 18px;
  color: #4f63b8;
  font-size: 1.02rem;
  line-height: 1.4;
}
body.page-testar-teclado-online .article .kbd-page .conv-perks { gap: 14px; }
body.page-testar-teclado-online .article .kbd-page .conv-perks li { gap: 12px; font-size: 0.84rem; }
body.page-testar-teclado-online .kbd-page .conv-perks strong { color: #1d4ed8; font-size: 0.95rem; }
body.page-testar-teclado-online .kbd-page .conv-perk { width: 42px; height: 42px; background-size: 22px; }
body.page-testar-teclado-online .kbd-page .conv-perk.is-key {
  background-color: #ede9fe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='6' width='18' height='12' rx='2' fill='%237c3aed'/%3E%3Cpath fill='%23fff' d='M6 9h2v2H6zm3.5 0h2v2h-2zM13 9h2v2h-2zm3.5 0H18v2h-1.5zM6 12.5h2v2H6zm3.5 0h5v2h-5zM16 12.5h2v2h-2z'/%3E%3C/svg%3E");
}
body.page-testar-teclado-online .kbd-page .conv-perk.is-easy {
  background-color: #ffedd5;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='8' fill='%23f97316'/%3E%3Ccircle cx='12' cy='12' r='2.4' fill='%23fff'/%3E%3Cpath fill='%23fff' d='M12 6.2v1.6M12 16.2v1.6M6.2 12h1.6M16.2 12h1.6M8 8l1.1 1.1M14.9 14.9 16 16M16 8l-1.1 1.1M9.1 14.9 8 16'/%3E%3C/svg%3E");
}
body.page-testar-teclado-online .kbd-page .conv-perk.is-free {
  background-color: #dbeafe;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='%232563eb'/%3E%3Cpath d='M12 7v7m0 0-3-3m3 3 3-3M8 17h8' fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
body.page-testar-teclado-online .article .kbd-page img.conv-art { max-width: 240px; margin-top: 16px; }

body.page-testar-teclado-online .kbd-app {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--kbd-ink);
}
body.page-testar-teclado-online .kbd-app [hidden] { display: none !important; }
body.page-testar-teclado-online .kbd-page .conv-board {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 14px;
}
@media (max-width: 1100px) {
  body.page-testar-teclado-online .kbd-page .conv-board { grid-template-columns: minmax(0, 1fr); }
}
body.page-testar-teclado-online .kbd-page .conv-stack,
body.page-testar-teclado-online .kbd-page .conv-card { min-width: 0; }
body.page-testar-teclado-online .kbd-page .conv-stack { gap: 14px; }
body.page-testar-teclado-online .kbd-page .conv-card,
body.page-testar-teclado-online .kbd-page .conv-steps,
body.page-testar-teclado-online .kbd-page .conv-tips {
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 22px rgba(15, 23, 42, 0.04);
}
body.page-testar-teclado-online .kbd-page .conv-steps li > span:first-child {
  width: 36px;
  height: 36px;
  background: #e8eef8;
  color: #64748b;
}
body.page-testar-teclado-online .kbd-page .conv-steps li.is-on > span:first-child { background: var(--kbd-blue); color: #fff; }
body.page-testar-teclado-online .kbd-page .conv-steps li.is-done > span:first-child { background: #16a34a; color: #fff; }
body.page-testar-teclado-online .kbd-page .conv-steps li.is-on strong { color: var(--kbd-blue); }
body.page-testar-teclado-online .kbd-page .conv-card-title { color: #1d4ed8; }
body.page-testar-teclado-online .kbd-badge {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: var(--kbd-blue);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
}

body.page-testar-teclado-online .kbd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
body.page-testar-teclado-online .kbd-head .conv-card-title { margin: 0; }
body.page-testar-teclado-online .kbd-actions { display: flex; gap: 8px; flex: none; }
body.page-testar-teclado-online .kbd-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 10px;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
}
body.page-testar-teclado-online #btest-btn-start {
  border: 0;
  background: var(--kbd-blue);
  color: #fff;
}
body.page-testar-teclado-online #btest-btn-start::before {
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='2' y='6' width='20' height='12' rx='2' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Cpath stroke='%23fff' stroke-width='2' d='M6 10h2M10 10h2M14 10h2M7 14h10'/%3E%3C/svg%3E") center / 16px no-repeat;
}
body.page-testar-teclado-online #btest-btn-stop {
  border: 1px solid #e3e9f1;
  background: #fff;
  color: #1f2937;
}
body.page-testar-teclado-online .kbd-actions button:disabled { opacity: 0.55; cursor: not-allowed; }

body.page-testar-teclado-online .kbd-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f9ff;
}
body.page-testar-teclado-online .kbd-hint-ico {
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 10px;
  background: #dbeafe url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='6' width='18' height='12' rx='2' fill='%232563eb'/%3E%3Cpath fill='%23fff' d='M6 9h2v2H6zm4 0h2v2h-2zm4 0h2v2h-2zM7 12.5h10v2H7z'/%3E%3C/svg%3E") center / 20px no-repeat;
}
body.page-testar-teclado-online .kbd-hint p {
  margin: 0;
  color: #475569;
  font-size: 0.92rem;
  line-height: 1.4;
}
body.page-testar-teclado-online .kbd-hint strong { color: var(--kbd-ink); }

body.page-testar-teclado-online .kbd-scroll {
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding-bottom: 4px;
}
body.page-testar-teclado-online .kbd-well {
  width: 100%;
  min-width: 648px;
  padding: 8px;
  border: 1px solid #eef2f7;
  border-radius: 16px;
  background: #f8fafc;
  box-sizing: border-box;
}
body.page-testar-teclado-online .btest-kb {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
body.page-testar-teclado-online .btest-key-row {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  width: 100%;
}
body.page-testar-teclado-online .btest-key {
  display: grid;
  place-items: center;
  flex: 1 1 0;
  box-sizing: border-box;
  min-width: 0;
  height: 36px;
  padding: 0 2px;
  border: 1px solid #e6edf5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1px 0 #e8eef5;
  color: #334155;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}
body.page-testar-teclado-online .btest-key.is-wide { flex-grow: 1.7; }
body.page-testar-teclado-online .btest-key.is-space { flex-grow: 4.5; }
body.page-testar-teclado-online .btest-key.is-hit {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}
body.page-testar-teclado-online .btest-key.is-active {
  border-color: #fcd34d;
  background: #fde68a;
  color: #92400e;
  transform: translateY(1px);
}
body.page-testar-teclado-online .kbd-nav-label {
  margin: 8px 0 0;
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
body.page-testar-teclado-online #btest-status {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}
body.page-testar-teclado-online #btest-status.is-error { color: #b91c1c; }
body.page-testar-teclado-online #btest-status.is-ok { color: #15803d; }

body.page-testar-teclado-online .kbd-log {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}
body.page-testar-teclado-online .kbd-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
body.page-testar-teclado-online .kbd-log-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--kbd-ink);
  font-size: 0.95rem;
  font-weight: 800;
}
body.page-testar-teclado-online .kbd-log-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #dbeafe url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='7' width='18' height='11' rx='2' fill='%232563eb'/%3E%3Cpath fill='%23fff' d='M6 10h2v2H6zm4 0h2v2h-2zm4 0h2v2h-2z'/%3E%3C/svg%3E") center / 16px no-repeat;
}
body.page-testar-teclado-online #kbd-btn-clear {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #e3e9f1;
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}
body.page-testar-teclado-online #kbd-btn-clear::before {
  content: "";
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 7h16M9 7V5h6v2M8 7l1 12h6l1-12'/%3E%3C/svg%3E") center / 14px no-repeat;
}
body.page-testar-teclado-online .kbd-empty {
  margin: 0;
  color: #94a3b8;
  font-size: 0.86rem;
}
body.page-testar-teclado-online .kbd-chips { display: flex; flex-wrap: wrap; gap: 8px; }
body.page-testar-teclado-online .kbd-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 10px;
  background: #dcfce7;
  color: #166534;
  font-size: 0.86rem;
  font-weight: 800;
}
body.page-testar-teclado-online .kbd-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
body.page-testar-teclado-online .kbd-note {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: #f5f9ff;
  color: #1d4ed8;
  font-size: 0.86rem;
  line-height: 1.4;
}
body.page-testar-teclado-online .kbd-note span {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  flex: none;
  margin-top: 1px;
  border-radius: 50%;
  background: var(--kbd-blue);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

body.page-testar-teclado-online .kbd-banner {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 0 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #dcfce7;
  color: #166534;
}
body.page-testar-teclado-online .kbd-banner::before {
  content: "";
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 50%;
  background: #16a34a url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 16px no-repeat;
}
body.page-testar-teclado-online .kbd-banner strong,
body.page-testar-teclado-online .kbd-banner p { display: block; margin: 0; }
body.page-testar-teclado-online .kbd-banner p { margin-top: 2px; font-size: 0.86rem; font-weight: 500; }
body.page-testar-teclado-online .kbd-stats { display: grid; margin: 0; }
body.page-testar-teclado-online .kbd-stats div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 2px;
  border-top: 1px solid #eef2f7;
}
body.page-testar-teclado-online .kbd-stats div:first-child { border-top: 0; }
body.page-testar-teclado-online .kbd-stats dt,
body.page-testar-teclado-online .kbd-stats dd { margin: 0; }
body.page-testar-teclado-online .kbd-stats dt {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #334155;
  font-size: 0.9rem;
  font-weight: 700;
}
body.page-testar-teclado-online .kbd-stats dd {
  color: var(--kbd-ink);
  font-size: 1rem;
  font-weight: 800;
}
body.page-testar-teclado-online .kbd-dot {
  width: 10px;
  height: 10px;
  flex: none;
  border-radius: 50%;
  background: #94a3b8;
}
body.page-testar-teclado-online .kbd-dot-key {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #dbeafe url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='4' y='7' width='16' height='10' rx='2' fill='%232563eb'/%3E%3C/svg%3E") center / 14px no-repeat;
}
body.page-testar-teclado-online .kbd-dot-ok { background: #22c55e; }
body.page-testar-teclado-online .kbd-dot-left { background: #f59e0b; }

body.page-testar-teclado-online .article .kbd-tips { margin: 0; }
body.page-testar-teclado-online .article .kbd-tips h2::before {
  content: "";
  width: 22px;
  height: 22px;
  background: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23f5b400' d='M9 18h6v2H9zM12 2a7 7 0 0 0-4 12.7V17h8v-2.3A7 7 0 0 0 12 2z'/%3E%3C/svg%3E") center / 22px no-repeat;
}
body.page-testar-teclado-online .article .kbd-tips ol,
body.page-testar-teclado-online .article .kbd-tips li { list-style: none; }
body.page-testar-teclado-online .article .kbd-tips li::before {
  content: "";
  background: #f5b400 url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' d='m6 12 4 4 8-8'/%3E%3C/svg%3E") center / 14px no-repeat;
}

@media (max-width: 720px) {
  body.page-testar-teclado-online .kbd-head { align-items: flex-start; flex-direction: column; }
  body.page-testar-teclado-online .kbd-actions { width: 100%; }
  body.page-testar-teclado-online .kbd-actions button { flex: 1; }
}

html[data-theme="dark"] body.page-testar-teclado-online .kbd-hint,
html[data-theme="dark"] body.page-testar-teclado-online .kbd-note,
html[data-theme="dark"] body.page-testar-teclado-online .kbd-well { background: #0f172a; }
html[data-theme="dark"] body.page-testar-teclado-online .kbd-well,
html[data-theme="dark"] body.page-testar-teclado-online .btest-key { border-color: #334155; }
html[data-theme="dark"] body.page-testar-teclado-online .btest-key { background: #1e293b; color: #e2e8f0; box-shadow: none; }
html[data-theme="dark"] body.page-testar-teclado-online .btest-key.is-hit { background: #14532d; color: #bbf7d0; border-color: #166534; }
html[data-theme="dark"] body.page-testar-teclado-online .btest-key.is-active { background: #92400e; color: #fde68a; border-color: #b45309; }
html[data-theme="dark"] body.page-testar-teclado-online .kbd-hint p,
html[data-theme="dark"] body.page-testar-teclado-online #btest-status,
html[data-theme="dark"] body.page-testar-teclado-online .kbd-nav-label,
html[data-theme="dark"] body.page-testar-teclado-online .kbd-empty { color: #94a3b8; }
html[data-theme="dark"] body.page-testar-teclado-online .kbd-note { color: #93c5fd; }
html[data-theme="dark"] body.page-testar-teclado-online #btest-btn-stop,
html[data-theme="dark"] body.page-testar-teclado-online #kbd-btn-clear { background: #0f172a; color: #e2e8f0; border-color: #334155; }
html[data-theme="dark"] body.page-testar-teclado-online .kbd-stats div,
html[data-theme="dark"] body.page-testar-teclado-online .kbd-log { border-color: #334155; }
html[data-theme="dark"] body.page-testar-teclado-online .kbd-stats dt { color: #cbd5e1; }
