:root {
  color-scheme: dark;
  --bg: #0f1319;
  --bg-subtle: #161c26;
  --surface: #1a222d;
  --surface-raised: #212b38;
  --border: #2a3544;
  --border-strong: #38485c;
  --text: #f8fafc;
  --text-secondary: #e2e8f0;
  --text-muted: #cbd5e1;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-hover: #93c5fd;
  --accent-soft: rgba(96, 165, 250, 0.15);
  --accent-line: #60a5fa;
  --detect: #4ade80;
  --detect-soft: rgba(74, 222, 128, 0.14);
  --search: #38bdf8;
  --search-soft: rgba(56, 189, 248, 0.14);
  --analyze: #818cf8;
  --analyze-soft: rgba(129, 140, 248, 0.14);
  --review: #f59e0b;
  --review-soft: rgba(245, 158, 11, 0.14);
  --flowcount: #06b6d4;
  --flowcount-soft: rgba(6, 182, 212, 0.14);
  --solar: #f59e0b;
  --solar-soft: rgba(245, 158, 11, 0.14);
  --biohub: #a78bfa;
  --biohub-soft: rgba(167, 139, 250, 0.16);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.45);
  --radius: 10px;
  --radius-lg: 14px;
  --font-sans: "Inter", "Noto Sans JP", "Hiragino Sans", "Yu Gothic UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "Cascadia Code", "Consolas", monospace;
  --max-width: 1080px;
  --header-height: 64px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 20px);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: min(var(--max-width), 92vw);
  margin: 0 auto;
}

/* ── Top navigation ── */

.top-nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 100;
  height: var(--header-height);
  background: rgba(15, 19, 25, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
}

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

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

.nav-brand:hover {
  color: var(--text);
}

.nav-logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 4px;
  background: #ffffff;
  border: 2.5px solid #e60012;
  color: #e60012;
  font-size: 0.95rem;
  font-weight: 900;
  letter-spacing: -0.04em;
  box-sizing: border-box;
}

.nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.nav-title span {
  color: var(--text-muted);
  font-weight: 400;
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.nav-link-tech {
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link-tech:hover {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.nav-badge {
  padding: 0.25rem 0.65rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ── Hero ── */

.hero {
  padding: 3.25rem 0 2.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 2.25rem 2.5rem;
  align-items: center;
}

.hero-eyebrow {
  margin: 0 0 0.85rem;
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(2.15rem, 4.5vw, 2.85rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.15;
  color: var(--text);
}

.hero-brand-sub {
  margin-left: 0.35rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: var(--text-secondary);
}

.hero-tagline {
  margin: 0 0 1rem;
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--text);
}

.hero-lead {
  margin: 0 0 1.15rem;
  max-width: 34rem;
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.75;
}

.hero-audience {
  margin: 0 0 0.85rem;
  max-width: 36rem;
  font-size: 0.82rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0 0 1.25rem;
}

.hero-points {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
}

.hero-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

.hero-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.hero-visual {
  margin: 0;
  position: relative;
}

.hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  padding: 0.5rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-md);
  background: var(--bg-subtle);
}

.hero-mosaic-tile {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.hero-mosaic-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-mosaic-label {
  position: absolute;
  left: 0.5rem;
  bottom: 0.5rem;
  padding: 0.22rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-family: var(--font-mono);
  background: rgba(15, 19, 25, 0.72);
  border: 1px solid var(--border);
  color: var(--text-secondary);
}

.hero-mosaic-tile[data-badge="solar"] .hero-mosaic-label {
  color: var(--solar);
  border-color: rgba(224, 164, 88, 0.4);
}
.hero-mosaic-tile[data-badge="analyze"] .hero-mosaic-label {
  color: var(--analyze);
  border-color: rgba(129, 140, 248, 0.4);
}
.hero-mosaic-tile[data-badge="search"] .hero-mosaic-label {
  color: var(--search);
  border-color: rgba(56, 189, 248, 0.4);
}
.hero-mosaic-tile[data-badge="review"] .hero-mosaic-label {
  color: var(--review);
  border-color: rgba(245, 158, 11, 0.4);
}

.hero-visual-caption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.hero-visual-caption span {
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-family: var(--font-mono);
  transition: all 0.18s ease;
}

.hero-visual-caption span[data-badge="detect"] {
  color: var(--detect);
  border-color: rgba(74, 222, 128, 0.4);
  background: var(--detect-soft);
}
.hero-visual-caption span[data-badge="search"] {
  color: var(--search);
  border-color: rgba(56, 189, 248, 0.4);
  background: var(--search-soft);
}
.hero-visual-caption span[data-badge="solar"] {
  color: var(--solar);
  border-color: rgba(224, 164, 88, 0.4);
  background: var(--solar-soft);
}
.hero-visual-caption span[data-badge="biohub"] {
  color: var(--biohub);
  border-color: rgba(167, 139, 250, 0.4);
  background: var(--biohub-soft);
}
.hero-visual-caption span[data-badge="analyze"] {
  color: var(--analyze);
  border-color: rgba(129, 140, 248, 0.4);
  background: var(--analyze-soft);
}
.hero-visual-caption span[data-badge="review"] {
  color: var(--review);
  border-color: rgba(245, 158, 11, 0.4);
  background: var(--review-soft);
}
.hero-visual-caption span[data-badge="flowcount"] {
  color: var(--flowcount);
  border-color: rgba(6, 182, 212, 0.4);
  background: var(--flowcount-soft);
}

.launch-hint {
  margin-top: 1.75rem;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.launch-hint summary {
  cursor: pointer;
  font-weight: 560;
  color: var(--text-secondary);
  list-style: none;
}

.launch-hint summary::-webkit-details-marker {
  display: none;
}

.launch-hint summary::after {
  content: "＋";
  float: right;
  color: var(--text-muted);
  font-weight: 500;
}

.launch-hint[open] summary::after {
  content: "−";
}

.launch-hint p {
  margin: 0.75rem 0 0.15rem;
  line-height: 1.65;
}

.launch-hint code {
  padding: 0.15rem 0.45rem;
  border-radius: 5px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--accent);
}

/* ── Choose (purpose-first) ── */

.choose-section {
  padding-top: 2.25rem;
  padding-bottom: 1.5rem;
}

.choose-header .section-desc {
  max-width: 36rem;
}

.choose-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-subtle);
  overflow: hidden;
}

.choose-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem 1.25rem;
  padding: 1.15rem 1.35rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  background: transparent;
  transition: background 0.15s ease;
}

