/* ============================================================
   PK Khmer Type — Official Documentation Stylesheet
   Designed for /Documents Endpoint
   ============================================================ */

:root {
  --doc-bg: #060812;
  --doc-surface: rgba(16, 20, 36, 0.75);
  --doc-surface-hover: rgba(24, 30, 52, 0.85);
  --doc-surface-solid: #101424;
  --doc-border: rgba(255, 209, 102, 0.16);
  --doc-border-glow: rgba(255, 157, 46, 0.45);
  
  --doc-ink: #f8fafc;
  --doc-ink-dim: #94a3b8;
  --doc-ink-muted: #64748b;
  --doc-text: #f8fafc;
  --doc-text-muted: #94a3b8;
  
  --doc-gold: #ff9d2e;
  --doc-gold-bright: #ffd166;
  --doc-gold-glow: rgba(255, 209, 102, 0.25);
  
  --doc-mint: #2dd4a7;
  --doc-mint-glow: rgba(45, 212, 167, 0.2);
  --doc-red: #ff3b56;
  --doc-cyan: #38bdf8;
  --doc-purple: #a855f7;

  --sidebar-w: 290px;
  --header-h: 70px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  background-color: var(--doc-bg);
  color: var(--doc-ink);
  font-family: 'Space Grotesk', 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 65vw 45vh at 20% -10%, rgba(255, 157, 46, 0.12), transparent 60%),
    radial-gradient(ellipse 60vw 40vh at 85% 10%, rgba(56, 189, 248, 0.08), transparent 60%),
    radial-gradient(ellipse 70vw 50vh at 50% 100%, rgba(45, 212, 167, 0.08), transparent 65%),
    linear-gradient(90deg, rgba(255, 209, 102, 0.03) 1px, transparent 1px) 0 0/48px 48px,
    linear-gradient(180deg, rgba(255, 209, 102, 0.03) 1px, transparent 1px) 0 0/48px 48px,
    var(--doc-bg);
  overflow-x: hidden;
  position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
::-webkit-scrollbar-track {
  background: rgba(8, 10, 18, 0.7);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--doc-gold-bright), var(--doc-gold));
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--doc-gold-bright);
}

/* Top Navigation Bar */
.docs-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(6, 8, 18, 0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--doc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  width: 40px;
  height: 40px;
  border-radius: 9px;
  filter: drop-shadow(0 0 10px rgba(255, 157, 46, 0.4));
  transition: transform 0.25s ease;
}
.brand-group:hover .brand-logo {
  transform: scale(1.06) rotate(-3deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 157, 46, 0.15);
  border: 1px solid rgba(255, 209, 102, 0.35);
  color: var(--doc-gold-bright);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 0.78rem;
  color: var(--doc-ink-dim);
  font-family: 'Kantumruy Pro', sans-serif;
}

.header-center {
  flex: 1;
  max-width: 480px;
  margin: 0 32px;
  position: relative;
}

.search-wrap {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 42px;
  padding: 0 40px 0 42px;
  border-radius: 10px;
  background: rgba(20, 26, 46, 0.7);
  border: 1px solid var(--doc-border);
  color: var(--doc-ink);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: all 0.25s ease;
}

.search-input:focus {
  background: rgba(24, 32, 60, 0.95);
  border-color: var(--doc-gold);
  box-shadow: 0 0 18px var(--doc-gold-glow);
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--doc-ink-muted);
  pointer-events: none;
}

.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--doc-ink-dim);
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.2s ease;
}
.search-clear-btn:hover {
  background: rgba(255, 59, 86, 0.25);
  border-color: var(--doc-red);
  color: #fff;
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 460px;
  overflow-y: auto;
  border-radius: 14px;
  background: rgba(12, 16, 32, 0.96);
  border: 1px solid var(--doc-border-glow);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.85), 0 0 24px rgba(255, 157, 46, 0.25);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 250;
  padding: 8px;
}

.search-dropdown-header {
  padding: 8px 12px 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--doc-gold-bright);
  border-bottom: 1px solid rgba(255, 209, 102, 0.12);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}

.search-result-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 14px;
  border-radius: 9px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.search-result-item:hover, .search-result-item.selected {
  background: rgba(255, 157, 46, 0.16);
  transform: translateX(3px);
}

.search-result-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-result-badge {
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255, 209, 102, 0.15);
  color: var(--doc-gold-bright);
  margin-left: auto;
}

.search-result-snippet {
  font-size: 0.82rem;
  color: var(--doc-ink-dim);
  line-height: 1.45;
}

.search-highlight {
  background: rgba(255, 209, 102, 0.38);
  color: #fff;
  border-radius: 3px;
  padding: 0 3px;
  font-weight: 700;
}

.search-empty-state {
  padding: 24px 16px;
  text-align: center;
  color: var(--doc-ink-muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

@keyframes search-target-pulse {
  0% { box-shadow: 0 0 0 0 rgba(255, 157, 46, 0.85); }
  50% { box-shadow: 0 0 38px 10px rgba(255, 209, 102, 0.65); }
  100% { box-shadow: 0 0 0 0 rgba(255, 157, 46, 0); }
}

.search-pulse-glow {
  animation: search-target-pulse 1.8s ease-out;
  border-color: var(--doc-gold) !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--doc-ink-dim);
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.09);
  color: var(--doc-ink);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-primary-glow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--doc-gold-bright), var(--doc-gold));
  color: #120e06;
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 0 18px rgba(255, 157, 46, 0.35);
  transition: all 0.2s ease;
}
.btn-primary-glow:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 24px rgba(255, 157, 46, 0.55);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--doc-ink);
  cursor: pointer;
  padding: 8px;
}

/* Documentation Layout */
.docs-layout {
  display: flex;
  max-width: 1560px;
  margin: 0 auto;
  min-height: calc(100vh - var(--header-h));
  position: relative;
}

/* Sticky Sidebar */
.docs-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  padding: 28px 18px 48px;
  border-right: 1px solid var(--doc-border);
  background: rgba(6, 8, 18, 0.5);
}

.toc-group {
  margin-bottom: 24px;
}

.toc-heading {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--doc-gold-bright);
  padding: 0 12px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.toc-list {
  list-style: none;
}

.toc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.86rem;
  color: var(--doc-ink-dim);
  text-decoration: none;
  transition: all 0.2s ease;
}

