/* ==========================================================================
   WinGet Maintenance Tool v4.0.0 — Design System
   Mirrors ui/design/tokens.py (DARK_TOKENS, LIGHT_TOKENS, HIGH_CONTRAST_TOKENS)
   ========================================================================== */

:root,
[data-theme="dark"] {
  --surface: #0b0f19;
  --surface-alt: #101725;
  --card: #151e2d;
  --card-hover: #1a2538;
  --border: #273449;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-disabled: #64748b;
  --accent: #6366f1;
  --accent-hover: #818cf8;
  --accent-text: #ffffff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --grid-line: rgba(99, 102, 241, 0.08);
  --shadow-window: 0 28px 80px -20px rgba(0, 0, 0, 0.72), 0 0 0 1px rgba(255, 255, 255, 0.05);
  --header-bg: rgba(11, 15, 25, 0.82);
}

[data-theme="light"] {
  --surface: #f5f7fb;
  --surface-alt: #ffffff;
  --card: #ffffff;
  --card-hover: #f8fafc;
  --border: #e2e8f0;
  --text-primary: #172033;
  --text-secondary: #64748b;
  --text-disabled: #94a3b8;
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-text: #ffffff;
  --success: #10b981;
  --warning: #d97706;
  --danger: #ef4444;
  --info: #0891b2;
  --grid-line: rgba(79, 70, 229, 0.06);
  --shadow-window: 0 24px 60px -18px rgba(15, 23, 42, 0.16), 0 0 0 1px rgba(15, 23, 42, 0.05);
  --header-bg: rgba(245, 247, 251, 0.86);
}

