/* AI4I & AdversityBench Academic Homepage Stylesheet 
   Aligned with Andong Wang / RIKEN AIP Top-Tier Academic Aesthetic */

:root {
  --font-sans: 'Times New Roman', Times, 'PingFang SC', 'Hiragino Sans GB', 'Noto Sans SC', 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', Menlo, Monaco, Consolas, monospace;
  --font-serif: 'Times New Roman', Times, 'Noto Serif SC', 'Songti SC', 'Source Han Serif SC', 'STSong', Georgia, serif;
  --font-kaiti: 'Times New Roman', Times, 'Kaiti SC', 'STKaiti', 'KaiTi', 'Noto Serif SC', serif;

  --bg-primary: #f7fafe;
  --bg-secondary: #edf5fc;
  --bg-tertiary: #f0f6fc;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f7fd;
  --bg-subtle: #edf5fc;
  
  --text-primary: #102235;
  --text-secondary: #233b52;
  --text-muted: #4a7191;
  --text-accent: #135d94;

  --border-subtle: #bad7ee;
  --border-strong: #7ca5c5;

  --accent-primary: #298cd1;
  --accent-primary-hover: #135d94;
  --accent-secondary: #2284c8;
  --accent-purple: #6366f1;
  --accent-amber: #d97706;
  --accent-rose: #e11d48;

  --shadow-sm: 0 1px 3px 0 rgba(16, 34, 53, 0.04);
  --shadow-md: 0 4px 12px -1px rgba(19, 93, 148, 0.07), 0 2px 4px -2px rgba(19, 93, 148, 0.04);
  --shadow-lg: 0 10px 20px -3px rgba(19, 93, 148, 0.09), 0 4px 6px -4px rgba(19, 93, 148, 0.04);
  --shadow-xl: 0 20px 25px -5px rgba(19, 93, 148, 0.12), 0 8px 10px -6px rgba(19, 93, 148, 0.06);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 9999px;

  --nav-height: 68px;
  --content-max-width: 1060px;
  --max: 1060px;
}

[data-theme="dark"] {
  --bg-primary: #0a131e;
  --bg-secondary: #101f30;
  --bg-tertiary: #15283c;
  --bg-card: #101f30;
  --bg-card-hover: #162a40;
  --bg-subtle: #15283c;

  --text-primary: #edf5fc;
  --text-secondary: #bad7ee;
  --text-muted: #7ca5c5;
  --text-accent: #38a3eb;

  --border-subtle: #23425f;
  --border-strong: #3b6890;

  --accent-primary: #38a3eb;
  --accent-primary-hover: #60b7f2;
  --accent-secondary: #298cd1;
  --accent-purple: #818cf8;
  --accent-amber: #fbbf24;
  --accent-rose: #f43f5e;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px -1px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 82% 4%, rgba(182, 218, 248, 0.45), transparent 28%),
    radial-gradient(circle at 12% 16%, rgba(205, 232, 255, 0.3), transparent 22%),
    linear-gradient(180deg, #edf6fc 0%, #f7fafe 340px),
    var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

[data-theme="dark"] body {
  background:
    radial-gradient(circle at 82% 4%, rgba(25, 60, 95, 0.35), transparent 28%),
    radial-gradient(circle at 12% 16%, rgba(20, 50, 80, 0.25), transparent 22%),
    linear-gradient(180deg, #0d1a29 0%, #0a131e 340px),
    var(--bg-primary);
}



.site-shell {
  width: min(var(--content-max-width, 960px), calc(100% - 40px));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

@media (max-width: 1024px) {
  .site-shell {
    width: min(840px, calc(100% - 32px));
  }
}

@media (max-width: 768px) {
  .site-shell {
    width: calc(100% - 24px);
  }
}

.topbar {
  position: sticky;
  top: 0;
  height: var(--nav-height);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 1000;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

[data-theme="dark"] .navbar, [data-theme="dark"] .topbar {
  background: rgba(9, 13, 22, 0.9);
}

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

.wordmark {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-primary);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.wordmark-dot {
  width: 9px;
  height: 9px;
  background: var(--accent-primary);
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(37, 99, 235, 0.6);
}

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

nav a {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 550;
  padding: 4px 9px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  white-space: nowrap;
}

nav a:hover, nav a.active {
  color: var(--accent-primary);
  background: var(--bg-tertiary);
}

/* Language Switcher & Actions */
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.lang-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 2px;
  flex-shrink: 0;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 550;
  padding: 3px 8px;
  border-radius: 4px;
  text-decoration: none;
  transition: all 0.15s ease;
  line-height: 1;
  white-space: nowrap !important;
  flex-shrink: 0;
  height: 24px;
  box-sizing: border-box;
}

.lang-btn:hover {
  color: var(--accent-primary);
  background: var(--bg-secondary);
}

.lang-btn.active {
  color: #ffffff !important;
  background: var(--accent-primary);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(41, 140, 209, 0.3);
}

.theme-toggle-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  height: 28px;
  width: 28px;
  padding: 0;
  font-size: 0.88rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.theme-toggle-btn:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-primary);
}

/* Hero Section */
.hero {
  padding: 56px 0 40px;
  text-align: center;
  background: radial-gradient(circle at 50% 10%, rgba(37, 99, 235, 0.07) 0%, transparent 65%);
}

.grant-pill, .hero-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent-primary);
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.pulse-dot, .live-indicator {
  width: 8px;
  height: 8px;
  background: var(--accent-secondary);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(13, 148, 136, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(13, 148, 136, 0); }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 14px;
  max-width:  860px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.35;
  color: var(--text-primary);
}

.hero-subtitle {
  font-size: 0.98rem;
  color: var(--text-secondary);
  max-width:  780px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

/* Executive Proposition Box */
.exec-box, .central-question-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.04) 0%, rgba(13, 148, 136, 0.04) 100%);
  border: 1px solid rgba(37, 99, 235, 0.2);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  margin: 0 auto 32px;
  text-align: left;
  box-shadow: var(--shadow-sm);
  max-width:  100%;
}

