:root {
  /* Color Tokens */
  --bg: #09090b;
  --card: #121215;
  --card-muted: #17171b;
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --border-focus: #10b981;

  --text: #f4f4f6;
  --text-muted: #8e8e99;
  --text-dim: #5a5a66;

  --emerald: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.08);
  --emerald-border: rgba(16, 185, 129, 0.28);

  --blue: #3b82f6;
  --blue-bg: rgba(59, 130, 246, 0.08);
  --blue-border: rgba(59, 130, 246, 0.25);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Motion & Easing Tokens */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --duration-fast: 160ms;
  --duration-normal: 240ms;
  --duration-slow: 400ms;

  /* Radii Tokens */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  /* Elevation Tokens */
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-elevated: 0 16px 36px rgba(0, 0, 0, 0.6);
  --shadow-glow: 0 0 24px rgba(16, 185, 129, 0.12);
}

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

*:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 45% at 50% -8%, rgba(16, 185, 129, 0.07), transparent 48%),
    radial-gradient(ellipse 55% 35% at 50% 18%, rgba(255, 255, 255, 0.018), transparent 55%);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Layout wrapper */
.shell {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (max-width: 480px) {
  .shell {
    padding: 0 16px;
  }
}

/* Grid layout */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 860px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background var(--duration-normal) ease, border-color var(--duration-normal) ease, box-shadow var(--duration-normal) ease;
}
header.scrolled {
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}
.header-content {
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
}

/* Scroll progress indicator */
.scroll-progress-track {
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1.5px;
  overflow: hidden;
  pointer-events: none;
}
.scroll-progress-bar {
  height: 100%;
  width: 100%;
  background: var(--emerald);
  transform-origin: left;
  transform: scaleX(0);
  will-change: transform;
  opacity: 0.9;
}

/* Brand Home Link (Issue #2) */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  margin-left: -8px;
  transition: background-color var(--duration-fast) ease;
  flex-shrink: 0;
  cursor: pointer;
}
.brand:hover {
  background-color: rgba(255, 255, 255, 0.04);
}
.brand:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}
.brand-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: #18181c;
  border: 1px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
  transition: border-color var(--duration-fast) ease, transform var(--duration-fast) ease;
}
.brand:hover .brand-icon {
  border-color: var(--emerald-border);
  transform: scale(1.04);
}
.brand-name {
  color: var(--text);
  font-weight: 700;
}
.brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  padding: 2px 7px;
  border-radius: 4px;
  font-weight: 500;
}

/* Navigation items container */
.nav-items {
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-link {
  font-size: 13px;
  color: var(--text-muted);
  position: relative;
  padding: 8px 4px;
  transition: color var(--duration-fast) ease;
  display: inline-flex;
  align-items: center;
}
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--emerald);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--duration-fast) var(--ease-smooth);
}
.nav-link:hover {
  color: var(--text);
}
.nav-link:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

/* Language Switcher */
.lang-switcher {
  display: inline-flex;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
}
.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  min-height: 32px;
  min-width: 32px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--duration-fast) ease;
}
.lang-btn:hover {
  color: var(--text);
}
.lang-btn.active {
  background: #27272e;
  color: var(--text);
}

/* Mobile Menu Controls (Issue #3) */
.header-actions-mobile {
  display: none;
  align-items: center;
  gap: 8px;
}
.mobile-menu-btn {
  display: none;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease;
  padding: 0;
}
.mobile-menu-btn:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
}
.mobile-menu-btn svg {
  transition: transform var(--duration-fast) ease;
}
.mobile-menu-btn.active svg {
  transform: rotate(90deg);
}

.desktop-only {
  display: inline-flex;
}
@media (max-width: 820px) {
  .desktop-only {
    display: none !important;
  }
}

/* Header responsiveness */
@media (max-width: 820px) {
  .header-actions-mobile {
    display: flex;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .nav-items {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(13, 13, 16, 0.98);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-hover);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7);
    flex-direction: column;
    align-items: stretch;
    padding: 18px 24px 24px;
    gap: 12px;
  }
  .nav-items.open {
    display: flex;
    animation: mobileMenuFade 200ms var(--ease-out-expo) forwards;
  }
  .nav-link {
    font-size: 15px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border);
  }
  .nav-link::after {
    display: none;
  }
  .nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border-hover);
  }
  .nav-items .btn-secondary {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }
}

@keyframes mobileMenuFade {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  padding: 9px 16px;
  min-height: 38px;
  border-radius: var(--radius-sm);
  transition: transform var(--duration-fast) var(--ease-out-expo),
              background var(--duration-fast) ease,
              border-color var(--duration-fast) ease,
              color var(--duration-fast) ease,
              box-shadow var(--duration-fast) ease;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}
