@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/SpaceGrotesk-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('../assets/fonts/SpaceGrotesk-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../assets/fonts/JetBrainsMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --font-display: 'Space Grotesk', 'Inter', 'Segoe UI', sans-serif;
  --font-body: 'Inter', 'Segoe UI', sans-serif;
  --font-code: 'JetBrains Mono', 'IBM Plex Mono', monospace;

  --primary: #5569b8;
  --primary-strong: #36488d;
  --primary-soft: #e8eefc;
  --accent: #89a0d8;
  --bg: #f4f7fc;
  --bg-nav: rgba(248, 250, 253, 0.84);
  --surface-canvas: #eff3fa;
  --surface-subtle: rgba(241, 245, 251, 0.86);
  --surface-elevated: rgba(255, 255, 255, 0.86);
  --surface-widget: rgba(252, 253, 255, 0.92);
  --surface-floating: rgba(255, 255, 255, 0.95);
  --surface-hover: rgba(85, 105, 184, 0.08);
  --surface-active: rgba(85, 105, 184, 0.12);
  --text: #1d2740;
  --text-muted: #68748b;
  --border: #d8e1ef;
  --outline-soft: rgba(134, 149, 180, 0.28);
  --outline-strong: rgba(85, 105, 184, 0.36);
  --focus-ring: rgba(85, 105, 184, 0.18);
  --success-bg: rgba(48, 142, 91, 0.14);
  --success-text: #226443;
  --danger-bg: rgba(188, 73, 61, 0.14);
  --danger-text: #8b2f26;
  --warning-bg: rgba(197, 126, 18, 0.14);
  --warning-text: #8c5e12;
  --shadow-soft: 0 10px 24px -18px rgba(13, 18, 34, 0.28);
  --shadow-strong: 0 26px 64px -34px rgba(13, 18, 34, 0.34);
  --glow-subtle: 0 0 0 1px rgba(255, 255, 255, 0.62), 0 18px 42px -30px rgba(15, 23, 42, 0.28);
  --motion-fast: 160ms cubic-bezier(0.16, 1, 0.3, 1);
  --motion-medium: 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ===================================================================
   DARK THEME — activated via data-theme="dark" on <html>
   =================================================================== */
[data-theme="dark"] {
  --bg: #0f1219;
  --bg-nav: rgba(15, 18, 25, 0.92);
  --surface-canvas: #141821;
  --surface-subtle: #1a2030;
  --surface-elevated: #1e2538;
  --surface-widget: #232a3a;
  --surface-floating: #1e2538;
  --surface-hover: rgba(45, 212, 191, 0.08);
  --surface-active: rgba(45, 212, 191, 0.12);
  --text: #e2e8f0;
  --text-muted: #8b95a8;
  --primary: #2dd4bf;
  --primary-strong: #5eead4;
  --primary-soft: rgba(45, 212, 191, 0.1);
  --accent: #2dd4bf;
  --border: rgba(255, 255, 255, 0.08);
  --outline-soft: rgba(255, 255, 255, 0.06);
  --outline-strong: rgba(45, 212, 191, 0.2);
  --focus-ring: rgba(45, 212, 191, 0.18);
  --success-bg: rgba(45, 212, 191, 0.12);
  --success-text: #2dd4bf;
  --danger-bg: rgba(239, 68, 68, 0.12);
  --danger-text: #f87171;
  --warning-bg: rgba(234, 179, 8, 0.12);
  --warning-text: #fbbf24;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-strong: 0 8px 24px rgba(0, 0, 0, 0.4);
  --glow-subtle: 0 0 0 1px rgba(255, 255, 255, 0.04), 0 18px 42px -30px rgba(0, 0, 0, 0.5);
}

/* --- Dark: body background ---------------------------------------- */
[data-theme="dark"] body {
  background-color: var(--bg);
  background-image:
    radial-gradient(64rem 38rem at 14% -6%, rgba(45, 212, 191, 0.10), transparent 55%),
    radial-gradient(58rem 30rem at 90% 80%, rgba(45, 212, 191, 0.07), transparent 55%),
    radial-gradient(40rem 40rem at 50% 20%, rgba(30, 40, 80, 0.25), transparent 70%);
  background-size: auto;
  background-blend-mode: normal;
}

/* --- Dark: links -------------------------------------------------- */
[data-theme="dark"] a {
  color: var(--primary);
  text-decoration-color: rgba(45, 212, 191, 0.28);
}

[data-theme="dark"] a:hover {
  color: var(--primary-strong);
  text-decoration-color: rgba(94, 234, 212, 0.44);
}

/* --- Dark: nav ---------------------------------------------------- */
[data-theme="dark"] nav {
  background:
    linear-gradient(
      180deg,
      rgba(15, 18, 25, 0.85),
      rgba(20, 24, 33, 0.9) 72%
    ),
    var(--bg-nav);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] nav::after {
  background: linear-gradient(90deg, transparent, rgba(45, 212, 191, 0.18), transparent);
}

[data-theme="dark"] nav a.active {
  color: var(--primary-strong);
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.2);
  box-shadow: none;
}

