/* ── BLOG.CSS — Kactyl Blog Shared Styles ── */
/* Matches the Kactyl keyboard pages design system */

/* ── RESET & BASE ── */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { overflow-x: clip; max-width:100%; }
button { cursor:pointer; font-family:inherit; border:none; background:none; }

/* ── DESIGN TOKENS ── */
:root {
  --red:     #E8353A;
  --indigo:  #6366F1;
  --purple:  #7C3AED;
  --green:   #059669;
  --blue:    #0068ff;

  --bg:      #EDF0F8;
  --surface: #FFFFFF;
  --border:  #DDE3EE;
  --shadow:  rgba(15,23,42,.07);

  --nav:     #0F172A;
  --nav-txt: #E2E8F0;

  --text:    #1E293B;
  --muted:   #64748B;

  --r:  16px;
  --rs: 10px;
  --rx: 12px;
}
[data-theme="dark"] {
  --bg:      #0F172A;
  --surface: #1E293B;
  --border:  #334155;
  --shadow:  rgba(0,0,0,.22);
  --text:    #F1F5F9;
  --muted:   #94A3B8;
}

/* ── BASE BODY ── */
body {
  font-family: 'Inter', sans-serif;
  background: #FFFFFF;
  color: var(--text);
  min-height: 100vh;
  transition: background .3s, color .3s;
  overflow-x: clip;
}
[data-theme="dark"] body { background: #07091A; }

/* ── HEADER (same as keyboard pages) ── */
header {
  background: rgba(255,255,255,.38);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom: 1px solid rgba(255,255,255,.4);
  height: 88px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 300;
  gap: 16px;
  transition: background .3s, border-color .3s;
}
[data-theme="dark"] header {
  background: rgba(15,23,42,.65);
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  border-bottom-color: rgba(255,255,255,.06);
}

.logo { display:flex; align-items:center; gap:12px; text-decoration:none; flex-shrink:0; }
.logo-img { height:200px; width:auto; display:block; }

nav { display:flex; align-items:center; gap:4px; }

.nav-link {
  color: var(--text); text-decoration:none;
  font-size:14px; font-weight:500;
  padding:6px 12px; border-radius:6px;
  transition: background .2s, color .2s;
  white-space:nowrap;
}
.nav-link:hover { background: var(--border); }
[data-theme="dark"] .nav-link { color: var(--nav-txt); }
[data-theme="dark"] .nav-link:hover { background: rgba(255,255,255,.1); }

/* Tools dropdown */
.tools-wrap { position:relative; }
.tools-btn { cursor:pointer; border:none; background:none; font:inherit; color:var(--text); font-size:14px; font-weight:500; padding:6px 12px; border-radius:6px; transition:background .2s; white-space:nowrap; display:flex; align-items:center; gap:4px; }
.tools-btn:hover { background:var(--border); }
[data-theme="dark"] .tools-btn { color:var(--nav-txt); }
[data-theme="dark"] .tools-btn:hover { background:rgba(255,255,255,.1); }
.tools-drop { display:none; position:absolute; top:100%; right:0; background:var(--surface); border:1px solid var(--border); border-radius:12px; padding:12px 6px 6px; min-width:230px; box-shadow:0 8px 28px rgba(0,0,0,.12); z-index:200; flex-direction:column; gap:2px; }
.tools-wrap.open .tools-drop{display:flex}
@media(pointer:fine){.tools-wrap:hover .tools-drop{display:flex}}
.tools-item { display:flex; align-items:center; gap:10px; padding:9px 12px; border-radius:8px; text-decoration:none; color:var(--text); font-size:13.5px; font-weight:500; transition:background .15s; white-space:nowrap; }
.tools-item:hover { background:var(--border); }
.tools-item .t-icon { font-size:15px; width:22px; text-align:center; flex-shrink:0; }
.tools-coming { font-size:10px; font-weight:700; color:#fff; background:var(--blue); border-radius:4px; padding:1px 5px; margin-left:auto; flex-shrink:0; }

/* Language pill */
.lang-wrap { position:relative; }
.lang-pill {
  display:flex; align-items:center; gap:5px;
  color: var(--text);
  background: var(--surface);
  border:1px solid var(--border);
  border-radius:6px;
  padding:5px 10px;
  font-size:13px; font-weight:500;
  cursor:pointer; transition: border-color .2s;
}
.lang-pill:hover { border-color: var(--indigo); }
[data-theme="dark"] .lang-pill { color: var(--nav-txt); background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.14); }

/* Theme toggle */
.theme-wrap { display:flex; align-items:center; gap:7px; cursor:pointer; user-select:none; }
.t-track { width:42px; height:23px; background: linear-gradient(135deg, #0068ff, #2459d8); border:1px solid #0058d6; border-radius:12px; position:relative; transition: background .3s; }
.t-track.on { background: linear-gradient(135deg, #1E293B, #0F172A); border-color:rgba(255,255,255,.12); }
[data-theme="dark"] .t-track { background: linear-gradient(135deg, #1E293B, #0F172A); border-color:rgba(255,255,255,.12); }
.t-thumb { position:absolute; top:2px; left:2px; width:17px; height:17px; background:#fff; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:9px; transition: transform .3s; }
.t-thumb.on { transform: translateX(19px); }
.t-lbl { font-size:10px; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:.5px; line-height:1.3; text-align:center; }

/* ── FOOTER (same as keyboard pages) ── */
footer {
  background: #07091A;
  border-top: none;
  padding: 0;
}
.ft-inner {
  max-width: 1000px; margin: 0 auto;
  padding: 56px 28px 44px;
  display: grid;
  grid-template-columns: 200px 1fr 150px 130px;
  gap: 40px;
  align-items: start;
}
.ft-brand { display:flex; flex-direction:column; gap:14px; }
.ft-logo { display:inline-flex; align-items:center; gap:10px; text-decoration:none; }
.ft-ic { width:48px; height:48px; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.ft-ic img { width:48px; height:48px; opacity:1; filter: drop-shadow(0 0 14px rgba(255,23,54,.5)) drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.ft-name { font-size:15px; font-weight:800; color:#F1F5F9; }
.ft-tagline { font-size:13px; color:#94A3B8; line-height:1.7; }
.ft-badges { display:flex; gap:6px; flex-wrap:wrap; }
.ft-badge { font-size:10px; font-weight:700; padding:3px 9px; border-radius:20px; letter-spacing:.3px; text-transform:uppercase; }
.ft-badge.g { background:rgba(5,150,105,.12); color:#34D399; border:1px solid rgba(5,150,105,.18); }
.ft-badge.b { background:rgba(0,104,255,.12); color:#60A5FA; border:1px solid rgba(0,104,255,.18); }
.ft-social { display:flex; gap:8px; margin-top:2px; }
.ft-soc-link { width:32px; height:32px; border-radius:8px; background:rgba(255,255,255,.07); border:1px solid rgba(255,255,255,.10); display:flex; align-items:center; justify-content:center; color:#94A3B8; text-decoration:none; transition:background .2s, color .2s, border-color .2s; }
.ft-soc-link:hover { background:rgba(0,104,255,.20); border-color:rgba(0,104,255,.40); color:#60A5FA; }

.ft-col h4 { font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.9px; color:#64748B; margin-bottom:14px; }
.ft-col h4.ft-h4-gap { margin-top:22px; }
.ft-kb-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:0 16px; }
.ft-kb-grid a, .ft-legal a {
  font-size:13px; color:#CBD5E1; text-decoration:none;
  padding:5px 0; display:block; transition:color .15s;
}
.ft-kb-grid a:hover, .ft-legal a:hover { color:#60A5FA; }
.ft-legal { display:flex; flex-direction:column; }

.ft-bottom {
  border-top:1px solid rgba(255,255,255,.05);
  padding:16px 28px;
  display:flex; align-items:center; justify-content:space-between;
  max-width:1000px; margin:0 auto; gap:12px;
}
.ft-copy { font-size:11px; color:#64748B; }
.ft-bottom-links { display:flex; align-items:center; gap:16px; }
.ft-bottom-links a { font-size:11px; color:#64748B; text-decoration:none; transition:color .15s; }
.ft-bottom-links a:hover { color:#94A3B8; }

@media(max-width:860px) {
  .ft-inner { grid-template-columns:200px 1fr 130px; }
  .ft-inner .ft-col:last-child { grid-column: 2; grid-row: 2; }
}
@media(max-width:640px) {
  .ft-inner { grid-template-columns:1fr 1fr; gap:32px; padding:40px 20px 32px; }
  .ft-brand { grid-column:1/-1; }
  .ft-bottom { flex-direction:column; gap:8px; text-align:center; padding:14px 20px; }
  .ft-bottom-links { flex-wrap:wrap; justify-content:center; }
}

/* ── BLOG-SPECIFIC STYLES ── */

/* Main article wrapper */
.blog-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

/* Breadcrumb nav */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  flex-wrap: wrap;
}
.breadcrumb a {
  color: var(--muted);
  text-decoration: none;
  transition: color .15s;
}
.breadcrumb a:hover { color: var(--blue); }
.breadcrumb .sep { color: var(--border); }
.breadcrumb .current { color: var(--text); font-weight: 500; }

/* Article hero / flag card */
.article-hero {
  border-radius: var(--r);
  padding: 40px 36px;
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 28px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--hero-from, #1a3a5c) 0%, var(--hero-to, #0068ff) 100%);
  color: #fff;
}
.article-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.18);
  pointer-events: none;
}
.hero-flag {
  font-size: 72px;
  line-height: 1;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.3));
}
.hero-text {
  position: relative;
  z-index: 1;
}
.hero-text .hero-kicker {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: .75;
  margin-bottom: 6px;
}
.hero-text h1 {
  font-size: clamp(22px, 3.5vw, 38px);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -.4px;
  margin-bottom: 10px;
}
.hero-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 12px;
  opacity: .8;
  flex-wrap: wrap;
}
.hero-meta span { display:flex; align-items:center; gap:4px; }

@media(max-width:600px) {
  .article-hero { flex-direction:column; padding:28px 20px; text-align:center; }
  .hero-flag { font-size:52px; }
  .hero-meta { justify-content:center; }
}

/* ── ARTICLE PHOTO ── */
.article-photo {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: 16px;
  margin: 0 0 32px;
  display: block;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
.article-photo-caption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: -24px;
  margin-bottom: 28px;
}

/* Article body */
.article-body {
  font-size: 17px;
  line-height: 1.8;
  max-width: 680px;
  color: var(--text);
}
[data-theme="dark"] .article-body { color: var(--text); }
.article-body h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 14px;
  letter-spacing: -.3px;
}
.article-body h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 24px 0 10px;
}
.article-body p { margin-bottom: 16px; }
.article-body ul, .article-body ol {
  padding-left: 22px;
  margin-bottom: 16px;
}
.article-body li { margin-bottom: 6px; }
.article-body strong { color: var(--text); font-weight: 600; }
.article-body a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { opacity: .8; }
.article-body code {
  font-family: 'Monaco', 'Menlo', monospace;
  font-size: .9em;
  background: var(--border);
  padding: 1px 6px;
  border-radius: 4px;
}

/* Quick answer / featured snippet box */
.quick-answer {
  border-left: 4px solid var(--blue);
  background: rgba(0,104,255,.06);
  border-radius: 0 var(--rx) var(--rx) 0;
  padding: 18px 22px;
  margin-bottom: 28px;
  font-size: 16px;
  line-height: 1.7;
}
[data-theme="dark"] .quick-answer {
  background: rgba(0,104,255,.10);
  border-left-color: #60A5FA;
}
.quick-answer strong {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--blue);
  margin-bottom: 6px;
}
[data-theme="dark"] .quick-answer strong { color: #60A5FA; }

/* Article CTA box */
.article-cta {
  background: linear-gradient(135deg, #0068ff 0%, #6366F1 100%);
  border-radius: var(--r);
  padding: 28px 32px;
  margin: 36px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
}
.cta-text {
  flex: 1;
}
.cta-text strong {
  display: block;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 5px;
  color: #fff;
}
.cta-text span {
  font-size: 14px;
  opacity: .85;
}
.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  color: var(--blue);
  font-weight: 700;
  font-size: 15px;
  padding: 12px 22px;
  border-radius: 10px;
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
}
@media(max-width:600px) {
  .article-cta { flex-direction:column; padding:22px 20px; text-align:center; }
}

/* Author bio */
.author-bio {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin: 36px auto 0;
  max-width: 860px;
  padding-left: 24px;
  padding-right: 24px;
}
.author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0068ff, #5E5CE6);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.author-name { font-weight: 700; font-size: 15px; color: var(--text); }
.author-role { font-size: 12px; color: var(--blue); font-weight: 600; margin: 3px 0 6px; }
.author-desc { font-size: 13px; color: var(--muted); line-height: 1.5; }
@media(max-width:540px) {
  .author-bio { flex-direction: column; gap: 12px; }
}

/* FAQ accordion */
.article-faq {
  max-width: 860px;
  margin: 36px auto 0;
  padding-left: 24px;
  padding-right: 24px;
}
.article-faq h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--rx);
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.faq-item.open { border-color: var(--blue); }
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  gap: 12px;
  transition: background .15s;
}
.faq-q:hover { background: var(--bg); }
.faq-icon {
  width: 26px; height: 26px;
  background: var(--bg);
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  font-size: 14px;
  flex-shrink: 0;
  transition: transform .25s, background .2s;
  color: var(--blue);
}
.faq-item.open .faq-icon { transform: rotate(45deg); background: var(--blue); color: #fff; }
.faq-a {
  display: none;
  padding: 0 20px 18px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  background: var(--surface);
}
.faq-item.open .faq-a { display: block; }

/* Blog grid (index page) */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 32px;
}
@media(max-width:860px) { .blog-grid { grid-template-columns: repeat(2, 1fr); } }
@media(max-width:540px) { .blog-grid { grid-template-columns: 1fr; } }

/* Blog card */
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 22px 20px;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.blog-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 24px var(--shadow);
  transform: translateY(-3px);
}
.card-flag { font-size: 32px; line-height: 1; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--text);
}
.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--muted);
  margin-top: auto;
}
.card-lang-tag {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.card-read-time { margin-left: auto; }

/* Blog index hero */
.blog-index-hero {
  text-align: center;
  padding: 48px 20px 36px;
  max-width: 700px;
  margin: 0 auto;
}
.blog-index-hero h1 {
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -.6px;
  color: var(--text);
  margin-bottom: 14px;
}
.blog-index-hero p {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}

/* Language filter tabs */
.lang-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 28px 0 8px;
}
.lang-filter-btn {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
}
.lang-filter-btn:hover, .lang-filter-btn.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* Steps list */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  counter-reset: steps;
}
.steps-list li {
  counter-increment: steps;
  padding: 14px 16px 14px 58px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rx);
  margin-bottom: 10px;
  position: relative;
  font-size: 15px;
  line-height: 1.6;
}
.steps-list li::before {
  content: counter(steps);
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px; height: 28px;
  background: var(--blue);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
}

/* Tip box */
.tip-box {
  background: rgba(5,150,105,.06);
  border-left: 4px solid var(--green);
  border-radius: 0 var(--rx) var(--rx) 0;
  padding: 14px 18px;
  margin: 20px 0;
  font-size: 15px;
  line-height: 1.6;
}
[data-theme="dark"] .tip-box { background: rgba(5,150,105,.10); }
.tip-box strong { color: var(--green); font-size: 11px; text-transform: uppercase; letter-spacing: .7px; display:block; margin-bottom:4px; }

/* Platform comparison table */
.platform-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.platform-table th, .platform-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.platform-table th {
  font-weight: 700;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .6px;
  background: var(--bg);
}
.platform-table td:first-child { font-weight: 600; }
.check { color: var(--green); font-weight: 700; }
.cross { color: var(--red); font-weight: 700; }

/* Alphabet table */
.alphabet-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 10px;
  margin: 20px 0;
}
.letter-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--rx);
  padding: 14px 10px;
  text-align: center;
  transition: border-color .15s, box-shadow .15s;
}
.letter-card:hover { border-color: var(--blue); box-shadow: 0 4px 12px var(--shadow); }
.letter-native { font-size: 28px; line-height: 1.2; display:block; margin-bottom:4px; }
.letter-roman { font-size: 11px; color: var(--muted); font-weight: 500; }

/* Related articles */
.related-articles {
  max-width: 860px;
  margin: 52px auto 0;
  padding: 36px 24px 64px;
  border-top: 1px solid var(--border);
}
.related-articles h2 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media(max-width:640px) { .related-grid { grid-template-columns: 1fr; } }

/* Back to blog link */
.back-to-blog {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--blue);
  text-decoration: none;
  font-weight: 500;
  transition: gap .2s;
}
.back-to-blog:hover { gap: 10px; }