.toc-link:hover {
  background: rgba(255, 209, 102, 0.06);
  color: var(--doc-ink);
  transform: translateX(3px);
}

.toc-link.active {
  background: rgba(255, 157, 46, 0.12);
  color: var(--doc-gold-bright);
  font-weight: 600;
  border-left: 3px solid var(--doc-gold);
  border-radius: 0 8px 8px 0;
}

.toc-badge {
  margin-left: auto;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--doc-ink-muted);
}

/* Main Content Area */
.docs-main {
  flex: 1;
  min-width: 0;
  padding: 44px 56px 90px;
}

/* Article Hero Banner */
.doc-hero {
  position: relative;
  padding: 40px 38px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(22, 28, 50, 0.7), rgba(12, 16, 30, 0.7));
  border: 1px solid var(--doc-border);
  backdrop-filter: blur(14px);
  margin-bottom: 48px;
  overflow: hidden;
}

.doc-hero::after {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(255, 157, 46, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(45, 212, 167, 0.14);
  border: 1px solid rgba(45, 212, 167, 0.35);
  color: var(--doc-mint);
}

.hero-version {
  font-size: 0.78rem;
  color: var(--doc-ink-muted);
}

.hero-title {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
  color: #ffffff;
}

.hero-lead {
  font-size: 1.15rem;
  color: var(--doc-ink-dim);
  max-width: 820px;
  line-height: 1.7;
}

/* Quick Metrics Row */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 32px;
}

.metric-card {
  padding: 16px 20px;
  border-radius: 12px;
  background: rgba(14, 18, 32, 0.65);
  border: 1px solid rgba(255, 209, 102, 0.12);
  display: flex;
  flex-direction: column;
}

.metric-val {
  font-size: 1.8rem;
  font-weight: 800;
  font-family: 'JetBrains Mono', monospace;
  color: var(--doc-gold-bright);
}

.metric-lbl {
  font-size: 0.78rem;
  color: var(--doc-ink-dim);
  margin-top: 4px;
}

/* Section Styling */
.doc-section {
  margin-bottom: 56px;
  scroll-margin-top: calc(var(--header-h) + 24px);
}

.section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(255, 209, 102, 0.12);
  padding-bottom: 12px;
}

.section-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-icon {
  color: var(--doc-gold);
}

.section-anchor {
  opacity: 0;
  color: var(--doc-gold-bright);
  text-decoration: none;
  font-size: 1rem;
  margin-left: 6px;
  transition: opacity 0.2s ease;
}
.section-head:hover .section-anchor {
  opacity: 1;
}

.doc-p {
  color: #cbd5e1;
  font-size: 1rem;
  line-height: 1.75;
  margin-bottom: 18px;
}

/* Feature Grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
  margin: 28px 0;
}

.feature-box {
  padding: 24px;
  border-radius: 14px;
  background: var(--doc-surface);
  border: 1px solid var(--doc-border);
  backdrop-filter: blur(12px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.feature-box:hover {
  transform: translateY(-3px);
  border-color: var(--doc-border-glow);
  box-shadow: 0 8px 24px rgba(255, 157, 46, 0.12);
}

.feature-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.feature-icon-badge {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 157, 46, 0.12);
  color: var(--doc-gold-bright);
}

.feature-name {
  font-size: 1.12rem;
  font-weight: 700;
  color: #fff;
}

.feature-desc {
  font-size: 0.92rem;
  color: var(--doc-ink-dim);
  line-height: 1.6;
}

/* Callout Boxes */
.callout {
  padding: 18px 22px;
  border-radius: 12px;
  margin: 24px 0;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.65;
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.callout.tip {
  background: rgba(45, 212, 167, 0.08);
  border: 1px solid rgba(45, 212, 167, 0.3);
  color: #d1fae5;
}
.callout.tip .callout-icon { color: var(--doc-mint); }

.callout.note {
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.3);
  color: #e0f2fe;
}
.callout.note .callout-icon { color: var(--doc-cyan); }

.callout.rule {
  background: rgba(255, 157, 46, 0.09);
  border: 1px solid rgba(255, 157, 46, 0.35);
  color: #fef3c7;
}
.callout.rule .callout-icon { color: var(--doc-gold-bright); }

.callout.warn {
  background: rgba(255, 59, 86, 0.09);
  border: 1px solid rgba(255, 59, 86, 0.35);
  color: #ffe4e6;
}
.callout.warn .callout-icon { color: var(--doc-red); }

/* Data Tables */
.doc-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--doc-border);
  background: var(--doc-surface);
  margin: 24px 0;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}

.doc-table th {
  background: rgba(20, 26, 46, 0.85);
  padding: 14px 18px;
  font-weight: 700;
  color: var(--doc-gold-bright);
  border-bottom: 1px solid var(--doc-border);
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
}

.doc-table td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(255, 209, 102, 0.07);
  color: #cbd5e1;
}

.doc-table tr:last-child td {
  border-bottom: none;
}

.doc-table tr:hover td {
  background: rgba(255, 209, 102, 0.03);
}

/* Keyboard Keycap Representation */
kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--doc-gold-bright);
  background: #191f33;
  border: 1px solid rgba(255, 209, 102, 0.3);
  border-bottom: 2px solid var(--doc-gold);
  border-radius: 5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Code Blocks */
.code-block-wrap {
  position: relative;
  margin: 20px 0;
  border-radius: 12px;
  border: 1px solid var(--doc-border);
  background: #090c18;
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(20, 26, 46, 0.7);
  border-bottom: 1px solid rgba(255, 209, 102, 0.1);
  font-size: 0.78rem;
  color: var(--doc-ink-dim);
  font-family: 'JetBrains Mono', monospace;
}

.copy-btn {
  background: none;
  border: none;
  color: var(--doc-ink-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  font-family: inherit;
  transition: color 0.2s ease;
}
.copy-btn:hover {
  color: var(--doc-gold-bright);
}

pre {
  margin: 0;
  padding: 18px 20px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  line-height: 1.6;
  color: #e2e8f0;
}

code {
  font-family: 'JetBrains Mono', monospace;
}

/* Interactive Layout Switch Preview Tabs */
.tabs-container {
  margin-top: 18px;
}

.tab-row,
.tabs-bar {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--doc-border);
  padding-bottom: 10px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.tab-row::-webkit-scrollbar,
.tabs-bar::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  padding: 9px 16px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--doc-ink-dim);
  font-size: 0.88rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--doc-ink);
  background: rgba(255, 255, 255, 0.06);
}

