/* ─── AI Visibility Index — Design System ──────────── */
/* Light mode, subtle borders, high readability */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700;800&family=Noto+Sans+JP:wght@400;500;700&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  /* ── Colors (DESIGN.md §2.1) ──────────────────── */
  --bg-canvas: #F6F9FC;
  --bg-surface: #FFFFFF;
  --border-subtle: #E6EBEF;
  --border-hover: #CBD5E1;

  --text-slate: #0A2540;
  --text-body: #425466;
  --text-muted: #64748B;

  --accent-brand: #2563EB;
  --accent-brand-hover: #1E40AF;

  /* Engine colors (DESIGN.md §2.2) */
  --engine-gpt: #10B981;
  --engine-claude: #F59E0B;
  --engine-gemini: #3B82F6;
  --engine-pplx: #8B5CF6;

  /* Semantic feedback (DA tokens) */
  --color-success: #259D63;
  --color-error: #C74700;
  --color-warning: #B78F00;

  --gradient-hero: linear-gradient(135deg, #0A2540 0%, #2563EB 100%);
  --gradient-score: linear-gradient(135deg, #2563EB, #1D4ED8);

  /* ── Typography (DESIGN.md §3) ────────────────── */
  --font-sans: 'Outfit', 'Noto Sans JP', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* ── Spacing — 4px scale (DESIGN.md §5) ───────── */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-32: 128px;

  /* ── Radius — DA scale (DESIGN.md §5) ─────────── */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* ── Shadows — Stripe multi-layer (DESIGN.md §4) ─ */
  --shadow-card:
    0 2px 5px -1px rgba(50, 50, 93, 0.04),
    0 1px 3px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover:
    0 6px 12px -2px rgba(50, 50, 93, 0.1),
    0 3px 7px -3px rgba(0, 0, 0, 0.08);
  --shadow-overlay:
    0 15px 35px rgba(50, 50, 93, 0.1),
    0 5px 15px rgba(0, 0, 0, 0.07);

  /* ── Transitions (DESIGN.md §4) ───────────────── */
  --transition-base: 0.15s ease;
  --transition-shadow: box-shadow 0.2s ease, border-color 0.2s ease;
}

/* ─── Reset ──────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-canvas);
  color: var(--text-body);
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent-brand); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--accent-brand-hover); text-decoration: underline; }

/* Focus (DESIGN.md §7) */
:focus-visible {
  outline: 2px solid var(--accent-brand);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ─── Layout ─────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

/* ─── Header ─────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-5) 0; /* Expanded padding as requested */
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-slate);
}

.header__logo-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-hero);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-8);
}
.header__nav a {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
  letter-spacing: 0.01em;
}
.header__nav a:hover { color: var(--text-slate); }

/* Header CTA Button */
.header__cta {
  background: var(--accent-brand) !important;
  color: white !important;
  padding: 10px var(--space-5) !important;
  border-radius: var(--radius-full, 999px);
  font-weight: 600 !important;
  font-size: 0.8125rem !important;
  letter-spacing: 0.02em !important;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(37, 99, 235, 0.3);
}
.header__cta:hover {
  background: var(--accent-brand-hover) !important;
  color: white !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}
.header__cta--active {
  pointer-events: none;
}

/* ─── Hero Wrapper (Full-bleed Stripe/Vercel Tier) ─── */
.hero-wrapper {
  width: 100%;
  position: relative;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  overflow: hidden;
}

/* Leapy.jp Inspired Animated Background */
.fv-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 0;
}

.fv-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.6;
  animation: floatOrb 20s infinite ease-in-out alternate;
  will-change: transform;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: rgba(37, 99, 235, 0.4);
  top: -200px;
  left: -100px;
  animation-delay: 0s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: rgba(139, 92, 246, 0.3);
  bottom: -150px;
  right: -100px;
  animation-delay: -5s;
}

.orb-3 {
  width: 400px;
  height: 400px;
  background: rgba(16, 185, 129, 0.2);
  top: 30%;
  left: 40%;
  animation-delay: -10s;
}

.fv-glass {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(80px);
  -webkit-backdrop-filter: blur(80px);
  z-index: 1;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(50px, -50px) scale(1.1); }
  66% { transform: translate(-30px, 30px) scale(0.9); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero {
  position: relative;
  z-index: 2;
  padding-top: var(--space-16);
  padding-bottom: var(--space-10);
}

.stats {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  padding: var(--space-6) 0 var(--space-8) 0;
}

.hero__content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-12);
  animation: fadeInUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero__text {
  flex: 1;
  max-width: 600px;
}

.hero__gauge-wrapper {
  flex-shrink: 0;
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  border-radius: 32px;
  padding: var(--space-12) var(--space-10);
  min-width: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  /* Vercel/Stripe style 3D Tilt */
  transform: perspective(1200px) rotateY(-12deg) rotateX(8deg);
  transform-style: preserve-3d;
  box-shadow: 20px 30px 60px -15px rgba(10, 37, 64, 0.12), inset 0 2px 2px rgba(255,255,255,0.8);
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero__gauge-wrapper:hover {
  transform: perspective(1200px) rotateY(-3deg) rotateX(2deg) scale(1.05);
  box-shadow: 25px 40px 70px -15px rgba(10, 37, 64, 0.22), inset 0 2px 2px rgba(255,255,255,1);
}

.hero-gauge {
  display: block;
  transform: translateZ(40px); /* Floats the SVG above the card */
  filter: drop-shadow(0 15px 15px rgba(37,99,235,0.1));
}
.hero-gauge circle:nth-child(2) {
  animation: gaugeLoad 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes gaugeLoad {
  from { stroke-dasharray: 0 364; }
}

/* Gauge Card (Enhanced Score Widget) */
.gauge-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-4);
}

