/* gapk v0.2.0 - Static Landing Page Stylesheet */

:root {
  --bg-page: #0a0e17;
  --bg-card: #0f172a;
  --bg-card-hover: #131d33;
  --bg-subtle: #162032;
  --bg-code: #06090f;
  --bg-code-header: #0e1524;
  --border-subtle: #1e293b;
  --border-strong: #334155;
  --border-emerald: rgba(16, 185, 129, 0.35);

  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: #34d399;
  --primary-tint: rgba(16, 185, 129, 0.1);

  --text-main: #f8fafc;
  --text-body: #cbd5e1;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --container-max: 1140px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-body);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

code, pre {
  font-family: var(--font-mono);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.icon {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* Header Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(10, 14, 23, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-toggle {
  display: none;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.version-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background-color: var(--primary-tint);
  border: 1px solid var(--border-emerald);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

.nav-links a:hover {
  color: var(--text-main);
}

.nav-links .nav-cta {
  color: var(--primary);
}

.nav-links .nav-cta:hover {
  color: var(--primary-light);
}

.nav-github {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-main) !important;
  font-size: 13px !important;
}

.nav-github:hover {
  border-color: var(--border-strong);
  background-color: var(--bg-card-hover);
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.hero-content {
  text-align: center;
  max-width: 820px;
}

.badge-row {
  margin-bottom: 18px;
}

.status-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--primary-light);
  background: var(--primary-tint);
  border: 1px solid var(--border-emerald);
  padding: 4px 12px;
  border-radius: 9999px;
  letter-spacing: 0.3px;
}

.hero-title {
  font-size: 56px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -1.5px;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-tagline {
  font-size: 20px;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 20px;
  letter-spacing: -0.3px;
}

.hero-description {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-description code {
  color: var(--text-main);
  background-color: var(--bg-subtle);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 36px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-primary {
  background-color: var(--primary);
  color: #06090f;
  border-color: var(--primary);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-main);
  border-color: var(--border-subtle);
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
  border-color: var(--border-strong);
}

.btn-large {
  padding: 14px 28px;
  font-size: 15px;
}

/* Quick Terminal Bar */
.quick-terminal {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 16px;
  font-family: var(--font-mono);
  font-size: 13px;
  max-width: 100%;
  overflow-x: auto;
}

.quick-terminal .prompt {
  color: var(--primary);
  font-weight: 700;
}

.quick-terminal .cmd-text {
  color: var(--text-main);
  white-space: nowrap;
}

.copy-inline-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease;
}

.copy-inline-btn:hover {
  color: var(--primary);
}

/* General Sections */
.section {
  padding: 72px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-darker {
  background-color: #080c14;
}

.section-header {
  margin-bottom: 40px;
}

.section-title {
  font-size: 30px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.6px;
  margin-bottom: 8px;
}

.section-subtitle {
  font-size: 16px;
  color: var(--text-muted);
}

/* Features Grid */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease;
}

.feature-card:hover {
  border-color: var(--border-strong);
}

.feature-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.feature-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.feature-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}

.feature-desc code {
  color: var(--text-main);
  background-color: var(--bg-subtle);
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 13px;
}

.feature-code-snippet {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-light);
  line-height: 1.5;
  overflow-x: auto;
}

/* Parity Section */
.parity-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

/* Grid/flex items must be allowed to shrink below their content's
   intrinsic width, otherwise a nowrap code block inside forces the
   whole card wider than the viewport (page-level horizontal overflow). */
.features-grid > *,
.parity-grid > *,
.workflow-grid > *,
.download-container > * {
  min-width: 0;
}

.parity-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
}

.parity-card-wide {
  grid-column: 1 / -1;
}

.parity-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.parity-category-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.parity-count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary);
}

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.code-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #38bdf8;
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  padding: 4px 9px;
  border-radius: var(--radius-sm);
}

.parity-card:hover .code-tag {
  border-color: #2a3850;
}

/* Code Window / Example */
.code-window {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-code-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  height: 48px;
}

.code-tabs {
  display: flex;
  height: 100%;
}