.tab-btn.active {
  background: rgba(255, 157, 46, 0.16);
  border-color: var(--doc-gold);
  color: var(--doc-gold-bright);
  box-shadow: 0 0 14px rgba(255, 157, 46, 0.18);
}

.tab-pane {
  display: none;
}
.tab-pane.active {
  display: block;
}

/* Layout Specification Grid & Home Row Keycap Capsules */
.spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 20px;
}

.spec-col {
  padding: 20px;
  border-radius: 14px;
  background: var(--doc-surface);
  border: 1px solid var(--doc-border);
  backdrop-filter: blur(10px);
}

.spec-col h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--doc-gold-bright);
  margin-bottom: 12px;
  letter-spacing: 0.01em;
}

.spec-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
  color: #cbd5e1;
  line-height: 1.6;
}

.spec-list li {
  position: relative;
  padding-left: 16px;
}
.spec-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--doc-gold);
  box-shadow: 0 0 8px var(--doc-gold);
}

.home-row-display {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}

.hand-side {
  padding: 12px;
  border-radius: 11px;
  background: rgba(9, 12, 24, 0.72);
  border: 1px solid rgba(255, 209, 102, 0.14);
}

.hand-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--doc-ink-dim);
  margin-bottom: 10px;
}

.key-capsules {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.cap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 4px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1b233a 0%, #121829 100%);
  border: 1px solid rgba(255, 209, 102, 0.28);
  border-bottom: 3px solid var(--doc-gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.cap span {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.cap small {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 600;
  color: var(--doc-gold-bright);
  opacity: 0.9;
}

.layout-preview-figure {
  margin: 22px 0 6px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(9, 12, 24, 0.75);
  border: 1px solid rgba(255, 209, 102, 0.16);
  text-align: center;
}

.layout-preview-img {
  display: block;
  width: 100%;
  max-width: 828px;
  height: auto;
  margin: 0 auto;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}

.layout-preview-caption {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--doc-ink-dim);
  letter-spacing: 0.01em;
}

/* Mobile Sidebar Backdrop */
.docs-sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 85;
  background: rgba(4, 6, 14, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.docs-sidebar-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* Footer */
.docs-footer {
  margin-top: 80px;
  padding-top: 36px;
  border-top: 1px solid var(--doc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--doc-ink-muted);
  font-size: 0.88rem;
}

.footer-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-links {
  display: flex;
  gap: 18px;
}

.footer-link {
  color: var(--doc-ink-dim);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-link:hover {
  color: var(--doc-gold-bright);
}

.section-lead {
  color: var(--doc-ink-dim);
  font-size: 0.96rem;
  line-height: 1.65;
  margin-top: 6px;
}
#studio-controls .section-head {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.anchor-link {
  opacity: 0;
  color: var(--doc-gold-bright);
  text-decoration: none;
  font-size: 1rem;
  margin-left: 6px;
  transition: opacity 0.2s ease;
}
.section-head:hover .anchor-link {
  opacity: 1;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
  .docs-sidebar {
    position: fixed;
    left: -105%;
    top: var(--header-h);
    z-index: 95;
    width: min(84vw, 310px);
    height: calc(100dvh - var(--header-h));
    padding: 22px 16px calc(56px + env(safe-area-inset-bottom, 0px));
    background: #090c18;
    transition: left 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 14px 0 38px rgba(0, 0, 0, 0.78);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .docs-sidebar.open {
    left: 0;
  }
  .mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    flex-shrink: 0;
  }
  .docs-main {
    padding: 28px 22px 64px;
  }
}

@media (max-width: 640px) {
  :root {
    --header-h: 112px;
  }
  .docs-header {
    height: auto;
    min-height: var(--header-h);
    padding: 10px 14px 12px;
    flex-wrap: wrap;
    gap: 10px;
  }
  .brand-logo {
    width: 32px;
    height: 32px;
  }
  .brand-sub {
    display: none;
  }
  .brand-title {
    font-size: 0.96rem;
    gap: 6px;
  }
  .brand-badge {
    font-size: 0.6rem;
    padding: 2px 6px;
  }
  .header-actions {
    gap: 6px;
    margin-left: auto;
  }
  .btn-ghost {
    padding: 7px 10px;
    font-size: 0.78rem;
  }
  .btn-primary-glow {
    padding: 7px 12px;
    font-size: 0.78rem;
  }
  .header-center {
    order: 3;
    flex: 0 0 100%;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .search-input {
    height: 40px;
    font-size: 16px; /* Prevents iOS Safari zoom on input focus */
    padding: 0 36px 0 38px;
    border-radius: 10px;
  }
  .search-icon {
    left: 12px;
  }
  .search-clear-btn {
    right: 10px;
  }
  .search-dropdown {
    position: fixed;
    top: calc(var(--header-h) + 4px);
    left: 10px;
    right: 10px;
    max-height: 68dvh;
  }
  .docs-main {
    padding: 20px 14px 56px;
  }
  .doc-hero {
    padding: 22px 16px;
    border-radius: 14px;
    margin-bottom: 32px;
  }
  .hero-title {
    font-size: clamp(1.45rem, 6vw, 1.85rem);
    line-height: 1.25;
  }
  .hero-lead {
    font-size: 0.94rem;
    line-height: 1.62;
  }
  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
  }
  .metrics-grid .metric-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
  .metric-card {
    padding: 12px 14px;
  }
  .metric-val {
    font-size: 1.45rem;
  }
  .doc-section {
    margin-bottom: 40px;
  }
  .section-title {
    font-size: 1.32rem;
    line-height: 1.3;
  }
  .doc-p {
    font-size: 0.94rem;
    line-height: 1.68;
  }
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 20px 0;
  }
  .feature-box {
    padding: 18px 16px;
  }
  .callout {
    padding: 14px 15px;
    gap: 12px;
    font-size: 0.9rem;
  }
  /* Mobile-friendly Responsive Data Tables (Stacked Cards on Phone) */
  .doc-table-wrap {
    border: none;
    background: transparent;
    overflow: visible;
    margin: 18px 0;
  }
  .doc-table,
  .doc-table tbody,
  .doc-table tr,
  .doc-table td {
    display: block;
    width: 100%;
  }
  .doc-table thead {
    display: none;
  }
  .doc-table tr {
    padding: 14px 15px;
    margin-bottom: 12px;
    border-radius: 12px;
    background: var(--doc-surface);
    border: 1px solid var(--doc-border);
  }
  .doc-table tr:last-child {
    margin-bottom: 0;
  }
  .doc-table td {
    padding: 4px 0;
    border: none;
    font-size: 0.88rem;
    line-height: 1.55;
  }
  .doc-table td:first-child {
    font-size: 0.92rem;
    color: var(--doc-gold-bright);
    padding-bottom: 4px;
  }
  .doc-table td:nth-child(2) {
    font-weight: 600;
    color: #ffffff;
    padding-bottom: 6px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 209, 102, 0.12);
  }
  .doc-table td:nth-child(3) {
    color: var(--doc-ink-dim);
  }
  /* Studio Controls & Layout Preview on Phone */
  .cmd-showcase-stage {
    padding: 16px 14px;
    border-radius: 14px;
  }
  .cmd-replica-dock {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 8px;
  }
  .cmd-replica-dock::-webkit-scrollbar {
    display: none;
  }
  .cmd-replica-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
  .cmd-spec-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .spec-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .spec-col {
    padding: 16px 14px;
  }
  .home-row-display {
    grid-template-columns: 1fr;
  }
  .layout-preview-figure {
    padding: 10px;
    border-radius: 12px;
  }
  .docs-footer {
    margin-top: 48px;
    padding-top: 24px;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  .keycap3d-viewport {
    height: 360px;
  }
  .keycap3d-toolbar {
    padding: 10px 12px;
    gap: 8px;
  }
}

@media (max-width: 390px) {
  .btn-ghost .lang-label {
    display: none;
  }
}

/* ================= 3D Model Interactive Showcase ================= */
.keycap3d-card {
  position: relative;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(18, 24, 44, 0.8), rgba(10, 14, 26, 0.85));
  border: 1px solid var(--doc-border);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 157, 46, 0.08);
  backdrop-filter: blur(16px);
  margin: 32px 0 48px;
  overflow: hidden;
}

