/* ==========================================================================
   Finish Line Sports Research - Homepage Stylesheet
   Design Philosophy: Vercel Geist Minimalist & Grid Aesthetic
   Theme: Custom Dark & Light Mode Toggle
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,500;0,600;0,700;1,400&family=JetBrains+Mono:wght@400;500;600&display=swap&font-display=swap');

:root {
  /* Deepened Royal Indigo Dark Mode (Default) variables */
  --bg-base: #050718;       /* Deepened indigo-black based on logo background #112378 */
  --bg-elevated: #0a0e28;   /* Card surface */
  --bg-hover: #12183c;      /* Hover states */
  --bg-accent-subtle: #070b24;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --border-glow: rgba(245, 166, 35, 0.25);
  
  --fg-1: #ffffff;
  --fg-2: #8a8fa3;          /* Indigo-tinted secondary gray */
  --fg-3: #565a75;
  
  --color-success: #10B981;

  /* Brand Specifics */
  --brand-indigo: #112378;        /* Exact logo background color */
  --brand-indigo-light: #2e45a8;
  --brand-accent: #f5a623;          /* Electric Blue Accent */
  --brand-accent-dark: #d97706;
  --brand-accent-glow: rgba(245, 166, 35, 0.15);
  
  /* Fonts */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-mono: 'JetBrains Mono', SFMono-Regular, Consolas, monospace;

  /* Motion */
  --motion-fast: 150ms;
  --motion-default: 250ms;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  
  /* Layout */
  --max-width: 1200px;
}

/* Light Mode overrides */
[data-theme="light"] {
  --bg-base: #f5f6fa;         /* Light indigo-gray base */
  --bg-elevated: #ffffff;     /* White cards */
  --bg-hover: #ebeef7;        /* Hover */
  --bg-accent-subtle: #eef2ff;
  --border-subtle: rgba(17, 35, 120, 0.08);
  --border-strong: rgba(17, 35, 120, 0.16);
  --border-glow: rgba(17, 35, 120, 0.15);
  
  --fg-1: #111424;            /* Dark indigo text */
  --fg-2: #525975;
  --fg-3: #8e95ad;
  
  --color-success: #10B981;

  --brand-indigo: #112378;    /* Exact logo background */
  --brand-indigo-light: #2e45a8;
  --brand-accent: #d97706;
  --brand-accent-dark: #b45309;
  --brand-accent-glow: rgba(217, 119, 6, 0.1);
}

/* Reset and Core Styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-base);
  color: var(--fg-1);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--motion-default) var(--ease-out), color var(--motion-default) var(--ease-out);
}

a {
  color: inherit;
  text-decoration: none;
}

/* Structure Rules & Grid Aesthetic */
.vercel-grid-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.vercel-border-x {
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
}

.vercel-border-y {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

/* Header & Navigation */
header {
  position: sticky;
  top: 0;
  background-color: color-mix(in srgb, var(--bg-base) 80%, transparent);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 100;
  transition: border-color var(--motion-default) var(--ease-out);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: var(--brand-indigo);
  color: var(--brand-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  border-radius: 4px;
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 10px rgba(17, 35, 120, 0.3);
  position: relative;
  overflow: hidden;
}

.brand-logo::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: 0.5s;
}

.brand:hover .brand-logo::after {
  left: 100%;
}

.brand-name {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-tagline {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-2);
  border-left: 1px solid var(--border-subtle);
  padding-left: 12px;
  margin-left: 4px;
  display: none;
}

@media(min-width: 640px) {
  .brand-tagline {
    display: inline-block;
  }
}

.nav-links {
  display: flex;
  gap: 20px;
  align-items: center;
}

.nav-link {
  font-size: 14px;
  color: var(--fg-2);
  transition: color var(--motion-fast) var(--ease-out);
}

.nav-link:hover {
  color: var(--fg-1);
}

.nav-link.active {
  color: var(--fg-1);
  font-weight: 500;
}

/* Theme Toggle Button */
.theme-btn {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--fg-2);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--motion-fast) var(--ease-out), color var(--motion-fast) var(--ease-out);
}

.theme-btn:hover {
  border-color: var(--border-strong);
  color: var(--fg-1);
}

.theme-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2px;
}

[data-theme="light"] .sun-icon {
  display: none;
}
[data-theme="dark"] .moon-icon {
  display: none;
}

