/* ==========================================================================
   Reaction Axis — Master Stylesheet (index.html, download.html, docs.html)
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

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

:focus-visible {
  outline: 2px solid var(--brand-cyan-dark);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   Layout & Sections
   -------------------------------------------------------------------------- */

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

.section {
  padding-block: 88px;
  position: relative;
}

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

.section-dark {
  background: var(--bg-studio);
  color: var(--studio-text);
  position: relative;
  overflow: hidden;
}

.section-dark::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 15% 0%, rgba(24, 200, 232, 0.10), transparent 70%),
    radial-gradient(50% 45% at 88% 100%, rgba(0, 75, 135, 0.25), transparent 70%);
  pointer-events: none;
}

.section-dark > .container {
  position: relative;
  z-index: 1;
}

.section-header {
  max-width: 740px;
  margin-bottom: 48px;
}

.section-header.center {
  margin-inline: auto;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-navy);
  background: var(--brand-navy-soft);
  border: 1px solid rgba(0, 75, 135, 0.16);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

.section-dark .eyebrow {
  color: var(--brand-cyan);
  background: rgba(24, 200, 232, 0.12);
  border-color: rgba(24, 200, 232, 0.28);
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--text);
}

.section-dark .section-title {
  color: var(--studio-text);
}

.section-subtitle {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text-muted);
}

.section-dark .section-subtitle {
  color: var(--studio-muted);
}

/* --------------------------------------------------------------------------
   Navigation & Header
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  height: var(--header-height);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.nav-brand-img {
  height: 34px;
  width: auto;
  object-fit: contain;
}

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

.nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 0.9125rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease, background var(--dur-fast) ease;
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--text);
  background: #f3f3f3;
}

.nav-link.active {
  color: var(--brand-navy);
  background: var(--surface-2);
  font-weight: 600;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all var(--dur-fast) ease;
}

.lang-btn:hover {
  color: var(--text);
  background: #f3f3f3;
}

.lang-btn.active {
  background: var(--bg);
  color: var(--brand-navy);
  box-shadow: var(--shadow-xs);
}

.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
}

.mobile-drawer {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  z-index: var(--z-drawer);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  padding: 16px 24px 24px;
}

.mobile-drawer.open {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-drawer-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-drawer .nav-link {
  padding: 10px 12px;
  font-size: 1rem;
}

.mobile-drawer-footer {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* --------------------------------------------------------------------------
   Buttons & Badges
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease-out), background var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease, color var(--dur-fast) ease;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--brand-navy);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(0, 75, 135, 0.25);
}

.btn-primary:hover {
  background: var(--brand-navy-dark);
  box-shadow: 0 6px 20px rgba(0, 75, 135, 0.34);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background: #f3f3f3;
  border-color: var(--border-strong);
  color: var(--text);
}

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

.btn-ghost:hover {
  background: #f3f3f3;
  color: var(--text);
}

.btn-dark {
  background: var(--bg-studio-card);
  color: var(--studio-text);
  border-color: var(--bg-studio-border);
}

.btn-dark:hover {
  background: #172540;
  border-color: var(--brand-cyan);
}

.btn-sm {
  padding: 7px 13px;
  font-size: 0.8375rem;
}

.btn-lg {
  padding: 13px 24px;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(15, 23, 42, 0.65);
  color: var(--studio-text);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  transition: all var(--dur-fast) ease;
}

.copy-btn:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
}

.copy-btn.copied {
  border-color: var(--brand-emerald);
  color: var(--brand-emerald);
  background: rgba(16, 185, 129, 0.14);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.badge-cyan {
  background: var(--brand-cyan-soft);
  color: var(--brand-cyan-dark);
  border: 1px solid rgba(2, 132, 199, 0.2);
}

.section-dark .badge-cyan {
  background: rgba(24, 200, 232, 0.14);
  color: var(--brand-cyan);
  border-color: rgba(24, 200, 232, 0.3);
}

.badge-amber {
  background: var(--brand-amber-soft);
  color: #B45309;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.section-dark .badge-amber {
  background: rgba(245, 158, 11, 0.14);
  color: #FBBF24;
  border-color: rgba(245, 158, 11, 0.3);
}

.badge-navy {
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  border: 1px solid rgba(0, 75, 135, 0.18);
}

/* --------------------------------------------------------------------------
   Cards & Grid Primitives
   -------------------------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), border-color var(--dur-base) ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card-dark {
  background: var(--bg-studio-card);
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-lg);
  padding: 26px;
  color: var(--studio-text);
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) ease;
}

.card-dark:hover {
  border-color: rgba(24, 200, 232, 0.4);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

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

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.bento-span-6 { grid-column: span 6; }
.bento-span-4 { grid-column: span 4; }
.bento-span-5 { grid-column: span 5; }
.bento-span-7 { grid-column: span 7; }
.bento-span-8 { grid-column: span 8; }
.bento-span-12 { grid-column: span 12; }

/* --------------------------------------------------------------------------
   Hero Section & Scientific Dot-Matrix Backdrop
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: 64px;
  padding-bottom: 84px;
  overflow: hidden;
  background: var(--bg);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 0, 0, 0.065) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 78%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 78%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 860px;
  margin-inline: auto;
  text-align: center;
  margin-bottom: 44px;
}

.hero-title {
  margin: 0 0 18px;
  font-size: clamp(2.15rem, 4.4vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.032em;
  color: var(--text);
}

.hero-subtitle {
  margin: 0 auto 28px;
  max-width: 740px;
  font-size: clamp(1.02rem, 1.45vw, 1.15rem);
  line-height: 1.72;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.hero-meta-strip {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  font-size: 0.8375rem;
  color: var(--text-faint);
}

.hero-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.hero-meta-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--brand-cyan);
  box-shadow: 0 0 0 3px rgba(24, 200, 232, 0.18);
}

/* --------------------------------------------------------------------------
   Interactive Desktop Workbench Window
   -------------------------------------------------------------------------- */