.keycap3d-viewport {
  position: relative;
  width: 100%;
  height: 520px;
  cursor: grab;
  outline: none;
  overflow: hidden;
  touch-action: none;
}
.keycap3d-viewport:active {
  cursor: grabbing;
}
.keycap3d-viewport canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.keycap3d-hud {
  position: absolute;
  top: 18px;
  left: 20px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.keycap3d-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 157, 46, 0.18);
  border: 1px solid rgba(255, 209, 102, 0.4);
  color: var(--doc-gold-bright);
}

.keycap3d-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.keycap3d-hint {
  font-size: 0.76rem;
  color: var(--doc-ink-dim);
  font-family: 'JetBrains Mono', monospace;
}

.keycap3d-toolbar {
  padding: 16px 20px;
  background: rgba(12, 16, 30, 0.85);
  border-top: 1px solid var(--doc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.keycap-ctrl-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.keycap-ctrl-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--doc-ink-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 4px;
}

.key-glyph-btn, .key-theme-btn, .key-action-btn, .key-layout-btn, .key-view-btn {
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--doc-ink-dim);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.key-glyph-btn:hover, .key-theme-btn:hover, .key-action-btn:hover, .key-layout-btn:hover, .key-view-btn:hover {
  background: rgba(255, 209, 102, 0.12);
  color: var(--doc-ink);
  border-color: rgba(255, 209, 102, 0.3);
}

.key-glyph-btn.active, .key-theme-btn.active, .key-action-btn.active, .key-layout-btn.active, .key-view-btn.active {
  background: linear-gradient(135deg, rgba(255, 209, 102, 0.25), rgba(255, 157, 46, 0.35));
  border-color: var(--doc-gold);
  color: var(--doc-gold-bright);
  box-shadow: 0 0 12px rgba(255, 157, 46, 0.25);
}

.btn-press-cta {
  background: linear-gradient(135deg, var(--doc-gold-bright), var(--doc-gold)) !important;
  color: #120e06 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 0 16px rgba(255, 157, 46, 0.35) !important;
}
.btn-press-cta:hover {
  box-shadow: 0 0 22px rgba(255, 157, 46, 0.6) !important;
  transform: translateY(-1px);
}
.btn-press-cta:active {
  transform: translateY(1px);
}

/* Inline SVG Document Icons */
.doc-icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.section-icon .doc-icon {
  width: 22px;
  height: 22px;
  color: var(--doc-gold-bright);
}
.feature-icon-badge .doc-icon {
  width: 20px;
  height: 20px;
  color: var(--doc-gold-bright);
}
.callout-icon .doc-icon {
  width: 20px;
  height: 20px;
}



/* ================= WIP Notice Bar (v2 — icon-driven) ================= */
.wip-notice-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 18px;
  border-radius: 10px;
  background: rgba(255, 157, 46, 0.07);
  border: 1px solid rgba(255, 157, 46, 0.22);
  border-left: 3px solid var(--doc-gold);
  font-size: 0.93rem;
  color: #d4aa70;
  margin-bottom: 22px;
  line-height: 1.5;
}

.wip-notice-icon {
  flex-shrink: 0;
  color: var(--doc-gold);
  display: flex;
  align-items: center;
}

/* ================= WIP Card v2 — Cyberpunk 3D Switch Chamber ================= */

/* Override height and container */
.wip-card-v2 {
  min-height: 440px;
  position: relative;
  overflow: hidden;
  --wip-accent: #ffd166;
  --wip-accent-dim: #ff9d2e;
  --wip-accent-glow: rgba(255, 209, 102, 0.45);
  --wip-accent-soft: rgba(255, 157, 46, 0.12);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
}

.wip-card-v2.theme-cyan {
  --wip-accent: #38bdf8;
  --wip-accent-dim: #0284c7;
  --wip-accent-glow: rgba(56, 189, 248, 0.5);
  --wip-accent-soft: rgba(56, 189, 248, 0.12);
}

.wip-card-v2.theme-magenta {
  --wip-accent: #f43f5e;
  --wip-accent-dim: #be123c;
  --wip-accent-glow: rgba(244, 63, 94, 0.5);
  --wip-accent-soft: rgba(244, 63, 94, 0.12);
}

.wip-card-v2.theme-mint {
  --wip-accent: #10b981;
  --wip-accent-dim: #047857;
  --wip-accent-glow: rgba(16, 185, 129, 0.5);
  --wip-accent-soft: rgba(16, 185, 129, 0.12);
}