/* Article date/reading info bar */
.article-meta-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-meta-bar span { display:flex; align-items:center; gap:5px; }

/* Responsive nav */
@media(max-width:640px) {
  header { padding:0 14px; height:72px; }
  .nav-link { display:none; }
}

/* ── KEYBOARD WIDGET ── */
.kb-widget-wrap {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 32px 0;
  box-shadow: 0 4px 24px rgba(0,104,255,.08);
}
.kb-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.kb-widget-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}
.kb-widget-full {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.kb-widget-full:hover { text-decoration: underline; }
.kb-widget-textarea {
  width: 100%;
  min-height: 72px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  font-size: 20px;
  line-height: 1.4;
  background: #F5F8FC;
  color: var(--text);
  resize: vertical;
  outline: none;
  margin-bottom: 12px;
  font-family: 'Tajawal', sans-serif;
  transition: border-color .2s;
}
.kb-widget-textarea:focus { border-color: var(--blue); }
[data-theme="dark"] .kb-widget-textarea { background: #1E293B; }
.kb-widget-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.kb-widget-row { display: flex; gap: 4px; justify-content: center; }
.kb-widget-key {
  min-width: 36px;
  height: 44px;
  background: linear-gradient(180deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.88) 100%);
  border: 1.5px solid rgba(195,210,238,.80);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,1), 0 4px 0 rgba(145,170,220,.65);
  font-family: 'Tajawal', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .1s, box-shadow .1s;
  flex-shrink: 0;
  padding: 0 4px;
}
.kb-widget-key:hover { background: #EEF2FF; border-color: #818CF8; transform: translateY(-1px); }
.kb-widget-key:active { transform: translateY(3px); box-shadow: inset 0 1px 0 rgba(99,102,241,.2), 0 1px 0 rgba(99,102,241,.30); }
.kb-widget-key.kw-space { flex: 0 0 auto; width: 55%; max-width: 260px; min-width: 100px; font-size: 12px; color: var(--muted); }
.kb-widget-key.kw-bsp { min-width: 50px; font-size: 14px; background: var(--bg); }
.kb-widget-key.kw-enter { min-width: 50px; font-size: 13px; background: var(--bg); }
[data-theme="dark"] .kb-widget-key {
  background: linear-gradient(180deg, rgba(255,255,255,.13) 0%, rgba(255,255,255,.06) 100%);
  border-color: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 4px 0 rgba(0,0,0,.30);
}
.kb-widget-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.kb-widget-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  background: linear-gradient(135deg, #0068ff, #5E5CE6);
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .2s, transform .15s;
}
.kb-widget-copy:hover { opacity: .88; transform: translateY(-1px); }
.kb-widget-hint { font-size: 11px; color: var(--muted); }