.central-question-tag {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent-primary);
  display: inline-block;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.central-question-title {
  font-family: var(--font-serif);
  color: var(--text-primary);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
}

.central-question-sub {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent-primary);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--accent-primary-hover);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

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

.btn-secondary:hover {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  transform: translateY(-1px);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-tertiary);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  font-size: 0.78rem;
  font-weight: 550;
  border: 1px solid var(--border-subtle);
}

/* Sections */
section {
  padding: 60px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-header {
  margin-bottom: 36px;
}

.section-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-primary);
  margin-bottom: 6px;
}

.section-header h2 {
  font-size: 1.65rem;
  color: var(--text-primary);
  line-height: 1.35;
}

.section-header p {
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width:  780px;
  line-height: 1.6;
}

/* Grids & Cards */
.grid-2, .two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}

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

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

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

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

.feature-card, .theory-card, .card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s ease;
}

.feature-card:hover, .theory-card:hover, .card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.theory-pill {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
  margin-bottom: 8px;
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.math-callout, .doc-math-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  margin: 16px 0;
  text-align: center;
  font-size: 1.05rem;
  overflow-x: auto;
}

/* Figure Lightbox */
.figure-container {
  margin: 32px 0 12px;
}

.figure-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 24px;
}

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

.figure-card img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  display: block;
  background: var(--bg-secondary);
}

.figure-caption {
  margin-top: 12px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.55;
  text-align: left;
}

.figure-caption strong {
  color: var(--text-primary);
}

/* ==========================================================================
   Publications List (Exact Match with User Screenshot)
   ========================================================================== */
.pub-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border-subtle);
  margin-top: 12px;
}

.pub-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border-subtle);
  align-items: start;
}

.pub-index {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent-primary);
  opacity: 0.85;
  padding-top: 2px;
}