[data-theme="dark"] .nav-dropdown {
  background: rgba(20, 24, 33, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

/* --- Dark: headings ----------------------------------------------- */
[data-theme="dark"] h1 {
  background: linear-gradient(135deg, #2dd4bf 0%, #5eead4 55%, #99f6e4 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

[data-theme="dark"] h2::after {
  background: linear-gradient(90deg, var(--primary), rgba(45, 212, 191, 0.4), transparent);
}

[data-theme="dark"] h3 {
  color: var(--primary-strong);
}

/* --- Dark: cards -------------------------------------------------- */
[data-theme="dark"] .card {
  background: var(--surface-subtle);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  backdrop-filter: none;
}

[data-theme="dark"] .card:hover {
  border-color: rgba(45, 212, 191, 0.15);
  box-shadow: var(--shadow-strong);
}

/* --- Dark: images ------------------------------------------------- */
[data-theme="dark"] main img {
  border-color: rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(20, 24, 33, 0.92), rgba(26, 32, 48, 0.92));
  box-shadow: var(--shadow-soft);
}

/* --- Dark: code figures ------------------------------------------- */
[data-theme="dark"] .code-figure img {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

/* --- Dark: tables ------------------------------------------------- */
[data-theme="dark"] table {
  background: var(--surface-subtle);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] th {
  background: linear-gradient(180deg, #1a2638, #1e2d42);
  color: var(--primary-strong);
  border-bottom: 1px solid rgba(45, 212, 191, 0.15);
}

[data-theme="dark"] td,
[data-theme="dark"] tbody td,
[data-theme="dark"] tbody tr td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: transparent !important;
  color: var(--text);
}

[data-theme="dark"] tbody tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02) !important;
}

[data-theme="dark"] tr:hover td {
  background: rgba(45, 212, 191, 0.05) !important;
}

[data-theme="dark"] td.yes {
  background: var(--success-bg) !important;
  color: var(--success-text);
}

[data-theme="dark"] td.no {
  background: var(--danger-bg) !important;
  color: var(--danger-text);
}

/* --- Dark: carousel nav buttons & dots ----------------------------- */
[data-theme="dark"] .nav-btn {
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

[data-theme="dark"] .nav-btn:hover:not(:disabled) {
  background: var(--surface-elevated);
  border-color: rgba(45, 212, 191, 0.2);
}

[data-theme="dark"] .dot {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .dot.active {
  background: var(--primary);
}

/* --- Dark: carousel/slider cards ----------------------------------- */
[data-theme="dark"] .cards-track .card {
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

/* --- Dark: code blocks -------------------------------------------- */
[data-theme="dark"] pre {
  background: #0d1017;
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: none;
}

[data-theme="dark"] code {
  color: var(--primary-strong);
}

[data-theme="dark"] pre code {
  color: var(--text);
}

/* --- Dark: footer ------------------------------------------------- */
[data-theme="dark"] footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: var(--surface-canvas);
  backdrop-filter: none;
}

[data-theme="dark"] .footer-links a,
[data-theme="dark"] .footer-links span {
  background: var(--surface-widget);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--primary-strong);
  box-shadow: none;
}

[data-theme="dark"] .footer-logos img {
  filter: saturate(0.7) brightness(0.85);
}

[data-theme="dark"] .footer-logos img:hover {
  filter: saturate(1) brightness(1.05);
}

/* --- Dark: scrollbar ---------------------------------------------- */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(139, 149, 168, 0.28);
  border: 2px solid transparent;
  background-clip: content-box;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 149, 168, 0.45);
  border: 2px solid transparent;
  background-clip: content-box;
}

/* --- Dark: hero section (home page) ------------------------------- */
[data-theme="dark"] .hero-preview {
  background:
    radial-gradient(circle at top right, rgba(45, 212, 191, 0.1), transparent 44%),
    linear-gradient(180deg, var(--surface-subtle), var(--surface-canvas));
}

[data-theme="dark"] .hero-preview::before {
  background: radial-gradient(circle, rgba(45, 212, 191, 0.08), transparent 70%);
}

[data-theme="dark"] .hero-preview-bar span {
  background: rgba(45, 212, 191, 0.25);
}

[data-theme="dark"] .hero-mode-list li {
  background: var(--surface-subtle);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
  color: var(--text);
}

[data-theme="dark"] .hero-mode-list li:hover {
  border-color: rgba(45, 212, 191, 0.15);
}

[data-theme="dark"] .hero-chip {
  background: var(--surface-subtle);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text);
}

[data-theme="dark"] .hero-link {
  background: var(--surface-subtle);
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--primary);
}