.workbench-shell {
  background: var(--bg-studio);
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-studio);
  overflow: hidden;
  color: var(--studio-text);
}

.workbench-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  background: #080E1A;
  border-bottom: 1px solid var(--bg-studio-border);
}

.workbench-dots {
  display: flex;
  align-items: center;
  gap: 7px;
}

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

.workbench-dot.red { background: #EF4444; }
.workbench-dot.yellow { background: #F59E0B; }
.workbench-dot.green { background: #10B981; }

.workbench-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--studio-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--brand-cyan);
  background: rgba(24, 200, 232, 0.1);
  border: 1px solid rgba(24, 200, 232, 0.25);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  flex-shrink: 0;
}

.workbench-tabs-wrap {
  background: #0D1627;
  border-bottom: 1px solid var(--bg-studio-border);
  padding: 10px 16px;
}

/* Generic Tabs Component (used in Workbench & Subpages) */

.tabs-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--studio-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--dur-fast) ease;
}

.tab-btn:hover {
  color: var(--studio-text);
  background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
  color: #FFFFFF;
  background: rgba(24, 200, 232, 0.14);
  border-color: rgba(24, 200, 232, 0.35);
  font-weight: 600;
}

/* Light-surface tabs override */
.tabs-light .tab-btn {
  color: var(--text-muted);
}

.tabs-light .tab-btn:hover {
  color: var(--text);
  background: #f3f3f3;
}

.tabs-light .tab-btn.active {
  color: var(--brand-navy);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeSlideUp 220ms var(--ease-out);
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.workbench-stage {
  padding: 24px;
  min-height: 410px;
}

.stage-grid-2 {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.stage-panel {
  background: var(--bg-studio-card);
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-md);
  padding: 18px;
}

.stage-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(30, 46, 74, 0.8);
}

.stage-panel-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--studio-text);
  display: flex;
  align-items: center;
  gap: 8px;
}

.stage-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 12px;
}

.stage-table th {
  text-align: left;
  color: var(--studio-muted);
  font-weight: 600;
  padding: 7px 8px;
  border-bottom: 1px solid var(--bg-studio-border);
}

.stage-table td {
  padding: 8px 8px;
  border-bottom: 1px solid rgba(30, 46, 74, 0.55);
  color: var(--studio-text);
}

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