.gauge-card__meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
}
.gauge-card__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: 0.02em;
}
.gauge-card__rating {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.gauge-card__dist {
  width: 100%;
  max-width: 180px;
}
.gauge-card__bar {
  display: flex;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--border-subtle);
}
.gauge-card__bar-fill { height: 100%; }
.gauge-card__bar--excellent { background: #10B981; }
.gauge-card__bar--good { background: #3B82F6; }
.gauge-card__bar--average { background: #F59E0B; }
.gauge-card__bar--poor { background: #EF4444; }

.gauge-card__legend {
  display: flex;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.gauge-card__legend span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.gauge-card__legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.gauge-card__engines {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
  margin: var(--space-4) 0;
  width: 100%;
}
.gauge-card__engine {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 0.65rem;
  color: var(--text-muted);
}
.gauge-card__engine-score {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-slate);
  font-family: var(--font-mono);
}

.gauge-card__updated {
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.7;
}

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

@media (max-width: 768px) {
  .hero__content {
    flex-direction: column;
    text-align: center;
  }
  .hero__text {
    margin-bottom: var(--space-8);
  }
  .hero__actions {
    align-items: center !important;
  }
}


/* Badge with shimmer */
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--accent-brand);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}
.hero__badge::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.08), transparent);
  animation: shimmer 3s infinite;
}
@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 200%; }
}

.hero__badge-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-brand);
  border-radius: 50%;
  animation: pulse 2s infinite;
  box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

/* Editorial Text Formatting */
.hero__title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-5);
  color: var(--text-slate);
  text-wrap: balance;
}

.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-body);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: var(--space-10);
  /* Reset center align from earlier */
  margin-left: 0;
  margin-right: 0;
}
.hero__subtitle strong {
  color: var(--text-slate);
  font-weight: 700;
}

/* Hero Actions Layout */
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  align-items: flex-start;
}

.hero__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: var(--radius-full);
  background: var(--accent-brand);
  color: #FFFFFF !important;
  font-weight: 600;
  font-size: 1rem;
  box-shadow: 0 4px 14px 0 rgba(37,99,235,0.39);
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none !important;
}
.hero__cta:hover {
  background: #1d4ed8;
  color: #FFFFFF !important;
  transform: translateY(-2px);
  text-decoration: none !important;
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}

.hero__engines {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: var(--space-1);
  line-height: 1.6;
}
.hero__engines-list {
  color: var(--text-body);
  margin-left: var(--space-1);
}

/* Stats Styling (Clean / Solid) */
@media (max-width: 640px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
  .stats .stat-card { padding: var(--space-4); }
}

.stat-card {
  text-align: center;
  padding: var(--space-8);
  border-radius: var(--radius-xl);
  background: #FFFFFF;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.02);
  animation: fadeInUp 0.5s ease both;
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -8px rgba(0,0,0,0.06);
}

.stat-card__value {
  font-size: 2.5rem;
  font-weight: 800;
  font-family: var(--font-mono);
  line-height: 1;
  background: var(--gradient-score);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-card__label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-body);
  margin-top: var(--space-1);
}

/* Stat card icon — SVG */
.stat-card__icon {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  line-height: 1;
  display: flex;
  justify-content: center;
}

/* ─── Ranking Table ──────────────────────────────── */
.ranking-section {
  margin: var(--space-16) 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-6);
}

.section-title {
  font-size: 1.5rem;
  letter-spacing: -0.01em; /* Stripe tight heading */
  font-weight: 700;
  color: var(--text-slate);
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* Generic Card */
.card {
  background: #fff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
}

.form-actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
  justify-content: center;
}

/* M3: Flat table (Cloudflare Radar style) */
.ranking-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 calc(-1 * var(--space-4));
  padding: 0 var(--space-4);
}
.ranking-table {
  width: 100%;
  border-collapse: collapse;
}

.ranking-table th {
  text-align: left;
  padding: var(--space-2) var(--space-3);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 2px solid var(--border-subtle);
  white-space: nowrap;
}

.ranking-table td {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  transition: background var(--transition-base);
}

.ranking-table tbody tr:hover td {
  background: rgba(37, 99, 235, 0.02);
}

/* M6: Rank — plain numbers (Cloudflare Radar style) */
.rank {
  font-weight: 800;
  font-size: 1rem;
  width: 36px;
  text-align: center;
  color: var(--text-slate);
  font-family: var(--font-mono);
}
.rank--1 { color: var(--accent-brand); }
.rank--2 { color: var(--accent-brand); }
.rank--3 { color: var(--accent-brand); }

/* cursor pointer on rows */
.ranking-table tbody tr {
  cursor: pointer;
}

/* M2: Score gauge (SVG circle) */
.score-cell {
  display: inline-flex;
  align-items: center;
}
.score-gauge {
  display: block;
}
.score-gauge__arc {
  transition: stroke-dasharray 0.6s ease;
}

/* Score badge — Stripe Badge Pattern (DESIGN.md §2.2) */
.score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.9375rem;
  font-family: var(--font-mono);
  border: 1px solid transparent;
}