.choose-item:last-child {
  border-bottom: none;
}

.choose-item:hover {
  background: var(--surface);
}

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

.choose-index {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  min-width: 1.75rem;
}

.choose-body {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
}

.choose-goal {
  font-size: clamp(1.08rem, 1.7vw, 1.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.4;
  color: var(--text);
}

.choose-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.85rem;
}

.choose-module {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding-left: 0.65rem;
  border-left: 2px solid var(--border-strong);
}

.choose-hint {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.45;
}

.choose-arrow {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.choose-arrow svg {
  width: 14px;
  height: 14px;
}

.choose-item:hover .choose-arrow {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--surface-raised);
}

.choose-item[data-module="detect"] .choose-module {
  color: var(--detect);
  border-left-color: var(--detect);
}

.choose-item[data-module="search"] .choose-module {
  color: var(--search);
  border-left-color: var(--search);
}

.choose-item[data-module="analyze"] .choose-module {
  color: var(--analyze);
  border-left-color: var(--analyze);
}

.choose-item[data-module="pv-review"] .choose-module {
  color: var(--review);
  border-left-color: var(--review);
}

.choose-item[data-module="flowcount"] .choose-module {
  color: var(--flowcount);
  border-left-color: var(--flowcount);
}

.choose-item[data-module="solar-filament"] .choose-module {
  color: var(--solar);
  border-left-color: var(--solar);
}

.choose-item[data-module="biohub"] .choose-module {
  color: var(--biohub);
  border-left-color: var(--biohub);
}

.choose-item[data-module="detect"]:hover .choose-arrow {
  color: var(--detect);
  border-color: rgba(74, 222, 128, 0.45);
  background: var(--detect-soft);
}

.choose-item[data-module="search"]:hover .choose-arrow {
  color: var(--search);
  border-color: rgba(56, 189, 248, 0.45);
  background: var(--search-soft);
}

.choose-item[data-module="analyze"]:hover .choose-arrow {
  color: var(--analyze);
  border-color: rgba(129, 140, 248, 0.45);
  background: var(--analyze-soft);
}

.choose-item[data-module="pv-review"]:hover .choose-arrow {
  color: var(--review);
  border-color: rgba(245, 158, 11, 0.45);
  background: var(--review-soft);
}