/* Scanlines overlay */
.wip-scanlines {
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.1) 2px,
    rgba(0, 0, 0, 0.1) 4px
  );
  pointer-events: none;
  z-index: 1;
  opacity: 0.55;
}

/* Perspective grid floor */
.wip-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--wip-accent-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--wip-accent-soft) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.7) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.7) 0%, transparent 75%);
  transition: background-image 0.4s ease;
}

/* Holographic vertical laser scanner beam */
.wip-scanner-beam {
  position: absolute;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(180deg, transparent, var(--wip-accent-soft), var(--wip-accent-glow), transparent);
  pointer-events: none;
  z-index: 2;
  opacity: 0.4;
  animation: wipLaserScan 6s linear infinite;
}

@keyframes wipLaserScan {
  0%   { top: -60px; opacity: 0; }
  10%  { opacity: 0.45; }
  90%  { opacity: 0.45; }
  100% { top: 100%; opacity: 0; }
}

/* Extended particles (16 total) */
.wip-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.wip-particle {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--wip-accent);
  opacity: 0;
  animation: wipFloat 6s ease-in-out infinite;
}
.wip-particle:nth-child(1)  { left: 8%;  top: 80%; animation-delay: 0s;    animation-duration: 7s; }
.wip-particle:nth-child(2)  { left: 22%; top: 75%; animation-delay: 0.7s;  animation-duration: 5s; }
.wip-particle:nth-child(3)  { left: 38%; top: 85%; animation-delay: 1.4s;  animation-duration: 8s; }
.wip-particle:nth-child(4)  { left: 52%; top: 90%; animation-delay: 2.1s;  animation-duration: 6s; }
.wip-particle:nth-child(5)  { left: 68%; top: 78%; animation-delay: 0.3s;  animation-duration: 7.5s; }
.wip-particle:nth-child(6)  { left: 83%; top: 82%; animation-delay: 2.8s;  animation-duration: 5.5s; }
.wip-particle:nth-child(7)  { left: 14%; top: 70%; animation-delay: 1s;    animation-duration: 6.5s; }
.wip-particle:nth-child(8)  { left: 60%; top: 72%; animation-delay: 1.8s;  animation-duration: 8.5s; }
.wip-particle:nth-child(9)  { left: 32%; top: 88%; animation-delay: 0.5s;  animation-duration: 5.8s; }
.wip-particle:nth-child(10) { left: 76%; top: 86%; animation-delay: 1.6s;  animation-duration: 7.2s; }
.wip-particle:nth-child(11) { left: 48%; top: 76%; animation-delay: 2.5s;  animation-duration: 6.8s; }
.wip-particle:nth-child(12) { left: 90%; top: 74%; animation-delay: 3.3s;  animation-duration: 5.2s; }
.wip-particle:nth-child(13) { left: 5%;  top: 60%; animation-delay: 1.9s;  animation-duration: 9s;   background: var(--doc-cyan); }
.wip-particle:nth-child(14) { left: 45%; top: 65%; animation-delay: 3.7s;  animation-duration: 7.8s; background: var(--doc-mint); }
.wip-particle:nth-child(15) { left: 72%; top: 60%; animation-delay: 0.9s;  animation-duration: 6.2s; background: var(--doc-cyan); }
.wip-particle:nth-child(16) { left: 28%; top: 55%; animation-delay: 2.2s;  animation-duration: 8.2s; background: var(--doc-mint); width: 2px; height: 2px; }

@keyframes wipFloat {
  0%   { opacity: 0; transform: translateY(0) scale(1); }
  15%  { opacity: 0.9; }
  50%  { opacity: 0.35; transform: translateY(-160px) scale(0.5); }
  100% { opacity: 0; transform: translateY(-300px) scale(0.15); }
}

/* HUD corner brackets with telemetry tags */
.wip-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  z-index: 6;
  pointer-events: none;
}
.wip-corner-tl { top: 12px; left: 14px; border-top: 2px solid var(--wip-accent); border-left: 2px solid var(--wip-accent); }
.wip-corner-tr { top: 12px; right: 14px; border-top: 2px solid var(--wip-accent); border-right: 2px solid var(--wip-accent); text-align: right; }
.wip-corner-bl { bottom: 12px; left: 14px; border-bottom: 2px solid var(--wip-accent); border-left: 2px solid var(--wip-accent); }
.wip-corner-br { bottom: 12px; right: 14px; border-bottom: 2px solid var(--wip-accent); border-right: 2px solid var(--wip-accent); text-align: right; }

.wip-corner-text {
  position: absolute;
  font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--wip-accent);
  white-space: nowrap;
  opacity: 0.85;
  text-shadow: 0 0 8px var(--wip-accent-glow);
}
.wip-corner-tl .wip-corner-text { top: 4px; left: 8px; }
.wip-corner-tr .wip-corner-text { top: 4px; right: 8px; }
.wip-corner-bl .wip-corner-text { bottom: 4px; left: 8px; }
.wip-corner-br .wip-corner-text { bottom: 4px; right: 8px; }

/* Two-column stage layout */
.wip-stage {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 38px 44px;
  min-height: 420px;
}

/* ============================================================
   LEFT — Interactive Holographic Mechanical Switch Chamber
   ============================================================ */
.wip-viewport-chamber {
  position: relative;
  flex-shrink: 0;
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  perspective: 900px;
}

/* Holographic radar reticle background */
.wip-holo-rings {
  position: absolute;
  width: 220px;
  height: 220px;
  top: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
}

.wip-holo-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.1);
  transition: border-color 0.4s ease;
}
.wip-holo-ring-outer {
  width: 216px;
  height: 216px;
  border: 1px solid var(--wip-accent-soft);
  border-top-color: var(--wip-accent);
  border-bottom-color: var(--wip-accent-dim);
  animation: wipHoloRotate 14s linear infinite;
}
.wip-holo-ring-mid {
  width: 164px;
  height: 164px;
  border: 1px dashed var(--wip-accent-glow);
  animation: wipHoloRotate 9s linear infinite reverse;
}
.wip-holo-ring-inner {
  width: 110px;
  height: 110px;
  border: 1px dotted rgba(255, 255, 255, 0.2);
  animation: wipHoloRotate 5s linear infinite;
}
@keyframes wipHoloRotate {
  to { transform: rotate(360deg); }
}