/* Hero Section */
.hero-section {
  padding: 80px 0 60px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9999px;
  background: var(--bg-elevated);
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-2);
  margin-bottom: 24px;
}

.hero-tag-accent {
  color: var(--brand-accent);
  font-weight: 600;
}

.hero-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media(min-width: 768px) {
  .hero-title {
    font-size: 64px;
  }
}

.hero-title span {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(135deg, var(--fg-1) 30%, var(--brand-accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 16px;
  color: var(--fg-2);
  max-width: 600px;
  margin: 0 auto 32px auto;
  line-height: 1.6;
}

@media(min-width: 768px) {
  .hero-description {
    font-size: 18px;
  }
}

.hero-ctas {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  padding: 10px 20px;
  height: 40px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-out);
}

.btn-primary {
  background-color: var(--fg-1);
  color: var(--bg-base);
  border: 1px solid var(--fg-1);
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--fg-1);
}

.btn-secondary {
  background-color: transparent;
  color: var(--fg-2);
  border: 1px solid var(--border-subtle);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  color: var(--fg-1);
  background-color: var(--bg-elevated);
}

.btn-accent {
  background: linear-gradient(135deg, var(--brand-accent) 0%, var(--brand-accent-dark) 100%);
  color: #000000;
  border: 1px solid var(--brand-accent);
  font-weight: 600;
}

.btn-accent:hover {
  box-shadow: 0 0 16px var(--brand-accent-glow);
  transform: translateY(-1px);
}

/* Grid layout for services */
.section-header {
  padding: 40px 0 24px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.section-label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.section-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--border-subtle);
}

@media(min-width: 768px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.service-card {
  padding: 40px;
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--motion-fast) var(--ease-out);
  position: relative;
  overflow: hidden;
}

@media(min-width: 768px) {
  .service-card:nth-child(odd) {
    border-right: 1px solid var(--border-subtle);
  }
}

.service-card:hover {
  background-color: var(--bg-elevated);
}

.service-num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--fg-3);
  margin-bottom: 24px;
  display: block;
}

.service-icon {
  width: 24px;
  height: 24px;
  color: var(--brand-accent);
  margin-bottom: 16px;
}

.service-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}

.service-desc {
  font-size: 14px;
  color: var(--fg-2);
  margin-bottom: 24px;
  line-height: 1.6;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: var(--bg-hover);
  border: 1px solid var(--border-subtle);
  color: var(--fg-2);
}

.badge-accent {
  color: var(--brand-accent);
  border-color: rgba(245, 184, 46, 0.3);
  background: rgba(245, 184, 46, 0.05);
}

/* Interactive Dashboard Console */
.interactive-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.console-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-top: 32px;
}

@media(min-width: 1024px) {
  .console-container {
    grid-template-columns: 320px 1fr;
  }
}

/* Console Sidebar Selector */
.console-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.console-menu-btn {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--fg-2);
  text-align: left;
  padding: 16px 20px;
  border-radius: 8px;
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-out);
  display: flex;
  align-items: center;
  gap: 12px;
}

.console-menu-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.console-menu-btn:hover {
  border-color: var(--border-strong);
  color: var(--fg-1);
  background-color: var(--bg-hover);
}

.console-menu-btn.active {
  background-color: var(--bg-base);
  border-color: var(--fg-1);
  color: var(--fg-1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.console-menu-btn.active svg {
  color: var(--brand-accent);
}

.console-menu-btn-desc {
  display: block;
  font-size: 11px;
  color: var(--fg-3);
  margin-top: 2px;
}

/* Console Panel Content */
.console-panel {
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  display: none;
}

.console-panel.active {
  display: block;
}

.console-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-base);
}

.console-title-text {
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.console-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--brand-accent);
  display: inline-block;
  box-shadow: 0 0 8px var(--brand-accent);
}

.console-actions {
  display: flex;
  gap: 8px;
}

.console-body {
  padding: 24px;
}

/* Console Widget 1: IELTS Diagnostic */
.diagnostic-widget {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slider-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.slider-header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.slider-label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}

.slider-label svg {
  width: 14px;
  height: 14px;
  color: var(--fg-2);
}

.slider-val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--brand-accent);
}

.slider-input {
  width: 100%;
  -webkit-appearance: none;
  background: var(--bg-hover);
  height: 6px;
  border-radius: 3px;
  outline: none;
  border: 1px solid var(--border-subtle);
}

.slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fg-1);
  border: 2px solid var(--brand-accent);
  cursor: pointer;
  transition: transform var(--motion-fast) var(--ease-out);
}

.slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.diagnostic-results {
  margin-top: 12px;
  padding: 20px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background-color: var(--bg-base);
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media(min-width: 640px) {
  .diagnostic-results {
    grid-template-columns: 140px 1fr;
  }
}

.result-band-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-right: none;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

@media(min-width: 640px) {
  .result-band-box {
    border-right: 1px solid var(--border-subtle);
    border-bottom: none;
    padding-bottom: 0;
    padding-right: 20px;
  }
}

.result-band-num {
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  color: var(--fg-1);
  letter-spacing: -0.05em;
}

.result-band-label {
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-top: 4px;
}

.result-feedback-box {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.result-feedback-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.result-feedback-desc {
  font-size: 13px;
  color: var(--fg-2);
}

/* Console Widget 2: R & NHANES terminal simulator */
.terminal-widget {
  background-color: #000000;
  color: #00ff66;
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 20px;
  border-radius: 6px;
  border: 1px solid var(--border-strong);
  height: 320px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terminal-line {
  line-height: 1.5;
  white-space: pre-wrap;
}

.terminal-cmd {
  color: #ffffff;
}

.terminal-output {
  color: var(--fg-2);
}

.terminal-success {
  color: #00ff66;
}

.terminal-prompt::before {
  content: "R > ";
  color: var(--brand-accent);
  font-weight: bold;
}

.terminal-actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

/* Console Widget 3: Project Estimator */
.estimator-widget {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.services-checkbox-group {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media(min-width: 640px) {
  .services-checkbox-group {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checkbox-card {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-base);
  padding: 16px;
  border-radius: 6px;
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-out);
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.checkbox-card:hover {
  border-color: var(--border-strong);
}

.checkbox-card.checked {
  border-color: var(--brand-accent);
  background-color: var(--bg-accent-subtle);
}

.checkbox-card input[type="checkbox"] {
  margin-top: 4px;
  accent-color: var(--brand-accent);
}

.checkbox-details {
  display: flex;
  flex-direction: column;
}

.checkbox-title {
  font-size: 13px;
  font-weight: 600;
}

.checkbox-price {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--brand-accent);
  margin-top: 2px;
}

.estimator-totals {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.total-card {
  padding: 16px;
  background-color: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  text-align: center;
}

.total-label {
  font-size: 11px;
  color: var(--fg-3);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.total-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--fg-1);
}

.total-value-accent {
  color: var(--brand-accent);
}

/* Success Cases & Showcase */
.cases-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.cases-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 13px;
}

.cases-table th, .cases-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.cases-table th {
  font-family: var(--font-mono);
  color: var(--fg-3);
  font-weight: 500;
  text-transform: uppercase;
}

.cases-table tr:hover td {
  background-color: var(--bg-elevated);
}

.case-badge {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(91, 139, 247, 0.1);
  color: #5B8BF7;
  border: 1px solid rgba(91, 139, 247, 0.2);
}

.case-badge-accent {
  background: rgba(245, 184, 46, 0.1);
  color: var(--brand-accent);
  border: 1px solid rgba(245, 184, 46, 0.2);
}

.case-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--fg-2);
  transition: color var(--motion-fast) var(--ease-out);
}

.case-link:hover {
  color: var(--fg-1);
}

.case-link svg {
  width: 12px;
  height: 12px;
}

/* Scientific Workflow / Timeline */
.workflow-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.workflow-steps {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 32px;
}

@media(min-width: 768px) {
  .workflow-steps {
    grid-template-columns: repeat(4, 1fr);
  }
}

.workflow-step {
  padding: 32px 24px;
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

@media (min-width: 768px) {
  .workflow-step {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
  }
  .workflow-step:last-child {
    border-right: none;
  }
}

.workflow-step:hover {
  background-color: var(--bg-elevated);
}

.workflow-num {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 300;
  color: var(--fg-3);
  line-height: 1;
  margin-bottom: 16px;
  display: block;
}

.workflow-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}

.workflow-desc {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
}

/* Contact / Call-to-action */
.contact-section {
  padding: 80px 0;
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.contact-box {
  max-width: 600px;
  margin: 0 auto;
}

.contact-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.contact-desc {
  color: var(--fg-2);
  font-size: 15px;
  margin-bottom: 32px;
}

.contact-channels {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 32px;
}

@media(min-width: 640px) {
  .contact-channels {
    grid-template-columns: repeat(2, 1fr);
  }
}

.channel-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 24px;
  border-radius: 8px;
  text-align: left;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: all var(--motion-fast) var(--ease-out);
}

.channel-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.channel-icon {
  width: 24px;
  height: 24px;
  color: var(--brand-accent);
  flex-shrink: 0;
}

.channel-info h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.channel-info p {
  font-size: 13px;
  color: var(--fg-2);
  word-break: break-all;
}

.channel-info .mono {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-1);
  margin-top: 4px;
  display: block;
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  font-size: 12px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}

footer p {
  color: var(--fg-3);
}

footer .footer-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 12px;
}