.btn svg {
  transition: transform var(--duration-fast) var(--ease-out-expo);
  flex-shrink: 0;
}
.btn:hover svg {
  transform: translateY(-1px);
}
.btn-primary {
  background: #f4f4f6;
  color: #09090b;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn-primary:hover {
  background: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.14);
}
.btn-primary:active {
  transform: translateY(0) scale(0.985);
}
.btn-secondary {
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
  transform: translateY(-1px);
}
.btn-secondary:active {
  transform: translateY(0) scale(0.985);
}

/* Hero Section */
.hero {
  position: relative;
  padding: 80px 0 60px;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.08) 75%, transparent);
  pointer-events: none;
}

@keyframes heroItemEntrance {
  0% {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(5px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

.hero-pre {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 20px;
  animation: heroItemEntrance 750ms var(--ease-out-expo) 60ms both;
  word-break: break-word;
}
.hero-pre span {
  color: var(--emerald);
}

.hero-title {
  font-size: clamp(30px, 6vw, 68px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
  color: #ffffff;
  max-width: 820px;
  animation: heroItemEntrance 850ms var(--ease-out-expo) 150ms both;
  word-break: break-word;
}

.hero-desc {
  font-size: clamp(15px, 2.2vw, 17px);
  color: var(--text-muted);
  max-width: 660px;
  line-height: 1.62;
  margin-bottom: 32px;
  animation: heroItemEntrance 800ms var(--ease-out-expo) 230ms both;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
  animation: heroItemEntrance 800ms var(--ease-out-expo) 310ms both;
}
@media (max-width: 640px) {
  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions .btn-primary {
    min-height: 44px;
    width: 100%;
  }
  .hero-actions .command-box {
    width: 100%;
    min-height: 44px;
  }
}

.command-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 8px 14px;
  min-height: 44px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: border-color var(--duration-fast) ease, background var(--duration-fast) ease, color var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
  max-width: 100%;
  overflow: hidden;
}
.command-box:focus-visible {
  outline: 2px solid var(--emerald);
  outline-offset: 2px;
}
.command-box code {
  white-space: nowrap;
  user-select: text;
  -webkit-user-select: text;
}
.command-box:hover {
  border-color: var(--border-hover);
  color: var(--text);
  background: var(--card-muted);
}
.command-box.copied-active {
  border-color: var(--emerald-border);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.12);
}
.copy-tag {
  font-size: 10px;
  color: var(--emerald);
  text-transform: uppercase;
  font-weight: 600;
  transition: color var(--duration-fast) ease;
  flex-shrink: 0;
  min-width: 96px;
  text-align: right;
  display: inline-flex;
  justify-content: flex-end;
  align-items: center;
}

/* Key Attributes Bar */
.attr-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: heroItemEntrance 800ms var(--ease-out-expo) 390ms both;
  width: 100%;
}
@media (max-width: 860px) {
  .attr-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 480px) {
  .attr-bar {
    grid-template-columns: 1fr;
  }
}
.attr-item {
  background: var(--card);
  padding: 16px 18px;
  transition: background var(--duration-fast) ease;
}
.attr-item:hover {
  background: var(--card-muted);
}
.attr-title {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.attr-val {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  transition: color var(--duration-fast) ease;
  line-height: 1.4;
}
.attr-item:hover .attr-val {
  color: #ffffff;
}
.attr-val small {
  font-size: 12px;
  color: var(--emerald);
  font-weight: 500;
  display: inline-block;
}

/* Section Base */
.section {
  position: relative;
  padding: 68px 0;
}
.section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08) 25%, rgba(255, 255, 255, 0.08) 75%, transparent);
  pointer-events: none;
}
.section-header {
  margin-bottom: 32px;
}
.section-label {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--emerald);
  margin-bottom: 8px;
  display: block;
}
.section-title {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: #fff;
  line-height: 1.25;
}
.section-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 6px;
  max-width: 640px;
  line-height: 1.6;
}

/* Scroll Reveal System */
[data-reveal] {
  opacity: 0;
  transition: opacity 700ms var(--ease-out-expo), transform 700ms var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal="up"], [data-reveal]:not([data-reveal="left"]):not([data-reveal="right"]):not([data-reveal="scale"]) {
  transform: translateY(24px);
}
[data-reveal="left"] {
  transform: translateX(-24px);
}
[data-reveal="right"] {
  transform: translateX(24px);
}
[data-reveal="scale"] {
  transform: scale(0.96);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translate(0) scale(1);
}