.choose-item[data-module="flowcount"]:hover .choose-arrow {
  color: var(--flowcount);
  border-color: rgba(6, 182, 212, 0.45);
  background: var(--flowcount-soft);
}

.choose-item[data-module="solar-filament"]:hover .choose-arrow {
  color: var(--solar);
  border-color: rgba(224, 164, 88, 0.45);
  background: var(--solar-soft);
}

.choose-item[data-module="biohub"]:hover .choose-arrow {
  color: var(--biohub);
  border-color: rgba(167, 139, 250, 0.45);
  background: var(--biohub-soft);
}

@media (max-width: 640px) {
  .choose-item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.65rem 0.85rem;
    padding: 1rem 1.1rem;
  }

  .choose-arrow {
    display: none;
  }

  .choose-goal {
    font-size: 1rem;
  }
}

/* ── Sections ── */

.section {
  padding: 2.75rem 0;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section-title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}

.section-desc {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* ── Use case tabs ── */

.usecase-tabs {
  position: relative;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  width: 100%;
  max-width: 100%;
  margin-bottom: 0.75rem;
  padding: 0.45rem;
  border-radius: var(--radius);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  box-sizing: border-box;
}

.usecase-tab {
  appearance: none;
  position: relative;
  z-index: 1;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 0.65rem 0.95rem;
  border-radius: 8px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, border-color 0.15s;
  white-space: nowrap;
  pointer-events: auto;
  min-height: 2.5rem;
}

.usecase-tab:hover {
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--surface-raised) 55%, transparent);
}

.usecase-tab.is-active {
  color: var(--text);
  background: var(--surface-raised);
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
}

.usecase-summary-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
}

.usecase-summary {
  position: relative;
  z-index: 0;
  flex: 1 1 16rem;
  margin: 0;
  padding: 0.7rem 0.95rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.45;
}

#usecase-primary-action[hidden] {
  display: none !important;
}

@keyframes use-case-pulse {
  0% {
    box-shadow: var(--shadow-md);
  }
  40% {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-line) 45%, transparent), var(--shadow-md);
  }
  100% {
    box-shadow: var(--shadow-md);
  }
}

.module-card.is-use-case-pulse {
  animation: use-case-pulse 0.7s ease-out;
}

/* ── Module cards ── */

.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.25rem;
}

.module-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s, opacity 0.25s;
  scroll-margin-top: calc(var(--header-height) + 20px);
}

.module-card:hover {
  box-shadow: var(--shadow-md);
}

.module-card.is-dimmed {
  opacity: 0.62;
}

.module-card.is-highlight {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-md);
}

.module-card.is-highlight::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-line);
}

.module-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  column-gap: 0.9rem;
  row-gap: 0;
  padding: 1.25rem 1.25rem 0;
  position: relative;
}

.module-media {
  margin: 0.85rem 1.25rem 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
  background: #0b1220;
}

.module-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.module-media--screen {
  aspect-ratio: auto;
}

.module-media--screen img {
  height: auto;
}

.module-media-link {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
}

.module-media-link .play-badge {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 5, 13, 0.30);
  transition: background 0.2s ease;
}

.module-media-link .play-badge svg {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.88);
  padding: 18px;
  padding-left: 22px;
  color: #05050d;
  opacity: 0.9;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.module-media-link:hover .play-badge,
.module-media-link:focus-visible .play-badge {
  background: rgba(5, 5, 13, 0.5);
}

.module-media-link:hover .play-badge svg,
.module-media-link:focus-visible .play-badge svg {
  transform: scale(1.12);
  opacity: 1;
  background: #38bdf8;
}

.module-card-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.35rem;
  flex: 0 1 auto;
  max-width: none;
  margin-left: auto;
}

.module-recommended {
  display: none;
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text-muted);
  white-space: nowrap;
}

.module-card.is-highlight .module-recommended {
  display: inline-block;
}

.module-finetuned {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  color: #8fd3a8;
  border: 1px solid rgba(74, 222, 128, 0.32);
  background: rgba(74, 222, 128, 0.07);
}

.module-beta {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  color: #c9a26a;
  border: 1px solid rgba(211, 154, 87, 0.32);
  background: rgba(211, 154, 87, 0.07);
}