footer .footer-link {
  transition: color var(--motion-fast) var(--ease-out);
}

footer .footer-link:hover {
  color: var(--fg-2);
}

/* Responsive Table scroll wrapper */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Brand Logo Formatting */
.brand-logo-img {
  height: 28px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  margin-right: 4px;
  transition: filter var(--motion-default) var(--ease-out);
}

[data-theme="dark"] .brand-logo-img {
  filter: invert(1);
}

/* Publications & Charts Section */
.publications-section {
  padding: 60px 0;
  background-color: var(--bg-base);
}

.paper-block {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding: 40px 0;
}

@media(min-width: 1024px) {
  .paper-block {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

.paper-info {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.paper-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brand-accent);
}

.paper-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--fg-1);
}

.paper-authors {
  font-size: 13px;
  color: var(--fg-2);
  font-weight: 500;
}

.paper-abstract {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.6;
  background-color: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  padding: 16px;
  text-wrap: pretty;
}

.paper-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.stat-badge {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  padding: 10px 12px;
  border-radius: 6px;
  text-align: center;
}

.stat-badge-title {
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.stat-badge-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-1);
}

/* ANOVA statistics card */
.anova-box {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.anova-header {
  padding: 10px 16px;
  background-color: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.anova-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.anova-table th, .anova-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.anova-table th {
  color: var(--fg-3);
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.anova-table tr:last-child td {
  border-bottom: none;
}

.residual-row {
  color: var(--fg-3);
}

.sig-val {
  color: var(--brand-accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Chart Layouts */
.paper-chart-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  border-radius: 8px;
  padding: 20px;
  height: 100%;
}

.chart-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-title svg {
  width: 16px;
  height: 16px;
  color: var(--brand-accent);
}

.multipanel-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 12px 0;
}

@media(min-width: 640px) {
  .multipanel-charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.panel-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: none;
  padding-right: 0;
}

@media(min-width: 640px) {
  .panel-container {
    border-right: 1px solid var(--border-subtle);
    padding-right: 20px;
  }
  .panel-container:last-child {
    border-right: none;
    padding-right: 0;
  }
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
  display: block;
}

.scientific-chart {
  width: 100%;
  height: 230px;
  margin: 8px 0;
}

.chart-caption {
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: block;
}

/* Service More Details Link */
.service-more-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--motion-fast) var(--ease-out);
  margin-top: 16px;
  text-decoration: none;
}

.service-more-link:hover {
  color: var(--fg-1);
}

.service-more-link:hover svg {
  transform: translateX(3px);
}

/* WeChat QR Code box */
.wechat-qr-box {
  width: 140px;
  height: 140px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background-color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}

.stat-badge-title {
  font-size: 10px;
  color: var(--fg-3);
  text-transform: uppercase;
  display: block;
  margin-bottom: 2px;
}

.stat-badge-val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--fg-1);
}

/* ANOVA statistics card */
.anova-box {
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
}

.anova-header {
  padding: 10px 16px;
  background-color: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
}

.anova-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.anova-table th, .anova-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
}

.anova-table th {
  color: var(--fg-3);
  font-weight: 600;
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.anova-table tr:last-child td {
  border-bottom: none;
}

.residual-row {
  color: var(--fg-3);
}

.sig-val {
  color: var(--brand-accent);
  font-weight: 600;
  font-family: var(--font-mono);
}

/* Chart Layouts */
.paper-chart-box {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--border-subtle);
  background-color: var(--bg-elevated);
  border-radius: 8px;
  padding: 20px;
  height: 100%;
}

.chart-title-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 12px;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chart-title svg {
  width: 16px;
  height: 16px;
  color: var(--brand-accent);
}

.multipanel-charts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 12px 0;
}