.code-tab {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  padding: 0 16px;
  height: 100%;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.code-tab:hover {
  color: var(--text-main);
}

.code-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: rgba(16, 185, 129, 0.05);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.copy-btn:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.copy-btn.copied {
  color: var(--primary);
  border-color: var(--border-emerald);
  background-color: var(--primary-tint);
}

.code-body {
  position: relative;
  max-height: 540px;
  overflow-y: auto;
}

.code-panel {
  display: none;
  padding: 20px;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.6;
  white-space: pre;
  overflow-x: auto;
}

.code-panel.active {
  display: block;
}

/* Syntax Highlighting Tokens */
.tok-kw { color: #34d399; font-weight: 600; }
.tok-act { color: #60a5fa; }
.tok-mod { color: #38bdf8; }
.tok-str { color: #fcd34d; }
.tok-num { color: #f472b6; }
.tok-bool { color: #f472b6; }
.tok-op { color: #94a3b8; }
.tok-type { color: #a78bfa; }
.tok-annot { color: #c084fc; }
.tok-comment { color: #64748b; font-style: italic; }
.tok-id { color: #e2e8f0; }

/* Terminal Card (CLI) */
.terminal-card {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 28px;
}

.terminal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--bg-code-header);
  border-bottom: 1px solid var(--border-subtle);
  padding: 0 16px;
  height: 44px;
}

.terminal-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ef4444; }
.dot-yellow { background-color: #f59e0b; }
.dot-green { background-color: #10b981; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
}

.terminal-body {
  padding: 20px;
  overflow-x: auto;
}

.terminal-body pre {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #e2e8f0;
  line-height: 1.6;
}

/* Workflow Grid */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.workflow-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px;
  display: flex;
  flex-direction: column;
}

.workflow-step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.workflow-step-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.workflow-step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 16px;
  flex-grow: 1;
}

.cli-cmd-box {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--primary-light);
  overflow-x: auto;
  white-space: nowrap;
}

/* Download Section */
.download-container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 24px;
}

.download-main-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
}

.download-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.meta-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.meta-val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.checksum-box {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.checksum-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  flex-shrink: 0;
}

.checksum-value {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-muted);
  overflow-x: auto;
  white-space: nowrap;
  flex-grow: 1;
  min-width: 0;
}

.download-action-row {
  margin-bottom: 24px;
}

.setup-commands {
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 14px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.setup-commands-header {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.setup-commands-block {
  overflow-x: auto;
  max-width: 100%;
}

.setup-commands-block code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #38bdf8;
  line-height: 1.6;
}

.notes-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.notes-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle);
}

.notes-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.notes-list strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 2px;
}

.notes-list code {
  color: var(--primary-light);
  background-color: var(--bg-code);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}

/* Site Footer */
.site-footer {
  margin-top: auto;
  background-color: #06090f;
  border-top: 1px solid var(--border-subtle);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-dim);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-brand {
  font-weight: 700;
  color: var(--text-muted);
}

.footer-sep {
  color: var(--border-strong);
}

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

.footer-links a {
  color: var(--text-dim);
}

.footer-links a:hover {
  color: var(--text-main);
}

/* Widget Reference Search */
.search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px 6px 6px 16px;
  max-width: 640px;
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}

.search-wrap:focus-within {
  border-color: var(--border-emerald);
}

.search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

#widget-search {
  flex: 1 1 auto;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 10px 0;
}

#widget-search::placeholder {
  color: var(--text-dim);
}

#widget-search::-webkit-search-cancel-button {
  cursor: pointer;
}

.search-kbd {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 4px 9px;
  flex-shrink: 0;
  margin-right: 6px;
}

.search-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 24px;
}

.ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.ref-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: border-color 0.15s ease;
}

.ref-card:hover {
  border-color: var(--border-strong);
}

.ref-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.ref-name {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--primary-light);
}

.ref-cat {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--primary);
  background-color: var(--primary-tint);
  border: 1px solid var(--border-emerald);
  padding: 2px 8px;
  border-radius: 9999px;
  flex-shrink: 0;
}

.ref-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
  flex-grow: 1;
}

.ref-code-wrap {
  position: relative;
  background-color: var(--bg-code);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.ref-code {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.55;
  color: #38bdf8;
  padding: 12px 52px 12px 12px;
  overflow-x: auto;
  white-space: pre;
  -webkit-overflow-scrolling: touch;
  margin: 0;
}

.ref-code code {
  font-family: inherit;
}

.ref-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s ease;
}

.ref-copy:hover {
  color: var(--text-main);
  border-color: var(--border-strong);
}

.search-empty {
  text-align: center;
  padding: 40px 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
}

.search-hint {
  text-align: center;
  padding: 36px 20px;
  border: 1px dashed var(--border-subtle);
  border-radius: var(--radius-md);
  background-color: rgba(16, 185, 129, 0.03);
}

.search-hint-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.search-hint-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.search-hint-desc code {
  font-family: var(--font-mono);
  color: var(--primary-light);
  background-color: var(--bg-code);
  padding: 1px 6px;
  border-radius: 3px;
}