/* Spotlight Surface */
.spotlight-surface {
  position: relative;
}
.spotlight-surface::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 300ms ease;
  background: radial-gradient(600px circle at var(--mouse-x, -999px) var(--mouse-y, -999px), rgba(255, 255, 255, 0.035), rgba(16, 185, 129, 0.02) 40%, transparent 80%);
  z-index: 1;
}
.spotlight-surface:hover::after {
  opacity: 1;
}
@media (max-width: 768px), (hover: none) {
  .spotlight-surface::after {
    display: none !important;
  }
}

/* Workbench card (Issue #3) */
.workbench {
  display: grid;
  grid-template-columns: 340px 1fr;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transform: perspective(1200px) rotateX(3deg) translateY(24px) scale(0.985);
  opacity: 0;
  transition: transform 800ms var(--ease-out-expo), opacity 800ms var(--ease-out-expo), border-color var(--duration-normal) ease;
  width: 100%;
}
.workbench.is-revealed {
  transform: perspective(1200px) rotateX(0deg) translateY(0) scale(1);
  opacity: 1;
}
.workbench:hover {
  border-color: var(--border-hover);
}
@media (max-width: 960px) {
  .workbench {
    grid-template-columns: 1fr;
    transform: none !important;
  }
}

.wb-controls {
  padding: 20px;
  border-right: 1px solid var(--border);
  background: #0d0d10;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  z-index: 2;
}
@media (max-width: 960px) {
  .wb-controls {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 16px;
  }
}

.wb-rule-btn {
  position: relative;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  padding: 12px 14px 12px 16px;
  min-height: 48px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--duration-fast) ease, border-color var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out-expo);
  color: inherit;
  width: 100%;
}
.wb-rule-btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--emerald);
  opacity: 0;
  transform: scaleY(0.4);
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) var(--ease-out-expo);
}
.wb-rule-btn:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
}
.wb-rule-btn.active {
  border-color: var(--emerald-border);
  background: var(--emerald-bg);
}
.wb-rule-btn.active::before {
  opacity: 1;
  transform: scaleY(1);
}
.wb-rule-btn .btn-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}
.wb-rule-btn .btn-name {
  font-weight: 600;
  font-size: 13px;
  color: #fff;
  transition: color var(--duration-fast) ease;
}
.wb-rule-btn.active .btn-name {
  color: var(--emerald);
}
.wb-rule-btn .btn-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  flex-shrink: 0;
}
.wb-rule-btn .btn-summary {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.wb-stage {
  padding: 24px;
  display: flex;
  gap: 24px;
  align-items: center;
  justify-content: center;
  background: #09090b;
  position: relative;
  z-index: 2;
  overflow: hidden;
  width: 100%;
}
@media (max-width: 768px) {
  .wb-stage {
    flex-direction: column;
    padding: 16px;
    gap: 18px;
  }
}

/* Phone container */
.device-viewport {
  width: 230px;
  max-width: 100%;
  aspect-ratio: 9 / 18.5;
  height: auto;
  background: #000;
  border: 5px solid #222228;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-elevated);
  flex-shrink: 0;
}
.device-viewport img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateY(0);
  opacity: 1;
  transition: opacity 180ms var(--ease-out-expo), transform 180ms var(--ease-out-expo);
  will-change: opacity, transform;
}
.device-viewport img.crossfade-out {
  opacity: 0;
  transform: translateY(4px);
}
.device-viewport img.crossfade-in {
  opacity: 1;
  transform: translateY(0);
}

/* Rule Inspector Code view */
.rule-spec {
  flex: 1;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  background: #111114;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  transition: opacity 180ms ease, border-color var(--duration-fast) ease;
}
.rule-spec pre {
  margin: 0;
  overflow-x: auto;
  white-space: pre;
  font-family: inherit;
  font-size: inherit;
}
.rule-spec:hover {
  border-color: var(--border-hover);
}
.spec-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 12px;
  font-size: 11px;
  color: var(--text-dim);
  gap: 8px;
  flex-wrap: wrap;
}
.code-kw { color: #f472b6; }
.code-prop { color: #60a5fa; }
.code-str { color: #34d399; }
.code-num { color: #fbbf24; }
.code-comment { color: #6b7280; font-style: italic; }

/* Comparison / Philosophy Table (Issue #3) */
.comp-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--card);
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-normal) ease;
  width: 100%;
}
.comp-table-wrap:hover {
  border-color: var(--border-hover);
}
table.comp-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}
table.comp-table th, table.comp-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
table.comp-table th {
  background: #0d0d10;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}
table.comp-table tr {
  transition: background var(--duration-fast) ease;
}
table.comp-table tr:hover td {
  background: rgba(255, 255, 255, 0.015);
}
table.comp-table tr:last-child td {
  border-bottom: none;
}
.badge-good {
  color: var(--emerald);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.badge-bad {
  color: #ef4444;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}
.badge-warn {
  color: #f59e0b;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
}

/* Technical Capability Matrix */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}
@media (max-width: 860px) {
  .cap-grid {
    grid-template-columns: 1fr;
  }
}
.cap-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  transition: border-color var(--duration-normal) ease,
              background var(--duration-normal) ease,
              transform var(--duration-normal) var(--ease-out-expo);
  position: relative;
  z-index: 2;
}
.cap-card:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
  transform: translateY(-2px);
}
.cap-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.cap-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 13px;
}
.cap-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-muted);
  gap: 8px;
}
.cap-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.cap-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.4);
  flex-shrink: 0;
}
.cap-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  background: #1e1e24;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}
.cap-badge.shizuku {
  background: var(--blue-bg);
  color: #93c5fd;
  border: 1px solid var(--blue-border);
}