[data-theme="dark"] .hero-link:hover {
  background: var(--surface-elevated);
  border-color: rgba(45, 212, 191, 0.2);
}

/* --- Dark: badges ------------------------------------------------- */
[data-theme="dark"] .badge {
  border-color: rgba(255, 255, 255, 0.08);
}

/* --- Dark: misc panels and sections with hardcoded backgrounds ---- */
[data-theme="dark"] .hero-section,
[data-theme="dark"] .hero-panel {
  background: transparent;
}

[data-theme="dark"] .comparison-caption {
  color: var(--text-muted);
}

/* --- Dark: gantt goals cards -------------------------------------- */
[data-theme="dark"] .goal-card,
[data-theme="dark"] .persona-card {
  background: var(--surface-subtle);
  border-color: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

/* --- Dark: misc elements ------------------------------------------ */
[data-theme="dark"] .uc-label {
  background: rgba(20, 24, 33, 0.9) !important;
}

[data-theme="dark"] .flow-box {
  background: #1a2030;
  border-color: var(--primary);
  color: var(--text);
}

[data-theme="dark"] .flow-box small {
  color: var(--text-muted);
}

[data-theme="dark"] .flow-box--primary {
  background: linear-gradient(135deg, #1a3a38, #1e2d42);
  color: var(--primary-strong);
  border-color: var(--primary);
}

[data-theme="dark"] .flow-box--primary small {
  color: var(--text-muted);
}

[data-theme="dark"] .flow-box--secondary {
  background: #1e2538;
}

[data-theme="dark"] .flow-arrow {
  color: var(--primary);
}

[data-theme="dark"] .badge-must {
  color: var(--primary-strong);
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.2);
}

[data-theme="dark"] .badge-should {
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.2);
}

[data-theme="dark"] .badge-could {
  color: var(--warning-text);
  background: var(--warning-bg);
  border-color: rgba(234, 179, 8, 0.2);
}

[data-theme="dark"] .badge-wont {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="dark"] .gantt-wrapper {
  background: var(--surface-subtle);
  border-color: rgba(255, 255, 255, 0.06);
  box-shadow: var(--shadow-soft);
}

[data-theme="dark"] .gantt-month-header th {
  color: var(--text-muted) !important;
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .gantt-week-header th {
  color: var(--text-muted) !important;
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .gantt-table tbody tr {
  border-bottom-color: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .gantt-table tbody td {
  border-left-color: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .dot {
  background: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .dot.active {
  background: var(--primary);
}

/* ===================================================================
   THEME TOGGLE BUTTON
   =================================================================== */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-left: auto;
  margin-left: auto;
  padding: 0;
  border: 1px solid var(--outline-soft);
  border-radius: 12px;
  background: var(--surface-widget);
  color: var(--text-muted);
  cursor: pointer;
  transition:
    color var(--motion-fast),
    background var(--motion-fast),
    border-color var(--motion-fast),
    transform var(--motion-fast);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--primary);
  background: var(--surface-hover);
  border-color: var(--outline-strong);
  transform: translateY(-1px);
}

.theme-toggle svg {
  width: 17px;
  height: 17px;
  transition: opacity var(--motion-fast), transform var(--motion-fast);
}

/* Sun icon visible in dark mode, moon icon visible in light mode */
.theme-toggle .icon-sun {
  display: none;
}

.theme-toggle .icon-moon {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* ===================================================================
   PAGE SIDEBAR — flat list of section headings
   =================================================================== */
.page-sidebar {
  position: fixed;
  top: var(--nav-height, 64px);
  left: 0;
  bottom: 0;
  width: 280px;
  padding: 0.75rem 0;
  background: var(--bg);
  border-right: 1px solid var(--outline-soft);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 800;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: var(--outline-soft) transparent;
}

.page-sidebar::-webkit-scrollbar { width: 4px; }
.page-sidebar::-webkit-scrollbar-thumb { background: var(--outline-soft); border-radius: 4px; }

[data-theme="dark"] .page-sidebar {
  background: var(--bg);
  border-right-color: rgba(255, 255, 255, 0.06);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.sidebar-link {
  display: block;
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-left: 3px solid transparent;
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease;
}

.sidebar-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.sidebar-link.active {
  color: var(--primary-strong);
  font-weight: 600;
  border-left-color: var(--primary-strong);
  background: var(--primary-soft);
}

[data-theme="dark"] .sidebar-link.active {
  color: var(--primary);
  border-left-color: var(--primary);
  background: rgba(45, 212, 191, 0.06);
}

/* ---- Layout: push main content ---- */
.has-sidebar main {
  margin-left: 280px;
  max-width: calc(820px + 280px);
}

.has-sidebar nav {
  padding-left: 0.9rem;
}

.has-sidebar footer {
  margin-left: 280px;
}

.has-sidebar section + section {
  padding-top: 2rem;
  border-top: 1px solid var(--outline-soft);
}

[data-theme="dark"] .has-sidebar section + section {
  border-top-color: rgba(255, 255, 255, 0.04);
}

/* ===================================================================
   RESPONSIVE: hide sidebar below 960px
   =================================================================== */
@media (max-width: 960px) {
  .page-sidebar {
    display: none;
  }

  .has-sidebar main {
    margin-left: 0;
    max-width: none;
  }

  .has-sidebar nav {
    padding-left: 0.9rem;
  }

  .has-sidebar footer {
    margin-left: 0;
  }

  .has-sidebar section + section {
    padding-top: 0;
    border-top: none;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--text);
  line-height: 1.72;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg);
  background-image:
    linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.45) 0,
      transparent 18%,
      transparent 82%,
      rgba(255, 255, 255, 0.45) 100%
    ),
    radial-gradient(64rem 38rem at 14% -6%, rgba(85, 105, 184, 0.12), transparent 62%),
    radial-gradient(58rem 30rem at 100% 100%, rgba(85, 105, 184, 0.08), transparent 65%),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.9) 0,
      rgba(255, 255, 255, 0.9) 1px,
      transparent 1px,
      transparent 8px
    );
  background-size: auto, auto, auto, 100% 8px;
  background-blend-mode: normal, screen, normal, soft-light;
}

