
:root{
  --bg:#0a0f15;
  --surface:#0f1722;
  --surface-2:#121d2a;
  --surface-3:#162333;
  --surface-4:#1a2a3d;
  --line:#24354a;
  --line-soft:#1c2a3a;
  --text:#f2f6fb;
  --muted:#93a4b8;
  --muted-2:#708196;
  --accent:#6f8eae;
  --accent-strong:#8eabc8;
  --accent-soft:#1a2d42;
  --key:#172638;
  --key-border:#2b435e;
  --tested:#1d4b2f;
  --held:#2f8f4a;
  --radius:22px;
  --shadow:0 22px 60px rgba(0,0,0,.28);
}
*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;color:var(--text);background:var(--bg);line-height:1.5}
a{color:inherit;text-decoration:none}
button{font:inherit}
.container{width:min(1220px,calc(100% - 32px));margin:0 auto}
.hero > .container{width:min(1380px,calc(100% - 32px))}
.topbar{position:sticky;top:0;z-index:50;background:rgba(10,15,21,.94);border-bottom:1px solid var(--line-soft);backdrop-filter:blur(14px)}
.nav{min-height:68px;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:9px 0}
.brand{display:inline-flex;align-items:center;gap:9px;font-size:1.45rem;font-weight:900;letter-spacing:-.05em}.brand span{color:var(--accent-strong)}
.navlinks{display:flex;gap:8px;align-items:center;color:#afbdcd;font-size:14px}.navlinks a{padding:9px 11px;border-radius:10px}.navlinks a:hover{background:var(--surface-2);color:#fff}
.langs{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;align-items:center;max-width:620px}.langs a{padding:7px 9px;border-radius:9px;border:1px solid var(--line-soft);background:var(--surface);font-size:11px;font-weight:800;color:#aebdd0}.langs a:hover,.langs a[aria-current=page]{background:var(--surface-4);border-color:#3a526d;color:#fff}
.hero{padding:50px 0 24px}.hero-copy{max-width:900px;text-align:center;margin:0 auto}.eyebrow{display:inline-flex;align-items:center;gap:9px;padding:7px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:.12em;color:#c0cddd}.eyebrow .dot{width:7px;height:7px;border-radius:50%;background:var(--accent-strong)}
h1{font-size:clamp(42px,6.4vw,72px);line-height:.98;letter-spacing:-.055em;margin:20px auto 14px;max-width:920px}.hero p{max-width:860px;margin:0 auto;color:#9fb0c2;font-size:clamp(16px,2vw,19px);line-height:1.65}.hero-badges{display:flex;gap:8px;justify-content:center;flex-wrap:wrap;margin-top:20px}.badge{padding:8px 11px;border:1px solid var(--line);border-radius:9px;background:var(--surface);color:#c5d0dc;font-size:12px;font-weight:750}
.tester-shell{margin-top:32px;background:var(--surface);border:1px solid var(--line);border-radius:26px;padding:18px;box-shadow:var(--shadow);max-width:1380px;margin-inline:auto}.tester-stack{width:100%;max-width:100%}
.control-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr);gap:12px;margin-bottom:12px}.control-card,.actions-card{border:1px solid var(--line);border-radius:18px;background:var(--surface-2);padding:14px}.actions-card{display:flex;flex-direction:column;justify-content:space-between}.control-label{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:11px}.control-label strong{font-size:13px}.control-label span{font-size:11px;color:var(--muted-2)}
.segmented,.actions-row{display:flex;gap:8px;flex-wrap:wrap}.layout-btn,.btn{appearance:none;border:1px solid var(--line);background:var(--surface-3);color:#dce6f0;padding:10px 14px;min-height:42px;border-radius:11px;font-size:13px;font-weight:850;cursor:pointer;transition:background .14s,border-color .14s,transform .14s}.layout-btn:hover,.btn:hover{background:var(--surface-4);border-color:#3d5672;transform:translateY(-1px)}.layout-btn.active{background:var(--accent-soft);border-color:#4b6888;color:#fff}.btn.secondary{background:var(--surface-3)}
.status-strip{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:12px}.stat{position:relative;background:var(--surface-2);border:1px solid var(--line);border-radius:16px;padding:15px 14px;overflow:hidden}.stat:after{content:"";position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--accent)}.stat-value{font-size:28px;line-height:1;font-weight:900;letter-spacing:-.04em}.stat-label{margin-top:7px;font-size:11px;color:var(--muted)}
.keyboard-surface{background:#0d151f;border:1px solid var(--line);border-radius:20px;padding:18px 16px}.keyboard-wrap{overflow-x:auto;overflow-y:hidden;padding-bottom:0;scrollbar-width:none;-ms-overflow-style:none;display:flex;justify-content:center}.keyboard-wrap::-webkit-scrollbar{display:none}.keyboard{display:flex;gap:14px;align-items:flex-start;min-width:1180px;width:max-content;max-width:none;margin:0 auto}.main-board{display:flex;flex-direction:column;gap:8px}.function-row,.key-row{display:flex;gap:7px;align-items:center}.function-spacer{display:block;width:18px;flex:0 0 18px}.key{display:flex;align-items:center;justify-content:center;position:relative;min-width:47px;height:48px;flex:0 0 calc((var(--w,1)*47px) + ((var(--w,1) - 1)*7px));padding:0 7px;border:1px solid var(--key-border);border-radius:10px;background:var(--key);color:#eaf0f7;font-size:11px;font-weight:850;user-select:none;box-shadow:inset 0 1px 0 rgba(255,255,255,.025);transition:background .08s,border-color .08s,transform .08s,box-shadow .08s}.key.active{background:var(--held);border-color:#4cc06b;color:#fff;box-shadow:0 0 0 1px rgba(76,192,107,.25),0 0 18px rgba(76,192,107,.18);transform:translateY(1px)}.key.tested{background:var(--tested);border-color:#3d8b56;color:#effcf2}.key.hidden-layout{display:none!important}.key-label{white-space:nowrap;pointer-events:none}
.side-board{display:flex;gap:10px;align-items:flex-start}.nav-board{width:155px}.nav-grid{display:grid;grid-template-columns:repeat(3,47px);gap:7px}.nav-grid .blank{visibility:hidden}.numpad{width:209px;display:grid;grid-template-columns:repeat(4,47px);grid-template-rows:repeat(5,48px);gap:7px}.numpad .key{min-width:0;height:auto}.numpad .tall{grid-row:span 2}.numpad .wide{grid-column:span 2}
.layout-tkl .numpad,.layout-75 .numpad,.layout-65 .numpad,.layout-60 .numpad{display:none}.layout-65 .function-row,.layout-60 .function-row{display:none}.layout-60 .nav-board{display:none}.layout-65 .nav-board{width:101px}.layout-65 .nav-grid{grid-template-columns:repeat(2,47px)}.layout-60 .keyboard{min-width:760px}.layout-65 .keyboard{min-width:900px}.layout-75 .keyboard{min-width:1000px}.layout-tkl .keyboard{min-width:1000px}.layout-full .keyboard{min-width:1180px}
.legend{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:10px;padding:11px 12px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.legend-left,.legend-right{display:flex;gap:14px;flex-wrap:wrap;align-items:center}.legend span{display:flex;align-items:center;gap:7px;color:#aebdce;font-size:11px}.swatch{width:10px;height:10px;border-radius:3px;background:var(--key);border:1px solid var(--key-border)}.swatch.active{background:var(--held);border-color:#4cc06b}.swatch.tested{background:var(--tested);border-color:#3d8b56}
.combo-card{display:grid;grid-template-columns:minmax(280px,1fr) auto;align-items:center;gap:14px;margin-top:10px;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.combo-head strong{display:block;font-size:13px;margin-bottom:3px}.combo-head p{margin:0;color:var(--muted);font-size:11px;line-height:1.45}.combos{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end;align-items:center}.combo{border:1px solid var(--line);background:var(--surface-3);border-radius:9px;padding:8px 10px;font-size:10px;font-weight:850;color:#c9d5e2}.combo.pass{background:#215638;border-color:#49b56a;color:#f3fff7}.notice{text-align:center;color:var(--muted-2);font-size:10px;margin-top:9px}
.content-shell{display:grid;gap:14px;margin:34px auto 72px}.feature-panel,.guide-panel,.seo-panel,.faq-panel,.keyword-panel{background:var(--surface);border:1px solid var(--line);border-radius:22px;padding:24px}.section-title{font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.14em;color:var(--accent-strong);margin:0 0 10px}.feature-panel h2,.guide-panel h2,.seo-panel h2,.faq-panel h2,.keyword-panel h2{font-size:30px;letter-spacing:-.04em;margin:0 0 16px}.feature-grid{display:grid;grid-template-columns:repeat(2,1fr);border-top:1px solid var(--line);border-left:1px solid var(--line)}.feature-card{padding:18px;border-right:1px solid var(--line);border-bottom:1px solid var(--line);background:transparent}.feature-card h3{font-size:16px;margin:0 0 7px}.feature-card p{font-size:13px;color:#9fb0c2;line-height:1.62;margin:0}.guide-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.guide-step{display:flex;gap:12px;padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.step-num{width:30px;height:30px;display:flex;align-items:center;justify-content:center;flex:none;border:1px solid #46617d;border-radius:8px;background:var(--accent-soft);color:#fff;font-weight:900;font-size:12px}.guide-step h3{margin:0 0 5px;font-size:14px}.guide-step p{margin:0;color:#9fb0c2;font-size:12px;line-height:1.55}
.seo-panel{display:grid;gap:22px}.seo-block{max-width:900px}.seo-block h2{margin-bottom:8px}.seo-block p{margin:0;color:#a0b1c3;font-size:14px;line-height:1.75}.keyword-cloud{display:flex;gap:7px;flex-wrap:wrap;margin-top:14px}.keyword-cloud span{padding:7px 9px;border:1px solid var(--line);border-radius:8px;background:var(--surface-2);color:#b8c6d5;font-size:11px}.usecase-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.usecase{padding:16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}.usecase h3{font-size:15px;margin:0 0 7px}.usecase p{font-size:12px;line-height:1.6;color:#98aabc;margin:0}
.faq-list{display:grid;gap:8px}.faq details{border:1px solid var(--line);border-radius:12px;background:var(--surface-2);padding:14px 15px}.faq summary{cursor:pointer;font-weight:800;font-size:13px;list-style:none}.faq summary::-webkit-details-marker{display:none}.faq p{margin:9px 0 0;color:#9fb0c2;font-size:13px;line-height:1.65}
footer{padding:0 0 44px;color:var(--muted);font-size:12px}.footer-row{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.footer-links{display:flex;gap:6px;flex-wrap:wrap}.footer-links a{padding:6px 8px;border:1px solid var(--line-soft);border-radius:8px;background:var(--surface)}

/* Fullscreen: center the actual tester instead of stretching content to the left edge. */
#tester:fullscreen{width:100vw;height:100vh;max-width:none;margin:0;border:none;border-radius:0;padding:24px 32px;background:var(--bg);overflow:auto;display:grid;justify-content:center;align-content:start;box-shadow:none}
#tester:fullscreen .tester-stack{width:fit-content;max-width:100%;margin:0 auto}
#tester:fullscreen .keyboard-surface{padding:18px 16px;margin:0 auto}
#tester:fullscreen .keyboard-wrap{display:flex;justify-content:center;overflow-x:auto;overflow-y:hidden}
#tester:fullscreen .keyboard{margin-inline:auto}
#tester:fullscreen .control-grid{grid-template-columns:minmax(0,1.45fr) minmax(280px,.75fr)}
#tester:fullscreen .status-strip{grid-template-columns:repeat(4,1fr)}
#tester:fullscreen .legend,#tester:fullscreen .combo-card,#tester:fullscreen .notice,#tester:fullscreen .status-strip,#tester:fullscreen .control-grid{width:100%}
#tester:-webkit-full-screen{width:100vw;height:100vh;max-width:none;margin:0;border:none;border-radius:0;padding:24px 32px;background:var(--bg);overflow:auto}

@media(max-width:1120px){.control-grid{grid-template-columns:1fr}.feature-grid{grid-template-columns:1fr}.guide-grid{grid-template-columns:1fr}.usecase-grid{grid-template-columns:1fr}.combo-card{grid-template-columns:1fr}.combos{justify-content:flex-start}#tester:fullscreen .control-grid{grid-template-columns:1fr}}
@media(max-width:850px){.navlinks{display:none}.status-strip{grid-template-columns:repeat(2,1fr)}.tester-shell{padding:13px;border-radius:20px}.container{width:min(100% - 20px,1220px)}.feature-panel,.guide-panel,.seo-panel,.faq-panel,.keyword-panel{padding:18px;border-radius:18px}.feature-panel h2,.guide-panel h2,.seo-panel h2,.faq-panel h2,.keyword-panel h2{font-size:25px}#tester:fullscreen .status-strip{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){h1{font-size:40px}.status-strip,#tester:fullscreen .status-strip{grid-template-columns:1fr}.segmented{display:grid;grid-template-columns:1fr 1fr}.layout-btn:last-child{grid-column:1/-1}.actions-row{display:grid;grid-template-columns:1fr 1fr}.langs{max-width:none}.feature-panel,.guide-panel,.seo-panel,.faq-panel,.keyword-panel{padding:16px}}

/* ===== v4 polish: wider desktop tester, centered fullscreen, clear key states ===== */

/* Keep the main navigation mathematically centered even with many language links. */
.nav{
  display:grid;
  grid-template-columns:minmax(180px,1fr) auto minmax(180px,1fr);
  align-items:center;
}
.brand{justify-self:start}
.navlinks{justify-self:center}
.langs{justify-self:end}

/* Wider tester so a full-size keyboard fits without a horizontal scrollbar on desktop. */
.hero > .container{
  width:min(1540px,calc(100% - 24px));
}
.tester-shell{
  max-width:1540px;
  padding:18px 20px;
}
.keyboard-surface{
  padding:18px 20px;
}
.keyboard-wrap{
  overflow-x:hidden;
  overflow-y:hidden;
  justify-content:center;
}
.layout-full .keyboard{
  min-width:0;
  width:max-content;
}

/* Cleaner top quick controls: one aligned toolbar instead of two floating boxes. */
.control-grid{
  display:flex;
  align-items:stretch;
  gap:0;
  padding:0;
  margin-bottom:12px;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
  background:var(--surface-2);
}
.control-card,.actions-card{
  border:0;
  border-radius:0;
  background:transparent;
  padding:13px 14px;
}
.control-card{flex:1 1 auto}
.actions-card{
  flex:0 0 auto;
  min-width:230px;
  border-left:1px solid var(--line);
}
.control-label{margin-bottom:9px}
.control-label span{display:none}
.segmented,.actions-row{align-items:center}
.layout-btn,.btn{min-height:40px}

/* Strong visual distinction between untested, tested and currently held keys. */
:root{
  --tested:#174a2d;
  --held:#16a34a;
}
.key.tested{
  background:#174a2d;
  border-color:#2f8f50;
  color:#effcf2;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.03);
}
/* Must come after .key.tested because a held key is also already in the tested set. */
.key.active,
.key.tested.active{
  background:#16a34a;
  border-color:#6ee790;
  color:#fff;
  box-shadow:0 0 0 2px rgba(34,197,94,.20),0 0 22px rgba(34,197,94,.25),inset 0 1px 0 rgba(255,255,255,.16);
  transform:translateY(1px);
}
.swatch.active{background:#16a34a;border-color:#6ee790}
.swatch.tested{background:#174a2d;border-color:#2f8f50}

/* Rollover strip: fixed left intro + consistently aligned chips. */
.combo-card{
  grid-template-columns:minmax(250px,310px) minmax(0,1fr);
  align-items:center;
  gap:18px;
}
.combos{
  justify-content:flex-start;
  align-items:center;
}
.combo{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  white-space:nowrap;
}
.combo.pass{
  background:#174a2d;
  border-color:#4fc36f;
  color:#fff;
}

/* Fullscreen: center the entire tester both horizontally and vertically. */
#tester:fullscreen,
#tester:-webkit-full-screen{
  width:100vw;
  height:100vh;
  max-width:none;
  margin:0;
  padding:24px;
  border:0;
  border-radius:0;
  background:var(--bg);
  box-shadow:none;
  overflow:auto;
  display:flex;
  align-items:center;
  justify-content:center;
}
#tester:fullscreen .tester-stack,
#tester:-webkit-full-screen .tester-stack{
  width:min(1500px,calc(100vw - 48px));
  max-width:none;
  margin:auto;
  flex:0 0 auto;
}
#tester:fullscreen .keyboard-surface,
#tester:-webkit-full-screen .keyboard-surface{
  width:100%;
  margin:0 auto;
}
#tester:fullscreen .keyboard-wrap,
#tester:-webkit-full-screen .keyboard-wrap{
  width:100%;
  overflow-x:hidden;
  justify-content:center;
}
#tester:fullscreen .keyboard,
#tester:-webkit-full-screen .keyboard{
  margin-inline:auto;
}
#tester:fullscreen .control-grid,
#tester:-webkit-full-screen .control-grid,
#tester:fullscreen .status-strip,
#tester:-webkit-full-screen .status-strip,
#tester:fullscreen .legend,
#tester:-webkit-full-screen .legend,
#tester:fullscreen .combo-card,
#tester:-webkit-full-screen .combo-card,
#tester:fullscreen .notice,
#tester:-webkit-full-screen .notice{
  width:100%;
}

/* Allow horizontal touch/trackpad panning only when the viewport is genuinely too narrow. */
@media(max-width:1280px){
  .keyboard-wrap{overflow-x:auto;scrollbar-width:none;-ms-overflow-style:none}
  .keyboard-wrap::-webkit-scrollbar{display:none;width:0;height:0}
  #tester:fullscreen .keyboard-wrap,#tester:-webkit-full-screen .keyboard-wrap{overflow-x:auto;scrollbar-width:none}
  .nav{grid-template-columns:auto 1fr auto}
}
@media(max-width:1120px){
  .control-grid{display:grid;grid-template-columns:1fr}
  .actions-card{border-left:0;border-top:1px solid var(--line);min-width:0}
  .combo-card{grid-template-columns:1fr}
  .navlinks{display:none}
}
@media(max-width:850px){
  .nav{display:flex}
  .langs{justify-self:auto}
  #tester:fullscreen,#tester:-webkit-full-screen{align-items:flex-start;padding:12px}
  #tester:fullscreen .tester-stack,#tester:-webkit-full-screen .tester-stack{width:100%;margin:0 auto}
}

/* Anchor offsets for the sticky header. Without this, nav links scroll the target underneath the header. */
#tester,#how,#faq{scroll-margin-top:88px}

.brand-icon{width:28px;height:28px;display:block;flex:none;border-radius:8px}