/* Terminal Walkthrough */
.term-window {
  background: #0d0d10;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-normal) ease;
  width: 100%;
  max-width: 100%;
}
.term-window:hover {
  border-color: var(--border-hover);
}
.term-bar {
  height: 34px;
  background: #141418;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 11px;
  color: var(--text-dim);
  gap: 8px;
  overflow: hidden;
}
.term-dots {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.term-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #2b2b32;
}
.term-body {
  padding: 16px;
  line-height: 1.65;
  color: #d1d5db;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  word-break: break-word;
}
.term-line {
  opacity: 0;
  transform: translateY(3px);
  transition: opacity 260ms var(--ease-out-expo), transform 260ms var(--ease-out-expo);
  transition-delay: var(--line-delay, 0ms);
}
.term-window.is-revealed .term-line {
  opacity: 1;
  transform: translateY(0);
}
.term-prompt { color: var(--emerald); user-select: none; }
.term-cmd { color: #f3f4f6; }
.term-out { color: var(--text-muted); }

/* Screenshot Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  width: 100%;
}
@media (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 500px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
.gallery-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-normal) ease, background var(--duration-normal) ease;
}
.gallery-card:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
}
.gallery-img-wrap {
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border);
  aspect-ratio: 9 / 19.5;
  width: 100%;
}
.gallery-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 450ms var(--ease-out-expo);
  will-change: transform;
}
.gallery-card:hover .gallery-img-wrap img {
  transform: scale(1.018);
}
.gallery-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.gallery-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Semantic Installation Classes */
.install-grid {
  align-items: start;
}
.install-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.install-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-card);
  transition: border-color var(--duration-normal) ease, background var(--duration-normal) ease, transform var(--duration-normal) var(--ease-out-expo);
}
.install-card:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
  transform: translateY(-2px);
}
.install-step-badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--emerald);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.install-step-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: #ffffff;
}
.install-step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}
.install-callout {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: var(--radius-sm);
  transition: border-color var(--duration-normal) ease, background var(--duration-normal) ease;
}
.install-callout:hover {
  border-color: var(--border-hover);
  background: var(--card-muted);
}
.install-callout--blue {
  border-left: 3px solid var(--blue);
}
.install-callout--emerald {
  border-left: 3px solid var(--emerald);
}
.install-callout-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.install-callout--blue .install-callout-tag {
  color: var(--blue);
}
.install-callout--emerald .install-callout-tag {
  color: var(--emerald);
}
.install-callout-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 6px;
  color: #ffffff;
}
.install-callout-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* OEM / HyperOS Box */
.oem-box {
  background: #111116;
  border: 1px solid var(--border);
  border-left: 3px solid #f59e0b;
  padding: 16px;
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color var(--duration-normal) ease;
}
.oem-box:hover {
  border-color: var(--border-hover);
  border-left-color: #f59e0b;
}
.oem-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
}
.oem-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Inline micro tags */
.tag {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  background: #1b1b22;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

/* Footer (Issue #2 & #3) */
footer {
  padding-block: 20px;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 13px;
  background: #09090b;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  min-height: 40px;
}
.footer-brand-info {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  line-height: 1.4;
}
.footer-links {
  display: flex;
  gap: 18px;
  font-family: var(--font-mono);
  font-size: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.footer-links a {
  transition: color var(--duration-fast) ease;
  padding: 6px 2px;
  display: inline-flex;
  align-items: center;
}
.footer-links a:hover {
  color: var(--text);
}
@media (max-width: 640px) {
  footer {
    padding-block: 24px;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .footer-links {
    gap: 14px;
    width: 100%;
  }
}

/* Reduced Motion Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hero-pre, .hero-title, .hero-desc, .hero-actions, .attr-bar {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
  [data-reveal], .workbench, .term-line {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .scroll-progress-bar {
    display: none !important;
  }
}