.wip-crosshair-h {
  position: absolute;
  width: 220px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--wip-accent-soft), transparent);
}
.wip-crosshair-v {
  position: absolute;
  height: 220px;
  width: 1px;
  background: linear-gradient(180deg, transparent, var(--wip-accent-soft), transparent);
}

.wip-radar-sweep {
  position: absolute;
  width: 216px;
  height: 216px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--wip-accent-soft) 0deg, transparent 65deg, transparent 360deg);
  animation: wipRadarSweep 4s linear infinite;
  opacity: 0.65;
}
@keyframes wipRadarSweep {
  to { transform: rotate(360deg); }
}

/* Interactive Switch Rig */
.wip-switch-rig {
  position: relative;
  z-index: 3;
  width: 220px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transform-style: preserve-3d;
  transition: transform 0.25s ease;
}
.wip-switch-rig:hover {
  transform: translateY(-2px) scale(1.02);
}
.wip-switch-rig:focus-visible {
  outline: 2px solid var(--wip-accent);
  outline-offset: 6px;
  border-radius: 12px;
}

.wip-switch-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.65));
}

/* Moving components inside the switch */
.wip-part-keycap {
  transition: transform 0.16s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transform-origin: 120px 80px;
}
.wip-part-stem {
  transition: transform 0.16s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transform-origin: 120px 130px;
}
.wip-part-spring {
  transition: transform 0.16s cubic-bezier(0.18, 0.89, 0.32, 1.28);
  transform-origin: 120px 185px;
}
.wip-part-housing-upper {
  transition: transform 0.25s ease;
  transform-origin: 120px 150px;
}
.wip-part-housing-base {
  transition: transform 0.25s ease;
  transform-origin: 120px 190px;
}

/* Actuation state (Key pressed) */
.wip-switch-rig.is-pressed .wip-part-keycap,
.wip-card-v2.is-actuating .wip-part-keycap {
  transform: translateY(14px);
}
.wip-switch-rig.is-pressed .wip-part-stem,
.wip-card-v2.is-actuating .wip-part-stem {
  transform: translateY(14px);
}
.wip-switch-rig.is-pressed .wip-part-spring,
.wip-card-v2.is-actuating .wip-part-spring {
  transform: scaleY(0.55);
}

/* Exploded view state */
.wip-card-v2.is-exploded .wip-part-keycap {
  transform: translateY(-46px);
}
.wip-card-v2.is-exploded .wip-part-stem {
  transform: translateY(-20px);
}
.wip-card-v2.is-exploded .wip-part-housing-upper {
  transform: translateY(4px);
}
.wip-card-v2.is-exploded .wip-part-spring {
  transform: translateY(12px) scaleY(1.25);
}
.wip-card-v2.is-exploded .wip-part-housing-base {
  transform: translateY(22px);
}

/* Anatomy labels state */
.wip-anatomy-callouts {
  position: absolute;
  inset: -10px;
  pointer-events: none;
  z-index: 5;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wip-card-v2.is-anatomy .wip-anatomy-callouts {
  opacity: 1;
}

.wip-callout-tag {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 700;
  color: var(--wip-accent);
  background: rgba(10, 14, 26, 0.9);
  border: 1px solid var(--wip-accent-glow);
  padding: 2px 7px;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}
.wip-callout-keycap { top: 18px; right: -25px; }
.wip-callout-stem   { top: 78px; left: -30px; }
.wip-callout-spring { top: 138px; right: -30px; }
.wip-callout-base   { bottom: 12px; left: -25px; }

/* Shockwave ripple ring on actuation */
.wip-actuation-ripple {
  position: absolute;
  width: 40px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--wip-accent);
  opacity: 0;
  pointer-events: none;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%) scale(0.5);
  transition: transform 0.4s ease-out, opacity 0.4s ease-out;
}
.wip-card-v2.is-actuating .wip-actuation-ripple {
  opacity: 1;
  transform: translateX(-50%) scale(4.5);
}

/* Floating Click-to-Actuate CTA Badge */
.wip-actuate-badge {
  position: absolute;
  bottom: -4px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(10, 14, 26, 0.88);
  border: 1px solid var(--wip-accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--wip-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 12px var(--wip-accent-soft);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 6;
}
.wip-actuate-badge:hover {
  background: var(--wip-accent);
  color: #080a12;
  box-shadow: 0 0 16px var(--wip-accent-glow);
  transform: scale(1.05);
}

/* Live Telemetry Ticker */
.wip-chamber-telemetry {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--doc-ink-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
}
.wip-telem-k { color: var(--doc-ink-muted); font-weight: 600; }
.wip-telem-v { color: var(--wip-accent); font-weight: 700; }
.wip-telem-sep { color: rgba(255, 255, 255, 0.2); }

/* ============================================================
   RIGHT — Info Column & Interactive Feature Console
   ============================================================ */
.wip-text-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Status chips */
.wip-chip-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.wip-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.wip-chip-live {
  background: var(--wip-accent-soft);
  border: 1px solid var(--wip-accent-glow);
  color: var(--wip-accent);
}

.wip-chip-tag {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--doc-ink-dim);
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* Pulsing status dot */
.wip-pulse {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--wip-accent);
  display: inline-block;
  animation: wipPulseDot 2s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes wipPulseDot {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 var(--wip-accent-glow); }
  50%      { opacity: 0.5; box-shadow: 0 0 0 7px rgba(255, 157, 46, 0); }
}

/* Title v2 */
.wip-title-v2 {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  margin: 0;
}
.wip-title-line1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--doc-ink-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.wip-title-line2 {
  font-family: 'Orbitron', 'Space Grotesk', sans-serif;
  font-size: 2.3rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, var(--wip-accent), #ff9d2e, #ffcc66, var(--wip-accent));
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: wipTitleShimmer 4s ease-in-out infinite;
}
@keyframes wipTitleShimmer {
  0%, 100% { background-position: 0% center; }
  50%      { background-position: 100% center; }
}

/* Subtitle v2 */
.wip-subtitle-v2 {
  font-size: 0.92rem;
  color: var(--doc-ink-dim);
  line-height: 1.6;
  margin: 0;
  max-width: 540px;
}