[data-theme="high_contrast"] {
  --surface: #000000;
  --surface-alt: #000000;
  --card: #000000;
  --card-hover: #111111;
  --border: #ffffff;
  --text-primary: #ffffff;
  --text-secondary: #ffff00;
  --text-disabled: #808080;
  --accent: #1aebff;
  --accent-hover: #ffffff;
  --accent-text: #000000;
  --success: #00ff00;
  --warning: #ffff00;
  --danger: #ff4d4d;
  --info: #1aebff;
  --grid-line: rgba(26, 235, 255, 0.16);
  --shadow-window: 0 0 0 2px #ffffff;
  --header-bg: #000000;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--surface);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

code,
pre,
kbd,
.mono-tag,
.mono-cell {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
}

code {
  font-size: 0.88em;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 0.12em 0.42em;
  border-radius: 5px;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  border-radius: 6px;
}

.container {
  width: min(1240px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  border-radius: 8px;
}

.brand-text {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.brand-name {
  font-family: "Space Grotesk", sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: -0.02em;
}

.brand-version {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--info);
  border: 1px solid var(--border);
  background: var(--card);
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.main-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.16s ease;
}

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

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.cmd-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.42rem 0.65rem;
  font-size: 0.82rem;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease;
}

.cmd-trigger:hover {
  border-color: var(--accent);
  color: var(--text-primary);
}

.cmd-trigger kbd {
  font-size: 0.72rem;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.theme-switcher {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  padding: 2px;
}

.theme-btn {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
}

.theme-btn.active {
  background: var(--accent);
  color: var(--accent-text);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn-sm {
  padding: 0.46rem 0.9rem;
  font-size: 0.84rem;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

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

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

.btn-secondary:hover {
  border-color: var(--accent);
  background: var(--card-hover);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* Hero */
.hero-section {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  border-bottom: 1px solid var(--border);
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 85% 75% at 60% 35%, #000 35%, transparent 100%);
  pointer-events: none;
}

.hero-layout {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 3rem;
  align-items: center;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 500;
  margin-bottom: 1.35rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

.hero-title {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(2.35rem, 4.3vw, 3.6rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 1.15rem;
}

.accent-gradient {
  color: var(--accent);
}

.hero-subtitle {
  font-size: 1.06rem;
  color: var(--text-secondary);
  margin: 0 0 1.75rem;
  max-width: 56ch;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.25rem;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1.25rem;
  margin: 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.metric-item dt {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.metric-item dd {
  margin: 0;
  font-weight: 600;
  font-size: 0.94rem;
}

/* Interactive App Simulator */
.app-window {
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.app-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
}

.app-titlebar-left {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.app-titlebar-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.win-badge {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.win-dots {
  display: inline-flex;
  gap: 5px;
}

.win-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--border);
  display: block;
}

.app-shell {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  min-height: 390px;
}

.app-rail {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 0.65rem 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
}

.rail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  padding: 0.52rem 0.6rem;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.rail-item:hover {
  background: var(--card);
  color: var(--text-primary);
}

.rail-item.active {
  background: var(--card);
  color: var(--text-primary);
  border-color: var(--border);
  box-shadow: inset 3px 0 0 var(--accent);
}

.rail-count {
  margin-left: auto;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.05rem 0.42rem;
  border-radius: 999px;
}

.app-viewport {
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
}

.sim-panel {
  display: none;
  flex-direction: column;
  gap: 1rem;
  height: 100%;
}

.sim-panel.active {
  display: flex;
}

.sim-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.sim-panel-head h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.05rem;
  margin: 0;
}

.sim-muted {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.sim-action-btn {
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 6px;
  padding: 0.45rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.sim-action-btn:hover {
  background: var(--accent-hover);
}

.sim-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
}

.sim-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.card-kicker {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.card-val {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.15rem;
}

.card-sub {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

.text-success { color: var(--success); }
.text-info { color: var(--info); }
.text-warn { color: var(--warning); }

.health-score-row {
  display: flex;
  align-items: baseline;
  gap: 0.2rem;
}

.health-num {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.45rem;
  line-height: 1;
}

.health-denom {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.health-bar {
  height: 5px;
  background: var(--surface);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.25rem;
}

.health-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.35s ease;
}

.sim-console-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  margin-top: auto;
}

.console-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.42rem 0.75rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 600;
}

.mono-tag {
  font-size: 0.7rem;
  color: var(--info);
}

.console-output {
  margin: 0;
  padding: 0.75rem;
  font-size: 0.74rem;
  line-height: 1.55;
  color: var(--text-secondary);
  overflow-x: auto;
  white-space: pre-wrap;
}

.log-tall {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex: 1;
}

.sim-search-wrap {
  flex: 1;
}

.sim-search {
  width: 100%;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 0.42rem 0.7rem;
  font-size: 0.8rem;
}

.sim-table-wrap {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}

.sim-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.sim-table th,
.sim-table td {
  padding: 0.52rem 0.65rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.sim-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  background: var(--surface);
}

.sim-table tr:last-child td {
  border-bottom: 0;
}

.pkg-id {
  display: block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.risk-pill {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
}

.risk-low {
  background: rgba(16, 185, 129, 0.14);
  color: var(--success);
}

.risk-med {
  background: rgba(6, 182, 212, 0.14);
  color: var(--info);
}

.risk-warn {
  background: rgba(245, 158, 11, 0.16);
  color: var(--warning);
}

.sim-auto-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.auto-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.auto-row strong {
  font-size: 0.85rem;
}

.auto-row p {
  margin: 0.18rem 0 0;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.badge-on,
.badge-safe {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  white-space: nowrap;
}

.badge-on {
  background: rgba(16, 185, 129, 0.14);
  color: var(--success);
}

.badge-safe {
  background: rgba(99, 102, 241, 0.16);
  color: var(--accent);
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--surface-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  max-width: 68ch;
  margin-bottom: 2.5rem;
}

.eyebrow {
  display: inline-block;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--info);
  margin-bottom: 0.6rem;
}

.section-header h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.45rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
}

.section-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

/* Bento Grid */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.15rem;
}

.bento-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.bento-wide {
  grid-column: span 2;
}

.bento-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  color: var(--accent);
  font-weight: 600;
}

.bento-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.22rem;
  margin: 0;
}

.bento-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.94rem;
}

.code-snippet-inline {
  margin-top: auto;
  padding-top: 0.6rem;
}

.code-snippet-inline code {
  display: block;
  padding: 0.65rem 0.85rem;
  font-size: 0.8rem;
  overflow-x: auto;
}

/* 10-Screen IA Explorer */
.ia-explorer {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 1.5rem;
  align-items: start;
}

.ia-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.ia-tab {
  text-align: left;
  background: var(--card);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.65rem 0.9rem;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.ia-tab:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

.ia-tab.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
  font-weight: 600;
}

.ia-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2rem;
}

.ia-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
}

.ia-index {
  color: var(--info);
  font-weight: 600;
}

.ia-module {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 0.15rem 0.55rem;
  border-radius: 6px;
}

.ia-detail-card h3 {
  font-family: "Space Grotesk", sans-serif;
  font-size: 1.65rem;
  margin: 0 0 0.75rem;
}

.ia-detail-card p {
  color: var(--text-secondary);
  margin: 0 0 1.25rem;
}

.ia-highlights {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

/* CLI Showcase */
.cli-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 2.5rem;
  align-items: center;
}

.cli-copy h2 {
  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(1.7rem, 2.8vw, 2.25rem);
  margin: 0 0 0.85rem;
}

.cli-copy p {
  color: var(--text-secondary);
  margin: 0 0 1.5rem;
}

.exit-codes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.exit-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.75rem;
  font-size: 0.84rem;
}

.cli-terminal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.terminal-tabs {
  display: flex;
  gap: 0.25rem;
  padding: 0.55rem 0.75rem;
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.term-tab {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 0.35rem 0.7rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.78rem;
  cursor: pointer;
}

.term-tab.active {
  background: var(--card);
  color: var(--text-primary);
  border-color: var(--border);
}

.terminal-body {
  position: relative;
  padding: 1.25rem;
}

.terminal-body pre {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  overflow-x: auto;
}

.terminal-body pre code {
  border: 0;
  background: transparent;
  padding: 0;
}

.copy-btn {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  background: var(--surface);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  cursor: pointer;
}

.copy-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent);
}

/* Install Grid */
.install-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.install-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.install-badge {
  align-self: flex-start;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--info);
  border: 1px solid var(--border);
  padding: 0.14rem 0.55rem;
  border-radius: 999px;
}