.score--excellent { background: rgba(5, 150, 105, 0.08); color: #065F46; border-color: rgba(5, 150, 105, 0.3); }
.score--good { background: rgba(37, 99, 235, 0.08); color: #1E40AF; border-color: rgba(37, 99, 235, 0.3); }
.score--average { background: rgba(217, 119, 6, 0.08); color: #92400E; border-color: rgba(217, 119, 6, 0.3); }
.score--poor { background: rgba(220, 38, 38, 0.08); color: #991B1B; border-color: rgba(220, 38, 38, 0.3); }
.score--invisible { background: rgba(100, 116, 139, 0.08); color: #475569; border-color: rgba(100, 116, 139, 0.3); }

/* Company name */
.company-name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text-slate);
}

.company-url {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

/* Industry tag */
.industry-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--bg-canvas);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
}

/* Engine scores (mini bars) */
.engine-scores {
  display: flex;
  gap: var(--space-1);
  align-items: center;
}

.engine-bar {
  height: 6px;
  border-radius: 3px;
  min-width: 4px;
  transition: width 0.5s ease, transform 0.15s ease;
  position: relative;
  cursor: help;
}
/* M7: CSS-only tooltip */
.engine-bar::after {
  content: attr(title);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) scale(0.9);
  background: var(--text-slate);
  color: white;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.6875rem;
  font-family: var(--font-mono);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.engine-bar:hover {
  transform: scaleY(1.8);
}
.engine-bar:hover::after {
  opacity: 1;
  transform: translateX(-50%) scale(1);
}
.engine-bar--chatgpt { background: var(--engine-gpt); }
.engine-bar--claude { background: var(--engine-claude); }
.engine-bar--gemini { background: var(--engine-gemini); }
.engine-bar--perplexity { background: var(--engine-pplx); }

/* A2: Engine legend */
.engine-legend {
  display: flex;
  gap: var(--space-6);
  margin-bottom: var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-body);
}
.engine-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.engine-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* ─── Distribution Chart (horizontal bars — modern) ─── */
.distribution {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin: var(--space-8) 0;
  padding: var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

.dist-row {
  display: grid;
  grid-template-columns: 110px 1fr 36px;
  align-items: center;
  gap: var(--space-3);
}

.dist-row__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-slate);
}

.dist-row__range {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  color: var(--text-muted);
  margin-top: 1px;
}

.dist-row__track {
  height: 8px;
  background: var(--bg-canvas);
  border-radius: 4px;
  overflow: hidden;
}

.dist-row__fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.dist-row__count {
  font-size: 0.875rem;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-slate);
  text-align: right;
}

/* ─── Methodology Card ───────────────────────────── */
.method-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  margin: var(--space-12) 0;
  box-shadow: var(--shadow-card);
}

.method-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--space-4);
  color: var(--text-slate);
}

.method-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  margin-top: var(--space-6);
  position: relative;
}

.method-step {
  text-align: center;
  padding: var(--space-5);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  position: relative;
}

.method-step__num {
  width: 36px;
  height: 36px;
  background: var(--accent-brand);
  color: white;
  border: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: var(--space-2);
}

.method-step__title {
  font-weight: 700;
  font-size: 0.9375rem;
  margin-bottom: var(--space-1);
  color: var(--text-slate);
}

.method-step__desc {
  font-size: 0.8125rem;
  color: var(--text-body);
  line-height: 1.5;
}

.method-card__desc {
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.7;
}

.method-card__footnote {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: var(--space-6);
}

/* ─── Blog ─────────────────────────────────────── */
.blog-main {
  padding-top: var(--space-16);
  padding-bottom: var(--space-16);
}

.blog-header {
  margin-bottom: var(--space-12);
}
.blog-header__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-slate);
  margin-bottom: var(--space-3);
}
.blog-header__subtitle {
  font-size: 1rem;
  color: var(--text-muted);
}

.blog-grid {
  display: grid;
  gap: var(--space-8);
}

.blog-card {
  background: white;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 0;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: row;
}
.blog-card:hover {
  border-color: var(--accent-brand);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.08);
}
.blog-card__thumb {
  display: block;
  overflow: hidden;
  flex-shrink: 0;
  width: 280px;
  margin: 12px;
  border-radius: 8px;
}
.blog-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}
.blog-card:hover .blog-card__thumb img {
  transform: scale(1.03);
}
.blog-card__body {
  padding: var(--space-6);
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
/* Fallback padding when no __body wrapper (e.g. related articles) */
.blog-card:not(:has(.blog-card__body)) {
  padding: var(--space-6);
}
.blog-card__category {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}
.blog-card__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-3);
  line-height: 1.4;
}
.blog-card__title a {
  color: inherit;
  text-decoration: none;
}
.blog-card__title a:hover { color: var(--accent-brand); }
.blog-card__desc {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.7;
  margin-bottom: var(--space-4);
}
.blog-card__meta {
  display: flex;
  gap: var(--space-4);
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Blog Post */
.blog-post__header {
  margin-bottom: var(--space-10);
}
.blog-post__back {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: var(--space-6);
  transition: color 0.2s;
}
.blog-post__back:hover { color: var(--accent-brand); }

.blog-post__category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent-brand);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-3);
}
.blog-post__title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-slate);
  line-height: 1.35;
  margin-bottom: var(--space-4);
}
.blog-post__meta {
  display: flex;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── Blog Post Figures ──────────────────────────── */
.blog-post__figure {
  margin: var(--space-8) 0;
  padding: 0;
}
.blog-post__figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}
.blog-post__figure--hero {
  margin: 0 0 var(--space-8) 0;
}
.blog-post__figure--hero img {
  border-radius: 8px 8px 0 0;
  max-height: 400px;
}