a {
  color: var(--primary);
  text-decoration-color: rgba(85, 105, 184, 0.28);
  text-underline-offset: 0.18em;
  transition:
    color var(--motion-fast),
    text-decoration-color var(--motion-fast);
}

a:hover {
  color: var(--primary-strong);
  text-decoration-color: rgba(54, 72, 141, 0.44);
}

img {
  max-width: 100%;
  height: auto;
}

nav {
  position: sticky;
  top: 0;
  z-index: 1000;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem;
  padding: 0.65rem 0.9rem;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.7),
      rgba(241, 245, 251, 0.78) 72%
    ),
    var(--bg-nav);
  border-bottom: 1px solid var(--outline-soft);
  box-shadow: var(--glow-subtle);
  backdrop-filter: blur(16px);
}

nav::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(85, 105, 184, 0.24), transparent);
}

.nav-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.15rem;
  margin-right: 0.2rem;
  border-radius: 14px;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-logo:hover {
  background: transparent;
  transform: none;
}

.nav-logo img {
  height: 36px;
  width: auto;
  filter: drop-shadow(0 10px 18px rgba(54, 72, 141, 0.12));
}

nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition:
    color var(--motion-fast),
    background var(--motion-fast),
    border-color var(--motion-fast),
    transform var(--motion-fast),
    box-shadow var(--motion-fast);
}

nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--outline-soft);
  transform: translateY(-1px);
  box-shadow: var(--glow-subtle);
}

nav a.active {
  color: var(--primary-strong);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(232, 238, 252, 0.9)),
    var(--surface-widget);
  border-color: var(--outline-strong);
  box-shadow: var(--glow-subtle);
}

/* Dropdown nav */
.nav-item {
  position: relative;
}

.nav-item > a {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.nav-item > a::after {
  content: none;
}

.nav-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 200px;
  background: rgba(255,255,255,0.97);
  border: 1px solid var(--outline-soft);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(54,72,141,0.13);
  padding: 0.5rem 0;
  z-index: 2000;
  backdrop-filter: blur(16px);
}

.nav-dropdown::before {
  content: '';
  position: absolute;
  top: -0.5rem;
  left: 0;
  right: 0;
  height: 0.5rem;
}

.nav-item:hover .nav-dropdown,
.nav-item:focus-within .nav-dropdown,
.nav-item.open .nav-dropdown {
  display: block;
}

.nav-dropdown a {
  display: block;
  padding: 0.5rem 1.1rem;
  border-radius: 0;
  border: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}

.nav-dropdown a:hover {
  background: var(--surface-hover);
  color: var(--primary-strong);
  transform: none;
  box-shadow: none;
  border: none;
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 3.25rem 1.6rem 5rem;
}

main > h1 {
  margin-bottom: 2.8rem;
}

section {
  position: relative;
  margin-bottom: 4rem;
  scroll-margin-top: 6.5rem;
}

body:not(.home-page) section > p,
body:not(.home-page) section > ol,
body:not(.home-page) section > ul,
body:not(.home-page) section > pre,
body:not(.home-page) section > .card,
body:not(.home-page) section > .comparison-caption,
body:not(.home-page) section > .cards-outer,
body:not(.home-page) section > .flow-diagram {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

h1 {
  background: linear-gradient(135deg, #243d82 0%, #5a73c2 55%, #9eb0df 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 1.05;
  padding-bottom: 0.08em;
  overflow: visible;
  text-align: center;
}

h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 1.4rem;
  padding-bottom: 0.7rem;
  color: var(--text);
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 600;
}

h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 72%;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary), rgba(137, 160, 216, 0.55), transparent);
}