/* Feature chips console */
.wip-feature-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.wip-feat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--doc-ink-dim);
  transition: all 0.2s ease;
  cursor: pointer;
  user-select: none;
}
.wip-feat-chip:hover {
  background: var(--wip-accent-soft);
  border-color: var(--wip-accent-glow);
  color: var(--wip-accent);
  transform: translateY(-1px);
}
.wip-feat-chip.is-active {
  background: var(--wip-accent-soft);
  border-color: var(--wip-accent);
  color: var(--wip-accent);
  box-shadow: 0 0 12px var(--wip-accent-soft);
}
.wip-feat-chip:focus-visible {
  outline: 2px solid var(--wip-accent);
  outline-offset: 2px;
}

.wip-feat-icon {
  color: var(--wip-accent);
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* Interactive Actuation Curve Drawer */
.wip-curve-drawer {
  display: none;
  background: rgba(10, 14, 26, 0.7);
  border: 1px solid var(--wip-accent-glow);
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: -4px;
}
.wip-card-v2.is-curve-open .wip-curve-drawer {
  display: block;
  animation: wipFadeDown 0.25s ease-out;
}
@keyframes wipFadeDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.wip-curve-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--wip-accent);
}
.wip-curve-svg {
  width: 100%;
  height: 50px;
  overflow: visible;
}

/* Build Progress section v2 */
.wip-progress-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.wip-progress-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wip-progress-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--doc-ink-muted);
}
.wip-progress-label svg { color: var(--wip-accent); }

.wip-progress-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--wip-accent);
}

.wip-progress-track {
  position: relative;
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  overflow: visible;
}

.wip-progress-bar {
  height: 100%;
  width: 68%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--wip-accent), var(--wip-accent-dim), var(--doc-mint));
  position: relative;
  animation: wipBarShimmer 2.5s ease-in-out infinite;
}
@keyframes wipBarShimmer {
  0%, 100% { filter: brightness(1); }
  50%      { filter: brightness(1.25); }
}

.wip-progress-glow {
  position: absolute;
  right: calc(100% - 68%);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--wip-accent);
  box-shadow: 0 0 14px 4px var(--wip-accent-glow);
  animation: wipGlowPulse 2s ease-in-out infinite;
  pointer-events: none;
  z-index: 2;
}
@keyframes wipGlowPulse {
  0%, 100% { box-shadow: 0 0 10px 3px var(--wip-accent-glow); }
  50%      { box-shadow: 0 0 20px 6px var(--wip-accent); }
}

/* Build stages */
.wip-progress-stages {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wip-stage-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background 0.2s ease;
}
.wip-stage-pill:hover {
  background: rgba(255, 255, 255, 0.05);
}
.wip-stage-pill.done   { color: var(--doc-mint); }
.wip-stage-pill.active { color: var(--wip-accent); animation: wipActiveStage 1.5s ease-in-out infinite; }
.wip-stage-pill.pending{ color: var(--doc-ink-muted); }

@keyframes wipActiveStage {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .wip-stage {
    flex-direction: column;
    padding: 32px 20px;
    gap: 32px;
  }
  .wip-viewport-chamber {
    width: 220px;
  }
  .wip-holo-rings {
    width: 190px;
    height: 190px;
  }
  .wip-holo-ring-outer { width: 186px; height: 186px; }
  .wip-switch-rig { width: 190px; height: 190px; }
  .wip-title-line2 { font-size: 1.8rem; }
  .wip-feature-chips { gap: 6px; }
  .wip-feat-chip { font-size: 0.74rem; padding: 5px 9px; }
}

@media (max-width: 540px) {
  .wip-stage {
    padding: 24px 16px;
  }
  .wip-viewport-chamber {
    width: 180px;
  }
  .wip-holo-rings {
    width: 160px;
    height: 160px;
  }
  .wip-holo-ring-outer { width: 156px; height: 156px; }
  .wip-holo-ring-mid { width: 120px; height: 120px; }
  .wip-switch-rig { width: 160px; height: 160px; }
  .wip-corner-text { display: none; }
  .wip-chip-row { gap: 5px; }
  .wip-chip { font-size: 0.66rem; }
  .wip-title-line2 { font-size: 1.5rem; }
  .wip-chamber-telemetry { font-size: 0.58rem; gap: 4px; padding: 3px 6px; }
}

/* Performance/reduced-motion overrides */
html.performance-mode .wip-scanlines,
html.performance-mode .wip-grid,
html.performance-mode .wip-scanner-beam,
html.performance-mode .wip-holo-ring,
html.performance-mode .wip-radar-sweep,
html.anim-mode-off .wip-scanlines,
html.anim-mode-off .wip-grid,
html.anim-mode-off .wip-scanner-beam,
html.anim-mode-off .wip-holo-ring,
html.anim-mode-off .wip-radar-sweep,
html.anim-mode-minimal .wip-scanlines,
html.anim-mode-minimal .wip-grid,
html.anim-mode-minimal .wip-scanner-beam,
html.anim-mode-minimal .wip-holo-ring,
html.anim-mode-minimal .wip-radar-sweep {
  animation: none !important;
}
html.performance-mode .wip-particles,
html.anim-mode-off .wip-particles,
html.anim-mode-minimal .wip-particles {
  display: none !important;
}



/* ============================================================
   PERFORMANCE & REDUCED MOTION SYSTEM OVERRIDES (Docs)
   ============================================================ */
html.performance-mode,
html.reduce-motion,
html.reduced-motion,
html.anim-mode-off {
  scroll-behavior: auto !important;
}

html.performance-mode *,
html.reduce-motion *,
html.reduced-motion *,
html.anim-mode-off * {
  animation: none !important;
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition: none !important;
  transition-duration: 0.001ms !important;
}

html.anim-mode-minimal * {
  transition-duration: 0.1s !important;
  animation-iteration-count: 1 !important;
}

html.performance-mode .wip-particles,
html.performance-mode .wip-particle,
html.performance-mode .wip-glow-ring,
html.anim-mode-off .wip-particles,
html.anim-mode-off .wip-particle,
html.anim-mode-off .wip-glow-ring,
html.anim-mode-minimal .wip-particles,
html.anim-mode-minimal .wip-particle,
html.anim-mode-minimal .wip-glow-ring {
  display: none !important;
}

html.performance-mode .docs-header,
html.performance-mode .doc-hero,
html.performance-mode .callout-card,
html.performance-mode .tab-nav,
html.performance-mode .studio-toolbar,
html.performance-mode .search-dropdown,
html.anim-mode-off .docs-header,
html.anim-mode-off .doc-hero,
html.anim-mode-off .callout-card,
html.anim-mode-minimal .docs-header,
html.anim-mode-minimal .doc-hero,
html.anim-mode-minimal .callout-card {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  background-color: var(--doc-surface-solid) !important;
}