.install-card h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0;
  font-size: 1.2rem;
}

.install-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.92rem;
}

.mini-code {
  margin: auto 0 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 0.9rem;
  font-size: 0.78rem;
  overflow-x: auto;
}

.mini-code code {
  border: 0;
  background: transparent;
  padding: 0;
}

/* Timeline */
.timeline {
  display: grid;
  gap: 1.25rem;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.version-pill {
  align-self: flex-start;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.version-pill.current {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.timeline-content h3 {
  font-family: "Space Grotesk", sans-serif;
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.timeline-content ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-secondary);
  display: grid;
  gap: 0.38rem;
  font-size: 0.92rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  background: var(--surface-alt);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
}

/* Command Palette Modal */
.cmd-backdrop {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(4px);
  display: grid;
  place-items: start center;
  padding-top: 12vh;
}

.cmd-backdrop[hidden] {
  display: none;
}

.cmd-dialog {
  width: min(560px, 100% - 2rem);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-window);
  overflow: hidden;
}

.cmd-input-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
}

.cmd-input-row input {
  flex: 1;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  font-size: 0.95rem;
  outline: none;
}

.cmd-results {
  list-style: none;
  margin: 0;
  padding: 0.45rem;
  max-height: 300px;
  overflow-y: auto;
}

.cmd-results li button {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--text-primary);
  padding: 0.6rem 0.75rem;
  border-radius: 7px;
  font-size: 0.88rem;
  cursor: pointer;
  text-align: left;
}

.cmd-results li button:hover {
  background: var(--accent);
  color: var(--accent-text);
}

.cmd-hint {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.74rem;
  opacity: 0.75;
}

/* Responsive */
@media (max-width: 1024px) {
  .hero-layout,
  .cli-layout,
  .ia-explorer {
    grid-template-columns: 1fr;
  }

  .main-nav {
    display: none;
  }
}

@media (max-width: 760px) {
  .bento-grid,
  .install-grid,
  .timeline-item,
  .sim-cards-grid {
    grid-template-columns: 1fr;
  }

  .bento-wide {
    grid-column: auto;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .app-rail {
    flex-direction: row;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .rail-item.active {
    box-shadow: inset 0 -3px 0 var(--accent);
  }

  .cmd-trigger span:not(.cmd-icon),
  .cmd-trigger kbd {
    display: none;
  }
}