/* ─── White Card Body ─────────────────────────────── */
.blog-post__body {
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-body);
  background: var(--bg-surface);
  border-radius: 12px;
  padding: var(--space-10);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  min-width: 0;
}
.blog-post__body h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-slate);
  margin: var(--space-12) 0 var(--space-4) 0;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.blog-post__body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-slate);
  margin: var(--space-8) 0 var(--space-3) 0;
}
.blog-post__body p {
  margin-bottom: var(--space-5);
}
.blog-post__body a {
  color: var(--accent-brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.blog-post__body a:hover { opacity: 0.8; }

.blog-post__body strong {
  color: var(--text-slate);
  font-weight: 600;
}

.blog-post__lead {
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text-slate);
  line-height: 1.7;
}

.blog-post__callout {
  background: var(--bg-surface);
  border-left: 3px solid var(--accent-brand);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: var(--space-6);
  margin: var(--space-8) 0;
}
.blog-post__callout strong {
  display: block;
  margin-bottom: var(--space-3);
}
.blog-post__callout ul {
  margin: 0;
  padding-left: var(--space-5);
}
.blog-post__callout li {
  margin-bottom: var(--space-2);
}

.blog-post__cta-banner {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-10);
  margin-top: var(--space-16);
  text-align: center;
}
.blog-post__cta-banner h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-3);
}
.blog-post__cta-banner p {
  color: var(--text-body);
  margin-bottom: var(--space-6);
}
.blog-post__cta-banner .hero__cta {
  display: inline-flex;
}

/* ─── Footer (Multi-column Stripe-style) ─── */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-16) 0 var(--space-8) 0;
  margin-top: var(--space-16);
  background: var(--bg-surface);
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-10);
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-subtle);
}

.footer__brand { display: flex; flex-direction: column; gap: var(--space-3); }
.footer__logo {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-slate);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.footer__logo svg { width: 20px; height: 20px; }
.footer__tagline {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 280px;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.footer__heading {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-slate);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 var(--space-2) 0;
}
.footer__col a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.footer__col a:hover { color: var(--text-slate); }

.footer__bottom {
  padding-top: var(--space-8);
  text-align: center;
}
.footer__copyright {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.footer__disclaimer {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: var(--space-4) auto 0;
  line-height: 1.5;
}

/* ─── Blog Section on TOP ────────────────────────── */
.blog-section {
  margin-top: var(--space-16);
}
.blog-section__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-8);
}
.blog-section__header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-slate);
}
.blog-section__header a {
  font-size: 0.875rem;
  color: var(--accent-brand);
  text-decoration: none;
  font-weight: 500;
}
.blog-section__header a:hover { text-decoration: underline; }
.blog-section__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}
.blog-section__grid .blog-card {
  flex-direction: column;
}

/* ─── TOC Sidebar ─────────────────────────────────── */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--space-8);
  align-items: start;
  max-width: 1200px;
  margin: 0 auto;
}
.blog-toc {
  position: sticky;
  top: 96px;
  max-height: calc(100vh - 116px);
  overflow-y: auto;
}
.blog-toc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.blog-toc__title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0;
}
.toc-share {
  display: flex;
  align-items: center;
  gap: 4px;
}
.toc-share__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border-subtle);
  background: white;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
  font-size: 0;
}
.toc-share__btn:hover {
  border-color: var(--accent-brand);
  color: var(--accent-brand);
}
.blog-toc__list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.blog-toc__list li {
  margin-bottom: var(--space-2);
}
.blog-toc__list a {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 3px 0 3px 0;
  transition: color 0.3s ease;
  position: relative;
}
.blog-toc__list a::before {
  content: '';
  display: block;
  flex-shrink: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--border-subtle);
  transition: height 0.3s ease, border-radius 0.3s ease, background 0.3s ease;
}
.blog-toc__list a:hover {
  color: var(--text-body);
}
.blog-toc__list a:hover::before {
  background: var(--border-hover);
}
.blog-toc__list a.active {
  color: var(--accent-brand);
  font-weight: 500;
}
.blog-toc__list a.active::before {
  height: 20px;
  border-radius: 2px;
  background: var(--accent-brand);
}

/* ─── Share Buttons (Mobile only) ───────────────── */
.share-buttons--mobile {
  display: none;
}
.share-buttons--bottom {
  display: none;
}
.share-buttons__label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}
.share-buttons__row {
  display: flex;
  gap: var(--space-3);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: white;
  color: var(--text-muted);
  font-size: 0;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  padding: 0;
}
.share-btn:hover {
  border-color: var(--accent-brand);
  color: var(--accent-brand);
  transform: translateY(-2px);
}

/* ─── Related Articles ───────────────────────────── */
.related-articles {
  margin-top: var(--space-12);
  padding-top: var(--space-12);
  border-top: 1px solid var(--border-subtle);
}
.related-articles__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-6);
}
.related-articles__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-6);
}
.related-articles .blog-card {
  flex-direction: column;
  padding: var(--space-6);
}