.pub-main {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-title-link {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.4;
  text-decoration: none;
}

.pub-title-link:hover {
  color: var(--accent-primary);
}

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

.pub-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.pub-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pub-pill-btn:hover {
  background: rgba(37, 99, 235, 0.1);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

/* Interactive Duality Calculator */
.interactive-calc-box {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

.calc-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.calc-res-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.calc-res-num {
  font-family: var(--font-mono);
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--accent-primary);
  margin-bottom: 4px;
}

.calc-res-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 102 Scenario Explorer */
.domain-tabs-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}

.domain-tab {
  padding: 5px 13px;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.domain-tab:hover, .domain-tab.active {
  background: var(--accent-primary);
  color: #ffffff;
  border-color: var(--accent-primary);
}

.scenario-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.scenario-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.scenario-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.scenario-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.scenario-domain {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
}

.scenario-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.35;
}

.scenario-preview {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal Overlay */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 680px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-xl);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-subtle);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: var(--accent-primary);
  color: #ffffff;
}

.brand-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Footer */
footer {
  padding: 40px 0;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .grid-2, .two-col, .grid-3, .figure-grid {
    grid-template-columns: 1fr;
  }
  .pub-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pub-index {
    display: none;
  }
  .hero-title {
  font-family: var(--font-serif);
    font-size: 1.85rem;
  }
  nav {
    display: none;
  }
}

/* Modern Seamless Motivation Section */
.motivation-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px 28px;
  box-shadow: var(--shadow-sm);
}

.motivation-step-section {
  padding: 22px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.motivation-step-section:last-child {
  border-bottom: none;
}

.motivation-step-header {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.motivation-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-primary);
  background: rgba(37, 99, 235, 0.08);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.02em;
}

[data-theme="dark"] .motivation-num {
  background: rgba(88, 166, 255, 0.12);
  color: #58a6ff;
}

.motivation-step-title {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.motivation-bridge-box {
  padding: 16px 20px;
  margin: 8px 0 16px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-kaiti);
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.75;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.bridge-icon {
  color: var(--accent-primary);
  font-size: 1rem;
  line-height: 1.5;
}

.motivation-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.motivation-list li {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.75;
  position: relative;
  padding-left: 16px;
}

.motivation-list li::before {
  content: "•";
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 0;
}

.motivation-list li strong {
  color: var(--text-primary);
}

/* Chat Prompt Bubble */
.crisis-chat-bubble {
  margin-top: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
}

.chat-bubble-header {
  font-family: var(--font-serif);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.chat-bubble-text {
  font-family: var(--font-serif);
  font-size: 0.92rem;
  color: var(--accent-primary);
  font-style: italic;
  line-height: 1.6;
}

[data-theme="dark"] .chat-bubble-text {
  color: #79c0ff;
}

.motivation-core-question-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* ==========================================================================
   Japanese Typography Enhancement (Aligned with RIKEN AIP spread_homepage)
   ========================================================================== */
html[lang="ja"] {
  --font-klee: "Klee One", "Yu Kyokasho", serif;
  --font-serif: "Times New Roman", Times, "Shippori Mincho", "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "BIZ UDPMincho", serif;
  --font-sans: "Times New Roman", Times, "Zen Kaku Gothic New", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}

html[lang="ja"] body {
  font-family: var(--font-sans);
  letter-spacing: 0.02em;
  line-height: 1.75;
}

html[lang="ja"] h1, 
html[lang="ja"] h2, 
html[lang="ja"] h3, 
html[lang="ja"] .hero-title,
html[lang="ja"] .wordmark {
  font-family: var(--font-serif);
  font-feature-settings: "palt" 1;
}

html[lang="ja"] .hero-badge-pill,
html[lang="ja"] .brand-badge,
html[lang="ja"] .theory-pill,
html[lang="ja"] .central-question-tag {
  font-family: var(--font-klee);
}


/* ==========================================================================
   Motivation 4-Stage Problem Formulation Card
   ========================================================================== */
.motivation-central-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 28px 0 24px;
  box-shadow: var(--shadow-sm);
}

.motivation-central-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.motivation-flow-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 992px) {
  .motivation-flow-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
  }
}

@media (max-width: 580px) {
  .motivation-flow-grid {
    grid-template-columns: 1fr;
  }
}

.motivation-step-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 16px 18px;
  display: flex;
  flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.motivation-step-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.motivation-step-num {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.motivation-step-title {
  font-family: var(--font-serif);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.32;
  margin: 0 0 10px 0;
  min-height: 44px;
  display: flex;
  align-items: flex-start;
}

.motivation-step-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.62;
  margin: 0;
  flex: 1;
}