.search-empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.search-empty-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.search-empty-desc code {
  font-family: var(--font-mono);
  color: var(--primary-light);
  background-color: var(--bg-code);
  padding: 1px 6px;
  border-radius: 3px;
}

/* Responsive Media Queries */
@media (max-width: 900px) {
  .features-grid,
  .workflow-grid {
    grid-template-columns: 1fr;
  }

  .download-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden; /* fallback for old browsers */
    overflow-x: clip; /* safety net: no page-level horizontal scroll; unlike hidden, clip keeps position: sticky working */
  }

  .container {
    padding: 0 16px;
  }

  /* Sticky Header & Hamburger Navigation */
  .header-inner {
    height: 60px;
    padding: 0;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    position: relative;
  }

  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }

  .nav-toggle:hover,
  .nav-toggle:focus-visible {
    border-color: var(--border-strong);
    background-color: var(--bg-card-hover);
  }

  .hamburger-bar {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  .nav-toggle.open .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: -16px;
    right: -16px;
    width: calc(100% + 32px);
    background-color: rgba(10, 14, 23, 0.98);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.7);
    padding: 12px 16px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    z-index: 99;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 14px;
    font-size: 15px;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background-color: var(--bg-subtle);
    color: var(--text-main);
  }

  .nav-links .nav-cta {
    color: var(--primary);
    font-weight: 600;
  }

  .nav-links .nav-github {
    justify-content: center;
    margin-top: 6px;
    min-height: 44px;
  }

  /* Section & Hero Padding */
  .section {
    padding: 44px 0;
  }

  .hero-section {
    padding: 48px 0 36px;
  }

  .hero-title {
    font-size: 38px;
    word-break: break-word;
  }

  .hero-tagline {
    font-size: 16px;
  }

  .hero-description {
    font-size: 15px;
    margin-bottom: 24px;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 28px;
  }

  .hero-actions .btn {
    width: 100%;
    min-height: 44px;
  }

  /* Quick Terminal */
  .quick-terminal {
    width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
    padding: 10px 12px;
    justify-content: space-between;
  }

  .quick-terminal .cmd-text {
    font-size: 12px;
  }

  /* Parity Grid */
  .parity-grid {
    grid-template-columns: 1fr;
  }

  .parity-card {
    padding: 18px 14px;
  }

  /* Code Window & Tabs */
  .code-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    padding: 0 8px 0 0;
    gap: 8px;
  }

  .code-tabs {
    display: flex;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
  }

  .code-tabs::-webkit-scrollbar {
    display: none;
  }

  .code-tab {
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 44px;
    height: 100%;
    padding: 0 14px;
  }

  .code-header .copy-btn {
    flex-shrink: 0;
    min-height: 38px;
    padding: 6px 12px;
  }

  .code-panel {
    padding: 14px;
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Terminal Card (CLI) */
  .terminal-body {
    padding: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .terminal-body pre {
    font-size: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .cli-cmd-box {
    font-size: 12px;
    padding: 8px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .workflow-card {
    padding: 18px 14px;
  }

  .feature-card {
    padding: 20px 16px;
  }

  .feature-code-snippet {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  /* Download Section */
  .download-main-card {
    padding: 20px 16px;
  }

  .download-meta-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .checksum-box {
    padding: 8px 10px;
    gap: 8px;
  }

  .checksum-value {
    font-size: 10.5px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-width: 0;
  }

  .download-action-row .btn-large {
    width: 100%;
    font-size: 13.5px;
    padding: 12px 14px;
    text-align: center;
    white-space: normal;
    min-height: 48px;
  }

  .setup-commands {
    padding: 12px;
  }

  .setup-commands-block {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  .setup-commands-block code {
    font-size: 12px;
  }

  .notes-card {
    padding: 20px 16px;
  }

  /* Tap targets for small buttons */
  .copy-inline-btn {
    min-width: 44px;
    min-height: 44px;
  }

  .copy-terminal-btn {
    min-height: 40px;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
  }

  .footer-links {
    flex-wrap: wrap;
    gap: 12px 16px;
  }

  /* Widget Reference Search */
  .search-wrap {
    max-width: 100%;
    padding: 4px 4px 4px 14px;
  }

  #widget-search {
    font-size: 14px;
    min-height: 44px;
  }

  .search-kbd {
    display: none;
  }

  .ref-grid {
    grid-template-columns: 1fr;
  }

  .ref-card {
    padding: 16px 14px;
  }
}