/* ─── SP-only utility ────────────────────────────── */
.sp-only { display: none; }
@media (max-width: 768px) {
  .sp-only { display: inline; }
}

/* ─── Mobile Header CTA Only ────────────────────── */
.header__mobile-cta {
  display: none;
}

/* ─── Responsive ─────────────────────────────────── */
@media (max-width: 768px) {
  .container { padding: 0 var(--space-4); }
  .stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-3); padding-bottom: var(--space-6); }
  .stats .stat-card__value { font-size: 1.5rem; }
  .stats .stat-card__label { font-size: 0.7rem; }
  .ranking-table { font-size: 0.75rem; }
  .ranking-table .engine-col { display: none; }
  .ranking-table th { padding: var(--space-2) var(--space-2); }
  .ranking-table td { padding: var(--space-2) var(--space-2); }
  .rank { width: 28px; font-size: 0.85rem; }
  .company-name { font-size: 0.8rem; }
  .company-url { font-size: 0.7rem; }
  .industry-tag { font-size: 0.65rem; padding: 1px 6px; white-space: nowrap; }
  .method-steps { grid-template-columns: repeat(2, 1fr); }

  /* Header: hide full nav, show mobile CTA */
  .header__nav { display: none; }
  .header__mobile-cta {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--accent-brand);
    color: white !important;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
  }

  /* Hero: stack vertically */
  .hero { padding-top: var(--space-12); padding-bottom: var(--space-8); }
  .hero__content { flex-direction: column; text-align: center; gap: var(--space-8); }
  .hero__text { max-width: 100%; margin-bottom: 0; }
  .hero__title { font-size: 1.75rem; }
  .hero__subtitle { font-size: 0.9rem; }
  .hero__actions { align-items: center !important; }
  .hero__gauge-wrapper {
    transform: none !important;
    min-width: unset;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: var(--space-8);
  }
  .hero__gauge-wrapper:hover { transform: none !important; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--space-8); padding-bottom: var(--space-8); }
  .footer__brand { grid-column: 1 / -1; }
  .footer { padding: var(--space-10) 0 var(--space-6) 0; }
  .footer__bottom { padding-top: var(--space-5); }

  /* Blog */
  .blog-layout { grid-template-columns: 1fr; }
  .blog-toc { display: none; }
  .blog-section__grid { grid-template-columns: 1fr; }
  .blog-post__title { font-size: 1.5rem; }
  .blog-post__body { padding: var(--space-5); border-radius: 8px; }
  .blog-main { padding: 0 var(--space-5); }
  .share-buttons--mobile.share-buttons--bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-subtle);
  }

  /* SP TOC FAB Button */
  .sp-toc-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--accent-brand);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    -webkit-tap-highlight-color: transparent;
  }
  .sp-toc-fab.is-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .sp-toc-fab:active {
    transform: scale(0.92);
  }

  /* SP TOC Overlay */
  .sp-toc-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
  }
  .sp-toc-overlay.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  /* SP TOC Bottom Sheet */
  .sp-toc-sheet {
    display: flex;
    flex-direction: column;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-height: 85vh;
    background: white;
    border-radius: 20px 20px 0 0;
    z-index: 1001;
    transform: translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
    overflow: hidden;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.12);
  }
  .sp-toc-sheet.is-open {
    transform: translateY(0);
  }
  .sp-toc-sheet__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 12px;
    border-bottom: 1px solid var(--border-subtle);
  }
  .sp-toc-sheet__header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: var(--border-default);
  }
  .sp-toc-sheet__title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  .sp-toc-sheet__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: var(--bg-surface);
    border-radius: 50%;
    color: var(--text-muted);
    cursor: pointer;
  }
  .sp-toc-sheet__list {
    list-style: none;
    padding: 12px 24px 20px;
    margin: 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
  }
  .sp-toc-sheet__list li + li {
    margin-top: 0;
  }
  .sp-toc-sheet__list a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
    transition: color 0.2s;
  }
  .sp-toc-sheet__list li:last-child a {
    border-bottom: none;
  }
  .sp-toc-sheet__list a::before {
    content: '';
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-default);
    flex-shrink: 0;
    transition: all 0.3s;
  }
  .sp-toc-sheet__list a.active {
    color: var(--accent-brand);
    font-weight: 500;
  }
  .sp-toc-sheet__list a.active::before {
    width: 4px;
    height: 20px;
    border-radius: 2px;
    background: var(--accent-brand);
  }

  /* SP Sheet Actions Row */
  .sp-toc-sheet__actions {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .sp-toc-sheet__share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: white;
    color: var(--text-muted);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    padding: 0;
    font-size: 0;
  }
  .sp-toc-sheet__share-btn:hover,
  .sp-toc-sheet__share-btn:active {
    border-color: var(--accent-brand);
    color: var(--accent-brand);
  }

  /* SP Sheet Compact Author */
  .sp-toc-sheet__author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 24px calc(28px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--border-subtle);
    flex-shrink: 0;
  }
  .sp-toc-sheet__author img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
  }
  .sp-toc-sheet__author-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
  }
  .sp-toc-sheet__author-handle {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
  }

  /* Inline Author Card (SP only) */
  .author-card--inline {
    display: block;
    margin: var(--space-8) 0;
    padding: var(--space-6);
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
  }

  /* Ranking table horizontal scroll */
  .ranking-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* SP TOC elements hidden on desktop */