.stage-tier-list {
  display: grid;
  gap: 10px;
}

.stage-tier {
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: rgba(11, 18, 32, 0.65);
  border: 1px solid var(--bg-studio-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stage-tier.highlight {
  border-color: rgba(24, 200, 232, 0.45);
  background: rgba(24, 200, 232, 0.07);
}

.stage-tier-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--studio-text);
}

.stage-tier-desc {
  font-size: 0.775rem;
  color: var(--studio-muted);
}

/* --------------------------------------------------------------------------
   Workflow 5-Step Strip
   -------------------------------------------------------------------------- */

.workflow-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.workflow-step {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  box-shadow: var(--shadow-xs);
}

.workflow-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--brand-navy);
  background: var(--brand-navy-soft);
  border-radius: var(--radius-xs);
  padding: 3px 8px;
  margin-bottom: 10px;
}

.workflow-step h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.workflow-step p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.workflow-note {
  margin-top: 24px;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px dashed rgba(0, 75, 135, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.925rem;
  color: var(--text-muted);
  text-align: center;
}

/* --------------------------------------------------------------------------
   7-Module Bento Grid
   -------------------------------------------------------------------------- */

.module-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.module-card.featured {
  background: var(--bg);
  border-color: var(--border-strong);
}

.module-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.module-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-navy-soft);
  color: var(--brand-navy);
  flex-shrink: 0;
}

.module-icon.cyan {
  background: var(--brand-cyan-soft);
  color: var(--brand-cyan-dark);
}

.module-icon.amber {
  background: var(--brand-amber-soft);
  color: #B45309;
}

.module-title {
  margin: 12px 0 8px;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--text);
}

.module-desc {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--text-muted);
}

.module-bullets {
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 7px;
}

.module-bullets li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.module-bullets li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-cyan-dark);
  margin-top: 8px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Before vs After Comparison
   -------------------------------------------------------------------------- */

.compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.compare-card {
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border);
  background: var(--bg);
}

.compare-card.after {
  background: linear-gradient(160deg, #0B1220 0%, #0F1D34 100%);
  border-color: rgba(24, 200, 232, 0.35);
  color: var(--studio-text);
  box-shadow: var(--shadow-lg);
}

.compare-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.compare-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
}

.compare-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

.compare-mark.before {
  background: var(--brand-rose-soft);
  color: #BE123C;
}

.compare-mark.after {
  background: rgba(24, 200, 232, 0.18);
  color: var(--brand-cyan);
}

/* --------------------------------------------------------------------------
   Code Blocks & Copy UI
   -------------------------------------------------------------------------- */

.code-block {
  background: #0A101E;
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.code-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #0E1729;
  border-bottom: 1px solid var(--bg-studio-border);
}

.code-lang {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--studio-muted);
}

.code-pre {
  margin: 0;
  padding: 16px 18px;
  overflow-x: auto;
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 1.62;
  color: #E2E8F0;
}

.mcp-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 28px;
  align-items: start;
}

.mcp-pillars {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.mcp-pillar {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg);
  border: 1px solid var(--border);
}

.mcp-pillar h4 {
  margin: 0 0 4px;
  font-size: 0.98rem;
  font-weight: 700;
}

.mcp-pillar p {
  margin: 0;
  font-size: 0.885rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Publication Gallery & Lightbox
   -------------------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.gallery-card {
  background: var(--bg-studio-card);
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--dur-base) var(--ease-out), border-color var(--dur-base) ease;
}

.gallery-card:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 200, 232, 0.45);
}

.gallery-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  background: radial-gradient(circle at 50% 45%, #16243D 0%, #09101D 100%);
  border-bottom: 1px solid var(--bg-studio-border);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gallery-visual img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.gallery-zoom-btn {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(11, 18, 32, 0.82);
  color: var(--studio-text);
  font-size: 12px;
  font-weight: 600;
  backdrop-filter: blur(8px);
  transition: all var(--dur-fast) ease;
}

.gallery-zoom-btn:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
}

.gallery-meta {
  padding: 20px 22px 22px;
}

.gallery-meta h3 {
  margin: 10px 0 6px;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--studio-text);
}

.gallery-meta p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--studio-muted);
}