h3 {
  margin-bottom: 0.75rem;
  color: var(--primary-strong);
  font-size: 1.16rem;
  font-weight: 600;
}

p,
li {
  color: var(--text);
  font-size: 1rem;
}

p {
  margin-bottom: 1rem;
}

ol,
ul {
  margin-bottom: 1.1rem;
  padding-left: 1.35rem;
}

li + li {
  margin-top: 0.5rem;
}

strong {
  color: var(--text);
}

main img {
  display: block;
  margin-top: 1rem;
  border: 1px solid var(--outline-soft);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 247, 252, 0.92));
  box-shadow: var(--shadow-soft), var(--glow-subtle);
}

.card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 252, 0.92)),
    var(--surface-elevated);
  border: 1px solid var(--outline-soft);
  border-radius: 22px;
  padding: 1.7rem;
  box-shadow: var(--shadow-soft), var(--glow-subtle);
  backdrop-filter: blur(14px);
  transition:
    transform var(--motion-fast),
    box-shadow var(--motion-medium),
    border-color var(--motion-fast);
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--outline-strong);
  box-shadow: var(--shadow-strong), var(--glow-subtle);
}

.card + .card {
  margin-top: 1rem;
}

/* ===== home ===== */
.home-page main {
  padding-top: 2.8rem;
}

.home-page h1 {
  margin-bottom: 1rem;
  text-align: left;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 1.8rem;
  align-items: stretch;
  margin-bottom: 3.6rem;
}

.hero-copy {
  padding-top: 0.2rem;
}

.hero-kicker,
.abstract-label,
.demo-label {
  margin-bottom: 0.75rem;
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.hero-lead {
  max-width: 40rem;
  margin-bottom: 1.35rem;
  color: var(--text-muted);
  font-size: 1.08rem;
  line-height: 1.8;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.82rem;
  border: 1px solid var(--outline-soft);
  border-radius: 999px;
  background: var(--surface-widget);
  box-shadow: var(--glow-subtle);
  color: var(--primary-strong);
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.62rem 0.98rem;
  border: 1px solid var(--outline-soft);
  border-radius: 999px;
  background: var(--surface-widget);
  box-shadow: var(--glow-subtle);
  color: var(--primary-strong);
  font-weight: 600;
  text-decoration: none;
  transition:
    transform var(--motion-fast),
    border-color var(--motion-fast),
    background var(--motion-fast),
    box-shadow var(--motion-medium);
}

.hero-link:hover {
  transform: translateY(-1px);
  border-color: var(--outline-strong);
  background: var(--surface-hover);
  box-shadow: var(--shadow-soft), var(--glow-subtle);
  text-decoration: none;
}

.hero-preview {
  position: relative;
  overflow: hidden;
  padding: 1.1rem;
  background:
    radial-gradient(circle at top right, rgba(85, 105, 184, 0.18), transparent 44%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 243, 250, 0.94)),
    var(--surface-floating);
}