@media (min-width: 769px) {
  .sp-toc-fab,
  .sp-toc-overlay,
  .sp-toc-sheet { display: none !important; }
  .author-card--inline { display: none; }
  .share-buttons--mobile { display: none; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: repeat(3, 1fr); gap: var(--space-2); }
  .stats .stat-card__value { font-size: 1.25rem; }
  .stats .stat-card__label { font-size: 0.65rem; }
  .hero__title { font-size: 1.5rem; }
  .hero__subtitle { font-size: 0.85rem; }
  .hero__cta { width: 100%; }
  .footer__grid { grid-template-columns: 1fr; }
  .blog-header__title { font-size: 1.5rem; }
}

/* ─── Breadcrumb ─────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: var(--space-6);
  padding-top: var(--space-4);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  white-space: nowrap;
  flex-wrap: nowrap;
}
.breadcrumb::-webkit-scrollbar { display: none; }
.breadcrumb a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.15s;
  flex-shrink: 0;
}
.breadcrumb a:hover { color: var(--accent-brand); }
.breadcrumb__sep {
  color: var(--border-hover);
  font-size: 0.7rem;
  flex-shrink: 0;
}
.breadcrumb__current {
  color: var(--text-body);
  font-weight: 500;
  flex-shrink: 0;
}

.blog-toc__inner {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: var(--space-6);
}

/* ─── Author Card ─────────────────────────────────── */
.author-card {
  background: var(--bg-surface);
  border-radius: 12px;
  padding: var(--space-6);
  border: 1px solid var(--border-subtle);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.author-card__title {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-4);
}
.author-card__profile {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.author-card__avatar-img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-subtle);
}
.author-card__name-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.author-card__name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-slate);
  line-height: 1.3;
}
.author-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color 0.2s;
}
.author-card__icon:hover {
  color: var(--accent-brand);
}
.author-card__handle {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.author-card__bio {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 var(--space-4) 0;
}
.author-card__products-title {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-2);
}
.author-card__products {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.author-card__products a {
  font-size: 0.78rem;
  color: var(--text-body);
  text-decoration: none;
  padding: 4px 0;
  transition: color 0.15s;
}
.author-card__products a:hover { color: var(--accent-brand); }

/* ─── Article Tags ────────────────────────────────── */
.blog-post__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}
.blog-post__tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  color: var(--accent-brand);
  background: rgba(37, 99, 235, 0.06);
  padding: 3px 10px;
  border-radius: 4px;
  text-decoration: none;
  transition: background 0.15s;
  font-weight: 500;
}
.blog-post__tag:hover {
  background: rgba(37, 99, 235, 0.12);
}

/* ═══════════════════════════════════════════════════════
   CONTENT DECORATION DESIGN SYSTEM (Zenn-inspired)
   コードブロック / 引用 / アラート / テーブル / リスト
   ═══════════════════════════════════════════════════════ */

/* ─── Code Blocks ─────────────────────────────────── */
.blog-post__body .code-block-wrapper {
  position: relative;
  margin: var(--space-6) 0;
}

/* File name tab */
.blog-post__body .code-block-wrapper .code-filename {
  display: inline-block;
  background: #181825;
  color: #a6adc8;
  font-size: 0.75rem;
  font-family: var(--font-mono);
  padding: 6px 16px;
  border-radius: 8px 8px 0 0;
  border: 1px solid rgba(255,255,255,0.06);
  border-bottom: none;
  margin-bottom: -1px;
  position: relative;
  z-index: 1;
}

.blog-post__body pre {
  background: #1e1e2e;
  color: #cdd6f4;
  border-radius: 8px;
  padding: var(--space-5) var(--space-6);
  padding-right: 60px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.7;
  margin: var(--space-6) 0;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  tab-size: 2;
  -moz-tab-size: 2;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,0.15) transparent;
}
.blog-post__body .code-block-wrapper pre {
  margin-top: 0;
  border-radius: 0 8px 8px 8px;
}
.blog-post__body pre::-webkit-scrollbar { height: 6px; }
.blog-post__body pre::-webkit-scrollbar-track { background: transparent; }
.blog-post__body pre::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

/* Copy button */
.blog-post__body .code-copy-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  color: #a6adc8;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2;
  padding: 0;
  font-size: 0;
}
.blog-post__body .code-copy-btn:hover {
  background: rgba(255,255,255,0.12);
  color: #cdd6f4;
}
.blog-post__body .code-copy-btn.copied {
  color: #a6e3a1;
  border-color: rgba(166,227,161,0.3);
}