.chip.chip-finetuned {
  color: #8fd3a8;
  border-color: rgba(74, 222, 128, 0.3);
  background: rgba(74, 222, 128, 0.06);
}

.module-status {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-subtle);
  white-space: nowrap;
}

.module-status.is-online {
  color: #8fd3a8;
  border-color: rgba(74, 222, 128, 0.32);
  background: rgba(74, 222, 128, 0.07);
}

.module-status.is-offline {
  color: #e09595;
  border-color: rgba(248, 113, 113, 0.3);
  background: rgba(248, 113, 113, 0.07);
}

.module-status.is-degraded {
  color: #d9ba7d;
  border-color: rgba(252, 211, 77, 0.3);
  background: rgba(252, 211, 77, 0.07);
}

.module-status.is-desktop {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--bg-subtle);
}

.module-badge {
  grid-column: 1;
  grid-row: 1;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-top: 0.1rem;
}

.module-card[data-module="detect"] .module-badge {
  background: var(--detect-soft);
  color: var(--detect);
  border: 1px solid rgba(74, 222, 128, 0.35);
}

.module-card[data-module="search"] .module-badge {
  background: var(--search-soft);
  color: var(--search);
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.module-card[data-module="analyze"] .module-badge {
  background: var(--analyze-soft);
  color: var(--analyze);
  border: 1px solid rgba(129, 140, 248, 0.35);
}

.module-card[data-module="pv-review"] .module-badge {
  background: var(--review-soft);
  color: var(--review);
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.module-card[data-module="flowcount"] .module-badge {
  background: var(--flowcount-soft);
  color: var(--flowcount);
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.module-card[data-module="solar-filament"] .module-badge {
  background: var(--solar-soft);
  color: var(--solar);
  border: 1px solid rgba(224, 164, 88, 0.35);
}

.module-card[data-module="biohub"] .module-badge {
  background: var(--biohub-soft);
  color: var(--biohub);
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.module-heading {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.module-title-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.module-name {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.25;
}

.module-sub {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-muted);
  overflow-wrap: normal;
  word-break: normal;
  line-break: strict;
}

.module-genre {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.genre-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.18rem 0.5rem;
  border-radius: 4px;
  white-space: nowrap;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--font-mono);
}

.module-body {
  padding: 0.95rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}

.module-desc {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.module-pitch {
  margin: 0;
  padding: 0.65rem 0.8rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  font-size: 0.88rem;
  font-weight: 560;
  line-height: 1.5;
  color: var(--text);
}


.module-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.chip {
  font-size: 0.72rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 5px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-mono);
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  margin-top: auto;
}

.module-sub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* author の display:flex が [hidden] の display:none を上書きしてしまうのを防ぐ */
.module-sub-actions[hidden] {
  display: none !important;
}

.module-card .launch-hint {
  margin: 0 1.35rem 1.35rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
  color: #0f1319;
  background: var(--accent);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: #0f1319;
}

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

.btn-secondary:hover {
  background: var(--surface-raised);
  color: var(--text);
}

.btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.85;
}

/* ── Workflow ── */

.workflow-panel {
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin: 1.5rem 0 0;
  padding: 0;
  list-style: none;
  position: relative;
}

.workflow-steps::before {
  content: "";
  position: absolute;
  top: 28px;
  left: 16.66%;
  right: 16.66%;
  height: 1px;
  background: var(--border-strong);
  z-index: 0;
}

.workflow-step {
  position: relative;
  z-index: 1;
  padding: 0 1rem;
  text-align: center;
}

.step-indicator {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--border-strong);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
}

.workflow-step:nth-child(1) .step-indicator { border-color: var(--search); background: var(--search-soft); }
.workflow-step:nth-child(2) .step-indicator { border-color: var(--text-muted); background: var(--bg-subtle); color: var(--text-secondary); }
.workflow-step:nth-child(3) .step-indicator { border-color: var(--analyze); background: var(--analyze-soft); color: var(--analyze); }

.workflow-step strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

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

.workflow-step .step-num {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.workflow-note {
  margin: 1.5rem 0 0;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent-line);
  background: var(--accent-soft);
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.workflow-panel.is-hidden {
  display: none;
}

/* ── Principles block ── */

.principles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.principle-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.principle-card h3 {
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.principle-card p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
}


/* ── Adoption ── */

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

.adoption-card {
  padding: 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
}

.adoption-card h3 {
  margin: 0 0 0.55rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}

.adoption-card p,
.adoption-card li {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.adoption-card ul {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.35rem;
}

.adoption-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1rem;
}

@media (max-width: 900px) {
  .adoption-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Footer ── */

.site-footer {
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.footer-inner a {
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
}

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

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  justify-content: center;
}

.footer-nav a[aria-current="page"] {
  color: var(--text);
}

/* ── Legal / credits pages ── */

.legal-page {
  padding: 2.5rem 0 3rem;
}

.legal-doc {
  max-width: 48rem;
}

.legal-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.legal-doc h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.75rem, 3vw, 2.1rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--text);
}

.legal-meta {
  margin: 0 0 1.75rem;
  font-size: 1.05rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.legal-doc h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.legal-doc p,
.legal-doc li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.legal-doc ul {
  margin: 0.5rem 0 1rem;
  padding-left: 1.25rem;
}

.legal-doc a {
  color: var(--accent-hover, var(--accent));
}

.legal-callout {
  margin: 1rem 0 1.5rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-subtle);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.contact-email-box {
  margin: 1.5rem 0 1.75rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--border-strong, var(--border));
  border-radius: var(--radius-lg, 12px);
  background: var(--surface, var(--bg-subtle));
}

.contact-email-label {
  margin: 0 0 0.35rem !important;
  font-size: 0.9rem !important;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted) !important;
}