.hero-preview::before {
  content: '';
  position: absolute;
  inset: auto -5rem -5rem auto;
  width: 13rem;
  height: 13rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(85, 105, 184, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-preview-bar {
  display: flex;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.hero-preview-bar span {
  width: 0.72rem;
  height: 0.72rem;
  border-radius: 50%;
  background: rgba(85, 105, 184, 0.22);
}

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

.hero-preview-label {
  margin-bottom: 0.5rem;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.hero-preview-title {
  display: block;
  margin-bottom: 1rem;
  padding-bottom: 0;
  border: none;
  font-size: 1.55rem;
  line-height: 1.22;
}

.hero-preview-title::after {
  display: none;
}

.hero-mode-list {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.8rem;
}

.hero-mode-list li {
  margin-top: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--outline-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--glow-subtle);
}

.hero-mode-list span {
  display: block;
  margin-bottom: 0.18rem;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--primary-strong);
}

.hero-mode-list strong {
  display: block;
  line-height: 1.45;
}

.hero-mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.hero-mini-card {
  padding: 0.95rem 1rem;
  border: 1px solid var(--outline-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
}

.hero-mini-card p {
  margin-bottom: 0.28rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.hero-mini-card strong {
  display: block;
  font-size: 0.94rem;
  line-height: 1.45;
}

.section-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 1rem;
  margin-bottom: 1.35rem;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-intro {
  max-width: 38rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

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

.abstract-card {
  height: 100%;
  padding: 1.45rem;
}

.abstract-card p:last-child {
  margin-bottom: 0;
}

.demo-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(260px, 0.92fr);
  gap: 1.5rem;
  align-items: stretch;
}

.demo-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.demo-copy h3 {
  margin: 0 0 0.75rem;
  color: var(--text);
  font-size: 1.42rem;
  line-height: 1.28;
}

.demo-copy p:last-child {
  margin-bottom: 0;
}

.demo-poster {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.demo-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 54px -32px rgba(36, 61, 130, 0.58);
  background: #111826;
}

.demo-video-player {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #111826;
}

.demo-link {
  margin: 0;
  font-size: 0.94rem;
  color: var(--text-muted);
}

.demo-link a {
  color: var(--accent-strong);
  text-decoration: none;
}

.demo-link a:hover,
.demo-link a:focus-visible {
  text-decoration: underline;
}

.team-section-intro {
  margin-bottom: 1.5rem;
}

.team-section-summary {
  max-width: 44rem;
  margin: -0.25rem 0 1.45rem;
  color: var(--text-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  max-width: 1040px;
  margin: 0 auto;
}

.team-member {
  flex: 0 1 300px;
  max-width: 300px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(239, 243, 250, 0.94)),
    var(--surface-floating);
  border: 1px solid var(--outline-soft);
  border-radius: 24px;
  padding: 1.85rem 1.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow-soft), var(--glow-subtle);
  transition:
    transform var(--motion-fast),
    box-shadow var(--motion-medium),
    border-color var(--motion-fast);
}

.team-member:hover {
  transform: translateY(-2px);
  border-color: var(--outline-strong);
  box-shadow: var(--shadow-strong), var(--glow-subtle);
}

.team-member img {
  width: 108px;
  height: 108px;
  margin-top: 0;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--outline-strong);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(232, 238, 252, 0.96));
  box-shadow: 0 12px 26px -18px rgba(36, 61, 130, 0.48);
}

.team-member h3 {
  margin-bottom: 0;
}

.team-role {
  margin-bottom: 0;
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.team-bio {
  margin-bottom: 0;
  flex-grow: 1;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.62;
}

.team-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.3rem;
}

.team-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.52rem 0.88rem;
  border-radius: 999px;
  border: 1px solid var(--outline-soft);
  background: var(--surface-widget);
  color: var(--primary-strong);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: var(--glow-subtle);
  transition:
    transform var(--motion-fast),
    box-shadow var(--motion-medium),
    border-color var(--motion-fast),
    background var(--motion-fast);
}

.team-link:hover {
  transform: translateY(-1px);
  border-color: var(--outline-strong);
  background: var(--surface-hover);
  box-shadow: var(--shadow-soft), var(--glow-subtle);
  text-decoration: none;
}

.team-link-icon {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), #8ba2db);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 16px -14px rgba(36, 61, 130, 0.72);
}

.video-container {
  overflow: hidden;
  border: 1px solid var(--outline-soft);
  border-radius: 22px;
  box-shadow: var(--shadow-soft), var(--glow-subtle);
}

.video-container video {
  width: 100%;
  display: block;
}

#gantt img {
  width: 100%;
}

.gantt-wrapper {
  overflow-x: auto;
  padding: 1.4rem;
  border: 1px solid var(--outline-soft);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(239, 243, 250, 0.9)),
    var(--surface-floating);
  box-shadow: var(--shadow-soft), var(--glow-subtle);
}

.gantt-table {
  min-width: 920px;
  width: 100%;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.gantt-table th,
.gantt-table td {
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
}

.gantt-month-header th {
  padding: 0.45rem 0 0.55rem !important;
  border-bottom: 1px solid var(--outline-soft);
  color: var(--text-muted) !important;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}

.gantt-week-header th {
  padding: 0.38rem 0 !important;
  border-bottom: 1px solid rgba(216, 225, 239, 0.8);
  color: var(--text-muted) !important;
  font-family: var(--font-code);
  font-size: 0.7rem;
  font-weight: 400;
  text-align: center;
}

.gantt-task-col {
  min-width: 190px;
  text-align: left !important;
  padding-right: 1rem !important;
}

.gantt-table tbody tr {
  border-bottom: 1px dashed rgba(134, 149, 180, 0.28);
}

.gantt-table tbody td {
  height: 46px;
  padding: 6px 2px;
  border-left: 1px dashed rgba(134, 149, 180, 0.22);
}

.gantt-table tbody td:first-child {
  border-left: none;
}

.gantt-label {
  padding-right: 1.15rem !important;
  border-left: none !important;
  white-space: nowrap;
  color: var(--text);
  font-size: 0.87rem;
  font-weight: 600;
}

.gbar {
  width: 100%;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76), 0 8px 18px -16px rgba(15, 23, 42, 0.56);
}