.blog-post__body code {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

/* Syntax highlighting (Catppuccin Mocha inspired) */
.blog-post__body pre .token-keyword { color: #cba6f7; }
.blog-post__body pre .token-string { color: #a6e3a1; }
.blog-post__body pre .token-comment { color: #6c7086; font-style: italic; }
.blog-post__body pre .token-function { color: #89b4fa; }
.blog-post__body pre .token-number { color: #fab387; }
.blog-post__body pre .token-operator { color: #89dceb; }
.blog-post__body pre .token-property { color: #f38ba8; }
.blog-post__body pre .token-tag { color: #f38ba8; }
.blog-post__body pre .token-attr { color: #fab387; }
.blog-post__body pre .token-value { color: #a6e3a1; }
.blog-post__body pre .token-type { color: #f9e2af; }
.blog-post__body pre .token-diff-add { color: #a6e3a1; background: rgba(166,227,161,0.1); display: inline-block; width: 100%; }
.blog-post__body pre .token-diff-del { color: #f38ba8; background: rgba(243,139,168,0.1); display: inline-block; width: 100%; }

/* ─── Inline Code ─────────────────────────────────── */
.blog-post__body :not(pre) > code {
  background: rgba(37, 99, 235, 0.07);
  color: #1e40af;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 0.86em;
  font-weight: 500;
  border: 1px solid rgba(37, 99, 235, 0.1);
  word-break: break-word;
}

/* ─── Blockquote ──────────────────────────────────── */
.blog-post__body blockquote {
  border-left: 3px solid var(--border-hover);
  margin: var(--space-6) 0;
  padding: var(--space-4) var(--space-6);
  background: rgba(100, 116, 139, 0.04);
  border-radius: 0 8px 8px 0;
  color: var(--text-body);
  font-size: 0.95rem;
}
.blog-post__body blockquote p {
  margin: 0;
}
.blog-post__body blockquote p + p {
  margin-top: var(--space-3);
}

/* ─── Alert Blocks (GitHub Alerts Style) ──────────── */
.blog-post__body .alert-block {
  margin: var(--space-6) 0;
  padding: var(--space-5) var(--space-6);
  border-radius: 8px;
  border-left: 4px solid;
  font-size: 0.92rem;
  line-height: 1.7;
}
.blog-post__body .alert-block__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.blog-post__body .alert-block__header svg {
  flex-shrink: 0;
}
.blog-post__body .alert-block p {
  margin: var(--space-2) 0 0 0;
}
.blog-post__body .alert-block p:first-of-type {
  margin-top: 0;
}

/* NOTE — Blue */
.blog-post__body .alert-block--note {
  background: rgba(37, 99, 235, 0.05);
  border-color: #3b82f6;
}
.blog-post__body .alert-block--note .alert-block__header {
  color: #2563eb;
}

/* TIP — Green */
.blog-post__body .alert-block--tip {
  background: rgba(5, 150, 105, 0.05);
  border-color: #10b981;
}
.blog-post__body .alert-block--tip .alert-block__header {
  color: #059669;
}

/* IMPORTANT — Purple */
.blog-post__body .alert-block--important {
  background: rgba(139, 92, 246, 0.05);
  border-color: #8b5cf6;
}
.blog-post__body .alert-block--important .alert-block__header {
  color: #7c3aed;
}

/* WARNING — Yellow/Amber */
.blog-post__body .alert-block--warning {
  background: rgba(217, 119, 6, 0.05);
  border-color: #f59e0b;
}
.blog-post__body .alert-block--warning .alert-block__header {
  color: #d97706;
}

/* CAUTION — Red */
.blog-post__body .alert-block--caution {
  background: rgba(220, 38, 38, 0.05);
  border-color: #ef4444;
}
.blog-post__body .alert-block--caution .alert-block__header {
  color: #dc2626;
}

/* ─── Tables ──────────────────────────────────────── */
.blog-post__body .table-wrapper {
  margin: var(--space-6) 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
  scrollbar-width: thin;
}
.blog-post__body .table-wrapper::-webkit-scrollbar { height: 6px; }
.blog-post__body .table-wrapper::-webkit-scrollbar-thumb { background: var(--border-subtle); border-radius: 3px; }

.blog-post__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  line-height: 1.6;
  min-width: 400px;
}
.blog-post__body table thead th {
  background: var(--bg-canvas);
  font-weight: 600;
  color: var(--text-slate);
  text-align: left;
  padding: var(--space-3) var(--space-4);
  border-bottom: 2px solid var(--border-subtle);
  white-space: nowrap;
  font-size: 0.82rem;
  letter-spacing: 0.01em;
}
.blog-post__body table tbody td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-body);
  vertical-align: top;
}
.blog-post__body table tbody tr:last-child td {
  border-bottom: none;
}
/* Stripe rows */
.blog-post__body table tbody tr:nth-child(even) {
  background: rgba(246, 249, 252, 0.6);
}
.blog-post__body table tbody tr:hover {
  background: rgba(37, 99, 235, 0.03);
}

/* ─── Lists (Custom Decoration) ──────────────────── */
/* Unordered lists — Custom bullet */
.blog-post__body ul {
  margin: var(--space-4) 0;
  padding-left: 0;
  list-style: none;
}
.blog-post__body ul li {
  position: relative;
  padding-left: var(--space-6);
  margin-bottom: var(--space-2);
}
.blog-post__body ul li::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0.7em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-brand);
  opacity: 0.5;
}

/* Nested unordered lists */
.blog-post__body ul ul {
  margin: var(--space-2) 0;
}
.blog-post__body ul ul li::before {
  width: 5px;
  height: 5px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--text-muted);
  opacity: 0.4;
}

/* Ordered lists — Custom numbering */
.blog-post__body ol {
  margin: var(--space-4) 0;
  padding-left: 0;
  list-style: none;
  counter-reset: ol-counter;
}
.blog-post__body ol li {
  position: relative;
  padding-left: var(--space-8);
  margin-bottom: var(--space-3);
  counter-increment: ol-counter;
}
.blog-post__body ol li::before {
  content: counter(ol-counter);
  position: absolute;
  left: 0;
  top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.08);
  color: var(--accent-brand);
  font-size: 0.72rem;
  font-weight: 700;
  font-family: var(--font-mono);
}

/* ─── Horizontal Rule ─────────────────────────────── */
.blog-post__body hr {
  border: none;
  height: 1px;
  background: var(--border-subtle);
  margin: var(--space-10) 0;
}

/* ─── Definition List (dl/dt/dd) ──────────────────── */
.blog-post__body dl {
  margin: var(--space-6) 0;
}
.blog-post__body dt {
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-1);
  font-size: 0.95rem;
}
.blog-post__body dd {
  margin-left: var(--space-6);
  margin-bottom: var(--space-4);
  color: var(--text-body);
  font-size: 0.92rem;
  padding-left: var(--space-4);
  border-left: 2px solid var(--border-subtle);
}

/* ─── Keyboard Shortcut (kbd) ─────────────────────── */
.blog-post__body kbd {
  display: inline-block;
  padding: 2px 6px;
  font-family: var(--font-mono);
  font-size: 0.8em;
  color: var(--text-slate);
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.06), inset 0 -1px 0 rgba(0,0,0,0.06);
  vertical-align: baseline;
  line-height: 1.4;
}

/* ─── Figure / Image Caption ──────────────────────── */
.blog-post__body figure {
  margin: var(--space-8) 0;
  padding: 0;
}
.blog-post__body figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  object-fit: cover;
}
.blog-post__body figcaption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
  font-style: italic;
}


/* ─── h2 Scroll Offset ───────────────────────────── */
.blog-post__body h2[id] {
  scroll-margin-top: 100px;
}

/* ─── Reduced Motion (DESIGN.md §8) ──────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ─── Blog Card SP Layout ────────────────────────── */
@media (max-width: 768px) {
  .blog-card {
    flex-direction: column;
  }
  .blog-card__thumb {
    width: auto;
    margin: 12px 12px 0 12px;
    aspect-ratio: 16 / 9;
  }
}

/* ═══════════════════════════════════════════════════════
   TOOLS PAGE — CSS-only (inline style migration)
   ═══════════════════════════════════════════════════════ */

/* Hero content: centered single-column layout */
.hero__content--tools {
  max-width: 100%;
  text-align: center;
  flex-direction: column;
  align-items: center;
}

/* Title: responsive clamped sizing */
.hero__title--tools {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  max-width: 700px;
}

/* Main section spacing */
.tools-main {
  padding-top: var(--space-12);
  padding-bottom: var(--space-16);
}

/* Checker section */
.tools-checker {
  max-width: 640px;
  margin: 0 auto var(--space-16) auto;
}
.tools-checker__card {
  padding: var(--space-8);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  background: var(--bg-white, #fff);
}

/* Form label */
.tools-form__label {
  display: block;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: var(--space-3);
  color: var(--text-slate);
}

/* Form input */
.tools-form__input {
  flex: 1;
  min-width: 200px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
.tools-form__input:focus {
  border-color: var(--accent-brand);
}

/* Form submit button */
.tools-form__submit {
  padding: var(--space-3) var(--space-6);
  background: var(--accent-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s;
  white-space: nowrap;
}
.tools-form__submit:hover {
  opacity: 0.9;
}

/* Form hint text */
.tools-form__hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* Result area */
.tools-result {
  display: none;
  margin-top: var(--space-6);
}

/* Result found section */
.tools-result__found {
  display: none;
}
.tools-result__body {
  text-align: center;
  padding: var(--space-6) 0;
}
.tools-result__gauge {
  margin: 0 auto var(--space-4) auto;
}
.tools-result__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-slate);
  margin-bottom: var(--space-1);
}
.tools-result__url {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-bottom: var(--space-4);
}
.tools-result__engines {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.tools-result__rank {
  font-size: 0.9rem;
  color: var(--text-body);
}

/* Engine score card (JS-rendered inside result-engines grid) */
.tools-engine-card {
  text-align: center;
  padding: var(--space-3);
  background: var(--bg-canvas);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
}
.tools-engine-card__name {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.tools-engine-card__score {
  font-size: 1.1rem;
  font-weight: 800;
}

/* Result CTA divider */
.tools-result__cta {
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--space-4);
  margin-top: var(--space-4);
}
.tools-result__cta p {
  font-size: 0.9rem;
  color: var(--text-body);
  text-align: center;
}
.tools-result__cta a {
  color: var(--accent-brand);
  font-weight: 700;
}

/* Result not found */
.tools-result__notfound {
  display: none;
  text-align: center;
  padding: var(--space-6) 0;
}
.tools-result__notfound-icon {
  margin: 0 auto var(--space-3) auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tools-result__notfound h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-2);
}
.tools-result__notfound p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.tools-result__request-btn {
  display: inline-block;
  padding: var(--space-3) var(--space-6);
  background: var(--accent-brand);
  color: #fff;
  border-radius: var(--radius-lg);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.2s;
}
.tools-result__request-btn:hover {
  opacity: 0.9;
}

/* Features section (why AI visibility matters) */
.tools-features {
  max-width: 800px;
  margin: 0 auto var(--space-16) auto;
}
.tools-features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
}
.tools-feature__icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-lg);
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
}
.tools-feature__title {
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-2);
  font-size: 1rem;
}
.tools-feature__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* FAQ section */
.tools-faq {
  max-width: 640px;
  margin: 0 auto;
}
.tools-faq__list {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.tools-faq__title {
  font-weight: 700;
  color: var(--text-slate);
  margin-bottom: var(--space-2);
  font-size: 0.95rem;
}
.tools-faq__answer {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

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