@media(min-width: 640px) {
  .multipanel-charts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.panel-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: none;
  padding-right: 0;
}

@media(min-width: 640px) {
  .panel-container {
    border-right: 1px solid var(--border-subtle);
    padding-right: 20px;
  }
  .panel-container:last-child {
    border-right: none;
    padding-right: 0;
  }
}

.panel-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
  display: block;
}

.scientific-chart {
  width: 100%;
  height: 230px;
  margin: 8px 0;
}

.chart-caption {
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.5;
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
  display: block;
}

/* Service More Details Link */
.service-more-link {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--motion-fast) var(--ease-out);
  margin-top: 16px;
  text-decoration: none;
}

.service-more-link:hover {
  color: var(--fg-1);
}

.service-more-link:hover svg {
  transform: translateX(3px);
}

/* WeChat QR Code box */
.wechat-qr-box {
  width: 140px;
  height: 140px;
  border: 1px dashed var(--border-strong);
  border-radius: 6px;
  background-color: var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--fg-3);
  font-family: var(--font-mono);
  text-transform: uppercase;
  text-align: center;
  padding: 10px;
  margin: 12px auto 0 auto;
}

/* Decorative English Watermarks for Premium Aesthetic */
#services, #publications, #console, #cases, .workflow-section, .contact-section {
  position: relative;
  overflow: hidden;
}

.section-watermark {
  position: absolute;
  top: 25px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 5rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--border-strong);
  opacity: 0.18;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  text-transform: uppercase;
}

[data-theme="light"] .section-watermark {
  opacity: 0.08;
}

.hero-watermark {
  position: absolute;
  top: 100px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 7rem;
  font-weight: 850;
  letter-spacing: 0.2em;
  color: var(--border-strong);
  opacity: 0.12;
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  user-select: none;
  text-transform: uppercase;
}

[data-theme="light"] .hero-watermark {
  opacity: 0.05;
}

/* Ensure headings display on top of watermarks */
.section-header, .hero-tag, .hero-title, .hero-description, .hero-ctas {
  position: relative;
  z-index: 1;
}

.discipline-card:hover {
  background-color: var(--bg-hover) !important;
}

.faq-item {
  transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}

.faq-item:hover {
  border-color: var(--border-strong) !important;
  box-shadow: 0 0 16px var(--brand-accent-glow);
}

/* ==========================================================================
   Quality Improvements — Navigation, Animations, Typography, UX
   ========================================================================== */

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* Focus visible — keyboard nav accessibility */
:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Active nav link highlight */
.nav-link.active-page {
  color: var(--fg-1);
  font-weight: 600;
}

/* Paper title links */
.paper-title-link {
  color: var(--fg-1);
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease-out);
  background: none;
  -webkit-text-fill-color: inherit;
}
.paper-title-link:hover {
  color: var(--brand-accent);
}

/* ── Mobile hamburger nav ── */
.nav-hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border-subtle);
  border-radius: 6px;
  color: var(--fg-2);
  padding: 6px 8px;
  cursor: pointer;
  transition: all var(--motion-fast) var(--ease-out);
}
.nav-hamburger:hover { border-color: var(--border-strong); color: var(--fg-1); }
.nav-hamburger svg { width: 18px; height: 18px; display: block; }

@media (max-width: 860px) {
  .nav-hamburger { display: flex; align-items: center; }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border-subtle);
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
    z-index: 99;
  }
  .nav-links.open { display: flex; }

  .nav-link {
    padding: 14px 24px;
    font-size: 15px;
    border-bottom: 1px solid var(--border-subtle);
    width: 100%;
  }
  .nav-link:last-of-type { border-bottom: none; }

  .theme-btn { margin: 10px 24px; width: fit-content; }
}