.gbar-purple { background: linear-gradient(135deg, #d9d1fb, #baaef5); }
.gbar-blue   { background: linear-gradient(135deg, #a7c8f6, #7baeee); }
.gbar-teal   { background: linear-gradient(135deg, #b3e1d9, #8dcfc2); }
.gbar-peach  { background: linear-gradient(135deg, #f8d7b7, #efbd8f); }
.gbar-green  { background: linear-gradient(135deg, #b4dfc2, #86c59f); }
.gbar-navy   { background: linear-gradient(135deg, #7895cc, #4f70b6); }

.gantt-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--outline-soft);
  border-radius: 999px;
  background: var(--surface-widget);
  box-shadow: var(--glow-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
}

.legend-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

table {
  width: 100%;
  margin: 1rem 0 2rem;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border: 1px solid var(--outline-soft);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 247, 252, 0.92)),
    var(--surface-elevated);
  box-shadow: var(--shadow-soft), var(--glow-subtle);
}

th {
  padding: 0.95rem 1rem;
  background: linear-gradient(180deg, var(--primary-strong), var(--primary));
  color: #fff;
  text-align: left;
  font-family: var(--font-code);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

td {
  padding: 0.95rem 1rem;
  border-bottom: 1px solid rgba(216, 225, 239, 0.86);
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  vertical-align: top;
}

tbody tr:nth-child(even) td {
  background: rgba(248, 250, 254, 0.88);
}

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

tr:hover td {
  background: rgba(232, 238, 252, 0.72);
}

td.yes {
  background: var(--success-bg) !important;
  color: var(--success-text);
  font-weight: 700;
}

td.no {
  background: var(--danger-bg) !important;
  color: var(--danger-text);
  font-weight: 700;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.38rem 0.72rem;
  min-height: 1.9rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-code);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.04em;
  text-align: center;
  vertical-align: middle;
  text-transform: uppercase;
}

.badge-must {
  color: var(--primary-strong);
  background: rgba(85, 105, 184, 0.14);
  border-color: rgba(85, 105, 184, 0.2);
}

.badge-should {
  color: #2f5f85;
  background: rgba(67, 135, 194, 0.13);
  border-color: rgba(67, 135, 194, 0.2);
}

.badge-could {
  color: var(--warning-text);
  background: var(--warning-bg);
  border-color: rgba(197, 126, 18, 0.2);
}

.badge-wont {
  color: var(--danger-text);
  background: var(--danger-bg);
  border-color: rgba(188, 73, 61, 0.2);
}

.comparison-caption {
  margin-top: -0.9rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.manual-screenshot {
  display: block;
  width: min(100%, 880px);
  margin: 0.9rem auto 0;
  border-radius: 18px;
  border: 1px solid var(--outline-strong);
  box-shadow: var(--shadow-strong), var(--glow-subtle);
  background: rgba(255, 255, 255, 0.9);
}

.manual-screenshot + .comparison-caption {
  max-width: 880px;
  margin: 0.85rem auto 0;
}

.wireframe-frame {
  display: block;
  width: 100%;
  margin-top: 0.9rem;
  overflow: hidden;
  border: 1px solid var(--outline-strong);
  border-radius: 18px;
  box-shadow: var(--shadow-strong), var(--glow-subtle);
  background: #0d1117;
  height: 586px;
}

.wireframe-embed {
  display: block;
  width: 1380px;
  height: 880px;
  border: 0;
  transform-origin: top left;
  transform: scale(0.665);
}

.evolution-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.evolution-card {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--outline-soft);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: var(--shadow-soft);
}

.evolution-image {
  display: block;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--outline-strong);
  box-shadow: var(--shadow-strong), var(--glow-subtle);
  background: rgba(255, 255, 255, 0.92);
}

.evolution-caption {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.evolution-caption strong {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--text);
}

.uc-block {
  margin-bottom: 1.8rem;
}

.uc-label {
  width: 14rem;
  font-family: var(--font-code);
  font-size: 0.8rem;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  background: rgba(243, 246, 251, 0.9) !important;
}

.uc-flow ol {
  margin-bottom: 0;
  padding-left: 1.2rem;
}

pre {
  margin: 1rem 0 1.5rem;
  padding: 1.35rem 1.45rem;
  overflow-x: auto;
  border: 1px solid var(--outline-soft);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 243, 250, 0.9)),
    var(--surface-subtle);
  box-shadow: var(--glow-subtle);
}

code {
  font-family: var(--font-code);
  font-size: 0.92rem;
  color: var(--primary-strong);
}

pre code {
  color: var(--text);
}

footer {
  margin-top: 4rem;
  padding: 2.4rem 1.5rem 2rem;
  text-align: center;
  border-top: 1px solid var(--outline-soft);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(239, 243, 250, 0.88)),
    var(--surface-subtle);
  backdrop-filter: blur(14px);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.4rem;
}

.footer-links a,
.footer-links span {
  display: inline-flex;
  align-items: center;
  padding: 0.62rem 0.98rem;
  border: 1px solid var(--outline-soft);
  border-radius: 999px;
  background: var(--surface-widget);
  box-shadow: var(--glow-subtle);
  color: var(--primary-strong);
  font-weight: 600;
  text-decoration: none;
}

.footer-links a:hover {
  background: var(--surface-hover);
  border-color: var(--outline-strong);
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.35rem;
  margin-bottom: 1.45rem;
}

.footer-logos a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
}

.footer-logos img {
  height: 42px;
  width: auto;
  margin-top: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  object-fit: contain;
  opacity: 0.88;
  filter: saturate(0.88) contrast(1.02) brightness(0.98);
  transition:
    opacity var(--motion-fast),
    filter var(--motion-fast);
}

.footer-logos img:hover {
  opacity: 1;
  filter: saturate(1) contrast(1.05) brightness(1);
}

.footer-logos .footer-logo-wordmark {
  color: #57afe6;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

footer p {
  color: var(--text-muted);
  font-size: 0.86rem;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(104, 116, 139, 0.38);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(104, 116, 139, 0.58);
  border: 2px solid transparent;
  background-clip: content-box;
}

.fade-in {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity var(--motion-medium),
    transform var(--motion-medium);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.code-figure {
  margin: 1.5rem 0;
  text-align: center;
}
.code-figure img {
  display: block;
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  border-radius: 8px;
}
.code-figure figcaption {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

@media (max-width: 960px) {
  main {
    padding-inline: 1.15rem;
  }

  .hero-panel,
  .demo-card {
    grid-template-columns: 1fr;
  }
  nav {
    padding: 0.85rem 1rem;
  }

  .team-grid {
    gap: 1.2rem;
  }

  .wireframe-frame {
    height: 500px;
  }

  .wireframe-embed {
    transform: scale(0.565);
  }

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

@media (max-width: 768px) {
  nav {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }

  .nav-logo {
    width: 100%;
    margin-right: 0;
  }

  .nav-logo img {
    margin: 0 auto;
  }

  nav a {
    font-size: 0.78rem;
    padding: 0.35rem 0.55rem;
  }

  main {
    padding: 2.4rem 1rem 4rem;
  }

  h1 {
    font-size: clamp(2.5rem, 14vw, 3.4rem);
  }

  .home-page h1 {
    text-align: left;
  }
  section {
    margin-bottom: 3rem;
  }

  .card,
  .team-member,
  .gantt-wrapper {
    padding: 1.3rem;
  }

  .team-member {
    flex-basis: 100%;
    max-width: none;
  }

  .abstract-grid,
  .hero-mini-grid {
    grid-template-columns: 1fr;
  }

  .wireframe-frame {
    height: 395px;
  }

  .wireframe-embed {
    transform: scale(0.445);
  }

  .evolution-card {
    padding: 0.85rem;
  }

  .hero-links {
    gap: 0.65rem;
  }

  .hero-link {
    width: 100%;
  }

  .section-heading {
    align-items: flex-start;
  }
  .uc-label {
    width: auto;
  }
}

/* Flow Diagram */
.flow-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin: 2rem auto;
  max-width: 600px;
}
.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.flow-step--split {
  flex-direction: row;
  justify-content: center;
  gap: 1.5rem;
}
.flow-box {
  background: #f0f2fa;
  border: 2px solid #2d3a7c;
  border-radius: 10px;
  padding: 0.85rem 1.5rem;
  text-align: center;
  font-weight: 600;
  color: #1a2260;
  width: 100%;
  max-width: 420px;
  font-size: 0.95rem;
}
.flow-box small {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  color: #555;
  margin-top: 0.25rem;
}
.flow-box--primary {
  background: #2d3a7c;
  color: #fff;
  border-color: #2d3a7c;
}
.flow-box--primary small {
  color: #c5cce8;
}
.flow-box--secondary {
  background: #e8eaf6;
  max-width: 180px;
  font-size: 0.88rem;
}
.flow-arrow {
  font-size: 1.5rem;
  color: #2d3a7c;
  line-height: 1.2;
  padding: 0.15rem 0;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}


.uc-block { display: none; }
.cards-outer { padding: 1.5rem 0; overflow: hidden; }
.cards-header { display: flex; align-items: center; justify-content: flex-end; margin-bottom: 1rem; }
.cards-track-wrap { overflow: hidden; }
.cards-track { display: flex; gap: 16px; transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.cards-track .card { min-width: 260px; width: min(90vw, 760px); flex-shrink: 0; box-sizing: border-box; }
.nav-btn:disabled { opacity: 0.3; cursor: default; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 1rem; }
.dot { width: 6px; height: 6px; border-radius: 50%; cursor: pointer; transition: width 0.2s; }
.dot.active { width: 18px; border-radius: 3px; }
.cards-track-wrap { overflow: hidden; }
.card-row { display: flex; gap: 8px; }
.card-row .card-label { flex-shrink: 0; }
.nav-btn { width: 44px; height: 44px; font-size: 22px; }