.contact-email {
  margin: 0 0 0.65rem !important;
  font-size: 1.35rem !important;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.4 !important;
  color: var(--text) !important;
}

.contact-email a {
  color: var(--accent-hover, var(--accent));
  text-decoration: none;
  word-break: break-all;
}

.contact-email a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.contact-email-hint {
  margin: 0 !important;
  font-size: 0.98rem !important;
  color: var(--text-secondary) !important;
}

.legal-back {
  margin-top: 2.5rem;
}

.credits-table-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1.25rem;
}

.credits-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.credits-table th,
.credits-table td {
  border-bottom: 1px solid var(--border);
  padding: 0.75rem 0.65rem;
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.credits-table th {
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.credits-table td strong {
  color: var(--text);
}

/* ── FAQ ── */

.faq-doc {
  max-width: 48rem;
}

.faq-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-subtle);
}

.faq-toc a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-hover, var(--accent));
  text-decoration: none;
}

.faq-toc a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.faq-item {
  margin: 0 0 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem 1.2rem;
  font-size: 1.08rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "＋";
  float: right;
  color: var(--text-secondary);
  font-weight: 500;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-answer {
  padding: 0 1.2rem 1.15rem;
  border-top: 1px solid var(--border);
}

.faq-answer p,
.faq-answer li {
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.faq-answer ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.faq-answer p:first-child {
  margin-top: 0.95rem;
}

/* ── Pipeline runner ── */

.pipeline-runner {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
}

.pipeline-runner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.pipeline-runner-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.pipeline-runner-desc {
  margin: 0 0 1.25rem;
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.pipeline-orchestrator-status,
.pipeline-phoenix-status {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  background: var(--bg-subtle);
}

.pipeline-orchestrator-status.is-online,
.pipeline-phoenix-status.is-online {
  color: var(--detect);
  border-color: rgba(109, 184, 146, 0.35);
  background: var(--detect-soft);
}

.pipeline-orchestrator-status.is-offline,
.pipeline-phoenix-status.is-offline {
  color: #c97a7a;
  border-color: rgba(201, 122, 122, 0.35);
  background: rgba(201, 122, 122, 0.1);
}

.pipeline-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

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

.field-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.field-input {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.field-input:focus {
  outline: 2px solid rgba(91, 159, 212, 0.35);
  border-color: var(--accent);
}

.field-file {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.field-preview {
  margin-top: 0.35rem;
  max-width: 100%;
  max-height: 140px;
  border-radius: 8px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--bg-subtle);
}

.field-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.pipeline-actions {
  display: flex;
  gap: 0.5rem;
}

.pipeline-error {
  margin: 1rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(201, 122, 122, 0.35);
  background: rgba(201, 122, 122, 0.1);
  color: #e8b4b4;
  font-size: 0.86rem;
}

.pipeline-result {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}

.pipeline-result.is-success {
  border-color: rgba(109, 184, 146, 0.35);
}

.pipeline-result.is-partial {
  border-color: rgba(245, 158, 11, 0.35);
}

.pipeline-result.is-failed {
  border-color: rgba(201, 122, 122, 0.35);
}

.pipeline-result-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.pipeline-result-badge {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  color: var(--text);
}

.pipeline-result.is-success .pipeline-result-badge {
  color: var(--detect);
  border-color: rgba(109, 184, 146, 0.35);
}

.pipeline-result-message {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

.pipeline-result-meta {
  margin: 0 0 0.75rem;
  padding: 0.75rem;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  overflow-x: auto;
}

.pipeline-notices {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin: 0.6rem 0 0.75rem;
}

.pipeline-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  line-height: 1.5;
}

.pipeline-notice-badge {
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pipeline-notice.is-fallback,
.pipeline-notice.is-degraded {
  border-color: rgba(211, 154, 87, 0.45);
  background: rgba(211, 154, 87, 0.08);
}

.pipeline-notice.is-default {
  border-color: rgba(105, 158, 204, 0.4);
  background: rgba(105, 158, 204, 0.08);
}

.pipeline-notice.is-skipped {
  opacity: 0.72;
}

.pipeline-result-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pipeline-step-item {
  display: grid;
  grid-template-columns: 5rem 5.5rem 1fr;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.pipeline-step-item.is-success .pipeline-step-state {
  color: var(--detect);
}

.pipeline-step-item.is-failed .pipeline-step-state {
  color: #c97a7a;
}

.pipeline-step-item.is-fallback .pipeline-step-state,
.pipeline-step-item.is-degraded .pipeline-step-state {
  color: #d39a57;
}

.pipeline-step-item.is-default .pipeline-step-state {
  color: #699ecc;
}

.pipeline-step-item.is-skipped {
  opacity: 0.62;
}

.pipeline-step-detail {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.pipeline-step-label {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.pipeline-step-ms {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.pipeline-history {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.pipeline-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pipeline-history-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
}

.pipeline-history-empty {
  margin: 0;
  font-size: 0.84rem;
  color: var(--text-muted);
}

.pipeline-history-notice-summary {
  grid-column: 1 / -1;
  margin: 0.25rem 0 0;
  color: #d39a57;
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

.pipeline-history-details {
  grid-column: 1 / -1;
  margin-top: 0.35rem;
  color: var(--text-muted);
  font-size: 0.75rem;
}

.pipeline-history-details summary {
  cursor: pointer;
  color: var(--text-secondary);
}

.pipeline-history-details p {
  margin: 0.3rem 0 0;
}

.pipeline-history-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pipeline-history-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 0.82rem;
}

.pipeline-history-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}

.pipeline-history-status.is-success {
  color: var(--detect);
  border-color: rgba(109, 184, 146, 0.35);
}

.pipeline-history-status.is-partial {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.35);
}

.pipeline-history-status.is-failed {
  color: #c97a7a;
  border-color: rgba(201, 122, 122, 0.35);
}

.pipeline-history-query {
  margin: 0;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pipeline-history-meta {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
}

body.has-module-launch {
  overflow: hidden;
}

.module-launch-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 10, 14, 0.72);
  backdrop-filter: blur(4px);
}

.module-launch-overlay[hidden] {
  display: none;
}

.module-launch-dialog {
  width: min(100%, 28rem);
  padding: 1.35rem 1.4rem 1.2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-elevated);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.module-launch-title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
}

.module-launch-message {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.module-launch-progress-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.module-launch-progress-track {
  flex: 1;
  height: 0.45rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
}

.module-launch-progress-bar {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-line);
  transition: width 0.35s ease;
}

.module-launch-progress {
  min-width: 2.5rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}

.module-launch-steps {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.module-launch-step {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.module-launch-step-icon {
  width: 0.65rem;
  height: 0.65rem;
  margin-top: 0.28rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.module-launch-step.is-running .module-launch-step-icon {
  border-color: #5b8ec0;
  background: #5b8ec0;
  box-shadow: 0 0 0 3px rgba(91, 142, 192, 0.2);
  animation: module-launch-pulse 1.2s ease-in-out infinite;
}

.module-launch-step.is-done .module-launch-step-icon {
  border-color: var(--detect);
  background: var(--detect);
}

.module-launch-step.is-failed .module-launch-step-icon {
  border-color: #c97a7a;
  background: #c97a7a;
}

.module-launch-step.is-skipped .module-launch-step-icon {
  opacity: 0.45;
}

.module-launch-step-label {
  line-height: 1.45;
}

.module-launch-error {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  color: #e0a0a0;
}

.module-launch-hint {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
}

#module-launch-close {
  width: 100%;
}

.module-launch-open-link {
  display: block;
  width: 100%;
  margin-bottom: 0.65rem;
  text-align: center;
}

.module-launch-open-link[hidden] {
  display: none;
}

@keyframes module-launch-pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.45;
  }
}

/* ── ML Techniques: K-Fold + Ensemble ── */

.ml-tech-section {
  margin-top: 1rem;
}

.ml-tech-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.2rem 2.4rem;
  margin-bottom: 2.5rem;
  box-shadow: var(--shadow-md);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ml-tech-block:hover {
  border-color: var(--border-strong);
}

.ml-tech-heading {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.ml-tech-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(91, 159, 212, 0.3);
  border-radius: 8px;
  flex-shrink: 0;
}

.ml-tech-title {
  margin: 0 0 0.25rem;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}

.ml-tech-subtitle {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

/* ── Diagrams ── */

.ml-diagram-wrap {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem 1.25rem;
  margin-bottom: 2rem;
  overflow-x: auto;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.ml-diagram {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto;
}

.kfold-cell {
  transition: opacity 0.2s ease, filter 0.2s ease;
}

.kfold-cell:hover {
  filter: brightness(1.15);
  cursor: default;
}

.ens-model,
.ens-output {
  transition: transform 0.2s ease, filter 0.2s ease;
}

.ens-model:hover,
.ens-output:hover {
  filter: brightness(1.15);
  cursor: default;
}

/* ── Part 1 Reasons Grid ── */

.ml-reasons-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.ml-reason-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem 1.25rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.ml-reason-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
}

.ml-reason-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 6px;
  margin-bottom: 0.85rem;
}

.ml-reason-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.ml-reason-card h4 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.ml-reason-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Part 2 Ensemble Steps ── */

.ens-steps-row {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
}

.ens-step {
  flex: 1;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s ease;
}

.ens-step:hover {
  border-color: var(--border-strong);
}

.ens-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.8rem;
  height: 1.8rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--review);
  background: var(--review-soft);
  border-radius: 50%;
  flex-shrink: 0;
}

.ens-step-body strong {
  display: block;
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.ens-step-body p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.ens-step-arrow {
  display: flex;
  align-items: center;
  color: var(--text-muted);
  opacity: 0.6;
  flex-shrink: 0;
}

.ens-step-arrow svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* ── Part 3 Synergy Table ── */

.ml-synergy-table-wrap {
  overflow-x: auto;
  margin-bottom: 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg);
}

.ml-synergy-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.92rem;
}

.ml-synergy-table th,
.ml-synergy-table td {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.ml-synergy-table th {
  background: var(--surface-raised);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.ml-synergy-table tbody tr:last-child td {
  border-bottom: none;
}

.ml-synergy-table tbody tr {
  transition: background 0.15s ease;
}

.ml-synergy-table tbody tr:hover {
  background: var(--surface-raised);
}

.synergy-tag {
  display: inline-block;
  padding: 0.3rem 0.65rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-mono);
  white-space: nowrap;
}

.synergy-kfold {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(91, 159, 212, 0.3);
}

.synergy-train {
  background: var(--analyze-soft);
  color: var(--analyze);
  border: 1px solid rgba(155, 142, 196, 0.3);
}

.synergy-ensemble {
  background: var(--detect-soft);
  color: var(--detect);
  border: 1px solid rgba(109, 184, 146, 0.3);
}

/* ── Conclusion Box ── */

.ml-conclusion {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.75rem;
}

.ml-conclusion-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
}

.ml-conclusion-icon {
  width: 2rem;
  height: 2rem;
  color: var(--detect);
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.ml-conclusion-inner strong {
  display: block;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.ml-conclusion-inner p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ── 3-Layer Engineering Architecture Section ── */

.arch-layers-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.arch-layer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.arch-layer-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.arch-layer-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.arch-layer-card.layer-dl::before,
.arch-layer-card.layer-math::before,
.arch-layer-card.layer-hitl::before {
  background: var(--border-strong);
}

.arch-layer-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 1rem;
  width: fit-content;
}

.layer-dl .arch-layer-badge {
  background: rgba(91, 159, 212, 0.15);
  color: #5b9fd4;
  border: 1px solid rgba(91, 159, 212, 0.3);
}

.layer-math .arch-layer-badge {
  background: rgba(155, 142, 196, 0.15);
  color: #9b8ec4;
  border: 1px solid rgba(155, 142, 196, 0.3);
}

.layer-hitl .arch-layer-badge {
  background: rgba(109, 184, 146, 0.15);
  color: #6db892;
  border: 1px solid rgba(109, 184, 146, 0.3);
}

.arch-layer-title {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}

.arch-layer-subtitle {
  margin: 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.arch-layer-desc {
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex-grow: 1;
}

.arch-layer-tech-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
}

.arch-layer-tech-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
}

.arch-layer-tech-item code {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: #fcd9a0;
  background: rgba(252, 217, 160, 0.08);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  white-space: nowrap;
}

.arch-layer-tech-item span {
  color: var(--text-muted);
  font-size: 0.78rem;
}

@media (max-width: 960px) {
  .arch-layers-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .workflow-steps {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .workflow-steps::before {
    display: none;
  }

  .workflow-step {
    text-align: left;
    padding: 0;
  }

  .step-indicator {
    margin: 0 0 0.75rem;
  }

  .module-card-tags {
    max-width: 100%;
  }

  .usecase-tabs {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .usecase-tab {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.6rem 0.7rem;
    font-size: 0.82rem;
  }

  .ml-tech-block {
    padding: 1.5rem 1.25rem;
  }

  .ml-reasons-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .ens-steps-row {
    flex-direction: column;
    gap: 0.75rem;
  }

  .ens-step-arrow {
    justify-content: center;
    transform: rotate(90deg);
    padding: 0.25rem 0;
  }

  .ml-conclusion-inner {
    flex-direction: column;
    gap: 0.75rem;
  }
}

@media (max-width: 480px) {
  .nav-meta .nav-badge {
    display: none;
  }
}

/* ─────────────────────────────────────────────────────────
   Term Tooltips (.term) - Accessibility & Glossary
   ───────────────────────────────────────────────────────── */
.term {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  border-bottom: 1px dotted var(--accent, #6db892);
  cursor: help;
  color: inherit;
  text-decoration: none;
}

.term-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  margin-left: 3px;
  border-radius: 50%;
  background: rgba(109, 184, 146, 0.22);
  color: var(--accent, #6db892);
  font-size: 9.5px;
  font-weight: 700;
  font-style: normal;
  line-height: 1;
  vertical-align: middle;
}

.term-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: min(290px, 80vw);
  padding: 8px 12px;
  border-radius: 8px;
  background: #0f131a;
  border: 1px solid rgba(109, 184, 146, 0.45);
  color: #f1f5f9;
  font-size: 0.78rem;
  line-height: 1.55;
  font-weight: 400;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 50;
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.term-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(109, 184, 146, 0.45);
}

.term:hover .term-tip,
.term:focus .term-tip,
.term:focus-within .term-tip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

/* ─────────────────────────────────────────────────────────
   Glossary Section & Cards
   ───────────────────────────────────────────────────────── */
.glossary-section {
  padding-top: 2rem;
  padding-bottom: 3.5rem;
}

.glossary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.glossary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.glossary-card:hover {
  border-color: rgba(109, 184, 146, 0.4);
  transform: translateY(-2px);
}

.glossary-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.45rem;
}

.glossary-term-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  font-family: var(--font-mono);
}

.glossary-term-category {
  font-size: 0.72rem;
  color: var(--accent, #6db892);
  background: rgba(109, 184, 146, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}

.glossary-term-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}


/* Interactive demo banner (MNIST handwriting demo, top page) */
.demo-banner {
  padding-top: 0.5rem;
}

.demo-banner-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border: 1px solid rgba(96, 165, 250, 0.35);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.1), rgba(15, 19, 25, 0.4));
  text-decoration: none;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.demo-banner-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.17), rgba(15, 19, 25, 0.4));
}

.demo-banner-viz {
  flex: 0 0 auto;
  display: flex;
}

.demo-banner-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.demo-banner-badge {
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: var(--accent);
}

.demo-banner-text strong {
  font-size: 0.98rem;
  color: var(--text);
}

.demo-banner-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.demo-banner-cta {
  margin-left: auto;
  flex: 0 0 auto;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .demo-banner-viz {
    display: none;
  }
}