/* ── Ticker / scrolling tags strip ── */
.index-ticker-wrap {
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
  padding: 11px 0;
  background: var(--bg-elevated);
}
.index-ticker-track {
  display: flex;
  gap: 56px;
  width: max-content;
  animation: indexTicker 28s linear infinite;
}
.index-ticker-wrap:hover .index-ticker-track { animation-play-state: paused; }
@keyframes indexTicker {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.index-ticker-item {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.index-ticker-item::before {
  content: '◆';
  color: var(--brand-accent);
  font-size: 7px;
}

/* ── Service card — accent left border on hover ── */
.service-card {
  border-left: 3px solid transparent;
}
.service-card:hover {
  border-left-color: var(--brand-accent);
}

/* ── Workflow step — accent left border on hover ── */
.workflow-step {
  border-left: 3px solid transparent;
  transition: background-color var(--motion-fast) var(--ease-out),
              border-left-color var(--motion-fast) var(--ease-out);
}
.workflow-step:hover {
  border-left-color: var(--brand-accent);
}

/* ── Cases table — row hover accent ── */
.cases-table tr:hover td {
  background-color: var(--bg-elevated);
}
.cases-table tr:hover td:first-child {
  border-left: 2px solid var(--brand-accent);
}

/* ── Footer — improved layout ── */
footer {
  padding: 48px 0 36px;
  border-top: 1px solid var(--border-subtle);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.footer-brand-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--fg-1);
  letter-spacing: -0.01em;
}
.footer-brand-copy {
  font-size: 12px;
  color: var(--fg-3);
  font-family: var(--font-mono);
}
.footer-nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-nav a {
  font-size: 13px;
  color: var(--fg-3);
  transition: color var(--motion-fast) var(--ease-out);
  font-family: var(--font-mono);
}
.footer-nav a:hover { color: var(--fg-1); }

/* ── Hero CTA button — secondary improved ── */
.btn-ghost {
  background: transparent;
  color: var(--fg-2);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
  background: var(--bg-elevated);
  color: var(--fg-1);
  border-color: var(--border-strong);
}

/* ── Section title size bump on large screens ── */
@media(min-width: 768px) {
  .section-title { font-size: 28px; }
}

/* ── Discipline card hover ── */
.discipline-card {
  transition: all var(--motion-fast) var(--ease-out);
}
.discipline-card:hover {
  border-color: var(--border-strong) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}


/* ==========================================================================
   Merged Content Styles — Workflow Landscape, Rich Cases, PhD/RP, Testimonials
   ========================================================================== */

/* ── Workflow Landscape (3-column node grid) ── */
.landscape-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.landscape-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  margin-top: 32px;
}

@media(min-width: 768px) {
  .landscape-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.landscape-col-header {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.landscape-col-header::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand-accent);
  display: inline-block;
  flex-shrink: 0;
}

.landscape-nodes {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ls-node {
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  border-radius: 6px;
  padding: 16px 18px;
  cursor: default;
  position: relative;
  transition: all var(--motion-fast) var(--ease-out);
  overflow: hidden;
}

.ls-node::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 3px;
  height: 100%;
  background: var(--brand-accent);
  transform: scaleY(0);
  transition: transform var(--motion-default) var(--ease-out);
  transform-origin: bottom;
}

.ls-node:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.ls-node:hover::before {
  transform: scaleY(1);
}

.ls-node-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ls-node-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-accent);
  display: inline-block;
  flex-shrink: 0;
  transition: transform var(--motion-fast) var(--ease-out);
}

.ls-node:hover .ls-node-dot {
  transform: scale(1.8);
}

.ls-node p {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.6;
}

/* ── Rich Case Cards (detailed version) ── */
.rich-cases-container {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 32px;
}

.rich-case-card {
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-elevated);
  overflow: hidden;
  transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}

.rich-case-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 6px 24px rgba(0,0,0,0.15);
}

.rich-case-topline {
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border-subtle);
  padding: 10px 24px;
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.rich-case-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rich-case-tag.accent {
  color: var(--brand-accent);
}

.rich-case-body {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 320px;
}

@media(min-width: 860px) {
  .rich-case-body {
    grid-template-columns: 0.8fr 1.2fr;
  }
}

.rich-case-left {
  padding: 28px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media(min-width: 860px) {
  .rich-case-left {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
  }
}

.rc-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--fg-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 4px;
  display: block;
}

.rc-value {
  font-size: 13px;
  color: var(--fg-2);
  line-height: 1.6;
}

.rc-value.strong {
  color: var(--fg-1);
  font-weight: 600;
}

.rc-value .role-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-3);
  margin-left: 4px;
}

.rc-pain-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rc-pain-list li {
  position: relative;
  padding-left: 14px;
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.5;
}

.rc-pain-list li::before {
  content: "•";
  color: #ef4444;
  font-weight: 700;
  position: absolute;
  left: 0;
}

.rc-stat-block {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px dashed var(--border-subtle);
}

.rc-stat-num {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--brand-accent);
  display: block;
}

.rc-stat-unit {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  margin-top: 2px;
  display: block;
}

.rich-case-right {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.rc-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--fg-1);
}