.gallery-replace-note {
  margin-top: 24px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  background: rgba(17, 28, 48, 0.72);
  border: 1px solid var(--bg-studio-border);
  font-size: 0.875rem;
  color: var(--studio-muted);
  text-align: center;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  background: rgba(5, 9, 18, 0.84);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox.open {
  display: flex;
  animation: fadeSlideUp 180ms var(--ease-out);
}

.lightbox-dialog {
  position: relative;
  width: min(980px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-studio-card);
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  box-shadow: var(--shadow-studio);
  color: var(--studio-text);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--bg-studio-border);
  background: var(--bg-studio);
  color: var(--studio-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
}

.lightbox-close:hover {
  border-color: var(--brand-cyan);
  color: var(--brand-cyan);
}

.lightbox-body {
  background: #080E1B;
  border: 1px solid var(--bg-studio-border);
  border-radius: var(--radius-md);
  padding: 20px;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-body svg,
.lightbox-body img {
  width: 100%;
  max-height: 60vh;
  object-fit: contain;
}

.lightbox-caption {
  margin-top: 16px;
}

.lightbox-caption h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
}

.lightbox-caption p {
  margin: 0;
  font-size: 0.925rem;
  color: var(--studio-muted);
}

/* --------------------------------------------------------------------------
   Bottom CTA Banner
   -------------------------------------------------------------------------- */

.cta-banner {
  background: linear-gradient(135deg, var(--brand-navy-dark) 0%, var(--brand-navy) 55%, #07649E 100%);
  border-radius: var(--radius-xl);
  padding: 48px 40px;
  color: #FFFFFF;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  box-shadow: var(--shadow-lg);
}

.cta-banner h2 {
  margin: 0 0 8px;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.cta-banner p {
  margin: 0;
  max-width: 600px;
  color: rgba(241, 245, 249, 0.88);
  font-size: 1rem;
}

.cta-banner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn-on-dark {
  background: #FFFFFF;
  color: var(--brand-navy-dark);
}

.btn-on-dark:hover {
  background: var(--brand-cyan-soft);
}

.btn-outline-on-dark {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-outline-on-dark:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: #FFFFFF;
}

/* --------------------------------------------------------------------------
   Subpage Hero (download.html & docs.html)
   -------------------------------------------------------------------------- */

.page-hero {
  padding-block: 56px 48px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}

.page-hero-inner {
  max-width: 780px;
}

.page-hero-title {
  margin: 0 0 12px;
  font-size: clamp(1.9rem, 3.4vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.15;
  color: var(--text);
}

.page-hero-sub {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.68;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Download Page Components (download.html)
   -------------------------------------------------------------------------- */

.download-hero-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.download-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
}

.download-card.featured {
  border-color: var(--brand-navy);
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, 0.12);
  background: var(--bg);
}

.download-card-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.download-card-head h2,
.download-card-head h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.download-card-head p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.download-meta {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.download-meta > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.download-meta code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text);
  word-break: break-all;
}

.download-meta strong {
  color: var(--text);
  font-weight: 600;
}

.download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.checksum-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-navy);
  flex-shrink: 0;
}

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

.callout {
  margin-top: 20px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  font-size: 0.9375rem;
  line-height: 1.62;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.callout strong,
.callout h3 {
  margin: 0;
  font-size: 0.975rem;
}

.callout p {
  margin: 0;
}

.callout-warn {
  background: #FFFBEB;
  border-color: rgba(245, 158, 11, 0.35);
  color: #78350F;
}

.callout-info {
  background: var(--brand-navy-soft);
  border-color: rgba(0, 75, 135, 0.22);
  color: #0F2942;
}

.spec-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.9375rem;
}

.spec-table th,
.spec-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.spec-table th {
  background: var(--surface-2);
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

.spec-table tbody tr:hover td {
  background: #f3f3f3;
}

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

.changelog-list {
  display: grid;
  gap: 16px;
}

.changelog-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
}

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

.changelog-head > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.changelog-item h3 {
  margin: 0 0 10px;
  font-size: 1.075rem;
  font-weight: 700;
}

.changelog-item ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
  font-size: 0.9375rem;
  color: var(--text-muted);
}