html.performance-mode .brand-logo,
html.performance-mode .btn-primary-glow,
html.performance-mode .btn-press-cta,
html.performance-mode .metric-card,
html.anim-mode-off .brand-logo,
html.anim-mode-off .btn-primary-glow,
html.anim-mode-minimal .brand-logo,
html.anim-mode-minimal .btn-primary-glow {
  box-shadow: none !important;
  filter: none !important;
}

/* ==========================================================================
   STUDIO COMMAND BAR & HUD CONTROLS SHOWCASE (#studio-controls)
   ========================================================================== */
.cmd-showcase-stage {
  position: relative;
  border-radius: 18px;
  padding: 24px;
  margin: 18px 0 24px;
  background: radial-gradient(120% 140% at 15% 0%, rgba(255, 209, 102, 0.11) 0%, rgba(11, 15, 27, 0.92) 55%, rgba(7, 10, 19, 0.98) 100%);
  border: 1px solid rgba(255, 209, 102, 0.24);
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.cmd-showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cmd-showcase-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffd166;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.35);
}

.cmd-showcase-hint {
  font-size: 0.78rem;
  color: var(--doc-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.cmd-replica-dock {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(10, 14, 26, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.cmd-replica-btn {
  font-family: 'Space Grotesk', -apple-system, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  padding: 7px 14px;
  min-height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: all 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

.cmd-replica-btn svg {
  width: 15px;
  height: 15px;
  color: #ffd166;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(255, 209, 102, 0.3));
  transition: transform 0.2s ease, color 0.2s ease, filter 0.2s ease;
}

.cmd-replica-btn:hover,
.cmd-replica-btn.is-selected {
  color: #ffffff;
  border-color: rgba(255, 209, 102, 0.68);
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.2), rgba(10, 14, 26, 0.65));
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5), 0 0 16px rgba(255, 209, 102, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}

.cmd-replica-btn:hover svg,
.cmd-replica-btn.is-selected svg {
  color: #ffe8a3;
  filter: drop-shadow(0 0 8px rgba(255, 209, 102, 0.65));
}

.cmd-replica-kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(8, 12, 22, 0.92);
  border: 1px solid rgba(255, 209, 102, 0.58);
  color: #ffd166;
  letter-spacing: 0.03em;
  margin-left: 2px;
  line-height: 1.25;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

.cmd-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.cmd-spec-card {
  position: relative;
  border-radius: 14px;
  padding: 16px;
  background: rgba(15, 21, 38, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: all 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: pointer;
}

.cmd-spec-card:hover,
.cmd-spec-card.is-highlighted {
  border-color: rgba(255, 209, 102, 0.65);
  background: linear-gradient(180deg, rgba(255, 209, 102, 0.1), rgba(15, 21, 38, 0.85));
  box-shadow: 0 10px 26px -8px rgba(0, 0, 0, 0.55), 0 0 20px rgba(255, 209, 102, 0.16);
  transform: translateY(-2px);
}

.cmd-spec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.cmd-spec-title-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
}

.cmd-spec-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 209, 102, 0.12);
  border: 1px solid rgba(255, 209, 102, 0.3);
  color: #ffd166;
  flex-shrink: 0;
}

.cmd-spec-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--doc-text);
  margin: 0;
}

.cmd-spec-desc {
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--doc-text-muted);
  margin: 0;
}

/* ================= Extra-Small Phones (320px - 380px) ================= */
@media (max-width: 380px) {
  .docs-header {
    padding: 8px 10px 9px;
    gap: 7px;
  }
  .header-left {
    gap: 8px;
  }
  .mobile-menu-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
  }
  .brand-group {
    gap: 8px;
  }
  .brand-logo {
    width: 30px;
    height: 30px;
  }
  .brand-title {
    font-size: 0.9rem;
    gap: 5px;
  }
  .brand-badge {
    display: none;
  }
  .header-actions {
    gap: 5px;
  }
  .btn-ghost {
    padding: 6px 8px;
    font-size: 0.74rem;
  }
  .btn-primary-glow {
    padding: 6px 9px;
    font-size: 0.74rem;
    gap: 5px;
  }
  .search-input {
    height: 36px;
    font-size: 16px;
    padding: 0 32px 0 34px;
  }
  .docs-main {
    padding: 14px 10px 44px;
  }
  .doc-hero {
    padding: 16px 12px;
    border-radius: 12px;
    margin-bottom: 24px;
  }
  .hero-eyebrow {
    font-size: 0.65rem;
    padding: 4px 9px;
    margin-bottom: 10px;
  }
  .hero-title {
    font-size: 1.3rem;
    line-height: 1.24;
  }
  .hero-lead {
    font-size: 0.85rem;
    line-height: 1.54;
  }
  .metrics-grid {
    gap: 8px;
    margin-top: 14px;
  }
  .metric-card {
    padding: 10px 11px;
  }
  .metric-val {
    font-size: 1.25rem;
  }
  .metric-label {
    font-size: 0.66rem;
  }
  .section-head {
    gap: 10px;
    margin-bottom: 14px;
  }
  .section-icon {
    width: 34px;
    height: 34px;
  }
  .section-title {
    font-size: 1.15rem;
  }
  .section-desc {
    font-size: 0.87rem;
  }
  .callout {
    padding: 12px 11px;
    gap: 9px;
    font-size: 0.84rem;
  }
  .callout code,
  .callout kbd,
  .doc-table code,
  .doc-table kbd,
  .section-desc code,
  .section-desc kbd {
    font-size: 0.75rem;
    padding: 1px 5px;
    word-break: break-word;
    overflow-wrap: anywhere;
    white-space: normal;
  }
  .home-row-group {
    padding: 11px 10px;
  }
  .home-keys {
    gap: 5px;
  }
  .cap {
    width: 42px;
    height: 42px;
    font-size: 0.95rem;
  }
  .keycap3d-viewport {
    height: 280px;
  }
  .keycap3d-title {
    font-size: 0.92rem;
  }
  .cmd-replica-shell {
    padding: 12px 10px;
  }
  .cmd-spec-card {
    padding: 12px;
  }
  .docs-sidebar {
    width: min(272px, 88vw);
    padding: 16px 12px 28px;
  }
}