.rc-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.rc-tag {
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  color: var(--fg-2);
  padding: 3px 10px;
  border-radius: 4px;
}

.rc-flow {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  padding: 12px 16px;
  border-radius: 6px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.rc-flow-step {
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-2);
}

.rc-flow-arrow {
  font-size: 11px;
  color: var(--fg-3);
  font-weight: 700;
}

.rc-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rc-tool {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-accent);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.2);
  padding: 3px 8px;
  border-radius: 4px;
}

.rc-quote {
  font-size: 13px;
  font-style: italic;
  line-height: 1.65;
  color: var(--fg-2);
  border-left: 2px solid var(--brand-accent);
  padding: 8px 16px;
  background: rgba(245, 166, 35, 0.04);
  border-radius: 0 4px 4px 0;
  margin-top: auto;
}

.rc-quote-attr {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--fg-3);
  margin-top: 6px;
  font-style: normal;
}

.rc-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--motion-fast) var(--ease-out);
  align-self: flex-start;
}

.rc-link:hover {
  color: var(--fg-1);
}

/* ── CGM Image Grid ── */
.cgm-images-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.cgm-img-item {
  border: 1px solid var(--border-subtle);
  background: var(--bg-base);
  border-radius: 6px;
  padding: 10px;
}

.cgm-img-item img {
  width: 100%;
  height: auto;
  border-radius: 3px;
  display: block;
}

.cgm-img-caption {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  margin-top: 6px;
  text-align: center;
  display: block;
  line-height: 1.4;
}

/* ── PhD / RP Section ── */
.phd-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.phd-intro {
  font-size: 14px;
  color: var(--fg-2);
  line-height: 1.8;
  max-width: 760px;
  margin-bottom: 36px;
}

.rp-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-bottom: 40px;
}

@media(min-width: 640px) {
  .rp-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media(min-width: 1024px) {
  .rp-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.rp-item {
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all var(--motion-fast) var(--ease-out);
}

.rp-item:hover {
  border-color: var(--brand-accent);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(245, 166, 35, 0.08);
}

.rp-num {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-accent);
  text-transform: uppercase;
}

.rp-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
  line-height: 1.35;
}

.rp-desc {
  font-size: 12px;
  color: var(--fg-2);
  line-height: 1.6;
  flex: 1;
}

.rp-supervisors {
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px dashed var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
  line-height: 1.5;
}

.phd-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Testimonials strip ── */
.testimonials-section {
  padding: 60px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 32px;
}

@media(min-width: 768px) {
  .testimonials-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.testimonial-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--motion-fast) var(--ease-out);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 16px;
  right: 20px;
  font-size: 64px;
  font-weight: 700;
  color: var(--brand-accent);
  opacity: 0.15;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.testimonial-text {
  font-size: 13.5px;
  color: var(--fg-2);
  line-height: 1.7;
  font-style: italic;
  flex: 1;
}

.testimonial-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
}

.testimonial-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-indigo) 0%, var(--brand-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 15px;
  color: #000;
  font-weight: 700;
  flex-shrink: 0;
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.testimonial-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
}

.testimonial-role {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--fg-3);
}

.testimonial-outcome {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  color: var(--brand-accent);
  background: rgba(245, 166, 35, 0.08);
  border: 1px solid rgba(245, 166, 35, 0.2);
  padding: 3px 8px;
  border-radius: 3px;
  margin-left: auto;
  white-space: nowrap;
}


/* ==========================================================================
   Visual Polish Pass — Vercel Geist alignment
   更大留白 · section 层次 · 交互细节
   ========================================================================== */

/* ── Consistent section vertical rhythm ── */
.hero-section {
  padding-top: 96px;
  padding-bottom: 80px;
}

/* Services section gets its padding from inline style now (80px) */
/* Publications, Cases, Testimonials, FAQ — uniform 80px via inline styles */

/* ── Section header bottom border breathing room ── */
.section-header {
  padding-top: 0;
  padding-bottom: 28px;
  margin-bottom: 8px;
}

/* ── Service card — tighter, cleaner ── */
.service-card {
  padding: 32px 36px;
}

.service-title {
  font-size: 18px;
}

.service-desc {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--fg-2);
  margin-bottom: 16px;
}

/* ── Case preview cards — consistent grid icon color system ── */
/* amber = academic, blue = data, green = study abroad */

/* ── Testimonial card — larger quote mark, more space ── */
.testimonial-card {
  padding: 32px 28px;
  gap: 20px;
}