.changelog-ver {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--brand-navy);
}

.changelog-date {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.license-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.license-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
}

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

.license-card h3,
.license-card h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.license-card p {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Docs Page Components (docs.html)
   -------------------------------------------------------------------------- */

.docs-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.docs-nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  font-size: 0.885rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--dur-fast) ease;
}

.docs-nav-link:hover {
  color: var(--text);
  background: #f3f3f3;
}

.docs-nav-link.active {
  color: var(--brand-navy);
  background: var(--bg);
  box-shadow: inset 0 0 0 1px var(--border);
  font-weight: 600;
}

.docs-content {
  min-width: 0;
  display: grid;
  gap: 48px;
}

.docs-section {
  scroll-margin-top: calc(var(--header-height) + 24px);
}

.docs-section h2 {
  margin: 0 0 12px;
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.step-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 14px;
  margin: 18px 0 0;
}

.step-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.step-item h3 {
  margin: 0 0 4px;
  font-size: 1.02rem;
  font-weight: 700;
}

.step-item p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.62;
  color: var(--text-muted);
}

.step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #FFFFFF;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.shortcut-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

.kbd {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  box-shadow: inset 0 -1px 0 var(--border-strong);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.faq-list {
  display: grid;
  gap: 12px;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-q {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 17px 20px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 0.985rem;
  font-weight: 600;
  color: var(--text);
}

.faq-q:hover {
  background: #f3f3f3;
}

.faq-q::after {
  content: "+";
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 500;
  color: var(--brand-navy);
  flex-shrink: 0;
}

.faq-item.open .faq-q::after {
  content: "−";
}

.faq-a {
  display: none;
  padding: 0 20px 18px;
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.faq-item.open .faq-a {
  display: block;
}

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

/* --------------------------------------------------------------------------
   Account Page Components (account.html)
   -------------------------------------------------------------------------- */

[hidden] {
  display: none !important;
}

.account-shell {
  max-width: 780px;
  display: grid;
  gap: 20px;
}

.account-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.account-card-head h2,
.account-devices-title-row h2 {
  margin: 0 0 6px;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
}

.account-card-head p,
.account-devices-head p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.account-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 24px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.account-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-strong);
  border-top-color: var(--brand-navy);
  animation: account-spin 0.8s linear infinite;
}

@keyframes account-spin {
  to { transform: rotate(360deg); }
}

.account-alert {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  line-height: 1.5;
}

.account-alert-error {
  background: var(--brand-rose-soft);
  border-color: rgba(244, 63, 94, 0.35);
  color: #9F1239;
}

.account-alert-success {
  background: var(--brand-emerald-soft);
  border-color: rgba(16, 185, 129, 0.35);
  color: #065F46;
}

.account-login-body {
  margin-top: 22px;
  max-width: 400px;
  width: 100%;
  display: grid;
  gap: 18px;
}

.account-google-section {
  display: grid;
  gap: 18px;
}

.account-google-btn-wrap {
  width: 100%;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.account-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-faint);
  font-size: 0.85rem;
  font-weight: 500;
}

.account-divider::before,
.account-divider::after {
  content: "";
  flex: 1 1 0;
  height: 1px;
  background: var(--border);
}

.account-form {
  margin-top: 22px;
  display: grid;
  gap: 18px;
}

.account-login-body .account-form {
  margin-top: 0;
}

.account-field {
  display: grid;
  gap: 7px;
}

.account-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.account-input-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.account-input {
  width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  line-height: 1.4;
  transition: border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}

.account-input:focus {
  outline: none;
  border-color: var(--brand-navy);
  box-shadow: 0 0 0 3px rgba(0, 75, 135, 0.14);
}

.account-code-input {
  max-width: 220px;
  font-family: var(--font-mono);
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-align: center;
}

.account-send-btn {
  flex-shrink: 0;
  min-width: 132px;
}

.account-send-btn:disabled,
.account-submit-btn:disabled,
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.account-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 4px;
}

.account-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.account-profile-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.account-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-navy);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.account-profile-info {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.account-profile-email-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-profile-email {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-all;
}

.account-profile-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.account-devices-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.account-devices-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.account-devices-title-row h2 {
  margin: 0;
}

.device-list {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}

.device-empty {
  margin: 0;
  padding: 20px;
  text-align: center;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  color: var(--text-muted);
  font-size: 0.925rem;
}

.device-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
  transition: border-color var(--dur-fast) ease, background var(--dur-fast) ease;
}

.device-row.is-current {
  background: var(--brand-navy-soft);
  border-color: rgba(0, 75, 135, 0.25);
}

.device-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--brand-navy);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.device-row.is-current .device-icon {
  background: var(--bg);
}

.device-info {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 4px;
}

.device-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-name {
  font-size: 0.975rem;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}

.device-meta {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
  word-break: break-word;
}

.device-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.device-rename-form {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-rename-input {
  flex: 1 1 200px;
  padding: 6px 10px;
  font-size: 0.9rem;
}

.btn-danger-ghost {
  background: transparent;
  color: #BE123C;
  border-color: rgba(244, 63, 94, 0.35);
}

.btn-danger-ghost:hover:not(:disabled) {
  background: var(--brand-rose-soft);
  border-color: rgba(244, 63, 94, 0.6);
  color: #9F1239;
}

/* --------------------------------------------------------------------------
   Privacy Policy Page Components (privacy.html)
   -------------------------------------------------------------------------- */

.privacy-shell {
  max-width: 820px;
  display: grid;
  gap: 18px;
}

.privacy-updated {
  margin: 14px 0 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-faint);
}

.privacy-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 10px;
}

.privacy-card h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.privacy-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.68;
  color: var(--text-muted);
}

.privacy-card ul {
  margin: 2px 0 0;
  padding-left: 20px;
  display: grid;
  gap: 8px;
  font-size: 0.94rem;
  line-height: 1.64;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Footer & Toast
   -------------------------------------------------------------------------- */

.site-footer {
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  padding-block: 56px 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid var(--border);
}

.footer-grid-minimal {
  grid-template-columns: 1.8fr 1fr 1fr;
}

.footer-logo {
  display: block;
  height: 30px;
  width: auto;
}

.footer-brand p,
.footer-tagline {
  margin: 14px 0 0;
  max-width: 340px;
  font-size: 0.9rem;
  line-height: 1.62;
  color: var(--text-muted);
}

.footer-col h4 {
  margin: 0 0 14px;
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.footer-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 9px;
}

.footer-col a {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--dur-fast) ease;
}

.footer-col a:hover {
  color: var(--brand-navy);
}

.footer-bottom {
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.8375rem;
  color: var(--text-faint);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translate(-50%, 16px);
  z-index: var(--z-toast);
  background: #0F172A;
  color: #F8FAFC;
  border: 1px solid rgba(24, 200, 232, 0.35);
  border-radius: var(--radius-pill);
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms var(--ease-out);
  max-width: min(92vw, 540px);
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */

@media (max-width: 1040px) {
  .workflow-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stage-grid-2,
  .mcp-layout {
    grid-template-columns: 1fr;
  }
  .footer-grid,
  .footer-grid-minimal {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .license-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-links,
  .nav-actions .lang-toggle {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .bento-span-6,
  .bento-span-4,
  .bento-span-5,
  .bento-span-7,
  .bento-span-8 {
    grid-column: span 12;
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .compare-grid,
  .gallery-grid,
  .download-hero-grid,
  .shortcut-grid,
  .docs-layout {
    grid-template-columns: 1fr;
  }
  .docs-sidebar {
    position: static;
  }
}

@media (max-width: 600px) {
  .section {
    padding-block: 60px;
  }
  .hero {
    padding-top: 44px;
    padding-bottom: 58px;
  }
  .workflow-strip,
  .footer-grid,
  .footer-grid-minimal,
  .license-grid {
    grid-template-columns: 1fr;
  }
  .workbench-stage {
    padding: 14px;
  }
  .cta-banner {
    padding: 32px 24px;
  }
  .account-card,
  .privacy-card {
    padding: 22px 18px;
  }
  .account-input-row {
    flex-direction: column;
  }
  .account-code-input {
    max-width: none;
  }
  .device-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .device-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