.testimonial-text {
  font-size: 13.5px;
  line-height: 1.75;
}

.testimonials-grid {
  gap: 16px;
  margin-top: 8px;
}

/* ── FAQ items — consistent hover glow ── */
.faq-item:hover {
  border-color: rgba(245, 166, 35, 0.35) !important;
  box-shadow: 0 0 0 1px rgba(245, 166, 35, 0.15);
}

/* ── Hero social proof strip ── */
.hero-section > div[style*="border-top"] {
  position: relative;
  z-index: 1;
}

/* ── Inline budget estimator inside services ── */
.services-checkbox-group {
  gap: 10px;
}

.checkbox-card {
  padding: 14px;
  gap: 10px;
}

.checkbox-title {
  font-size: 12.5px;
}

.estimator-totals {
  margin-top: 16px;
}

/* ── Remove ECharts load on homepage (not used anymore) ── */
/* Note: ECharts script still loaded but no containers reference it on homepage */

/* ── Publications list style ── */
.pub-thumb-col {
  display: none;
}

@media(min-width: 768px) {
  .pub-thumb-col {
    display: block;
  }
}

/* ── Responsive: case preview icon column ── */
@media(max-width: 480px) {
  /* collapse 3-col grid to 2-col on very small screens */
  [style*="grid-template-columns:56px 1fr auto"] {
    grid-template-columns: 1fr auto !important;
  }
  [style*="grid-template-columns:56px 1fr auto"] > div:first-child {
    display: none;
  }
}


/* ==========================================================================
   Publications Figure Cards — premium scientific chart layout
   ========================================================================== */

.pub-figure-card {
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: var(--bg-base);
  overflow: hidden;
  transition: border-color var(--motion-fast) var(--ease-out), box-shadow var(--motion-fast) var(--ease-out);
}

.pub-figure-card:hover {
  border-color: var(--border-strong);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
}

.pub-figure-head {
  padding: 24px 28px 18px;
}

.pub-tag-amber, .pub-tag-blue, .pub-tag-muted {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 3px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.pub-tag-amber {
  background: rgba(245, 166, 35, 0.1);
  color: var(--brand-accent);
  border: 1px solid rgba(245, 166, 35, 0.25);
}
.pub-tag-blue {
  background: rgba(91, 139, 247, 0.1);
  color: #5B8BF7;
  border: 1px solid rgba(91, 139, 247, 0.25);
}
.pub-tag-muted {
  color: var(--fg-3);
  letter-spacing: 0.08em;
}

.pub-figure-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 8px;
}
.pub-figure-title a {
  color: var(--fg-1);
  transition: color var(--motion-fast) var(--ease-out);
}
.pub-figure-title a:hover {
  color: var(--brand-accent);
}

.pub-figure-desc {
  font-size: 12.5px;
  color: var(--fg-2);
  line-height: 1.65;
}

.pub-figure-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--border-subtle);
}

@media(min-width: 720px) {
  .pub-figure-grid {
    grid-template-columns: 1.5fr 1fr;
  }
}

.pub-panel {
  padding: 18px 20px;
  background: linear-gradient(180deg, rgba(255,255,255,0.015) 0%, transparent 100%);
}

.pub-panel:first-child {
  border-bottom: 1px solid var(--border-subtle);
}

@media(min-width: 720px) {
  .pub-panel:first-child {
    border-bottom: none;
    border-right: 1px solid var(--border-subtle);
  }
}

.pub-panel-label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  color: var(--fg-2);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.03em;
}

.pub-panel-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: var(--brand-accent);
  color: #000;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
}

.pub-chart {
  width: 100%;
  height: 240px;
}

.pub-figure-foot {
  padding: 14px 24px 18px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.pub-caption {
  font-size: 11px;
  color: var(--fg-3);
  line-height: 1.55;
  flex: 1;
  min-width: 200px;
}

.pub-link {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--brand-accent);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: gap var(--motion-fast) var(--ease-out);
}
.pub-link:hover {
  gap: 8px;
}


/* ==========================================================================
   Paper figure rows — responsive 2-col → 1-col on mobile
   ========================================================================== */
.eye-fig-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 720px) {
  .eye-fig-row {
    grid-template-columns: 1fr;
  }
}


/* Generic 2-col split that stacks on mobile (used in service-ai-writing) */
.split-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 720px) {
  .split-2col {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}
